๐Ÿ‘คnirvanis๐Ÿ•‘10y๐Ÿ”ผ103๐Ÿ—จ๏ธ37

(Replying to PARENT post)

There's of course also a optimized brainfuck compiler written in sed: https://github.com/stedolan/bf.sed
๐Ÿ‘คGurkenmaster๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

I while ago I wrote a simple Brainfuck interpreter, JIT and compiler (https://github.com/brianquinlan/brainfuck-jit).

The compiler implements the "Operation offsets" optimization as described in the article. It is actually pretty straightforward. This function converts a map of offset => delta to x86-64 instructions: https://github.com/brianquinlan/brainfuck-jit/blob/master/bf...

and the function following it generates that table.

๐Ÿ‘คbquinlan๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

I have a (at the initial release, and possibly still) "state-of-the-art" Brainfuck compiler to C [1], which can compile a "Hello, world" program into a single `puts` call.

Some ProTip(tm): JITing Brainfuck doesn't fare a lot; for example, resetting the cell is an O(n) operation in BF, so JIT alone doesn't reduce this into O(1). Some kind of scalar evolution has to be implemented to reduce this O(n) factor. More sophiscated liveness and range analysis might be required to go further (esotope-bfc didn't get there, anyway).

[1] https://bitbucket.org/lifthrasiir/esotope-bfc

๐Ÿ‘คlifthrasiir๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

http://calmerthanyouare.org/2014/09/30/brainfuck-java.html some of the issues encountered when writing a brainfuck-to-java compiler in brainfuck

Yo dawg, etc

๐Ÿ‘คJetSpiegel๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

As a comparison, what does it look like if you enable GCC optimization?
๐Ÿ‘คsp332๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Brainfuck is a really beautiful language. It was the first language I wrote a parser for, and it's incredibly beautiful in its simplicity.
๐Ÿ‘คdebacle๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Is there an implementation of this that converts any BF code into C/C# code? Might make a handy web-based tool.

It would be interesting to apply this to AI generated programs (http://www.primaryobjects.com/CMS/Article163)

๐Ÿ‘คprimaryobjects๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Though rather juvenile I appreciated this interpreter that maps instructions to offensive four letter words.

NSFW text. ff/feckfeck/f* ckf* ck.

http://web.archive.org/web/20050318095341/http://www.chilliw...

http://web.archive.org/web/20050311055852/http://www.chilliw...

๐Ÿ‘คabandonliberty๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

I'm working on implementing the JVM in Brainfuck
๐Ÿ‘คninjakeyboard๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Now peg it against http://mazonka.com/brainf/, the bff4lnr version :)
๐Ÿ‘คhuhtenberg๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

This sounds cool, but I was not sure till halfway through the post if it's like an Onion article or not.
๐Ÿ‘คYadi๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

How long until someone makes a homoiconic version of brainfuck?
๐Ÿ‘คFede_V๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Who is hiring brainfuck developers these days?
๐Ÿ‘คchucksmart๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Beautiful insanity.
๐Ÿ‘คblt๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Kudos, I guess...
๐Ÿ‘คnemo๐Ÿ•‘10y๐Ÿ”ผ0๐Ÿ—จ๏ธ0