4 ms·
> echo "hello world" I count 18 bytes in that program. Too long! I left a definitive answer on Quora some years ago: https://www.quora.com/What-programming-l
by stickfigure 3y ago
> echo "hello world"
I count 18 bytes in that program. Too long!
I left a definitive answer on Quora some years ago:
https://www.quora.com/What-programming-language-has-the-shortest-Hello-World-program/answer/Jeff-Schnitzer?ch=10&oid=8795460&share=cf052892&srid=CWe&target_type=answer https://www.quora.com/What-programming-language-has-the-shor...
- deleted 3y ago[deleted]
- sacrosancty 3y agoThose 18 bytes aren't the binary, they're just the command to call the program. Don't count it just as you wouldn't count the length of the filename and its arguments for a regular executable.
- cvoss 3y agoIf you insist on categorizing `echo "hello world"` as the invocation, rather than the program, then what is the program under your categorization? I'll submit that it is the `echo` binary, which is a whopping 35kB on my machine. I'll just observe that there is no way to compress "hello world" below a certain size (definitely not to size 0). If you think you have, you've just "moved" it into, say, the framework/os/input/algorithm/etc. But this fun little debate we're having here is actually connected to some deep theoretical questions, like Kolmogorov complexity, its invariance theorem, and applications to the concept of data compression [0]. [0] https://en.wikipedia.org/wiki/Kolmogorov_complexity https://en.wikipedia.org/wiki/Kolmogorov_complexity