{"id":13541444,"url":"https://github.com/google-research/dex-lang","last_synced_at":"2025-05-15T10:07:14.190Z","repository":{"id":37548470,"uuid":"217529714","full_name":"google-research/dex-lang","owner":"google-research","description":"Research language for array processing in the Haskell/ML family","archived":false,"fork":false,"pushed_at":"2025-01-25T03:31:39.000Z","size":36176,"stargazers_count":1611,"open_issues_count":141,"forks_count":110,"subscribers_count":56,"default_branch":"main","last_synced_at":"2025-04-12T12:13:00.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google-research.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-25T12:33:24.000Z","updated_at":"2025-04-12T12:10:35.000Z","dependencies_parsed_at":"2022-07-12T16:22:39.781Z","dependency_job_id":"458f9824-afd4-460d-910c-af9c1648a97b","html_url":"https://github.com/google-research/dex-lang","commit_stats":{"total_commits":3057,"total_committers":53,"mean_commits":"57.679245283018865","dds":0.6306836768073274,"last_synced_commit":"87f7b717cf74d113eb482faa83640267c8c5e565"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fdex-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fdex-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fdex-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fdex-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google-research","download_url":"https://codeload.github.com/google-research/dex-lang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319720,"owners_count":22051073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T10:00:47.815Z","updated_at":"2025-05-15T10:07:09.158Z","avatar_url":"https://github.com/google-research.png","language":"Haskell","funding_links":[],"categories":["Haskell","Haskell Packages","History"],"sub_categories":["Packages Under Active Development","Languages"],"readme":"# Dex [![Test status](https://github.com/google-research/dex-lang/workflows/Tests/badge.svg)](https://github.com/google-research/dex-lang/actions?query=workflow%3ATests)\nDex (named for \"index\") is a research language for typed, functional array\nprocessing. The goal of the project is to explore:\n\n  * Type systems for array programming\n  * Mathematical program transformations like differentiation and integration\n  * User-directed compilation to parallel hardware\n  * Interactive and incremental numerical programming and visualization\n\nTo learn more, check out our\n[paper](https://arxiv.org/abs/2104.05372),\nour [tutorial](https://google-research.github.io/dex-lang/examples/tutorial.html)\nor these example programs:\n\n  * [Dex prelude](https://google-research.github.io/dex-lang/lib/prelude.html)\n  * [Mandelbrot set](https://google-research.github.io/dex-lang/examples/mandelbrot.html)\n  * [Ray tracer](https://google-research.github.io/dex-lang/examples/raytrace.html)\n  * [Estimating pi](https://google-research.github.io/dex-lang/examples/pi.html)\n  * [Hamiltonian Monte Carlo](https://google-research.github.io/dex-lang/examples/mcmc.html)\n  * [ODE integrator](https://google-research.github.io/dex-lang/examples/ode-integrator.html)\n  * [Sierpinski triangle](https://google-research.github.io/dex-lang/examples/sierpinski.html)\n  * [Basis function regression](https://google-research.github.io/dex-lang/examples/regression.html)\n  * [Brownian bridge](https://google-research.github.io/dex-lang/examples/brownian_motion.html)\n  * [Dynamic programming (Levenshtein distance)](https://google-research.github.io/dex-lang/examples/levenshtein-distance.html)\n  * [Molecular dynamics simulation](https://google-research.github.io/dex-lang/examples/md.html)\n\nOr for a more comprehensive look, there's\n\n  * [The InDex](https://google-research.github.io/dex-lang/index.html) of all documents, libraries, and examples included in this repository.\n\n🚨 **Dex is an experimental research project at an early stage of\ndevelopment. Expect monstrous bugs and razor-sharp edges!**\n\n🤝 **Contributions welcome!** See our issue tracker for [good first issues](https://github.com/google-research/dex-lang/labels/good%20first%20issue), or browse by [thematic labels](https://github.com/google-research/dex-lang/labels).\n\n## Dependencies\n\n  * Install [stack](https://www.haskellstack.org)\n  * Install LLVM 12\n    * Ubuntu/Debian: `apt-get install llvm-12-dev`\n    * macOS: `brew install llvm@12`\n      * Make sure `llvm@12` is on your `PATH` before building. Example: `export PATH=\"$(brew --prefix llvm@12)/bin:$PATH\"`\n  * Install clang 12 (may be installed together with llvm)\n    * Ubuntu/Debian: `apt-get install clang-12`\n    * macOS: installs with llvm\n  * Install libpng (often included by default in *nix platforms)\n    * Ubuntu/Debian: `apt-get install libpng-dev`\n    * macOS: `brew install libpng`\n\n## Installing\n\nTo build and install a release version of Dex run `make install`.\n\nThe default installation directory is `$HOME/.local/bin`, so make sure to add\nthat directory to `$PATH` after installing Dex. To install Dex somewhere else,\nset the `PREFIX` environment variable before running `make install`. For\nexample, `PREFIX=$HOME make install` installs `dex` in `$HOME/bin`.\n\n## Building\n\n * Build Dex in development (unoptimized) mode: `make`\n * Run tests in development mode: `make tests`\n\nIt is convenient to set up a `dex` alias (e.g. in `.bashrc`) for running Dex in\ndevelopment mode:\n\n```console\n# Linux:\nalias dex=\"stack exec dex -- --lib-path lib\"\n\n# macOS:\nalias dex=\"stack exec --stack-yaml=stack-macos.yaml dex -- --lib-path lib\"\n```\n\nYou might also want to consider other development build targets:\n  * `build-opt` for local optimized builds,\n  * `build-dbg` for local debug builds,\n  * `build-prof` for local optimized builds with profiling enabled.\n\nThose non-standard targets require different aliases. Please consult the documentation\nat the top of the [`makefile`](https://github.com/google-research/dex-lang/blob/main/makefile)\nfor detailed instructions.\n\n### Haskell Language Server\n\nIn order to use [HLS](https://github.com/haskell/haskell-language-server) with\nthe Haskell code in this project:\n\n- Install [ghcup](https://www.haskell.org/ghcup/)\n- Run `ghcup install hls`\n- Create a file in the root `dex` directory called `hie.yaml` with the following\ncontents:\n\n```yaml\ncradle:\n  stack:\n    stackYaml: \"./stack-macos.yaml\"  # Or stack.yaml if not on MacOS\n```\n\nUnfortunately one cannot dynamically select the `stack.yaml` file to use based\non the environment, and so one has to create an appropriate `hie.yaml` file\nmanually. This will be ignored by git.\n\nThis should work out of the box with Emacs' `lsp-haskell` package.\n\n### Building with Nix\n\n[Nix](https://nixos.org/) is a functional package manager and build system.\n\nTo build with vanilla Nix:\n```bash\n$ nix-build\n```\n\nTo build with flakes-enabled Nix:\n```bash\n$ nix build .#dex\n```\nThe resulting `dex` binary should be in `result/bin/dex`.\n\nFor development purposes, you can use a Nix environment with\n```bash\n$ nix-shell\n$ nix develop  # With flakes\n```\nand use `make` to use Stack to build Dex.\n\n## Running\n\n  * Traditional REPL: `dex repl`\n  * Execute script: `dex script examples/pi.dx`\n  * Live-updated notebook display `dex web examples/pi.dx` (html) or `dex watch\n    examples/pi.dx` (terminal).\n\n## License\n\nBSD-3\n\nThis is an early-stage research project, not an official Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-research%2Fdex-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle-research%2Fdex-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-research%2Fdex-lang/lists"}