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 / apps / interplane-forge / galaxy / cli.om

42 lines · 562 bytes Raw Blame History
1note cli.om: galaxy as a filter. stdin is the feed (or "css"), stdout the page. Composed after page.om.
2fn rdin to void
3n = ulong 0
4k = long 1
5while gt k 0 bound 65536
6k = read 0 ib n sub 65535 n
7if gt k 0
8n = add n ulong k
9end
10end
11put ibl 0 n
12end
13fn flush to int
14n = get obl 0
15o = ulong 0
16while lt o n bound 1048576
17k = write 1 ob o sub n o
18if le k 0
19ret 1
20end
21o = add o ulong k
22end
23ret 0
24end
25fn main to int
26rdin
27n = get ibl 0
28mode = ulong 0
29if ge n 3
30if eq get ib 0 99
31if eq get ib 1 115
32mode = ulong 1
33end
34end
35end
36if eq mode 1
37css
38else
39page
40end
41ret flush
42end