A functional programming language which integrates a bidirectional dynamic analysis, connecting outputs to data sources in a fine-grained way. Fluid is implemented in PureScript and runs in the browser.
npm install @explorable-viz/fluidFluid is a pure functional programming language, with a provenance-tracking runtime and Pythonic syntax. Fluid is implemented in PureScript and runs in the browser.


Building a Fluid website usually involves building a Node application:
- yarn add @explorable-viz/fluid
- yarn install to install Node dependencies
- yarn install-website article to copy example article website from @exploreable-viz/fluid
- Add dist/ and website/ folders to .gitignore
yarn bundle-website $WEBSITE_NAME to bundle website to dist/$WEBSITE_NAMEnpx http-serve dist/$WEBSITE_NAME -c-1 to serve website at localhost- Clone repository (for Windows users, under Ubuntu WSL)
- Run ./script/setup/dev-setup.sh from the top-level directory
- yarn install to install Node dependencies
- yarn build to build interpreter
Fluid examples in the dist/fluid/fluid can be evaluated from the command line as follows
(from the top-level directory):
```
npx fluid evaluate -f .fld
Note that the path is relative and should not include the extension, e.g. for the range.fld example:``
% npx fluid evaluate -f example/range
((0, 0) : ((0, 1) : ((1, 0) : ((1, 1) : []))))
Success
:
- yarn build to ensure Fluid source code has been compiled (can be skipped on subsequent runs)
- yarn bundle-website literate-execution (can be skipped if the website being run is fluid-org)
- yarn serve literate-execution (you may be prompted to proceed; press y)
- Open a browser to the served URL (defaults to 127.0.0.1:8080)Note:
yarn bundle-serve is a convenient shorthand for yarn bundle-website followed by yarn serveTesting
$3
After building, tests can be run from the command line via
yarn test-all$3
- As per command-line tests above, but run yarn test-browser, which opens
a browser window.
- To observe the status of tests, click Debug in the browser window, and then open the JavaScript Console for your browser (e.g., via the Developer Tools).$3
-
yarn bundle-website X
- yarn test-website XRebuild with
puppeteerTests.headless set to false to run in browser.Development via VS Code
The following are some notes on developing Fluid using VS Code.
- Avoid having PureScript installed globally
- Install the PureScript IDE extension
- In the PureScript IDE extension settings, select
Add Npm Path`- For Windows users:
- Launch VSCode through Ubuntu (WSL) terminal
- Install WSL extension in VSCode