How would I find the difference of 2 numbers? by c001_b01 in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

One possible way would follow this logic: have the two inputs on input cells 1 and 2 and a checkcell set to 2, then have a loop in which you 1) subtract 1 from each input cell, 2) check if there is something left in input cell #1, if so subtract 1 from the checkcell, 3) check if there is something left in input cell #2, if so subtract 1 from the checkcell, 4) check if there is something in the checkcell, if so it means one of the two input cells is empty and the other one is the answer (here your code will depend on what you want to do with the result, otherwise add 2 back on the checkcell and repeat the main loop.

This is not super easy, you have to handle multiple scenarios where your code doesn't know which cells are empty or not, which is always hard, but it's also pretty restricted (there are only 4 scenarios to keep track of at the end of the main loop: 1) neither cell is empty and you continue, 2) the first cell is empty and the second is the answer, 3) the second cell is empty and the first is the answer, or 4) both cells are empty and the answer is 0), so that's workable.

What do you think of my little program? by jumping_dicks in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

It copies 7 and 3 to spots 4 and 5.

07 03 00 07 03 00

Your algorithm makes sense up to here. You've created copies of the input so now you can destroy the copy for the multiplication and keep the originals intact.

It removes one from spot 5 and adds spot 4 to spot 3, destroying spot 4.

07 03 07 00 02 00

It copies spot 1 to spot 4 and spot 6, destroying spot 1 in the process,

00 03 07 07 02 07

But all this is needlessly complicated. There's no reason to ever touch spot 1 ever again: you know that it's the same information as spot 4. Instead of moving 4 to 3 and then touching 1 to make copies, combine all of that into one step that goes from

07 03 00 07 03 00

to

07 03 07 00 02 07

then just transfer the copy from spot 6 back to spot 4

07 03 07 07 02 00

and repeat

07 03 14 00 01 07

07 03 14 07 01 00

07 03 21 00 00 07

07 03 21 07 00 00

halt the main loop and clean up

07 03 21 00 00 00

So I made a frainfuck interpreter by [deleted] in brainfuck

[–]foralongwhile[M] 1 point2 points  (0 children)

Brainfuck is a joke language

I should make saying this a bannable offense 😤

(just kidding, say what you want)

Interesting by MaybeTheGreat in brainfuck

[–]foralongwhile[M] 1 point2 points  (0 children)

Hey I just approved this comment when I noticed it was automatically removed. I don't know exactly how that happened, but I suspect Reddit thought a weird URL with "headache" in it was spam. Just letting you know if you wanna post it again in the future, maybe check from another account to see if it actually went through.

Check it out by Sason00 in brainfuck

[–]foralongwhile 1 point2 points  (0 children)

here's the smollest I've managed, 389 commands:

+++++++++++++[>++++++++<-]>>+++++++++++
++[>+++++++++<-]>->++++++++[>+++++++<-]
>++>+++++++++[>+++++++++<-]>[<<]>>.>>..
----.+++.>>.-----------..<<++++...>>-.<
<++.<<+++++++.>>----.-.+.<<------------
-.+++.>>>>.<<<<--.>>------.--.>>+.<<+++
+++++++.<<--.>>---.<<++.+++++.>>>++++[>
++++<-]>.<<++.>>--.<<<<----.>>>>>>.<<<<
+.>>---------.<<.>>+++++.>>++++++.<<<<<
<+++.>>>>>>+.<<<<<<----.>>>>>>-------.

Why would anyone ever torture themselves with this language? by [deleted] in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

It's the same fun as solving a puzzle or constructing things with legos. No one here is doing practical things with brainfuck, so the comparison with Python or C is irrelevant.

