Revision 8f67f41233c7a10d79cd9dc8e221fb1adda20a46 authored by Andreas Stuhlmüller on 21 October 2016, 20:37:42 UTC, committed by Andreas Stuhlmüller on 21 October 2016, 20:37:42 UTC
1 parent 3287cf7
Raw File
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
back to top