progs/while-arrays/compile_bfc.sc
changeset 825 dca072e2bb7d
parent 817 89f9c68fc417
child 829 dc3c35673e94
--- a/progs/while-arrays/compile_bfc.sc	Fri Feb 26 08:47:18 2021 +0000
+++ b/progs/while-arrays/compile_bfc.sc	Thu May 13 13:10:38 2021 +0100
@@ -248,12 +248,12 @@
 }
 
 // a benchmark program (counts down from 'Z' to 'A')
-@doc(" Benchmark 'Z' to 'A'.")
+//@doc(" Benchmark 'Z' to 'A'.")
 @main
 def bfc0() = bf_run(read(pwd / "benchmark.bf"), "bench")
 
 
-@doc(" Sierpinski triangle.")
+//@doc(" Sierpinski triangle.")
 @main
 def bfc1() = bf_run(read(pwd / "sierpinski.bf"), "sier")
 
@@ -261,7 +261,7 @@
 val bf2 = """++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]
       >>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++."""
 
-@doc(" Hello world.")
+//@doc(" Hello world.")
 @main
 def bfc2() = bf_run(bf2, "hello")
 
@@ -279,7 +279,7 @@
       [-]]<<[>>+>+<<<-]>>>[<<<+>>>-]<<[<+>-]>[<+>-]<<<-]
       [-]++++++++++."""
 
-@doc(" Fibonacci numbers.")
+//@doc(" Fibonacci numbers.")
 @main
 def bfc3() = bf_run(bf3, "fibs")
 
@@ -290,7 +290,7 @@
 // takes approximately 10 minutes to parse with our parser combinators,
 // and approximately 30 seconds with Ammonite's fastparse.
 
-@doc(" Mandelbrot set.")
+//@doc(" Mandelbrot set.")
 @main
 def bfc4() = bf_run(read(pwd / "mandelbrot.bf"), "mandelbrot")
 
@@ -300,9 +300,13 @@
 //@main
 //def bfc5() = bf_run(read(pwd / "collatz.bf"), "coll")
 
+// this unfortunately hits the capacity of the JVM, even with optimisations
+//@doc(" Towers of Hanoi.")
+//@main
+//def bfc6() = bf_run(read(pwd / "hanoi.bf"), "hanoi")
 
 //
-@doc(" All benchmarks.")
+//@doc(" All benchmarks.")
 @main
 def all() = { bfc0(); bfc1(); bfc2(); bfc3(); bfc4() }