Revision 71891428245690d59fc43431c4ddd4a582b01999 authored by null-a on 05 July 2017, 08:06:50 UTC, committed by null-a on 05 July 2017, 08:06:50 UTC
1 parent 4da45df
installation.rst
.. _installation:
Installation
============
First, install `git <https://git-scm.com/downloads>`_.
Second, install `Node.js <http://nodejs.org>`_. WebPPL is written in
JavaScript, and requires Node to run. After it is installed, you can
use npm (**n**\ ode **p**\ ackage **m**\ anager) to install WebPPL::
npm install -g webppl
Create a file called ``test.wppl``::
var greeting = function () {
return flip(.5) ? "Hello" : "Howdy"
}
var audience = function () {
return flip(.5) ? "World" : "Universe"
}
var phrase = greeting() + ", " + audience() + "!"
phrase
Run it with this command::
webppl test.wppl
Updating
--------
WebPPL is in active development. To update WebPPL, run::
npm update -g webppl
Computing file changes ...