this post was submitted on 25 Jan 2024
827 points (98.4% liked)

Programmer Humor

32467 readers
1107 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] stingpie@lemmy.world 17 points 9 months ago (1 children)

Anything that's turning complete, has enough ram, and has a c compiler can run Linux. Theoretically, you could program a CPLD to run brainfuck and you could still run Linux.

[–] Tja@programming.dev 32 points 9 months ago (1 children)
[–] stingpie@lemmy.world 20 points 9 months ago (3 children)

Yes. Any turing complete processor can perfectly emulate any other turing complete processor, whether it is x86, arm, or riscv. Mainline Linux can then run on this emulated processor without modification.

[–] Rodeo@lemmy.ca 14 points 9 months ago (1 children)

Damn that's gonna be slow.

But I guess speed was not a criterion.

[–] xmunk@sh.itjust.works 7 points 9 months ago

It's technically correct, the best kind of correct.

[–] Tja@programming.dev 4 points 9 months ago

I guess it's the difference of can today vs could if this emulator existed...

[–] monk@lemmy.unboiled.info 1 points 9 months ago (1 children)

"boot" is the next important part. Have you tried reading it in full?

[–] stingpie@lemmy.world 1 points 9 months ago (1 children)

Emulated processors can do the same things as physical processors, including booting from disk.

[–] Ross_audio@lemmy.world 2 points 9 months ago (1 children)

Boot = Bootstrap

If you've loaded up a virtual CPU first that's not a boot of mainline Linux on the CPU.

[–] stingpie@lemmy.world 1 points 9 months ago

I respectfully disagree. The turning machine is not doing any set-up before the emulated CPU begins execution, and all of the actual BIOS is done by the emulated CPU.