Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/omc/sites/found-xarray-1.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / omc / sites / found-xarray-1.om` 36 lines ยท 743 bytes Raw Blame History 1 target x86linux 2 note ok.om: an OM-2 function unit (no fn main) using every function-mode host word: getuid geteuid 3 note getgid getegid, stat lstat fopen fstat fclose, and read. Compiles (exit 0) since the om2 function-mode 4 note host-word subset; the same unit without the om2 line is error 9 (om1.om). 5 om2 6 fn ids to ulong 7 a = ulong getuid 8 b = ulong geteuid 9 c = ulong getgid 10 e = ulong getegid 11 ret add add a b add c e 12 end 13 fn peek p view uchar * to long 14 s = new uchar 128 0 15 r = lstat p 0 len p s 0 128 16 if ne r 0 17 if ne r 0 18 ret r 19 end 20 r = stat p 0 len p s 0 128 21 if ne r 0 22 ret r 23 end 24 fd = fopen p 0 len p 559104 0 25 if lt fd 0 26 ret fd 27 end 28 b = new uchar 16 0 29 k = fstat int fd s 0 128 30 n = read int fd b 0 16 31 z = fclose int fd 32 if ne k 0 33 ret k 34 end 35 ret n 36 end