A sandbox for Human Resource Machine programs. There is a similar project hrm-cpu which works under ES6, and there are projects with level data and with solutions. There is also an excellent JavaScript viewer for web based projects.
Try a live demo of the HRM Sandbox.
Download node at nodejs.org and install it, if you haven't already.
$ npm install hrmsandbox
$ hrmsandbox --file=min-of-3.hrm -- 3 5 -1 2 -9 -9 13 -20 0
INBOX:
[ 3, 5, -1, 2, -9, -9, 13, -20, 0 ]
VARIABLES:
{ a: -20, b: 0, c: 13, temp: 0 }
INBOX:
[]
OUTBOX:
[ 13, 0, -20, 2, -9, -9, 5, 3, -1 ]
Tests use tape
and require tap
:
$ npm install
$ npm test
> [email protected] test /tmp/hrmsandbox
> tap test/*.js
test/syntax.js ........................................ 13/13
total ................................................. 13/13
13 passing (342.102ms)
ok
- minimist
- peg.js
MIT