How do you write so much JS code? (i.e. editor, testing, debugging, running, dev environment, etc.)
Thank you.
51–60 of 71 posts
How do you write so much JS code? (i.e. editor, testing, debugging, running, dev environment, etc.)
Thank you.
# scummvm
How the heck does a 7MB image come with an entire OS, emulator, and a fully functional game?! You have to wonder how much of our stuff is bloated.
But the impressive partbis the emulator itself... The emulator is a full SoC in javascript, based on the OpenRISC instruction set.
Honest question: How do you write so much JS code? (i.e. editor, testing, debugging, running, dev environment, etc.) Thank you.
Testing: Firefox and Chrome
Debugging: Function console.log
Optimization: JIT inspector for Firefox (incompatible since FF 23) and profiling tools from both browsers
So, nothing special involved. Neglecting the redundancy, the source code contains 4000 lines of code. The complicated part was the building of the Linux image and libraries with a toolchain in beta status.
So realistically, what can you do with something like this especially since there is no networking? Can it do anything fun with WebGL?
Read the lessons, follow along in another tab. No messing around with VMs etc.
Earlier quoted context omitted.
How the heck does a 7MB image come with an entire OS, emulator, and a fully functional game?! You have to wonder how much of our stuff is bloated.
Back in the day, you could boot the entire BeOS kernel, filesystem, GUI, network stack, window & task manager, and web browser off of a 1.44mb floppy disk. Ever since then, I've been unable to shake the feeling that something has gone catastrophically wrong with the way we architect software.
Reminds me a lot of this http://bellard.org/jslinux/
Here's my list, please add to it if you know any others: https://gist.github.com/ysangkok/5606032
Arm-js has a control panel which is really nice. It would be sweet if the open-source emulators could share some code, but they are pretty different code-wise right now...
Two things: 1) I am waiting for a version using networking. I know there are security issues but there are also workarounds. 2) My notebook is hot, so I checked and the Chrome CPU console is at 25% even if I am not doing anything in the console.
I'd have to look at the code, but it might not be too awful to get tun/tap to work over WebSockets... Regarding the heat, I wonder if the architecture has support for idle states. If so, the VM should "clock down" by executing its loop from a timer instead of full-bore. I wonder if this is already happening, though.
I tried adding an extra serial port some months ago, but I didn't succeed.
It would be really cool if you made this. Here's a use case I had in mind:
You go to emulator.html#http://otherwebsite.com/packages.json . The emulator's JavaScript part detects the fragment, and downloads a list of dpkg packages to the HTML5 file system. The emulator boots up, checks the HTML5 file system over 9P, and installs all those packages.
Like this, you could test any binary package over the web without fear, and it would be decentralized, you wouldn't have to modify the emulator.
But for jor1k, we'd need networking and 9P/HTML5 support (like in Arm-js). For Arm-js, just the networking would suffice, as the 9P support is already there.
9P in Arm-js: https://github.com/ozaki-r/arm-js#emulator-features
Fantastic. I love that it's OpenRISC based rather than the "obvious" choice of yet another x86 emulator. And framebuffer support, though slow.