News for hackers. Stuff that matters.
Re:Smallest x86 ELF Hello World by sambeau on Tuesday October 11, 2011 @11:38AM (#3099008)
Other than as an interesting intellectual exercise is there any reason to do this on a modern computer with Virtual memory?

Surely, once you get below page-size (e.g. 4K) you are just wasting memory that will get loaded anyway?

Re:Smallest x86 ELF Hello World by DanielRibeiro on Tuesday October 11, 2011 @12:30PM (#3099209)
Well, on one of the Dart threads, bashing its hello world size, this[1] came up:

Compile "Hello world" into an executable, and see how many kilobytes it takes on most architectures, despite the object file being a few bytes.

This thread pretty much responds to that. It is no 17000 lines, nor 17000K, it is just 142 bytes (other comments suggest it is 62).

[1] http://news.ycombinator.com/item?id=3098660

Re:Smallest x86 ELF Hello World by sambeau on Tuesday October 11, 2011 @01:21PM (#3099428)
It makes more sense for VM byte-code as the bytes not only have to be loaded (probably by the page, again) but the bytes have to be run and possibly jitted, too.
Re:Smallest x86 ELF Hello World by Moschops on Tuesday October 11, 2011 @12:00PM (#3099096)
Practice and understanding for when you've got to work on something that comes with 4k of RAM in total, if you're lucky.
Re:Smallest x86 ELF Hello World by sambeau on Tuesday October 11, 2011 @12:08PM (#3099129)
I edited out the words "apart from on an embedded device with a tiny memory" as I had hoped that the mention of the modern computer and virtual memory would suffice.

But this was a genuine question rather than a put-down. I was hoping to have my assumption debunked.

EDIT: I have no idea why you're being down-voted seems unfair