Tag Archives: linux

Linux on JavaScript: new horizons in interactive content

busybox in browser

Linux-in-Javascript emulators are very interesting to me. These are stripped-down Linux systems (usually running busybox) running atop a virtual CPU whose emulation engine is written in JavaScript.

It started with the groundbreaking JavaScript PC Emulator by Fabrice Bellard in 2011. His project emulates a 486 processor.¬†Follow that link to see Linux boot right in your browser. It even comes with gcc to compile programs! The first time you boot up it’s pretty slow, but caching by your browser will result in better performance on subsequent boots.

Check out busybox’s own version of Bellard’s emulator with a fully tricked-out busybox executable.

Today I discovered the JOR1K Emulator which uses the OpenRISC 1000 emulator and includes network and graphics frame buffer support. All things considered, it’s very fast, even on an iPhone. Be sure to run the demo.

These emulators would be a great way to introduce novice students to the command line without needing to set up an account on a real Linux system in advance. They could be embedded directly into educational content–picture an online textbook where the student could try commands in the safety of an emulator. With a suitable suspend/resume feature, we could forego the whole “boot” process entirely and simply jump into a working shell.

As I bring more of my classroom content online (the “flipped classroom” model), it has to be more than just “read this chapter” or “watch these videos.” Interactive content is the way to keep students motivated and engaged. Projects like these really get me thinking about the possibilities.


WASD is the new HJKL


I was showing some students the vi editor recently. One can, of course, use the arrow keys to move around the screen, but HJKL can be used without moving the hands from the home row. (For those who are unfamiliar with vi, H will move left, J down, K up, and L right.)H J K L keys on a keyboard

They commented that HJKL seemed like a strange choice. Why not the more intuitive WASD?

I’m not a gamer. WASD isn’t in my muscle memory. The adoption of WASD as movement keys is a much, much more recent development than vi. Once you see the ADM-3A terminal it was created on, it’s easy to understand why HJKL was used. Nevertheless, an era before first-person shooters was clearly the Dark Ages of computing.


The next time you’re using an application or a website that uses keyboard shortcuts, such as Boston Globe’s The Big Picture or Trello, take at look at what the navigation keys are. If they are H, J, K, and L, you can bet it was developed by an old-fogey vi user like me.