Dex (named for "index") is a research language for typed, functional array processing. The goal of the project is to explore:
To learn more, check out our paper, our tutorial or these example programs:
Or for a more comprehensive look, there's
🚨 Dex is an experimental research project at an early stage of development. Expect monstrous bugs and razor-sharp edges!
🤝 Contributions welcome! See our issue tracker for good first issues, or browse by thematic labels.
apt-get install llvm-12-devbrew install llvm@12
llvm@12 is on your PATH before building. Example: export PATH="$(brew --prefix llvm@12)/bin:$PATH"apt-get install clang-12apt-get install libpng-devbrew install libpngTo build and install a release version of Dex run make install.
The default installation directory is $HOME/.local/bin, so make sure to add
that directory to $PATH after installing Dex. To install Dex somewhere else,
set the PREFIX environment variable before running make install. For
example, PREFIX=$HOME make install installs dex in $HOME/bin.
makemake testsIt is convenient to set up a dex alias (e.g. in .bashrc) for running Dex in
development mode:
# Linux:
alias dex="stack exec dex -- --lib-path lib"
# macOS:
alias dex="stack exec --stack-yaml=stack-macos.yaml dex -- --lib-path lib"
You might also want to consider other development build targets:
build-opt for local optimized builds,build-dbg for local debug builds,build-prof for local optimized builds with profiling enabled.Those non-standard targets require different aliases. Please consult the documentation
at the top of the makefile
for detailed instructions.
In order to use HLS with the Haskell code in this project:
ghcup install hlsdex directory called hie.yaml with the following
contents:cradle:
stack:
stackYaml: "./stack-macos.yaml" # Or stack.yaml if not on MacOS
Unfortunately one cannot dynamically select the stack.yaml file to use based
on the environment, and so one has to create an appropriate hie.yaml file
manually. This will be ignored by git.
This should work out of the box with Emacs' lsp-haskell package.
Nix is a functional package manager and build system.
To build with vanilla Nix:
$ nix-build
To build with flakes-enabled Nix:
$ nix build .#dex
The resulting dex binary should be in result/bin/dex.
For development purposes, you can use a Nix environment with
$ nix-shell
$ nix develop # With flakes
and use make to use Stack to build Dex.
dex repldex script examples/pi.dxdex web examples/pi.dx (html) or dex watch examples/pi.dx (terminal).BSD-3
This is an early-stage research project, not an official Google product.
Haskell
88.9%
Python
5.9%
Julia
1.3%
Dex (named for "index") is a research language for typed, functional array processing. The goal of the project is to explore:
To learn more, check out our paper, our tutorial or these example programs:
Or for a more comprehensive look, there's
🚨 Dex is an experimental research project at an early stage of development. Expect monstrous bugs and razor-sharp edges!
🤝 Contributions welcome! See our issue tracker for good first issues, or browse by thematic labels.
apt-get install llvm-12-devbrew install llvm@12
llvm@12 is on your PATH before building. Example: export PATH="$(brew --prefix llvm@12)/bin:$PATH"apt-get install clang-12apt-get install libpng-devbrew install libpngTo build and install a release version of Dex run make install.
The default installation directory is $HOME/.local/bin, so make sure to add
that directory to $PATH after installing Dex. To install Dex somewhere else,
set the PREFIX environment variable before running make install. For
example, PREFIX=$HOME make install installs dex in $HOME/bin.
makemake testsIt is convenient to set up a dex alias (e.g. in .bashrc) for running Dex in
development mode:
# Linux:
alias dex="stack exec dex -- --lib-path lib"
# macOS:
alias dex="stack exec --stack-yaml=stack-macos.yaml dex -- --lib-path lib"
You might also want to consider other development build targets:
build-opt for local optimized builds,build-dbg for local debug builds,build-prof for local optimized builds with profiling enabled.Those non-standard targets require different aliases. Please consult the documentation
at the top of the makefile
for detailed instructions.
In order to use HLS with the Haskell code in this project:
ghcup install hlsdex directory called hie.yaml with the following
contents:cradle:
stack:
stackYaml: "./stack-macos.yaml" # Or stack.yaml if not on MacOS
Unfortunately one cannot dynamically select the stack.yaml file to use based
on the environment, and so one has to create an appropriate hie.yaml file
manually. This will be ignored by git.
This should work out of the box with Emacs' lsp-haskell package.
Nix is a functional package manager and build system.
To build with vanilla Nix:
$ nix-build
To build with flakes-enabled Nix:
$ nix build .#dex
The resulting dex binary should be in result/bin/dex.
For development purposes, you can use a Nix environment with
$ nix-shell
$ nix develop # With flakes
and use make to use Stack to build Dex.
dex repldex script examples/pi.dxdex web examples/pi.dx (html) or dex watch examples/pi.dx (terminal).BSD-3
This is an early-stage research project, not an official Google product.
Haskell
88.9%
Python
5.9%
Julia
1.3%