interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / aienux / connector / gates / hostile / passwd.om

16 lines · 297 bytes Raw Blame History
1note hostile probe: read /etc/passwd; prints its first 64 bytes, or "open -1"
2text pw "/etc/passwd"
3text m1 "open -1\n"
4fn main to int
5b = new uchar 64 0
6fd = fopen pw 0 len pw 0 0
7if lt fd 0
8k = write 1 m1 0 len m1
9ret 0
10end
11n = read int fd b 0 64
12if gt n 0
13k = write 1 b 0 ulong n
14end
15ret 0
16end