Live data from Hacker News

Tetris-OS: An operating system that only plays Tetris

github.com

91–100 of 126 posts

Re: Tetris-OS: An operating system that only plays Tetris

#91

“In the 1980s with things like the Amiga computer, for example, every game was a boot disk. It booted into its own customized version of an operating system that ran what it needed to run to make its game work well and be performant and reliable. … We know that in the past, hardware that was very capable and very interesting made it so easy to create an operating system that literally everybody did it. Not a few peop…

He seems to forget that the Amiga had the OS in a ROM (or, in the case of the A1000, in a separate Kickstart disk to be loaded at power-up).

Boot-loaded Games disposed of the GUI (Workbench) and some other things, but the OS was not included in them.

Re: Tetris-OS: An operating system that only plays Tetris

#92
post #85
post #10

"Windows - Absolutely no idea." QEMU works on WSL and WSL2 now, that would be one way.

Couldn't you actually run this on bare metal on a suitable PC?

Or DOSBox. You could run the binary as if it was a bootable floppy.

          boot tetris.bin -l a
Or, if you have the source, change the org loading address to 100h, then compile it as usual, as DOS will see it as a COM file and thus you could run it under DOS.

Re: Tetris-OS: An operating system that only plays Tetris

#93

“In the 1980s with things like the Amiga computer, for example, every game was a boot disk. It booted into its own customized version of an operating system that ran what it needed to run to make its game work well and be performant and reliable. … We know that in the past, hardware that was very capable and very interesting made it so easy to create an operating system that literally everybody did it. Not a few peop…

Yet many of these self-booting disks would quite happily work when copied to a reboot-persistent RAM drive (the RAD: drive), which showed that although it was claimed that they did all the OS-ey things themselves, actually there was still quite a lot of the original OS still running there. At the core of it, the AmigaOS exec was tiny and helpful, and things like device drivers were just separate processes that you se…

Doesn't WHDLoad do that?

Re: Tetris-OS: An operating system that only plays Tetris

#96

“In the 1980s with things like the Amiga computer, for example, every game was a boot disk. It booted into its own customized version of an operating system that ran what it needed to run to make its game work well and be performant and reliable. … We know that in the past, hardware that was very capable and very interesting made it so easy to create an operating system that literally everybody did it. Not a few peop…

It should be again like this. I only truly understood C after I wrote my own fully functional Operating System (e.g. paging, interrupts, user mode, multitasking and multicore etc.) and got it running on bare metal. Programming other things in C now often feels like when you beat the final level in recent Mario games ("Champions Road") and replay the core game again, it just flows is easy and highly enjoyable. I'd rec…

>I'd recommend every serious programmer to write their own OS.

Um, I do extremely well working exclusively with higher level languages like Python and JavaScript. If we're talking about pure salary, a senior web dev will probably make more than the vast majority of embedded engineers.

I'm totally nitpicking here, but I don't like the gatekeeping of saying you need to be able to use a low level language to be a programmer

Re: Tetris-OS: An operating system that only plays Tetris

#97
post #96

Earlier quoted context omitted.

It should be again like this. I only truly understood C after I wrote my own fully functional Operating System (e.g. paging, interrupts, user mode, multitasking and multicore etc.) and got it running on bare metal. Programming other things in C now often feels like when you beat the final level in recent Mario games ("Champions Road") and replay the core game again, it just flows is easy and highly enjoyable. I'd rec…

>I'd recommend every serious programmer to write their own OS. Um, I do extremely well working exclusively with higher level languages like Python and JavaScript. If we're talking about pure salary, a senior web dev will probably make more than the vast majority of embedded engineers. I'm totally nitpicking here, but I don't like the gatekeeping of saying you need to be able to use a low level language to be a progra…

Without passing judgement on either side, I think the wording of your comment and the wording of the comment you're replying to speak for themselves. You mention you're talking about “pure salary”, while the comment you're replying to speaks about the enjoyment and knowledge brought about by understanding what's going on under the hood.

You may well have very different yardsticks. Programming means different things to different people.

Re: Tetris-OS: An operating system that only plays Tetris

#98
post #87

Earlier quoted context omitted.

I like to define an OS as something that can execute arbitrary binaries. So if your hypothetical Smalltalk OS has a defined executable format that non-Smalltalk programs can compile to, I’d call it an OS. Note that this also makes for example the uppermost part of the JVM an OS by my definition. I’d argue it’s not a completely incorrect characterization.

You've presented a conscientious criterion for what can be classified as an operating system. I think it's clever, I'm not sure I agree though. It's very broad: By this same definition any processor is an operating system, since it will execute arbitrary binary data. Your example of the JVM being an operating system calls to mind the above: It is a virtual machine , it is designed to execute arbitrary bytecode in a s…

You may have found a loophole in my specification :) I’d like to amend it to specify that an OS refers to software “that can run...”. (And this is why we do design reviews!).

In your example, a real or virtual machine’s load/setregs interface is an operating system. One that can only run a single program at a time in the case of the physical processor’s bootstrap, but you’d be surprised how similar that is to early DOS.

A more hand-waving version is “the lowest level interface over the machine that can run...”. So a processor and a ROM grid can run arbitrary programs, but the lowest common denominator entry point is the ROM flashing spec! A very slow scheduler indeed.

Re: Tetris-OS: An operating system that only plays Tetris

#99
post #96

Earlier quoted context omitted.

>I'd recommend every serious programmer to write their own OS. Um, I do extremely well working exclusively with higher level languages like Python and JavaScript. If we're talking about pure salary, a senior web dev will probably make more than the vast majority of embedded engineers. I'm totally nitpicking here, but I don't like the gatekeeping of saying you need to be able to use a low level language to be a progra…

Without passing judgement on either side, I think the wording of your comment and the wording of the comment you're replying to speak for themselves. You mention you're talking about “pure salary”, while the comment you're replying to speaks about the enjoyment and knowledge brought about by understanding what's going on under the hood. You may well have very different yardsticks. Programming means different things t…

How are we defining programming. As far as I'm concerned if I can create a small game using Unity, even if I don't really understand what's going on, that is programming.

If an intern writes a small Python script to format CSV contacts, that's programming. Programming can be completely visual as well, such as Unreal blueprints. I don't suggest going that route because it doesn't open up many career opportunities, but it still is programming.

Personally I've never been able to use a lower level language to get anything done. And I still have a fantastic career.

Re: Tetris-OS: An operating system that only plays Tetris

#100
post #64

Earlier quoted context omitted.

I think that definition is a bit too broad and too narrow to be useful. For too narrow: you might have a security focused OS that includes everything like a TCP/IP stack etc, but perhaps doesn't allow arbitrary binaries by construction. (Eg it might only allow binaries that come with a proof of innocence, or some other restriction that's harsh enough to lose the 'arbitrary' rating.) For too broad: https://en.wikipedi…

Obviously, "capable of running arbitrary binaries, but with a check inside exec() to allow only specific binaries run" counts as "capable of running arbitrary binaries".

Yes, perhaps a more specific example would be better.

Imagine some embedded application, eg in car, that has a network stack, graphics drivers etc, but can only run built-in functionality.

Post reply on HN