Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

code density (Announce)

posted by Rugxulo Homepage, Usono, 16.09.2010, 21:10

> > "Should be", yeah, but never are. 32-bit assumptions, POSIX 2008,
> > everything-is-*nix, etc.
>
> Most of that should be possible to be worked around by the compiler - even
> if generating 16-bit code. The only problem is probably code size - can't
> fit no POSIX-compatible system in 1 MiB.

Minix 2.0.2 was the last to truly support the 8086, and it was POSIX. I'm not saying you could or should cram everything in there, but it should be good enough for "something"! (I may be preaching to the choir here, heh.)

FYI, 2.0.4 had a bug, but it would run minimally on 286s. Minix-vmd was the 386+ fork that added virtual memory, XFree86, and GCC. Minix 3 is 386+ only but much more sophisticated, heavily becoming more modern every day (but I don't know the true minimum specs for that, can't test right now).

Niklaus Wirth worked back when they had to fit compilers in less than 64 kb. Lilith only had 256 kb of RAM, I think, and was heavily designed for code density. His Oberon system also ran in as little as 200 kb, including compiler. Of all people, I'll bet he at least thinks we've jumped the shark and lost focus on how to do things properly. You know, a megabyte truly is a lot of space. Even at worst, six bytes per instruction (8086), 1024*1024/6 = 174762, or 640*1024/6 = 109226 or more realistically 512*1024/6 = 87381. So yeah, can't we find a way to write decent programs in that many instructions??? I THINK SO!!! (I don't want to say GCC or C/C++ is an abomination, but it's truly 1000 x too complex to build and hence WAY too big in size for what it does. BTW, adjust the numbers for 10 bytes = max 286 instruction, 15 bytes max for 386.)

It's truly sloppy or crappy compilers that don't output small size anymore. Or maybe it's the dumb linkers fault for not stripping the unused parts. Still, even when some claim to be smart, it's still "too big" in my eyes. It's not that it's so horribly huge, but all that bloat does add up until you can't run anything in less than ... MB / GB. Most people don't want to go back to raw assembly, and that's fine, but we NEED decent compilers that aren't too lazy to actually do some of the grunt work. 100 kb (or more!) for a "Hello world!" (or any reasonably small program, like a dumb Befunge interpreter) is just too much. And we don't need ten billion tools that overlap and do the exact same thing but with different syntax. But whatever, simplifying and unifying everything is an art in itself, and it's not easy.

WIRTH FOR PRESIDENT 2012!

 

Complete thread:

Back to the forum
Board view  Mix view
22649 Postings in 2111 Threads, 402 registered users, 900 users online (1 registered, 899 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum