

Small Brainf*ck Interpreter in Scala - dindresto
http://dindresto.tumblr.com/post/40418904638/small-bf-interpreter-in-scala

======
rolux
As any other Brainfuck interpreter, it shows that Brainfuck is a nice, simple,
small language. Things become mildly more interesting when you write a
transpiler, lets say to Scala.

See here for a sketch of a "Brainfuck IDE" that compiles to JavaScript (just
click "load", then "compile"): <http://rolux.org/brainfuck/>

~~~
dindresto
Looks pretty cool, I think I'll try doing something like that!

~~~
rolux
As you can see in the example above, there are a few features that can make a
Brainfuck developer's life less miserable, like source formatting, error
handling or logging.

------
jdiez17
Sorry, but I must be missing what's so interesting.

Great, you wrote a Brainfuck (why do people insist in censoring themselves?!)
in Scala. You didn't even implement dynamic memory resizing.

Again, not sure why this is here.

~~~
evincarofautumn
Agreed, more or less. Brainfuck implementations are not generally interesting,
except as proofs of Turing-completeness for other esoteric languages. And
there are many more esolangs out there with much wilder and more beautiful
semantics than Brainfuck. Implementing _those_ can be a really valuable
learning experience.

Also, if we’re bringing Scala into it, I would be more interested to see a
type-level implementation.

~~~
rolux
> And there are many more esolangs out there with much wilder and more
> beautiful semantics than Brainfuck. Implementing those can be a really
> valuable learning experience.

Like, for example, INTERCAL with threading via `comefrom`:
<http://www.cse.unsw.edu.au/~malcolmr/intercal/threaded.html>

~~~
evincarofautumn
Lazy K[1] and Funciton[2] are two of my personal favourites.

[1]: <http://homepages.cwi.nl/~tromp/cl/lazy-k.html>

[2]: <http://esolangs.org/wiki/Funciton>

