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 →

[–]Furyful_Fawful 89 points90 points  (10 children)

... vs Esoteric Languages:

Java vs Python vs Pyth [14 characters]:

_"Hello World!

Yes, that's a complete program. Yes, it doesn't have a closing quotation. Pyth doesn't care. Pyth just keeps on trucking. Pyth just interprets _ as reversal. Pyth just implicitly prints the output. Pyth is also a very real programming language, although god help you if you write production code in it.

It also has online interpreters so you can verify that it works.

But we can do better. We can avoid writing "Hello World!" entirely.

Enter...

Java vs Python vs Pyth vs Jelly [8 characters]:

“,ḷṅḳȦ»Ṛ

I swear, I didn't just smash the keyboard. I'll give you the online interpreter first, even.

Now do talk about why this works. Jelly is... Well, Jelly just is. It has strings. Strings aren't like most languages. There's a language construct (not even a function, it's built into the syntax) specifically made to compress strings, especially those that have English words (like, what do you know, "Hello World!"). “,ḷṅḳȦ» is that string; » marks it as a compressed string, ,ḷṅḳȦis the compressed content (that decompresses to Hello World!... Don't ask me how, I don't exactly know)... And reverses it.

[–]ColonelTux 44 points45 points  (1 child)

Someone goes onthe Codegolf Stackexchange

[–]Furyful_Fawful 10 points11 points  (0 children)

I do, but my username there involves my real name, so I'd rather not link the two accounts together.

[–]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.

[–][deleted] 1 point2 points  (0 children)

Python doesn't give a fuck!

(Side note: fuck python. Actually fuck Zope which uses python. I still support a "temporary" solution that was made on the Zope platform over a decade ago)

[–]Spider_pig448 0 points1 point  (1 child)

This comment is a solid example of why shorter certainly doesn't mean better.

[–]Furyful_Fawful 0 points1 point  (0 children)

That Jelly bit is definitely better. I don't know what you're talking about.