4 ms·
Small Brainf*ck Interpreter in Scala
- jdiez17 14y agoSorry, 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.
- dindresto 14y agoExactly. 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.
- evincarofautumn 14y agoAgreed, 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.
- jrabone 14y agoIf 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 :)
- rolux 14y ago> 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 http://www.cse.unsw.edu.au/~malcolmr/intercal/threaded.html
- evincarofautumn 14y agoLazy K[1] and Funciton[2] are two of my personal favourites. [1]: http://homepages.cwi.nl/~tromp/cl/lazy-k.html http://homepages.cwi.nl/~tromp/cl/lazy-k.html [2]: http://esolangs.org/wiki/Funciton http://esolangs.org/wiki/Funciton
- rolux 14y agoAs 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/ http://rolux.org/brainfuck/