ocaml: phase 5.1 brainfuck.ml baseline (subset interpreter)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 21s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 21s
Five '+++++.' groups, cumulative accumulator 5+10+15+20+25 = 75. This is a brainfuck *subset* — only > < + - . (no [ ] looping). That's intentional: the goal is to stress imperative idioms that the recently added Array module + array indexing syntax + s.[i] make ergonomic, all in one program. Exercises: Array.make 256 0 arr.(!ptr) arr.(!ptr) <- arr.(!ptr) + 1 prog.[!pc] ref / ! / := while + nested if/else if/else if for op dispatch 25 baseline programs total.
This commit is contained in:
@@ -407,6 +407,12 @@ _Newest first._
|
||||
binary search tree (`type 'a tree = Leaf | Node of 'a * 'a tree *
|
||||
'a tree`) with insert + in-order traversal. Tests parametric ADT,
|
||||
recursive match, List.append, List.fold_left.
|
||||
- 2026-05-09 Phase 5.1 — brainfuck.ml baseline (subset interpreter,
|
||||
five `+++++.` groups → cumulative 5+10+15+20+25 = 75). No loop
|
||||
brackets — the interpreter only handles `> < + - .`, but that's
|
||||
enough to exercise Array.make, arr.(i), arr.(i) <- v, prog.[!pc],
|
||||
ref/!/:=, while loop with conditional update via nested if/else.
|
||||
25 baseline programs total.
|
||||
- 2026-05-09 Phase 5.1 — sieve.ml baseline (Sieve of Eratosthenes,
|
||||
count of primes ≤ 50 = 15). Stresses Array.make + arr.(i) +
|
||||
arr.(i) <- v + nested for/while loops + `begin..end` block. 24
|
||||
|
||||
Reference in New Issue
Block a user