Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Since these are so small I don't see why we couldn't have a "demoscene launcher" with a "mailto:" style protocol handler and just let people click on base64 encoded links to start the demo.


A handler for executing arbitrary code. What could possibly go wrong?


We already allow arbitrary code to execute by clicking a link, in the form of JavaScript.

You may argue that JS is sandboxed, but so is DOSBox. At least DOSBox can’t easily connect to remote servers over the internet.


Correct me if I'm wrong, I haven't used DOSBOX for a decade but doesn't it have the ability to access hard drives and mount them?

Given that, it's not much of a sandbox.

Or does that require intervention from the host system rather than auto-mounting home and similar?


I would clearly prefer a web browser with a dosbox to the "real" dosbox when it comes to safety...


Then I agree completely, and must have misunderstood what was proposed by a handler. Typically a handler will launch an external application such as mailto, ftp, magnet, etc.

If we want to run code in browser there is WASM.

So is the proposal that it would it be beneficial to have a DOS-like OS or x86 emulator in WASM for running COM files?

Yes, that would be better and more sandboxed than dosbox running outside the browser.


Run the code in an emulator, with the emulator implemented in WASM running in a web browser. That's enough sandboxing to be "reasonably secure".


http://dosify.me should be fairly easy to modify to read the binary from url fragment instead of zip file


(author here) I didn't know about that one. I use http://twt86.co/ (no music there too, sadly) On both websites the performance is rather bad, but that is something that time will solve for us :D


(author here) Well there is http://twt86.co/ You can try samples, write your own code, or create clickable links =)


I tried something similar with a 4K C64 demo recently in my emulator, basically percent-encoding the program to run right into the URL instead of hosting it somewhere. It works, but only up to about 2.5 KBytes (good enough for 256 byte demos though).

Let's see if HN accepts the URL:

https://floooh.github.io/tiny8bit/c64.html?prg=AQgLCB4AnjIwN...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: