Revision b5742e5922017e8a7ee0d7e45ac71ac42279add8 authored by jpchen on 18 December 2016, 10:45:03 UTC, committed by jpchen on 20 December 2016, 08:30:26 UTC
1 parent 366bd3d
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
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...