Re:How small is the smallest .NET Hello World binary?
by bombcar on Sunday July 09, 2023 @07:42AM
(#36653674)
My hello world requires the "bash" framework and is zero bytes. You call it via:
[ Parent
| on HN ]
Re:How small is the smallest .NET Hello World binary?
by bdhcuidbebe on Sunday July 09, 2023 @07:47AM
(#36653693)
I’m intrigued, please share your 100% text compression rate algorithm!
Re:How small is the smallest .NET Hello World binary?
by bombcar on Sunday July 09, 2023 @07:48AM
(#36653697)
Just make sure you have a filesystem that can take arbitrary-length filenames! Then you can compress to zero byte file with a very long filename ;)
Re:How small is the smallest .NET Hello World binary?
by bdhcuidbebe on Sunday July 09, 2023 @08:14AM
(#36653838)
I guess if you store the filetable in unlimited S3 storage, maybe ;-)
Re:How small is the smallest .NET Hello World binary?
by reilly3000 on Sunday July 09, 2023 @09:53AM
(#36654449)
TXT records in Route 53 for 100% SLA
Re:How small is the smallest .NET Hello World binary?
by anoncow on Sunday July 09, 2023 @09:45AM
(#36654406)
Infinity compression.
Re:How small is the smallest .NET Hello World binary?
by osigurdson on Sunday July 09, 2023 @04:43PM
(#36658684)
I once ran gzip and infinite number of times on a text file. I was surprised at the result.
Re:How small is the smallest .NET Hello World binary?
by besnn00 on Sunday July 09, 2023 @09:17PM
(#36660876)
Should it become idempotent after a certain number of iterations? What were the results?
Re:How small is the smallest .NET Hello World binary?
by Chaosvex on Monday July 10, 2023 @12:15AM
(#36662017)
He doesn't have the results, yet. He's running it in an infinite number of times.
Without actually checking, the result is going to be that the output size increases slightly over time.
Re:How small is the smallest .NET Hello World binary?
by osigurdson on Monday July 10, 2023 @11:58AM
(#36668261)
I was in quantum space at the time so results are hard to translate. The best approximation to our current reality is a black hole.
Re:How small is the smallest .NET Hello World binary?
by tynorf on Monday July 10, 2023 @01:08AM
(#36662357)
I'm pretty sure part of the contract with gzip (and compression in general) is that applying it N times is undone by decompressing N times.
The size definitely gets bigger with each iteration:
$ echo text >0.txt
$ for i in {0..9}; do
gzip <$i.txt >$((i + 1)).txt
done
$ ls | sort -n | xargs -n1 wc -c
5 0.txt
25 1.txt
46 2.txt
69 3.txt
82 4.txt
105 5.txt
120 6.txt
143 7.txt
161 8.txt
184 9.txt
207 10.txt
Re:How small is the smallest .NET Hello World binary?
by mkleczek on Sunday July 09, 2023 @08:46AM
(#36654049)
I am afraid it requires "echo" runtime environment, doesn't it?
Re:How small is the smallest .NET Hello World binary?
by tehsauce on Sunday July 09, 2023 @08:54AM
(#36654103)
yes but it’s very easy to install if you have npm
Re:How small is the smallest .NET Hello World binary?
by AdieuToLogic on Sunday July 09, 2023 @09:14AM
(#36654201)
That almost launched a sip of morning coffee... Well played!
Re:How small is the smallest .NET Hello World binary?
by hnfong on Sunday July 09, 2023 @08:59AM
(#36654129)
echo is actually a bash builtin, so, not really, unless you're using another shell that doesn't have builtin echo.
Re:How small is the smallest .NET Hello World binary?
by virtue3 on Sunday July 09, 2023 @10:19AM
(#36654637)
whoosh...
Re:How small is the smallest .NET Hello World binary?
by AdieuToLogic on Sunday July 09, 2023 @09:21AM
(#36654252)
How about this, assuming there must be a stand-alone "binary":
cd /tmp
echo 'echo $0' > hello\ world
chmod +x hello\ world
PATH=. hello\ world
Re:How small is the smallest .NET Hello World binary?
by osigurdson on Sunday July 09, 2023 @11:07AM
(#36655066)
Are you sure that is zero bytes?
Re:How small is the smallest .NET Hello World binary?
by stickfigure on Sunday July 09, 2023 @11:44AM
(#36655428)
> 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-shor...
[dead]
Re:How small is the smallest .NET Hello World binary?
by cvoss on Sunday July 09, 2023 @06:39PM
(#36659746)
If 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].