Hobbes wrote:I'd like to see a Brainfuck compiler in LEGO
Hello,
I wish to tell you that I'm working on it
though in fact a Brainfuck interpreter or mechanical Brainfuck processor would fit better than compiler
I've added the constraint to not use any electronics (e.g. mindstorm computer bricks) since emulating processors on other processors is being done all the time
though one or more electric motors that could easily be replaced by a crank should be OK
As Brainfuck is proven Turing Complete, this machine will become a Turing Machine
Since my ordinary job takes most of my productive time, this project will progress somewhat slowly, but status is:
A lot of functionality is designed on paper, including basic design and choices
7 bit register (ASCII is mentioned in original Brainfuck post)
3 bit instruction stack (gives itself)
LEGO soccer balls (as used in LEGO GBC) acts as bits and event carriers
event driven - no clock - every task will take the required time
A 7 bit binary adder register is built and working
it can easily perform the + instruction ( increment )
- (decrement) is being solved by adding 127
a rack producing the number 127 is built and working
detailed drawings exist on next versions of the register, with necessary abilities like flush and read-out.
also detailed drawings of instruction decoder and suggestions to dot matrix display for output is waiting to be tried out in Real Brick.
If you find this interesting, I will gladly share the development of this project
Best Regards