News for hackers. Stuff that matters.
Re:TempleOS: Installation by sagebird on Monday May 20, 2019 @12:41PM (#19962223)
I don't like running TempleOS on hardware or in a full fledged VM(Seems like overkill). I would like to make an alternate virtual machine to run TempleOs programs on, in Javascript using a Canvas element for UI. I am unsure if there are constructs which TempleOS uses which are unrepresentable in a virtual machine built inside of a javascript virtual machines - like threads, interrupts, etc. I think events could be wired up as interrupts and there is probably a way to simulate threads in a single thread but I have no experience here. If anyone has any insight into what the challenges of such an approach would be, I would love to hear them.
Re:TempleOS: Installation by yjftsjthsd-h on Monday May 20, 2019 @12:59PM (#19962426)
Philosophical objection: that is exactly the opposite of what TempleOS is about.

Practical objection: By the time you've done that, you'd have written a complete IBM-PC-to-browser compatibility layer. ... This would be super cool if it worked, I'm just sceptical.

Re:TempleOS: Installation by garaetjjte on Monday May 20, 2019 @01:06PM (#19962502)
x86 emulators in browser are available: https://copy.sh/v86/ https://bellard.org/jslinux/

These won't run TempleOS though, because it requires x86-64.

Re:TempleOS: Installation by yjftsjthsd-h on Monday May 20, 2019 @01:37PM (#19962860)
Didn't sound like OP wanted a VM; they wanted a reimplementation or compatibility layer (like wine or wsl).
Re:TempleOS: Installation by sagebird on Tuesday May 21, 2019 @11:07AM (#19970808)
Re: complete IBM-PC-to-browser- I am not sure about that. I think that the Holy C compiler only emits a small subset of all of the x86/64 Instruction set.
Re:TempleOS: Installation by danmg on Monday May 20, 2019 @04:31PM (#19964842)
Bochs is not terry approved.
Re:TempleOS: Installation by stevekemp on Monday May 20, 2019 @02:38PM (#19963588)
If you'd like to write a PC-emulator in Javascript I can only tell you good-look. It can be done, it has been done for example <https://www.pcjs.org/>, but it will require the kind of low-level PC hardware knowledge which takes a while to come together.

Yes you'll need interrupts, but you'll need a hell of a lot more than that! If you're interested in learning about emulation then start with chip-8, or a similar simple system. Once you've done that you'll become much more aware of all the parts you're not aware of.

But seriously this is a lot of work, rewarding work, commercially useful work, but a throwaway comment "Lets do this in javascript with <canvas>" is a significantly understated commen suggests to me you don't understand the scope of what you're proposing - not that this should stop you, it would be rewarding. It's just a fine line between pondering "What if ..?" and being insulting to Terry.

Re:TempleOS: Installation by MayeulC on Monday May 20, 2019 @01:07PM (#19962529)
There is no reason why this couldn't be done, AFAIK.

You can run QEMU in a web browser [0], although it could be interesting to see a webassembly port. It would be an interesting experience to scroll such an article with live, interactive VMs snapshoted at different stages instead of static images.

[0]: https://bellard.org/jslinux/

Re:TempleOS: Installation by xena on Monday May 20, 2019 @01:53PM (#19963072)
I'd love to do that! Let's see what can be done :)
Re:TempleOS: Installation by pingucrimson on Monday May 20, 2019 @01:00PM (#19962432)
You could try looking at what Fabrice Bellard (creator of QEMU and FFmpeg, among many other things) did for [JSLinux](https://bellard.org/jslinux/).

Edit: Although, it's a low-level emulation, not the insanely high-level emulation that you seem to be looking for.

Re:TempleOS: Installation by xena on Monday May 20, 2019 @01:55PM (#19963086)
You can't really experience the true TempleOS flavor without the hardware speaker beeping RNG-based hymns.
Re:TempleOS: Installation by majkinetor on Monday May 20, 2019 @02:05PM (#19963220)
Indeed. That algorithmic music is something else... each time I hear it I don't know what to say and I used to create experimental electronic music all the time...
Re:TempleOS: Installation by xena on Monday May 20, 2019 @04:12PM (#19964638)
A way to think about it is that music, to Terry, is quite literally the voice of God. Imagine what meaning things like this hymn Risen (the theme song of TempleOS) must have: https://www.youtube.com/watch?v=m3zCwrbOvEU