8 ms·
A monolithic operating system in 512 bytes of x86 machine code
- marssaxman 3y agoWhat a beautiful work of art!
- rajnathani 3y agoTIL that the definition of a monolithic operating system doesn’t entail a scheduler.
- detrites 3y agoAbsolutely mad history here: https://news.ycombinator.com/item?id=20569438 https://news.ycombinator.com/item?id=20569438 (2019) As a teaser, from the above: > For those not aware of the background, the author is a wizard from a secretive underground society of wizards known as the Familia Toledo; he and his family (it is a family) have been designing and building their own computers (and ancillary equipment like reflow ovens) and writing their own operating systems and web browsers for some 40 years now.
- silisili 3y agoI've read about them before, and Oscar's seemingly complete mastery of these type of things. It makes me wonder what he does professionally, and how much it pays. Is it a valuable(to companies) skill even?
- thom 3y agoYou can buy the annotated source code for Oscar Toledo G’s Nanochess here: http://www.amazon.com/Toledo-Nanochess-commented-source-code/dp/1304864375 http://www.amazon.com/Toledo-Nanochess-commented-source-code... It was certainly a humbling experience for me.
- acqq 3y agoalso: C: Nanochess online: https://nanochess.org/chess3.html https://nanochess.org/chess3.html Micro-Max: https://home.hccnet.nl/h.g.muller/max-src2.html https://home.hccnet.nl/h.g.muller/max-src2.html assembly: Atomchess Game The world's smallest chess program in x86 machine code, only 326 bytes! https://nanochess.org/chess6.html https://nanochess.org/chess6.html
- acqq 3y agoAnd another: https://smmax.sourceforge.net/ https://smmax.sourceforge.net/ Written in C: "The current "shrinking level" of this version is around 670 bytes." ... "Later on this version has been extended to allow playing with full FIDE rules, meaning including the management of en-passant, castling and under promotion. This new version is around 750 characters (35 lines of codes when pretty printed)." + full FIDE version assembly 583 bytes .COM + ZX81 1K version
- mysterydip 3y agoThere's also these two books: boot sector games http://www.lulu.com/shop/oscar-toledo-gutierrez/programming-boot-sector-games/paperback/product-24188564.html http://www.lulu.com/shop/oscar-toledo-gutierrez/programming-... more boot sector games (includes this OS): http://www.lulu.com/shop/oscar-toledo-gutierrez/more-boot-sector-games/paperback/product-24462035.html http://www.lulu.com/shop/oscar-toledo-gutierrez/more-boot-se...
- misja111 3y agoAssembly was one of the first languages that I wrote in when I learned to program in the 80's, simply because other languages were too slow to develop games and other stuff. Since then I've switched to Pascal, Java, Scala, Python etc. But sometimes I still miss the joy of micro-optimizing some assembly code until perfection. This Toledo family is amazing. I wonder if this will be the future of SD craftmanship, now that Moore's law seems to come to an end and we are forced to look at optimizing the performance of our software stack.
- actionfromafar 3y agoIt's so incredible I can't digest it.
- gigel82 3y agoWell now you made me curious to learn more about this mythical OS and browser... any leads?
- 29athrowaway 3y agoUnderground but with an Internet website, github and HN account? probably you are hyping it a bit too much. http://www.biyubi.com/eng_principal.html http://www.biyubi.com/eng_principal.html https://news.ycombinator.com/from?site=github.com/nanochess https://news.ycombinator.com/from?site=github.com/nanochess https://news.ycombinator.com/user?id=nanochess https://news.ycombinator.com/user?id=nanochess
- detrites 3y ago"Hyping"? My own opinion was presented as-is, without any exaggeration. Anyway thanks for the links!
- brutusborn 3y agoAnother HN thread on Toledo: https://news.ycombinator.com/item?id=28337064 https://news.ycombinator.com/item?id=28337064
- Solvency 3y agoThis reads very aggrandizing and hyperbolic.
- CephalopodMD 3y agoSounds a bit like wozmon. Neat!
- bmacho 3y agoWhy is it monolithic? Why not microkernel? Especially that all the typical jobs of an operating system are outsourced.
- Arch-TK 3y agoI think the infrastructure required for a microkernel would have more features than this OS. It really is incredibly barebones and that's why it is monolithic. That being said, I guess it's maybe possible.
- kramerger 3y agoWarning: big piece of opinion that may trigger some of you. In practice (feel free to verify this yourself by downloading and building the latest L4 derivative), microkernels that actually work on modern hardware need a huge amount of baseline code to get IPC and memory server working in a distributed yet somewhat performant fashion. There is a flag for compiling Linux without any hardware and filesystem drivers. That gives you the kernel core in a surprising small binary which is not that far from sel4 or okl4. In summary, monolithic is the new microkernel :)
- jandrese 3y agoHow much separation are you expecting from half a kilobyte of code?
- oso2k 3y agoStrictly speaking, a monolithic kernel is one which builds in all the code to operate: talk to hardware, load programs, perform its services or even include the ability to load drivers/code to talk to other hardware. All of the key functionality is loaded into the kernel program space but that is usually separate from user space or process space. Dumb programs; smart kernel. https://en.wikipedia.org/wiki/Monolithic_kernel https://en.wikipedia.org/wiki/Monolithic_kernel A microkernel has a much more limited scope, sometimes just the ability to pass messages or data between processes, and may exclude most of the functionality to talk to hardware. The microkernel program space is separated from user space, process space and driver space. Dumb kernel; smart programs. https://en.wikipedia.org/wiki/Microkernel https://en.wikipedia.org/wiki/Microkernel
- nico 3y agoThis is amazing Would love to see something like this that boots into a chat with either a local or remote LLM
- thelastparadise 3y agoWhat? Why?
- renonce 3y agoLet's find a way to fit an LLM into 512 bytes!
- Sharlin 3y agoLarge language model (for certain values of "large")
- dhosek 3y agoKind of reminds me of writing single-sector bootloaders¹ for the Apple ][. The idea was that you wouldn’t have DOS on a floppy disk to free up that storage for other stuff, but then if you accidentally turned on your computer with that disk in the drive, you’d want a nice message letting you know you messed up and a prompt so you could put in a DOS disk and boot up properly. ⸻ 1. It might have been a whole track on the disk, it’s hard to remember the details of this when it’s 37 years since I last used an Apple ][.
- petabytes 3y agoReminds me of the 256 byte OS I made, which was really just a BrainFuck ripoff with a prompt. Went on to make a huge assembler and "kernel" for it.