July 2013
Intermediate to advanced
282 pages
6h 28m
English
If that didn’t seem impressive enough, here is a really gorgeous implementation of a Fibonacci sequence generator, complete with documentation. The BF compiler used to write this ignores any character other than the eight commands, so the comments don’t need to be marked in any way; they just need to be really careful not to use punctuation.[16]
| | +++++++++++ number of digits to output |
| | > #1 |
| | + initial number |
| | >>>> #5 |
| | ++++++++++++++++++++++ |
| | ++++++++++++++++++++++ (comma) |
| | > #6 |
| | ++++++++++++++++ |
| | ++++++++++++++++ (space) |
| | <<<<<< #0 |
| | [ |
| | > #1 |
| | copy #1 to #7 |
| | [>>>>>>+>+<<<<<<<-] |
| | >>>>>>>[<<<<<<<+>>>>>>>-] |
| | < |
| | divide #7 by 10 (begins in #7) |
| | [ |
| | > |
| | ++++++++++ set the divisor #8 |
| | [ |
| | subtract from the dividend and ... |
Read now
Unlock full access