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