Editor.sh

About

Editor.sh teaches programming by doing: every lesson has small programs you read, change and run right in the page, and exercises that check your work as you go. There is nothing to install and no account to create.

Looking for the blog that used to live at this address? It has moved to xuwaters.com.

How it works

These courses run real programs inside your browser tab. A RISC-V computer is emulated in WebAssembly (xvm); it runs a small Linux, today with a complete Java development kit: OpenJDK's javac and java, the Java course's environment. No server compiles or runs your code, and nothing you type is sent anywhere: the pages, the emulator and the Linux image are static files, and your files are kept in this browser's storage (the Environment panel can download them as a .zip or delete them).

Licences and source code

The Linux guest that runs in this page contains software under the GNU General Public License version 2 (the Linux kernel, BusyBox, and OpenJDK under GPL-2.0 with the Classpath Exception) and version 3 with the GCC Runtime Library Exception (libgcc, libstdc++). For every guest image version this site serves, the complete corresponding source code is available at no charge from our public repository github.com/xuwaters/xvm-sources, at the commit recorded for that version (the list of versions links it): the upstream source of the Linux kernel, BusyBox and OpenJDK at the exact tag the image was built from, and Alpine's build files with every patch. Each version's licence directory on this site holds every patch we applied, the kernel configuration, and the scripts used to build and assemble the binaries, with the digests of the public container images they run in (tools.txt); its README.html lists each source archive with its SHA-256 and the tag and commit it corresponds to, and its index.json the same in machine-readable form. The source remains available for as long as we serve that version and for at least three years afterwards.

The web application (this site's JavaScript and the emulator) is MIT OR Apache-2.0. The third-party code it bundles — FAST, xterm.js, the Monaco editor and its dependencies, the Rust crates compiled into the emulator — is listed with its licence texts in THIRD_PARTY_NOTICES.md.

Source: https://github.com/xuwaters/xvm.