This is the VM for the Spry language, packaged as a Nim library.
This is not where you start out with Spry, instead take a look at the language website and install the Spry nimble package that in turn depends on this package to implement usable Spry interpreters.
SpryVM mainly depends on Nim, so it should work fine on Windows, OSX, Linux etc, but for the moment I use Linux for Spry development. The shell scripts will probably be rewritten in nimscript and thus everything can be fully cross platform - feel free to help me with that!
The following should work on a Ubuntu/Debian, adapt accordingly for other distros.
-
Get Nim! I recommend using choosenim or just following the official instructions. Using choosenim it's as simple as:
sudo apt install gcc curl https://nim-lang.org/choosenim/init.sh -sSf | sh
-
Install dependencies, currently this is libsnappy-dev (or libsnappy1v5):
sudo apt install libsnappy-dev
-
Clone this repo. Then run
nimble install
in it. -
Finally run all tests using
cd tests && ./run.sh
(runjs.sh is for running them in nodejs, but not fully green right now)
So now that you have installed Spry, you can proceed to play with the samples in the examples
directory, see README in there for details.
The following should work on OSX.
-
Install Homebrew unless you already have it.
-
Get Nim! I recommend using choosenim or just following the official instructions. Using choosenim it's as simple as:
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
-
Install dependencies, currently this is only snappy and we can get it using:
brew install snappy
-
Clone this repo. Then run
nimble install
in it. That should hopefully end up withspry
andispry
built and in your path. -
Finally run all tests using
cd tests && ./run.sh
(runjs.sh is for running them in nodejs, but not fully green right now)
So now that you have installed Spry, you can proceed to play with the samples in the samples
directory, see README in there for details.
First you want to have git installed, and most happily with the unix utilities included so that some of the basic unix commands work on the Windows Command prompt.
-
Installing Nim on Windows using choosenim doesn't fly (blocked by issue 35, well, ok, the older version worked but that created a 32 bit Nim compiler which may be less optimal. You will need to follow official installation procedure, which is quite easy, just download the zip, unpack it and run
finish.exe
from a command prompt and follow the interactive questions. -
Install dependencies, currently this is the snappy dll which is used for fast compression. The most reasonable place I found a precompiled version of it was on https://snappy.machinezoo.com/downloads/. Download, unpack and take the
native/snappy64.dll
ornative/snappy32.dll
and copy the proper one (presumably 64 bits) to a place where it can be found, for example inc:\Users\<youruser>\.nimble\bin
and rename it tolibsnappy.dll
. I will fix so that it's included somehow. -
Clone this repo. Then run
nimble install
in it. That should hopefully end up withspry
andispry
built and in your path. -
Finally run all tests using
cd tests && sh run.sh
(runjs.sh is for running them in nodejs, but not fully green right now). On windows two tests fail as of writing this.