588 points · by nanochess · 7y ago · 121 comments
And they have maintained their achievements mostly private, perhaps because whenever they've talked about their details publicly, the commentary has mostly been of the form "This isn't possible" and "This is obviously a fraud" from the sorts of ignorant people who make a living installing virus scanners and pirate copies of Windows and thus imagine themselves to be computer experts. (All of this happened entirely in Spanish, except I think for a small amount which happened in Zapotec, which I don't speak; the family counts the authorship of a Zapotec dictionary among their public achievements.) In particular, they've never published the source or even binary code of their operating systems and web browsers, as far as I know.
This changed a few years back when Óscar Toledo G., the son of the founder (Óscar Toledo E.), won the IOCCC with his Nanochess program: https://en.wikipedia.org/wiki/International_Obfuscated_C_Cod... and four more times as well. His obvious achievements put to rest — at least for me — the uncertainty about whether they were underground genius hackers or merely running some kind of con job. Clearly Óscar Toledo G. is a hacker of the first rank, and we can take his word about the abilities of the rest of his family, even if they do not want to publish their code for public criticism.
I look forward to grokking BootOS in fullness and learning the brilliant tricks contained within! Getting a full CLI and minimalist filesystem into a 512-byte floppy-disk boot sector is no small achievement.
It's unfortunate that, unlike the IOCCC entries, BootOS is not open source.
I just watched some of TV interviews with the family and saw the rest of his work, and it's pretty amazing. Check out Invaders in 512 bytes [1][2], or Aardvark game for the Atari 2600 ([3]).
Also seems he has just self-published a book (as of July 27):
Do you would like more details on the inner workings? This program is fully commented in my new book Programming Boot Sector Games and you'll also find a 8086/8088 crash course! Now available from Lulu [4]
[1] https://github.com/nanochess/Invaders
[2] https://www.youtube.com/watch?v=pC976eejfms
[3] https://www.youtube.com/watch?v=HNZfw6jShng
[4] http://www.lulu.com/shop/oscar-toledo-gutierrez/programming-...
The unqualified claim - may I say lie - that CPU time is cheaper than programmer time was never true and never will be[0] because it depends, it depends on the economics, and a surprising amount of my time has been taken up optimising for speed on multicore modern CPUs. Exactly what other people say isn't worth doing, right up until it is - and it often is.
Optimising for speed often means optimising for caches, and that means optimising for size[1], so I'm going to dive into this guy's stuff.
[0] and I'd ask people to stop repeating it unless the larger context is accounted for.
[1] and cache-friendly access patterns; another issue.
I'll be surprised if you learn new things about cache-oblivious algorithm design from BootOS, though.
> Do you would like more details on the inner workings? This program is fully commented in my new book Programming Boot Sector Games and you'll also find a 8086/8088 crash course!
I created one such game [1] a few years ago and had plenty of fun. I'm pretty shocked to see an actual book published specifically about this niche topic. I haven't read it, but I hope it gets some recognition, because IMO toying with 8086 is one of the best ways to get into bare-metal coding.
This is ridiculously impressive hacking up there with Woz code.
Why did Mozart write music? What would Mozart have done if he lived in the city of the deaf?
I mean they've written a lot of stuff on their web site about their motivations — they saw that electronics were the wave of the future, they wanted to make Mexico technologically independent and limit the damage of the neoliberal economic model, they wanted to preserve the Zapotec culture from obliteration, and so on — but I think basically it's that they like doing it, in the way Mozart liked music. I'm sympathetic to those other motivations but I don't think they would have been sufficient to maintain their progress in the face of the opposition they've faced from the Mexican government, which continues to adhere to the obsolete "progress is big factories" model mixed with the simply traitorous "progress is installing Microsoft software" model. (They've written about this stuff on their website too.)
As far as I can tell, they make a living by building some industrial control hardware and teaching electronics classes. Maybe a member of the family will comment and offer more detail.
The HN profile of OP says: “I fight boredom by challenging myself to my limits.”
That’s the hacker spirit :)
But only in my dreams do I approach achievements like Biyubi.
>Probably nobody will read this comment here, but I thought it was worth mentioning.
They've translated some of their pages themselves, although the translation is somewhat out of date: http://www.biyubi.com/eng_principal.html
If you make fun of the errors in the translation I will make fun of you mercilessly for not knowing any Spanish at all.
Unfortunately I can't update my top-level comment above.
Wow. None of this is plausible.
It's not? What's that asm file in there? It looks like it's the full source code for the image. Or do you mean there's no license file, so it's not free-software/copyright?
I'm well aware that people in Mexico City aren't illiterate paupers. That's not what I was saying, man. But you're going to have a hell of a time launching a new kind of laptop in Mexico City, and that's what they were trying to do.
> Unfortunately, they live on the outskirts of Mexico City, not Sunnyvale or Boston, so the public accounts of their achievements have been mostly written by vulgar journalists without even rudimentary knowledge of programming or electronics. It would be a valid reason in '80s
Sometime in the past couple months, there was a link on HN to a project also by one dude, who's implementing a CPU on breadboards, with wires. (Can probably be found by the score filter from the ‘undocumented features’ of HN: the post got >2000 points.)
Computers aren't necessarily gigantic corporate undertakings.
I'm not saying it's not possible, there are much stories in HN about guys creating VGA cards or self-made computers, I'm asking for evidence.
Maybe you mean Ben Eater. He has a great Youtube Channel: https://www.youtube.com/channel/UCS0N5baNlQWJCUrhCEo8WlA
All of that sounds very interesting, but as edgarvm points out, it's not exactly evidence. Reads more like a product brochure than a research paper detailing how their claims are possible.
I would make a recommendation to the BootOS project which is to squeeze a function table as I have done in order to allow programs to call functions in the kernel. If not, you either end up re-writing these functions for each of your programs, you have to recompile your programs any time you change your kernel or you end up trying to maintain jump positions.
For those still reading, I'm working on a large overhaul of saxos which includes very simple multi-tasking (currently working). The intention will be to have the kernel load a 512 byte GUI on top and then for the programs to have access to a terminal within the GUI. Once that's working I then want to move towards also allowing programs to draw to the Window, but that also brings its own issues.
[1] https://bitbucket.org/danielbarry/saxoperatingsystem/src/mas...
I don't think BootOS tries to export its filesystem API to user programs. BootBASIC in particular doesn't seem to have a way to save and load programs.
Brilliant work!
(Apparently I heard about this before and never looked at it? Because I have a clone of it on my laptop dating from September 14th.)
Yes, but it offers more to the programs that it loads. There's a trade-off when you go this low on disk space!
> But the filesystem supports more than one sector per file?
SaxOS supports half the disk, but each file has to be 512 bytes [1]. There are potentially work arounds for this limitation of one sector per file, but it's just hacky. (For example, you could name your files txt0, txt1, ... - or you could leave some header information in your program's file for more data.) I will fix this in a future version though, the plan is to keep loading sectors by the same name in the file table.
> Saxos is open-source, unlike BootOS, even if maybe that would be clearer if you used a widely-recognized license.
When I wrote this I had no idea about licenses :) I will look to update this, but the project is mostly just archived for now.
> I don't think BootOS tries to export its filesystem API to user programs. BootBASIC in particular doesn't seem to have a way to save and load programs.
It takes very little to extend the functionality of your kernel to your implementing programs, hopefully BootOS will do this in the future. At some point I want to write a simple self-writing documentation (using the comments structure) so that I can always produce up-to-date documentation for the OS.
> Brilliant work!
Thanks!
I was trying to build a very small low end compression algorithm for it to, but unfortunately I came hard up against entropy. The idea worked (as I envisioned it) but it had the effect of just transforming the dimension the data was stored in and adding unthinkable amounts of computational power and memory being required to get it back.
> (Apparently I heard about this before and never looked at it? Because I have a clone of it on my laptop dating from September 14th.)
Awesome! My plan for quite a while has been to write a small book and guide people through building their own very simple OS. I think people building their own 512 byte boot-able kernel is a nice intro into OSes whilst also having enough limitations that at some point you can say "this is complete". Anyway, it's what I wish had existed when I first set out may years ago!
Speaking of which, I must give a shout out to MikeOS which is where I learned about assembly and OSes [2].
[1] https://bitbucket.org/danielbarry/saxoperatingsystem/src/96c...
I strongly encourage you to stick an explicit license on it if you want people to study it! Otherwise there's the risk of a Numerical Recipes or SCO lawsuit nightmare. (While we were writing this thread, Óscar Toledo G. added a BSD license to BootOS!)
I wonder—and maybe it's presumptuous to offer suggestions like this without working code, so feel free to ignore it—if it might be more flexible to go the BootOS route of including at least some kind of hex or octal† input in the initial boot monitor, and relegate the filesystem to a loadable device driver in a second sector? It would be less convenient for running apps that want to use the firesystem, since you'd need to run two commands instead of one, but it also means those 512 bytes are sufficient by themselves to bootstrap anything else you wanted. With enough work.
…holy shit, you have a scrolling full-screen editor in one sector? This is amazing.
† I like octal because (sorry, rdl) the 8086 instruction set is way easier to read in octal. Also octal input takes less code than hexadecimal input, unless there's something I'm not seeing, or you're willing to count 0123456789jklmno.
https://thestarman.pcministry.com/asm/mbr/index.html
Writing a tiny program that lets you modify memory, and more importantly execute it, is the first step in the "bootstrap pilgrimage" to creating your own environment and eventually OS, but this one seems deliberately limited; nonetheless, starting with this, one can use it to create the next stage of the bootstrap, 512 bytes at a time.
For the new generations this will seem not to have any real applications beyond code golfing.
But from a nostalgic point of view, it brings me back to the demoscene era. I still fell a wistful longing for the old days thinking to fr-041:debris ( https://www.youtube.com/watch?v=tq2llbP52Zo ) 7:20 minutes of awesomeness in less than 199 Kb.
BTW, I just google it and apparently there is plenty of events going on... Coming very soon: https://www.assembly.org/summer19/
I agree that it's probably not practically useful. But it's a brilliant hack!
Interestingly, there is modern OS in the same space. That's UEFI. Unti I played with it a few months ago, I thought it was some mysterious firmware-adjacent black-box. But actually it's just an OS, very similar to DOS (though it runs in protected mode).
It has a shell and some basic built-in commands including text editors and such. And most importantly it lets you run executables that a stored on a FAT (well, FAT32) filesystem.
The name BootOS could very well describe UEFI. And equally, a slightly more capable version of BootOS could serve as (very underpowered) UEFI replacement.
What's this then?
bootOS programs: (Oh yes! we have software support)
fbird https://github.com/nanochess/fbird
Pillman https://github.com/nanochess/pillman
invaders https://github.com/nanochess/invaders
bootBASIC https://github.com/nanochess/bootBASIC
And one can test the image:"find a pre-designed disk image along this Git with the name osall.img"
So, although I am not planning to switch my laptop to running BootOS, I think there are some significant things BootOS can do that UEFI can't.
1. Flash boot os on the boot sector, place any iso/img file on the stick.
2. Boot from the stick
3. select the iso you want to boot
Don't know it this is possible though... (I know that there is a emulation mode for virtual cd drives in the bios but thats about it...)
I used to have a 2.5 enclosure that supports this in hardware (Zalman ZM-VE300) but selection of ISO is done on-device before booting. I don't see any reason you couldn't build a hardware/software combo where selection on-screen made the USB hardware mount the selected ISO as a new logical device and then booted it.
[1]: http://www.zalman.com/contents/products/view.html?no=212
It's not 100% compatible with every ISO, but it's definitely possible to boot more than one thing from a single USB drive.