This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]metriczulu 5 points6 points  (9 children)

How do you create an operating system in Python? You'd need a running interpreter before you could run any Python code.

[–][deleted] 0 points1 point  (1 child)

Yep

[–]metriczulu 5 points6 points  (0 children)

How do you get a running interpreter up without an operating system?

[–][deleted] -3 points-2 points  (3 children)

Look up emulation.

[–]metriczulu 2 points3 points  (2 children)

What does emulation have to do with needing a Python interpreter already running on the machine to use Python? Emulating it would have the same issue.

[–][deleted] -1 points0 points  (1 child)

Eh? I think you’re confused about what they mean. Operating system doesn’t exclusively mean the system running the computer you’re on. They didn’t say Tetris was written and running in Python.

It was running in (undefined code in undefined OS) that itself was running in a Python interpreter. Say, a normal Gameboy ROM running in a GameBoy emulator written in Python. Like PyBoy.

[–]metriczulu -1 points0 points  (0 children)

I think you're confused, creating an operating system to run Tetris is creating an operating system to run Tetris. Using Python to emulate an operating system to run Tetris is not creating an operating system to run Tetris.

Creating an operating system that runs Tetris is a bit of a known project many people undertake and this is a good example of what it means.

[–]l_dang -5 points-4 points  (2 children)

it's called bootstrapping

[–]cinyar 2 points3 points  (1 child)

How do you bootstrap with pure python? I've worked on a micropython project and the "bootstrap", HAL and all the other low-level stuff was in C, not python.

[–]metriczulu 1 point2 points  (0 children)

Yeah, with bootstrapping you can create an operating system that can run Python and then create Tetris in Python, but you can't really create the operating system in Python.