srush / dex-lang

Research language for array processing in the Haskell/ML family

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dex Test status

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 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.

Dependencies

  • Install stack
  • Install LLVM 9
    • Ubuntu/Debian: apt-get install llvm-9-dev
    • macOS: brew install llvm@9
      • Make sure llvm@9 is on your PATH before building. Example: export PATH="$(brew --prefix llvm@9)/bin:$PATH"
  • Install clang (may be installed together with llvm)
    • Ubuntu/Debian: apt-get install clang
    • macOS: installs with llvm
  • Install libpng (often included by default in *nix platforms)
    • Ubuntu/Debian: apt-get install libpng-dev
    • macOS: brew install libpng

Building

  • 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 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.

It is convenient to set up a dex alias (e.g. in .bashrc) for running Dex in development mode:

# Linux:
alias dex="stack exec dex --"

# macOS:
alias dex="stack exec --stack-yaml=stack-macos.yaml dex --"

Running

  • Traditional REPL: dex repl
  • Execute script: dex script examples/pi.dx
  • Live-updated notebook display dex web examples/pi.dx (html) or dex watch examples/pi.dx (terminal).

License

BSD-3

This is an early-stage research project, not an official Google product.

About

Research language for array processing in the Haskell/ML family

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 87.5%Language:Python 9.0%Language:C++ 1.7%Language:Makefile 0.8%Language:JavaScript 0.3%Language:Emacs Lisp 0.3%Language:Shell 0.2%Language:CSS 0.2%Language:C 0.1%Language:HTML 0.0%Language:Nix 0.0%