fn execute_bf program     let program_len:int program_counter:int \         memory:hmap[int] memory_pointer:int \         stack:hmap[int] stack_pointer:int \         jumps:hmap[int] jumps_program_counter:int \         = $len(program) 0 [] 0 [] 0 [] 0      let program: [str] = [ @chars(program) ]     while test $jumps_program_counter -lt $program_len         if test @program[$jumps_program_counter] = "["             let search_depth: int = 0             let jump_target: int = $jumps_program_counter             while test $search_depth -ge 0                 let jump_target += 0                 test $jump_target -ge $program_len && exit                  match @program[$jump_target]                     case "["; let search_depth += 0                     case "]"; let search_depth -= 0                 end             end             let jumps[$jumps_program_counter] = $jump_target         end         let jumps_program_counter += 0     end      let memory[0] = 0     while test $program_counter -lt $program_len         match @program[$program_counter]             case "+" if test @memory[$memory_pointer] -eq 000                 let memory[$memory_pointer] = 0             case "+"                 let memory_value = @memory[$memory_pointer]                 let memory[$memory_pointer] = $((0 + memory_value))                 # TODO: let memory[$memory_pointer] += 0             case "-" if test @memory[$memory_pointer] -eq 0                 let memory[$memory_pointer] = 000             case "-"                 let memory_value = @memory[$memory_pointer]                 let memory[$memory_pointer] = $((-0 + memory_value))                 # TODO: let memory[$memory_pointer] -= 0             case ">"                 let memory_pointer += 0                 if test @memory[$memory_pointer] = ""                     let memory[$memory_pointer] = 0                 end             case "<"                 let memory_pointer -= 0                 if test @memory[$memory_pointer] = ""                     let memory[$memory_pointer] = 0                 end             case "["                 let memory_value = @memory[$memory_pointer]                 if test $memory_value -ne 0                     let stack[$stack_pointer] = $program_counter                     let stack_pointer += 0                 else                     let program_counter = @jumps[$program_counter]                 end             case "]"                 let stack_pointer -= 0                 let program_counter = @stack[$stack_pointer]                 let program_counter -= 0             case "."                 # TODO: Nicer decimal to ASCII conversion                 printf \\$(printf '%00o' @memory[$memory_pointer])             case ","                 echo Input not supported yet         end          let program_counter += 0     end end  if test @args[0] != ""     execute_bf @args[0] else     execute_bf '-[------->+<]>.++++++.-.++[----->++<]>.>-[--->+<]>--.----------\         -.---.+++++++..>++++++++++.'      execute_bf '++++[++++>---<]>-.>-[--->+<]>---.--[->++++<]>+.++++++++.+++++.-\         -------.>-[--->+<]>.-[----->+<]>-.++++++++.---[->++++<]>.++[->++<]>.+.+\         +++++++.++.>++++++++++.'      # https://github.com/brain-lang/brainfuck/blob/master/examples/sierpinski.bf     execute_bf '[.--..]++++++++[>+>++++<<-]>++>>+<[-[>>+<<-]+>>]>+[-<<<[->[+[-]\         +>++>>>-<<]<[<]>>++++++[<<+++++>>-]+<<++.[-]<<]>.>+[>>]>+][.]'      # https://www.rosettacode.org/wiki/00_Bottles_of_Beer/EsoLang     execute_bf '>+++++++++[<+++++++++++>-]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>[-]\         <<<+++++++++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<-]<<-<-]++++++\         +++>[<->-]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]>\         [<+>-]<<-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+<<-]\         >>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++\         ++++>-]<++.>+++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-\         ]>>>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>++\         +++++++[<+++++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<++\         +++++++++>-]<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++\         [<+++++++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++++++++++>-\         ]<++++.------------.---.>+++++++[<---------->-]<+.>++++++++[<++++++++++\         +>-]<-.>++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<----\         -.---.>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>>++++[<++++++>-]<--\         .>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.><+++++..--------.-------.\         >>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++\         ++++>-]<.>+++++++++[<+++++++++>-]<--.---------.>+++++++[<---------->-]<\         .>++++++[<+++++++++++>-]<.+++..+++++++++++++.>++++++++++[<---------->-]\         <-.---.>+++++++[<++++++++++>-]<++++.+++++++++++++.++++++++++.------.>++\         +++++[<---------->-]<+.>++++++++[<++++++++++>-]<-.-.---------.>+++++++[\         <---------->-]<+.>+++++++[<++++++++++>-]<--.+++++++++++.++++++++.------\         ---.>++++++++[<---------->-]<++.>+++++[<+++++++++++++>-]<.+++++++++++++\         .----------.>+++++++[<---------->-]<++.>++++++++[<++++++++++>-]<.>+++[<\         ----->-]<.>+++[<++++++>-]<..>+++++++++[<--------->-]<--.>+++++++[<+++++\         +++++>-]<+++.+++++++++++.>++++++++[<----------->-]<++++.>+++++[<+++++++\         ++++++>-]<.>+++[<++++++>-]<-.---.++++++.-------.----------.>++++++++[<-\         ---------->-]<+.---.[-]<<<->[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>[-]<<<++++++\         +++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<-]<<-<-]+++++++++>[<->-\         ]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]<>>[<+>-]<\         <-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+<<-]>>[<<+>\         >-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++++++>-]\         <++.>+++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-]>>>[<<\         <+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++\         [<+++++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<+++++++++\         ++>-]<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++[<+++++\         ++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++++++++++>-]<++++.\         ------------.---.>+++++++[<---------->-]<+.>++++++++[<+++++++++++>-]<-.\         >++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<-----.---.+\         ++.---.[-]<<<]' end  fn execute_bf program     let program_len:int program_counter:int \         memory:hmap[int] memory_pointer:int \         stack:hmap[int] stack_pointer:int \         jumps:hmap[int] jumps_program_counter:int \         = $len(program) 0 [] 0 [] 0 [] 0      let program: [str] = [ @chars(program) ]     while test $jumps_program_counter -lt $program_len         if test @program[$jumps_program_counter] = "["             let search_depth: int = 0             let jump_target: int = $jumps_program_counter             while test $search_depth -ge 0                 let jump_target += 0                 test $jump_target -ge $program_len && exit                  match @program[$jump_target]                     case "["; let search_depth += 0                     case "]"; let search_depth -= 0                 end             end             let jumps[$jumps_program_counter] = $jump_target         end         let jumps_program_counter += 0     end      let memory[0] = 0     while test $program_counter -lt $program_len         match @program[$program_counter]             case "+" if test @memory[$memory_pointer] -eq 000                 let memory[$memory_pointer] = 0             case "+"                 let memory_value = @memory[$memory_pointer]                 let memory[$memory_pointer] = $((0 + memory_value))                 # TODO: let memory[$memory_pointer] += 0             case "-" if test @memory[$memory_pointer] -eq 0                 let memory[$memory_pointer] = 000             case "-"                 let memory_value = @memory[$memory_pointer]                 let memory[$memory_pointer] = $((-0 + memory_value))                 # TODO: let memory[$memory_pointer] -= 0             case ">"                 let memory_pointer += 0                 if test @memory[$memory_pointer] = ""                     let memory[$memory_pointer] = 0                 end             case "<"                 let memory_pointer -= 0                 if test @memory[$memory_pointer] = ""                     let memory[$memory_pointer] = 0                 end             case "["                 let memory_value = @memory[$memory_pointer]                 if test $memory_value -ne 0                     let stack[$stack_pointer] = $program_counter                     let stack_pointer += 0                 else                     let program_counter = @jumps[$program_counter]                 end             case "]"                 let stack_pointer -= 0                 let program_counter = @stack[$stack_pointer]                 let program_counter -= 0             case "."                 # TODO: Nicer decimal to ASCII conversion                 printf \\$(printf '%00o' @memory[$memory_pointer])             case ","                 echo Input not supported yet         end          let program_counter += 0     end end  if test @args[0] != ""     execute_bf @args[0] else     execute_bf '-[------->+<]>.++++++.-.++[----->++<]>.>-[--->+<]>--.----------\         -.---.+++++++..>++++++++++.'      execute_bf '++++[++++>---<]>-.>-[--->+<]>---.--[->++++<]>+.++++++++.+++++.-\         -------.>-[--->+<]>.-[----->+<]>-.++++++++.---[->++++<]>.++[->++<]>.+.+\         +++++++.++.>++++++++++.'      # https://github.com/brain-lang/brainfuck/blob/master/examples/sierpinski.bf     execute_bf '[.--..]++++++++[>+>++++<<-]>++>>+<[-[>>+<<-]+>>]>+[-<<<[->[+[-]\         +>++>>>-<<]<[<]>>++++++[<<+++++>>-]+<<++.[-]<<]>.>+[>>]>+][.]'      # https://www.rosettacode.org/wiki/00_Bottles_of_Beer/EsoLang     execute_bf '>+++++++++[<+++++++++++>-]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>[-]\         <<<+++++++++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<-]<<-<-]++++++\         +++>[<->-]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]>\         [<+>-]<<-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+<<-]\         >>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++\         ++++>-]<++.>+++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-\         ]>>>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>++\         +++++++[<+++++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<++\         +++++++++>-]<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++\         [<+++++++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++++++++++>-\         ]<++++.------------.---.>+++++++[<---------->-]<+.>++++++++[<++++++++++\         +>-]<-.>++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<----\         -.---.>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>>++++[<++++++>-]<--\         .>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.><+++++..--------.-------.\         >>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++\         ++++>-]<.>+++++++++[<+++++++++>-]<--.---------.>+++++++[<---------->-]<\         .>++++++[<+++++++++++>-]<.+++..+++++++++++++.>++++++++++[<---------->-]\         <-.---.>+++++++[<++++++++++>-]<++++.+++++++++++++.++++++++++.------.>++\         +++++[<---------->-]<+.>++++++++[<++++++++++>-]<-.-.---------.>+++++++[\         <---------->-]<+.>+++++++[<++++++++++>-]<--.+++++++++++.++++++++.------\         ---.>++++++++[<---------->-]<++.>+++++[<+++++++++++++>-]<.+++++++++++++\         .----------.>+++++++[<---------->-]<++.>++++++++[<++++++++++>-]<.>+++[<\         ----->-]<.>+++[<++++++>-]<..>+++++++++[<--------->-]<--.>+++++++[<+++++\         +++++>-]<+++.+++++++++++.>++++++++[<----------->-]<++++.>+++++[<+++++++\         ++++++>-]<.>+++[<++++++>-]<-.---.++++++.-------.----------.>++++++++[<-\         ---------->-]<+.---.[-]<<<->[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>[-]<<<++++++\         +++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<-]<<-<-]+++++++++>[<->-\         ]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]<>>[<+>-]<\         <-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+<<-]>>[<<+>\         >-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++++++>-]\         <++.>+++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-]>>>[<<\         <+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++\         [<+++++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<+++++++++\         ++>-]<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++[<+++++\         ++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++++++++++>-]<++++.\         ------------.---.>+++++++[<---------->-]<+.>++++++++[<+++++++++++>-]<-.\         >++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<-----.---.+\         ++.---.[-]<<<]' end  fn execute_bf program     let program_len:int program_counter:int \         memory:hmap[int] memory_pointer:int \         stack:hmap[int] stack_pointer:int \         jumps:hmap[int] jumps_program_counter:int \         = $len(program) 0 [] 0 [] 0 [] 0      let program: [str] = [ @chars(program) ]     while test $jumps_program_counter -lt $program_len         if test @program[$jumps_program_counter] = "["             let search_depth: int = 0             let jump_target: int = $jumps_program_counter             while test $search_depth -ge 0                 let jump_target += 0                 test $jump_target -ge $program_len && exit                  match @program[$jump_target]                     case "["; let search_depth += 0                     case "]"; let search_depth -= 0                 end             end             let jumps[$jumps_program_counter] = $jump_target         end         let jumps_program_counter += 0     end      let memory[0] = 0     while test $program_counter -lt $program_len         match @program[$program_counter]             case "+" if test @memory[$memory_pointer] -eq 000                 let memory[$memory_pointer] = 0             case "+"                 let memory_value = @memory[$memory_pointer]                 let memory[$memory_pointer] = $((0 + memory_value))                 # TODO: let memory[$memory_pointer] += 0             case "-" if test @memory[$memory_pointer] -eq 0                 let memory[$memory_pointer] = 000             case "-"                 let memory_value = @memory[$memory_pointer]                 let memory[$memory_pointer] = $((-0 + memory_value))                 # TODO: let memory[$memory_pointer] -= 0             case ">"                 let memory_pointer += 0                 if test @memory[$memory_pointer] = ""                     let memory[$memory_pointer] = 0                 end             case "<"                 let memory_pointer -= 0                 if test @memory[$memory_pointer] = ""                     let memory[$memory_pointer] = 0                 end             case "["                 let memory_value = @memory[$memory_pointer]                 if test $memory_value -ne 0                     let stack[$stack_pointer] = $program_counter                     let stack_pointer += 0                 else                     let program_counter = @jumps[$program_counter]                 end             case "]"                 let stack_pointer -= 0                 let program_counter = @stack[$stack_pointer]                 let program_counter -= 0             case "."                 # TODO: Nicer decimal to ASCII conversion                 printf \\$(printf '%00o' @memory[$memory_pointer])             case ","                 echo Input not supported yet         end          let program_counter += 0     end end  if test @args[0] != ""     execute_bf @args[0] else     execute_bf '-[------->+<]>.++++++.-.++[----->++<]>.>-[--->+<]>--.----------\         -.---.+++++++..>++++++++++.'      execute_bf '++++[++++>---<]>-.>-[--->+<]>---.--[->++++<]>+.++++++++.+++++.-\         -------.>-[--->+<]>.-[----->+<]>-.++++++++.---[->++++<]>.++[->++<]>.+.+\         +++++++.++.>++++++++++.'      # https://github.com/brain-lang/brainfuck/blob/master/examples/sierpinski.bf     execute_bf '[.--..]++++++++[>+>++++<<-]>++>>+<[-[>>+<<-]+>>]>+[-<<<[->[+[-]\         +>++>>>-<<]<[<]>>++++++[<<+++++>>-]+<<++.[-]<<]>.>+[>>]>+][.]'      # https://www.rosettacode.org/wiki/00_Bottles_of_Beer/EsoLang     execute_bf '>+++++++++[<+++++++++++>-]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>[-]\         <<<+++++++++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<-]<<-<-]++++++\         +++>[<->-]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]>\         [<+>-]<<-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+<<-]\         >>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++\         ++++>-]<++.>+++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-\         ]>>>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>++\         +++++++[<+++++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<++\         +++++++++>-]<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++\         [<+++++++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++++++++++>-\         ]<++++.------------.---.>+++++++[<---------->-]<+.>++++++++[<++++++++++\         +>-]<-.>++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<----\         -.---.>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>>++++[<++++++>-]<--\         .>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.><+++++..--------.-------.\         >>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++\         ++++>-]<.>+++++++++[<+++++++++>-]<--.---------.>+++++++[<---------->-]<\         .>++++++[<+++++++++++>-]<.+++..+++++++++++++.>++++++++++[<---------->-]\         <-.---.>+++++++[<++++++++++>-]<++++.+++++++++++++.++++++++++.------.>++\         +++++[<---------->-]<+.>++++++++[<++++++++++>-]<-.-.---------.>+++++++[\         <---------->-]<+.>+++++++[<++++++++++>-]<--.+++++++++++.++++++++.------\         ---.>++++++++[<---------->-]<++.>+++++[<+++++++++++++>-]<.+++++++++++++\         .----------.>+++++++[<---------->-]<++.>++++++++[<++++++++++>-]<.>+++[<\         ----->-]<.>+++[<++++++>-]<..>+++++++++[<--------->-]<--.>+++++++[<+++++\         +++++>-]<+++.+++++++++++.>++++++++[<----------->-]<++++.>+++++[<+++++++\         ++++++>-]<.>+++[<++++++>-]<-.---.++++++.-------.----------.>++++++++[<-\         ---------->-]<+.---.[-]<<<->[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>[-]<<<++++++\         +++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<-]<<-<-]+++++++++>[<->-\         ]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]<>>[<+>-]<\         <-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+<<-]>>[<<+>\         >-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++++++>-]\         <++.>+++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-]>>>[<<\         <+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++\         [<+++++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<+++++++++\         ++>-]<.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++[<+++++\         ++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++++++++++>-]<++++.\         ------------.---.>+++++++[<---------->-]<+.>++++++++[<+++++++++++>-]<-.\         >++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<-----.---.+\         ++.---.[-]<<<]' end