Dex (named for "index") is a research language for typed, functional array processing. The goal of the project is to explore:
- Type systems for array programming
- Mathematical program transformations like differentiation and integration
- User-directed compilation to parallel hardware
- Interactive and incremental numerical programming and visualization
To learn more, check out our workshop paper or these example programs:
- Dex prelude
- Mandelbrot set
- Ray tracer
- Estimating pi
- Hamiltonian Monte Carlo
- ODE integrator
- Sierpinsky triangle
- Basis function regression
- Brownian bridge
Please note that Dex is an experimental research project at an early stage of development. Contributions welcome!
- Install stack
- Install LLVM 9
apt-get install llvm-9-dev
on Ubuntu/Debian,brew install llvm@9
on macOS.
- Build Dex in development mode:
make
- Run tests in development mode:
make tests
- Install a release version of Dex:
make install
The default installation directory is $HOME/.local/bin
so make sure to add that
directory to $PATH
once you install Dex. If you'd like to install it somewhere else
make sure to have the PREFIX
environment variable set when you run make install
.
For example PREFIX=$HOME make install
would install dex
in $HOME/bin
.
While working in development mode, it is convenient to set up a dex
alias
(e.g. in .bashrc): alias dex="stack exec dex --"
.
- Traditional REPL:
dex repl
- Execute script:
dex script examples/pi.dx
- Live-updated notebook display
dex web examples/pi.dx
(html) ordex watch examples/pi.dx
(terminal).
BSD-3
This is an early-stage research project, not an official Google product.