Skip to main content
added 1782 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

brainfuck, 77 76 75 72 bytes

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

Try it online!Try it online!

How it works

The interpreter begins with a tape of 0 cells.

++++++++

This sets the first cell to 8, leaving the tape in the following state.

   8
   ^
[>+>++++++>++++>-<<<<-]

This increments the second cell once, the third cell 6 times, the fourth cell 4 times, decrements the fifth cell once, then goes back to the beginning of the tape and decrements the first cell. After 8 iterations, the tape looks like follows.

  0   8  48  32  -8
  ^
>++

We advance to the second cell and increment it twice, getting ready to print the digits.

  0  10  48  32  -8
      ^
[>.+<-]

This prints the third cell, increments it, then goes back to the second cell and decrements it. After 10 iterations, we've printed 0123456789 and the tape looks like follows.

  0   0  58  32  -8
      ^
>>

Time to prep the tape for the letters! We begin by advancing two cells.

  0   0  58  32  -8   0   0
              ^
[>+>++>+++<<<-]

This increments the fifth cell once, the sixth cell twice, the seventh cell thrice, then goes back to the fourth cell and decrements it. After 32 iterations, the tape looks like follows.

  0   0  58   0  24  64  96
              ^
>++

As a last step before printing the letters, we advance to the fifth cell and increment it twice.

  0   0  58   0  26  64  96
                  ^
[>+.>+.<<-]

Finally, we advance to the sixth cell to increment and print it, do the same for the seventh cell, then go back to the fifth cell and decrement it. After 26 iterations, we've printed Aa...Zz.

brainfuck, 77 76 75 72 bytes

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

Try it online!

brainfuck, 77 76 75 72 bytes

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

Try it online!

How it works

The interpreter begins with a tape of 0 cells.

++++++++

This sets the first cell to 8, leaving the tape in the following state.

   8
   ^
[>+>++++++>++++>-<<<<-]

This increments the second cell once, the third cell 6 times, the fourth cell 4 times, decrements the fifth cell once, then goes back to the beginning of the tape and decrements the first cell. After 8 iterations, the tape looks like follows.

  0   8  48  32  -8
  ^
>++

We advance to the second cell and increment it twice, getting ready to print the digits.

  0  10  48  32  -8
      ^
[>.+<-]

This prints the third cell, increments it, then goes back to the second cell and decrements it. After 10 iterations, we've printed 0123456789 and the tape looks like follows.

  0   0  58  32  -8
      ^
>>

Time to prep the tape for the letters! We begin by advancing two cells.

  0   0  58  32  -8   0   0
              ^
[>+>++>+++<<<-]

This increments the fifth cell once, the sixth cell twice, the seventh cell thrice, then goes back to the fourth cell and decrements it. After 32 iterations, the tape looks like follows.

  0   0  58   0  24  64  96
              ^
>++

As a last step before printing the letters, we advance to the fifth cell and increment it twice.

  0   0  58   0  26  64  96
                  ^
[>+.>+.<<-]

Finally, we advance to the sixth cell to increment and print it, do the same for the seventh cell, then go back to the fifth cell and decrement it. After 26 iterations, we've printed Aa...Zz.

added 11 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

brainfuck, 77 76 7575 72 bytes

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

Try it online!Try it online!

brainfuck, 77 76 75 bytes

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

Try it online!

brainfuck, 77 76 75 72 bytes

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

Try it online!

deleted 117 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

brainfuck, 77 7676 75 bytes

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

The first part was inspired by this algorithm.

Try it online!Try it online!

brainfuck, 77 76 bytes

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

The first part was inspired by this algorithm.

Try it online!

brainfuck, 77 76 75 bytes

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

Try it online!

added 14 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading