1 / 5
Mar 2007

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

Can anyone come up with anything better?

  • created

    Mar '07
  • last reply

    Mar '15
  • 4

    replies

  • 1.5k

    views

  • 5

    users

1 year later

This isn't better, but I thought since I took a different approach, I would share.

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

Instead of checking individual characters for matches, it turns input into an actual integer, and then spits it out by converting from an integer to multiple digit Ascii.
The way it converts from an integer to ascii characters is EXTREMELY inefficient, and was just to see how far I could take brainf*ck. Nearly had a prograsm when it was accepted.

11 months later

Lol, so I wasn't the first person to try this out, it took me a while to get it working, but this one was acceptet now:

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

Sorry, I can't read brainfuck code in a short time. smiley So what were your ideas? I just had the following idea: I have a loop with input and a test if the input is 4. If no (line 2), it outputs and goes to the next iteration of the loop. If yes, it goes to the inner part (which is no real loop, because he only stays there for one iteration) and takes another input (line 3). If this input is not 2, it outputs this and the last output (line 4). If yes, it ends. Of course, before outputting, it has to correct the numbers, because i subtracted the ASCII codes of 4 or 2 to test, if it was one of those.

1 year later

i have another solution and is shorter

>>>+[-<+<,<++++[>-------------<-]
>[<++++[>+++++++++++++<-]>.[-]>->+<<]
>[,<++++[>------------<-]>--
[>++++[>+++++++++++++<-]>.[-]<<<++++[>++++++++++++<-]>++.[-]>+<]]
>]
4 years later

Instead of checking individual characters for matches, it turns input into an actual integer, and then spits it out by converting from an integer to multiple digit Ascii.
The way it converts from an integer to ascii characters is EXTREMELY inefficient, and was just to see how far I could take brainf*ck. Nearly had a prograsm when it was accepted.