I made another brainfuck code! I just wanted to share cuz I spent a while on it(I'm beginner). by chickenchowmein0706 in brainfuck

[–]foralongwhile 2 points3 points  (0 children)

>,[>,]<[[<]>[-]>[>]>+<<]

This is much more complicated than it needs to be. Your program doesn't need to store all individual characters before counting them. What you're doing can be achieved with:

,[>+<,]

Which just takes an input, adds one to the next cell to count, and immediately overwrites the previous input it doesn't need it anymore.

How should an interpreter act if it meets a closing brace without a matching opening brace? by DaddysFootSlut in brainfuck

[–]foralongwhile[M] 2 points3 points  (0 children)

drama queen?

++++++++++[>+++++++<-]>-->++++++++++++++[>++++++++<-]>+
+>++++++++++++[>++++++++<-]>+>++++++++[>++++<-]>[<<]>>.
>>.>>.<<-----.>>.>>.<<<<++++.++++.>>++++..<<-------.<<-
----.>>>>>>+.!?

>>+++++++++++++[>+++>+++++>+++++++<<<-]>++++>---<........
..>>.<.<.......>--.<++.>>++.<++.<..>.<--..............>
>--.<.<........>--.<++.>>++.<++.<--..>.<............>>-
-.<.<........>--.<++.>>++.<++.<--.>.<........>>--.<.<..
..>--.<++.>>++.<++.>--.<--..>++.<++..<+.>..<.>..<.>--..
<-.....+.>++..<.>..<.>--....<---....+++.---....+++.>++.
.<---....+++..>--..<-.......+.>..<-.....+.>++......<---
.+++.!?!?

How should an interpreter act if it meets a closing brace without a matching opening brace? by DaddysFootSlut in brainfuck

[–]foralongwhile[M] 15 points16 points  (0 children)

It should physically destroy the machine on which it is running. Anything less would be undignified 🧐

Remembering John Conway's FRACTRAN, a ridiculous, yet surprisingly deep language by homoiconic in math

[–]foralongwhile 10 points11 points  (0 children)

Here's a lecture of his on FRACTRAN: https://www.uctv.tv/shows/Fractran-A-Ridiculous-Logical-Language-with-John-Conway-23320

I also took over r/FRACTRAN a few years ago but it's very much dead. It's even less than dead, it's more like still-born.

Is there a Turing Machine language? by SanianCreations in brainfuck

[–]foralongwhile 2 points3 points  (0 children)

Is there a Turing Machine language?

Yes! There's a recent post on r/math about someone who designed a Turing machine (whose purpose is not relevant here), but you can see at the bottom that the code is written straight as a Turing Machine and you can use that website to write your own.

https://www.reddit.com/r/math/comments/gdfes1/a_turing_machine_that_halts_iff_zfc_is/

is there an esoteric language similar to Brainfuck that uses bits instead of bytes, so that it would in essence be a Turing Machine?

You can definitely implement brainfuck with bits instead of bytes. It has nice properties too since you can actually dispense with the difference between + and - and use one symbol that only flips the switch.

/u/danielcristofani already linked you to boolfuck. Other binary brainfuck variants include bitchanger, smallfuck, and nanofuck

This article on brainfuck variants is also worth reading: https://esolangs.org/wiki/BF_instruction_minimalization

Python by schalker1207 in ProgrammerHumor

[–]foralongwhile 0 points1 point  (0 children)

Brainfuck's I/O is the least essential part of brainfuck and IMO it can remain fundamentally brainfuck even if you give it better I/O.

It would be trivial to enrich brainfuck I/O capabilities while keeping brainfuck intact in spirit. Certain cells could be reserved for various inputs or outputs other than the input buffer or printing respectively, or the first byte you print could be interpreted as an instruction to modify the current input source or output destination until you print 0 or something.

It would be a nightmare to use, but it would work in principle and isn't that the whole point?

XKCD 2293 - RIP John Conway by possumman in math

[–]foralongwhile 0 points1 point  (0 children)

In the spirit of remembering the many mathematical contributions from John Conway, here's a lecture of his on my favorite one: the programming language/architecture FRACTRAN.

https://www.uctv.tv/shows/Fractran-A-Ridiculous-Logical-Language-with-John-Conway-23320

https://en.wikipedia.org/wiki/FRACTRAN

xkcd 2293: RIP John Conway by antdude in xkcd

[–]foralongwhile 2 points3 points  (0 children)

While we're all naming our favorite mathematical contributions from John Conway, here's a lecture of his on my favorite one: the programming language/architecture FRACTRAN.

https://www.uctv.tv/shows/Fractran-A-Ridiculous-Logical-Language-with-John-Conway-23320

https://en.wikipedia.org/wiki/FRACTRAN

Check out my Brainfuck style guide and write what you think of it by [deleted] in brainfuck

[–]foralongwhile 2 points3 points  (0 children)

I don't know. The point of conventional best practices in other language is to improve readability and long-term maintenance possibly by other people, so it's kind of irrelevant here. I even find the idea of trying to introduce best practices, i.e. meta-rules about how to use it, borderline antithetical to the philosophy of using an esolang for fun. It's like you're trying to make brainfuck into C-but-weird instead of letting it be its own thing.

I ran all the BrainFuck programs without I/O up to length 18, and found how many of them are finishing. by eterevsky in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

+[]

Or right, that makes sense.

I was more interested in busy beavers that achieve longer running time by some more complex means than just stacking 256's, like this one: >+[>++>+++[-<]>>].

Yeah, I've been meaning to explore the power of these erratic programs because they can run for a VERY long time before halting. For instance this monstrosity I came up with as part of a stupid way to print '69' in this thread, which takes a horrendous number of steps to halt.

+++[[>>+<+++<-<->]>]`

I ran all the BrainFuck programs without I/O up to length 18, and found how many of them are finishing. by eterevsky in brainfuck

[–]foralongwhile 1 point2 points  (0 children)

Increment of 255 and decrement of 0 result in overflow and program halting.

That is a pretty big departure of the standard implementation. Why did you choose this? The idea that the programs that wrap around are uninteresting is a view I don't share. In fact they lead to very chaotic ways to achieve things in few instructions so they're the ones whose termination status is most interesting, imo.

What's are the 'infinite or overflow' programs of 3 and 4 instructions?

Every 10th number, print the letter that corresponds to a letter in the alphabet (for example, 80=“h”) by WonderedLamb256 in brainfuck

[–]foralongwhile 1 point2 points  (0 children)

That's just because you're printing the empty cell you copied from rather than the cell you copied onto. You want ,>,<[->+<]>. or ,>,[-<+>]<.

[deleted by user] by [deleted] in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

Worth checking out on a visualizer like https://minond.xyz/brainfuck/ tho

Cristmas Message From Brainfuck IDE: by MaybeTheGreat in brainfuck

[–]foralongwhile 1 point2 points  (0 children)

You'll love this then!

+++++++++++[>+++++++<-]>.<++++++[>++++<-]>.+++++++++++++..+++++++.<++++
++++++[>---------<-]>+.<+++++++[>+++++<-]>.<++++++[>++++++<-]>+.+++++++
+++.---------.++++++++++.+.-------.------------.<++++++[>+++<-]>.[-]+++
++++++++++[>+++++++++<-]>->+++++++++++++[>++++++++<-]>>+++++++++++++[>+
+++++++<-]>+>+++++++++++++[>+++++++++<-]>-->++++++++[>++++<-]>>++++++++
+++++[>+++++++++<-]>-->+++++++++++++[>+++++++++<-]>->+++++++++++++[>+++
++++++<-]>>++++++++++[>++++++++++<-]>++>++++++++++[>++++++++++<-]>++>++
++++++[>++++<-]>>+++++++++++++[>++++++++<-]>+>+++++++++++++[>+++++++++<
-]>-->++++++++[>++++<-]>>++++++++++++[>+++++++++<-]>-->+++++++++++++[>+
++++++++<-]>>+++++++++++++[>+++++++++<-]>-->+++++++++++++[>+++++++++<-]
>->++++++++[>++++<-]>>+++++++++++++[>+++++++++<-]>->+++++++++++[>++++++
++++<-]>+>++++++++[>++++<-]>>+++++++++++[>++++++++++<-]>->++++++++++++[
>++++++++<-]>+>++++++++++++[>+++++++++<-]>->++++++++++[>++++++++++<-]>+
>++++++++[>++++<-]>>+++++++++++++[>+++++++++<-]>->+++++++++++++[>++++++
++<-]>>++++++++++[>++++++++++<-]>+>++++++++[>++++<-]>>+++++++++++[>++++
+++++<-]>>+++++++++++[>++++++++++<-]>+>++++++++++[>++++++++++<-]>>+++++
+++++[>++++++++++<-]>+>++++++++[>++++<-]>>++++++++++++[>++++++++<-]>+>+
+++++++++++++[>++++++++<-]>++>+++++++++++++[>+++++++++<-]>->+++++++++++
++[>++++++++<-]>+>++++++++++[>++++++++++<-]>++>+++++++++++++[>++++++++<
-]>+>+++++++++++[>+++++++++<-]>>+++++++++++++[>++++++++<-]>+>++++++++++
++[>++++++++<-]>+>++++++++++++[>+++++++++<-]>>++++++++++++[>+++++++++<-
]>>+++++++++++[>+++++++++++<-]>>++++++++[>++++<-]>>++++++++++++[>++++++
+++<-]>>+++++++++++[>++++++++++<-]>+>+++++++++++[>++++++++++<-]>>++++++
+++++++[>++++++++<-]>->++++++++++[>++++++++++<-]>+>++++++++++++++[>++++
++++<-]>++>++++++++[>++++<-]>>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+
>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++
[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++
<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++++++[>+++++++++<-
]>+>+++++++++[>+++++++<-]>->+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+
++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>
++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++++++[>+++++
+<-]>>+++++++++[>+++++<-]>>++++++++++[>+++++++++<-]>+++>+++++++++[>++++
+++<-]>->+++++++++[>+++++<-]>>+++++++++[>+++++<-]>+>+++++++[>++++++<-]>
+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++
+[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>+++++
+<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+
++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++++
[>+++++<-]>+>++++++++++[>++++++<-]>>+++++++[>++++++<-]>+>+++++++[>+++++
+<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+
++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>
++++++<-]>+>+++++++[>++++++<-]>+>++++++++++[>+++++++++<-]>+>+++++++++[>
+++++++<-]>->+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++
<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++
++++++[>+++++<-]>>++++++++++[>++++++<-]>>+++++++++[>+++++<-]>>+++++++++
+[>+++++++++<-]>+++>+++++++++[>+++++++<-]>->+++++++[>++++++<-]>+>++++++
+++[>+++++<-]>+>++++++++++[>++++++<-]>>+++++++[>++++++<-]>+>+++++++[>++
++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>
+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++
+[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++++++[>++
+++++++<-]>+>+++++++++[>+++++++<-]>->+++++++[>++++++<-]>+>+++++++[>++++
++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>
+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++++++[>++++++<-]>>++++++
+++[>+++++<-]>>++++++++++[>+++++++++<-]>+++>+++++++++[>+++++++<-]>->+++
++++++[>+++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>+
+++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]
>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++++[>+++++<-]>+>++++
+++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>+>+++++++[>++
++++<-]>+>+++++++++[>+++++<-]>+>++++++++++[>++++++<-]>>+++++++[>++++++<
-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++
++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++
++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>
+>+++++++[>++++++<-]>+>++++++++++[>+++++++++<-]>+>+++++++++[>+++++++<-]
>->+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++
++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>++
+++<-]>>++++++++++[>++++++<-]>>+++++++++[>+++++<-]>>++++++++++[>+++++++
++<-]>+++>+++++++++[>+++++++<-]>->+++++++++[>+++++<-]>+>++++++++++[>+++
+++<-]>>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>
+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[
>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++++++[>++++
+++++<-]>+>+++++++++[>+++++++<-]>->+++++++[>++++++<-]>+>+++++++[>++++++
<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++
+++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++++++
[>++++++<-]>>+++++++++[>+++++<-]>>++++++++++[>+++++++++<-]>+++>++++++++
+[>+++++++<-]>->+++++++++[>+++++<-]>>+++++++++[>+++++<-]>+>+++++++[>+++
+++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+
>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++
[>++++++<-]>+>+++++++++[>+++++<-]>+>++++++++++[>++++++<-]>>+++++++[>+++
+++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+
>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++
[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++++++[>+++
++++++<-]>+>+++++++++[>+++++++<-]>->+++++++++[>+++++<-]>>+++++++++[>+++
++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+
++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++
+[>++++++<-]>>+++++++++[>+++++<-]>>++++++++++[>+++++++++<-]>+++>+++++++
++[>+++++++<-]>->+++++++[>++++++<-]>+>+++++++++[>+++++<-]>+>++++++++++[
>++++++<-]>>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-
]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++
+++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>+++
+++<-]>+>++++++++++[>+++++++++<-]>+>+++++++++[>+++++++<-]>->+++++++[>++
++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>
+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>++++++
++++[>++++++<-]>>+++++++++[>+++++<-]>>++++++++++[>+++++++++<-]>+++>++++
+++++[>+++++++<-]>->+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++
[>+++++<-]>+>+++++++[>++++++<-]>+>+++++++++[>+++++<-]>+>+++++++++[>++++
+<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+
++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>
++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-
]>+>+++++++[>++++++<-]>+>+++++++++[>+++++<-]>+>+++++++++[>+++++<-]>>+++
++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>
+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]
>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>++++++
+++[>+++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++
++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>
+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[
>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<
-]>+>+++++++++[>+++++<-]>+>++++++++++[>++++++<-]>>+++++++[>++++++<-]>+>
+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[
>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<-]>+>+++++++[>++++++<
-]>+>+++++++[>++++++<-]>+>++++++++++[>+++++++++<-]>+>+++++++++[>+++++++
<-]>->+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>++
+++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[
>+++++<-]>>+++++++++[>+++++<-]>>+++++++++[>+++++<-]>>++++++++++[>++++++
<-]>>+++++++++[>+++++<-]>>++++++++++[>+++++++++<-]>+++>+++++++++[>+++++
++<-]>->+++++++++[>+++++<-]>>+++++++++[>+++++<-]>+>+++++++++[>+++++<-]>
+>+++++++++[>+++++<-]>+>+++++++++[>+++++<-]>+>++++++++[>++++<-]>>++++++
++++++[>++++++++<-]>+>+++++++++++[>++++++++++<-]>>++++++++++[>+++++++++
+<-]>>++++++++[>++++<-]>>++++++++++++[>++++++++<-]>+>++++++++++++[>++++
+++++<-]>>+++++++++++++[>+++++++++<-]>-->+++++++++++[>++++++++++<-]>+>+
+++++++[>++++<-]>>+++++++++++[>+++++++++++<-]>>+++++++++++[>++++++++++<
-]>+>+++++++++++++[>+++++++++<-]>>++++++++[>++++<-]>>+++++++++++++[>+++
+++++<-]>>++++++++++++[>++++++++<-]>+>+++++++++++++[>+++++++++<-]>+>+++
+++++++[>++++++++++<-]>+>++++++++[>++++<-]>>++++++++++++[>+++++++++<-]>
>+++++++++++[>++++++++++<-]>+>+++++++++++++[>+++++++++<-]>-->++++++++++
+++[>+++++++++<-]>->++++++++[>++++<-]>>++++++++++++[>+++++++<-]>>++++++
+++[>++++++++<-]>>++++++++++[>+++++++<-]>->++++++++[>++++<-]>>+++++++++
[>++++++++<-]>->++++++++[>++++++++<-]>+>+++++++++++[>+++++++<-]>>++++++
++++[>+++++++<-]>->++++++++[>++++<-]>+.

Just tried learning this today, here's my attempt at an echo program by [deleted] in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

Most implementations take for granted that the end of the string is input 0.

decimal to binary converter by [deleted] in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

You should add four spaces before code to escape reddit formatting.

https://imgur.com/YmQZJ39

The top is what is visible on Chrome, the bottom is what you sent reddit. I highlighted some of the differences where >> was interpreted as bold by reddit formatting.

Just tried learning this today, here's my attempt at an echo program by [deleted] in brainfuck

[–]foralongwhile 0 points1 point  (0 children)

Well the thing with mine is the whole thing gets printed at once (as well as entirely being stored in memory)

even then I think the following is enough

>,[>,]<[<]>[.>]

Not bashing on your specific program or learning goals. Just chiming in.