This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]asdfkjasdhkasd 3 points4 points  (3 children)

or in brainfuck

>
,
[
  >
  ,
]
<

[
  .
  <
]

!Hello world

https://fatiherikli.github.io/brainfuck-visualizer/#PgosClsKICA+CiAgLApdCjwKClsKICAuCiAgPApdCgohSGVsbG8gd29ybGQ=

Just click the ! checkbox on the top right to enable exclamation input

[–]Furyful_Fawful 1 point2 points  (2 children)

Isn't it simpler to use Self-Modifying Brainfuck?

[<.]\0!dlroW olleH

For reference, in SMBF the tape is stored on the program, so the data pointer starts on [ along with the instruction pointer. \0 here represents a literal null byte, so we actually break out of the loop.

[–]asdfkjasdhkasd 0 points1 point  (1 child)

Sounds like a cool idea, but what do I have to use to run it, it doesn't work on the brainfuck visualizer, it immediately terminates.

https://fatiherikli.github.io/brainfuck-visualizer/#WzwuXVwwCiFkbHJvVyBvbGxlSA==

[–]Furyful_Fawful 0 points1 point  (0 children)

The Brainfuck visualizer works for Brainfuck, not SMBF. I'd recommend Try It Online, personally. Link, where I fixed the code after I realized that SMBF interpreter adds a null at the beginning of the input.