The JavaScript blog.


games education ES6


Posted on .

WarriorJS (GitHub: olistic/warriorjs, License: MIT, npm: warriorjs) by Matías Olivera is a game that you play by writing ES6 code. Each level is solved by moving the player and interacting with units which include archers and wizards. The simplest level is best by moving the player left, so you just edit Player.js to include the line warrior.walk() in the right place.


The warrior actually has hit points, and there are two difficulty levels: beginner and intermediate. The levels are JSON files, so you could make your own fairly easily.

Matías will be adding new levels over time, so to check if there are new ones run npm outdated -g warriorjs.


tools games education

TRY.js, MightyEditor

Posted on .


When I was at school we had a turtle graphics game that was meant to teach the rudiments of programming. It also had a turtle robot that you could drive around. There are many attempts to update this type of educational software, but one that impressed me is TRY.js (GitHub: s-a/TRY.js, License: MIT/GPL) by Stephan Ahlf:

TRY.js is supposed to program a virtual robot which moves in a 3D environment and is able to pick up and unload objects. The program gives beginners a first insight into the world of computer programming.

Due to the ease of use and the limited instruction set TRY.js is well suited for the introduction to programming, especially for learning the programming language JavaScript. It gives an overview about synchronous and asynchronous codes as well as test driven development.

It uses Google Drive so you can save your experiments and share them. There's also a project for sharing TRY.js packages.

If you want to try programming the robot, there's a Robot API on GitHub. Rather than trying to present a fake educational DSL, TRY.js embraces modern JavaScript idioms, so beginners would need assistance but it might help them to learn how people actually write web-based software -- complete with tests!



Guntis Smaukstelis sent in a powerful web-based game level editor for Phaser games called MightyEditor (GitHub: TheMightyFingers/mightyeditor, License, Demo). It supports asset management for organising textures, and there's a map editor so you can paint levels, with tools for scale and rotate. It also has a physics editor and code editing, so you can alter the behaviour of the game without exporting it first.

It's open source with the limitation that you can't create paid services on top of the MightyEditor, and you must reference the project's creator (mightyfingers.com) in your work. The company behind the editor also sells paid subscriptions, so you can support them if you use it for building your own games. Otherwise the licensing is flexible, and it seems like a powerful tool.


libraries angularjs education angular rust

Angular Smart Table, TurtleScript

Posted on .

Smart Table

Smart Table

Smart Table (GitHub: lorenzofox3 / Smart-Table, License: MIT) by Laurent Renard helps quickly render data as tables in AngularJS projects. It provides the smart-table directive which will render a rowCollection -- an array that contains objects for each row. It also supports layouts by specifying the columns with columnCollection, data formatting, and sorting.

Smart Table has some more advanced features as well, like styling and inline editing. Laurent has included API documentation and unit tests.


TurtleScript (GitHub: cscott / TurtleScript, License: GPLv2) by C. Scott Ananian from One Laptop per Child aims to provide a Logo-like environment for teaching programming. TurtleScript itself is based on JavaScript, and uses a bytecode compiler/interpreter.

The TurtleScript documentation has a lot more background that explains what it does and how it works. Meanwhile, Scott has been working on rusty-turtle (GitHub: cscott / rusty-turtle, License: GPLv2). This is a TurtleScript implementation written in Rust. If you're interested in the Rust language and want to see what a JavaScript parser in Rust might look like, check it out!

Rusty-turtle is a "native" bytecode interpreter, so it runs the TurtleScript parser and compiler in order to generate bytecode for it to run.


apps email computer-science education

Dependent Types for JavaScript, radioactive.js, Minimail

Posted on .

Dependent Types for JavaScript

Dependent Types for JavaScript published on Lambda the Ultimate is about Dependent JavaScript (DJS), a statically-typed dialect of JavaScript by Ravi Chugh, David Herman, and Ranjit Jhala (pdf):

DJS supports the particularly challenging features such as run-time type-tests, higher-order functions, extensible objects, prototype inheritance, and arrays through a combination of nested refinement types, strong updates to the heap, and heap unrolling to precisely track prototype hierarchies

The paper has a summary of related work that will be interesting to those of you who are experimenting with dialects of JavaScript with different type models.


radioactive.js (GitHub: reinpk / radioactive, License: MIT) by Peter Reinhardt is a library for modelling nuclear physics. Its intended use is for creating interactive demonstrations of radioactive decay:

One of the biggest problems I've encountered in writing about nuclear reactors is that people don't understand radioactive decay. This is a huge problem because it means that 99% of the population is totally unqualified to decide anything about nuclear energy.

Suppose I have 1 kg of Cesium-134, with a half-life of 30 years. And 1 kg of Uranium-238, with a half-life of 4.5 billion years. I'm going to give you one of the blocks, and you have to sleep with it tonight like a teddy bear. Which one do you want?

If you guessed Cesium-134, you're dead.

So, if you often find yourself presented with various radioactive isotopes and don't want to die, Peter's library may be of use to you. Or else you're creating presentations or simulations using D3.js that you want to have some level of accuracy.


Minimail (GitHub: emailbox / minimailmobileapp, License: _BSD3) by Nicholas Reed is a mobile and server-side project to create a developer-friendly email client:

It is at the alpha stage, which means it kinda, sorta runs on Android and iOS, and is usable as a replacement mobile client (with changes synced to your Gmail web interface). I made it because there currently are no mobile email clients that are built with common frontend web languages. I'd like to see anyone able to run their own custom email client that fits their workflow.

It's built using PhoneGap, and the server is Node with MongoDB.