We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Talk:pRINT
Jump to navigation
Jump to search
Brainfuck interpreter
Here is a brainfuck interpreter:
>>>>>>>>>>>>>>>,----------[<<<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>[-]<[-]>>[<<+>>-]+<<<[>->+<<-]>>[<<+>>-]<[>>-<<[-]]<[-]>>[-]<[-]>>[<+<+>>-]<[>+<-]<[>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-][-]++++++++++.[-]<[-]]>>,----------]
It treats the first line of input as the program, and outputs print and a line feed for every p in the program.
It is compiled from this BFFuck program:
x=inc sub(x,10) while(x) eq(x,102) if(x) print(print) outc(10) endif x=inc sub(x,10) endwhile
But, honestly, it isn't very optimized. --None1 (talk) 01:04, 16 August 2023 (UTC)
I tried to make another brainfuck interpreter:
+++++++[>>++++[<++++>-]<<-],[>-<-]>[>+<]<+++++[>>+++++[<++++>-]+<<-]>+-----.++.---------.+++++.++++++.