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 / selftest / src / st7-cheat.om

17 lines · 551 bytes Raw Blame History
1note st7-cheat (selftest only): a program that does not solve its task but copies the task's expected output,
2note named by its absolute path, to stdout. The stub puts the task directory in place of @TASKS@. It exits 0 also
3note when it cannot open the file, so only what the scorer lets it read decides its score.
4text p "@TASKS@/st7-cheat/expected.out"
5global buf uchar 4096
6fn main to int
7fd = fopen p 0 len p 0 0
8if lt fd 0
9ret 0
10end
11n = read int fd buf 0 len buf
12while gt n 0
13w = write 1 buf 0 ulong n
14n = read int fd buf 0 len buf
15end
16ret 0
17end