Live data from Hacker News

Tetris-OS: An operating system that only plays Tetris

github.com

41–50 of 126 posts

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

#43
post #19

This is cool, but I think it's misleading to call it an operating system. It's Tetris that runs without an operating system, which is to say, on bare metal, old school. Writing programs that run on bare metal is a cool and worthwhile thing to do, but calling any such program an "operating system" is confusing. This probably sounds like I'm picking a nit, but I think it matters for the sake of newbies just starting to…

I don't think it is essential that there be a clear boundary between an OS and programs. For example, you can have a Smalltalk-based OS, written in Smalltalk. The OS components are simply Smalltalk classes and methods. Your programs/utilities/applications would also be Smalltalk classes and methods. There needn't be any clear boundary between the classes/methods that belong to the OS and those that belong to programs…

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.

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

#44
post #2

Youtube video that goes over the developer's experience making it: https://www.youtube.com/watch?v=FaILnmUYS_U

In my retirement, watching programming streams has been a guilty pleasure (drives my SO crazy), and this is one of my favorite channels. I especially loved their other video on making Minecraft from scratch* * - https://www.youtube.com/watch?v=4O0_-1NaWnY

Replying to watch later!

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

#45
post #19

This is cool, but I think it's misleading to call it an operating system. It's Tetris that runs without an operating system, which is to say, on bare metal, old school. Writing programs that run on bare metal is a cool and worthwhile thing to do, but calling any such program an "operating system" is confusing. This probably sounds like I'm picking a nit, but I think it matters for the sake of newbies just starting to…

Alternatively, it's Tetris with bits of a minimal OS mixed in, just enough to support it, which is not unlike what a lot of OSs in embedded systems are like.

A lot of software was written in this format several decades ago, including many games:

https://en.wikipedia.org/wiki/Self-booting_disk

https://en.wikipedia.org/wiki/List_of_PC_booter_games

I think the boundaries are quite fuzzy; while something like the mask-ROM firmware in a 4-function calculator or microwave would probably not be called an OS by the majority of people, how about a router running Linux, or the RTOS used in a car's ECU? Moving up from there, DOS is clearly in the realm of an actual OS, then we have the locked-down mobile devices, and at the far end are the general-purpose PCs running Windows, Linux, macOS, and such.

Even at the "small end", a microcontroller running a firmware containing a single infinite loop that does stuff with the peripherals seems unlikely to classify as an OS; but what if you start adding dynamic memory allocation, coroutines/cooperative multithreads, filesystem code, etc.?

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

#48
post #19

This is cool, but I think it's misleading to call it an operating system. It's Tetris that runs without an operating system, which is to say, on bare metal, old school. Writing programs that run on bare metal is a cool and worthwhile thing to do, but calling any such program an "operating system" is confusing. This probably sounds like I'm picking a nit, but I think it matters for the sake of newbies just starting to…

It's not even running on bare metal.

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

#49

> This has only been tested in an emulator. Real hardware might not like it. ?! So this is just a stand-alone binary with an awkward loader then. The real trick (and challenge) comes when you want to run your stuff on actual bare metal.

Yeah... my biggest question is why it hasn't been tested on hardware. Dev doesn't own an x86?

Also the author refers to the (raw/MBR-format) disk image twice as an "iso" which makes me shudder.

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

#50
post #19

This is cool, but I think it's misleading to call it an operating system. It's Tetris that runs without an operating system, which is to say, on bare metal, old school. Writing programs that run on bare metal is a cool and worthwhile thing to do, but calling any such program an "operating system" is confusing. This probably sounds like I'm picking a nit, but I think it matters for the sake of newbies just starting to…

IDK. Plenty of "operating systems" are linked as a single binary with the application, in the embedded world and historically. This takes it a bit further but I doubt you think the dividing line is "OS and application are maintained as a separate project" which is about the only distinction.

I do see where you're coming from, though. Personally I would've described it as "bootable Tetris".

Post reply on HN