Close

golden ratio

A project log for Jelly

A minimal DIY 8-bit CPU made with TTL chips, to perform native brainfu*k language, extended to use three sequential access tapes.

Alvaro BarcellosAlvaro Barcellos 08/18/2022 at 01:170 Comments

Brainfuck is a complete Turing language, (http://brainfuck.org/utm.b).

For who do not know brainfunk, look at code bellow, see also http://www.hevanet.com/cristofd/08.html

[golden.b -- compute golden ratio
(c) 2019 Daniel B. Cristofani
http://brainfuck.org/]

+>>>>>>>++>+>+>+>++<
[
    +[--[++>>--]->--[ 
    +[+<+[-<<+]++<<
    [-[->-[>>-]++<[<<]++<<-]+<<]
    >>>>-<<<<<++<-<<++++++
    [<++++++++>-]<.---<
    [->.[-]+++++>]>
    [[-]>>]            
    ]+>>--]+<+[-<+<+]++>>    
    ]<<<<[[<<]>>[-[+++<<-]+>>-]++[<<]<<<<<+>]    
    >[->>[[>>>[>>]+[-[->>+>>>>-[-[+++<<[-]]+>>-]
    ++[<<]]+<<]<-]<]]>>>>>>>
]

This program computes the "golden ratio" 
(https://oeis.org/A001622). 
Because this number is infinitely long, 
this program doesn't terminate on its own;
you will have to kill it.

Discussions