This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [2025day7a.b -- 2025 Advent of Code Day 7 Part 1 | |
| (c) 2025 Daniel B. Cristofani | |
| http://brainfuck.org/ | |
| This program is licensed under a Creative Commons Attribution-ShareAlike 4.0 | |
| International License (http://creativecommons.org/licenses/by-sa/4.0/). | |
| This program solves Advent of Code 2025, Day 7, Part 1. | |
| (https://adventofcode.com/2025/day/7) | |
| Assumes EOF="no change" or EOF=0. No assumptions about cell size. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [2025day6b.b -- 2025 Advent of Code Day 6 Part 2 | |
| (c) 2025 Daniel B. Cristofani | |
| http://brainfuck.org/ | |
| This program is licensed under a Creative Commons Attribution-ShareAlike 4.0 | |
| International License (http://creativecommons.org/licenses/by-sa/4.0/). | |
| This program solves Advent of Code 2025, Day 6, Part 2. | |
| (https://adventofcode.com/2025/day/6) | |
| Assumes EOF="no change" or EOF=0. No assumptions about cell size.] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [2025day3.b -- 2025 Advent of Code Day 3 | |
| (c) 2025 Daniel B. Cristofani | |
| http://brainfuck.org/ | |
| This program is licensed under a Creative Commons Attribution-ShareAlike 4.0 | |
| International License (http://creativecommons.org/licenses/by-sa/4.0/). | |
| This program solves Advent of Code 2025, Day 3. | |
| (https://adventofcode.com/2025/day/3) | |
| You can change battery count in parentheses at the start for part 1 or 2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>,[ | |
| [[>>]++[-<<]>>] | |
| ++++++++[>[>-<-]>[<+>+[-]]<<-[>>+<<-]+>>] | |
| <[-< | |
| <[-< | |
| <[-< | |
| <[-< | |
| <[-< | |
| <[-< | |
| <[-< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [day9a.b -- 2022 Advent of Code Day 9 Part 1 | |
| (c) 2022 Daniel B. Cristofani | |
| http://brainfuck.org/ | |
| This program is licensed under a Creative Commons Attribution-ShareAlike 4.0 | |
| International License (http://creativecommons.org/licenses/by-sa/4.0/).] | |
| [This program solves Advent of Code 2022, Day 9, Part 1. | |
| (https://adventofcode.com/2022/day/9/) | |
| Basic data layout is, roughly: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [siercarpet.b -- Sierpinski Carpet | |
| (c) 2021 Daniel B. Cristofani | |
| http://brainfuck.org/] | |
| >-->->->>>>>(>>>>>>>>>)+++++[>++++++<-]>+[>+>+++<<-]>+[ | |
| [<]<++[<++]--<[>>[-->]>..<<<]>>[[-->]>>--.++.<<]<<<<<<<+[ | |
| [--->++++++<[+++>--------->>[->>>]->>>]+<<<+] | |
| >[<->>>[->>>]++++++++++.[-]<<+>+++[-]]< | |
| ]>>>->> | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [life.b -- John Horton Conway's Game of Life | |
| (c) 2021 Daniel B. Cristofani | |
| http://brainfuck.org/] | |
| >>>->+>+++++>(++++++++++)[[>>>+<<<-]>+++++>+>>+[<<+>>>>>+<<<-]<-]>>>>[ | |
| [>>>+>+<<<<-]+++>>+[<+>>>+>+<<<-]>>[>[[>>>+<<<-]<]<<++>+>>>>>>-]<- | |
| ]+++>+>[[-]<+<[>+++++++++++++++++<-]<+]>>[ | |
| [+++++++++brainfuck.org-------->>>]+[-<<<]>>>[>>,----------[>]<]<<[ | |
| <<<[ | |
| >--[<->>+>-<<-]<[[>>>]+>-[+>>+>-]+[<<<]<-]>++>[<+>-] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >,>+>>>,+<++++++++[<<<------>>>>------<-]>-[+<]<<[>]<[ | |
| <[ | |
| ->>>>[ | |
| <+[->-[[>>]>-<]++++++++++>+]<[-]<<-[+>>]<< | |
| [[>>+<<-]<<] | |
| <<[>+<-]->[<+>>+<-]+>>+>>>> | |
| ]<<<[ | |
| >>>++<< | |
| ] | |
| ]>[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [How to do functions in brainfuck. | |
| Okay. We'll translate the following program into brainfuck, with no thought of efficiency: | |
| char fib (char a){ | |
| switch(a): | |
| case 0: return 0 | |
| case 1: return 1 | |
| default: return fib(a-2)+fib(a-1) | |
| } |
NewerOlder