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 / si / harness / coder / eval / cat.om

23 lines · 543 bytes Raw Blame History
1note cat: copy standard input to standard output. score.sh runs it through the om2 gate with a program's saved
2note output as input and the task's expected output as the expected stdout, so the comparison is the gate's.
3note A short write continues; a failed write exits 90, a failed read exits 91.
4global buf uchar 65536
5fn main to int
6n = read 0 buf 0 len buf
7while gt n 0
8p = ulong 0
9e = ulong n
10while lt p e
11k = write 1 buf p sub e p
12if le k 0
13exit 90
14end
15p = add p ulong k
16end
17n = read 0 buf 0 len buf
18end
19if lt n 0
20exit 91
21end
22ret 0
23end