9 comments

[ 3.5 ms ] story [ 34.7 ms ] thread
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.

Exactly. It's not that interesting. But why should I care if others don't care either? Anyhow, I decided for 2013 that I'll submit anything I write related to programming on HN.
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.

If we're bringing Scala into it, I'd like to see a Scala compiler in Brainfuck. That might keep the esolang people quiet for a bit :)
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/

Looks pretty cool, I think I'll try doing something like that!
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.