P
I just spent 30 minutes reading about this. I'm so shocked that I'm logging in to comment after 5 years of lurking.
Justine has built a c library that allows you compile a binary once and have it run it on any os or baremetal. The SAME binary. Quite frankly, that sentence doesn't even make sense to me.
Check out https://storage.googleapis.com/justine/cosmopolitan/index.html
As far as I'm concerned, this is literal magic. Look at the magic numbers:https://github.com/jart/cosmopolitan/blob/37a4c70c3634862d8d005955c032b5a2fa8737c5/libc/sysv/consts.sh
I could go on, but there's no binary portability comparison with any other language. And she has made some pretty neat optimizations.
Back in the day, I saw some pretty neat stuff with the ELF format, but this takes the cake.
Wow.
Edit: I'm editing because this is just so bloody absurd.
https://storage.googleapis.com/justine/printimage.html
$ ./printimage.com someimage.jpg
Like wow. And also video.
https://storage.googleapis.com/justine/printvideo.html
I'm struggling to put my shock into words. I've been around.
There's engineering. There's academia.
But this falls into straight-up wizardry.
hprx, 5 hours ago