Home

Awesome

Build Status Contributor Covenant

Disco is a programming language intended to teach basic functional programming principles in the context of a discrete mathematics course.

Using Disco on replit.com

If you just want to use disco (i.e. if you are a student, or just checking out the language), the recommended way is to use it via replit.com. Simply visit this REPL and follow the instructions there to fork your own copy, where you will be able to evaluate Disco expressions, and edit and run your own .disco files, all via your web browser, without installing anything on your computer.

Design principles

Feel free to look around, ask questions, etc. You can also contribute---collaborators are most welcome.

Community

Check out the disco IRC channel, #disco-lang on Libera.Chat. If you're not familiar with IRC, you can connect via this web client.

Documentation

Documentation is hosted on readthedocs.io.

Contributing

If you'd like to contribute to disco development, check out CONTRIBUTING.md.

Building with stack

First, make sure you have the stack tool (the easiest way to install it is via ghcup). Then open a command prompt, navigate to the root directory of this repository, and execute

stack build

After this completes, you should be able to

stack exec disco

to run the Disco command-line REPL.

While developing, you may want to use a command like

stack test --fast --file-watch --ghc-options='-Wall'

which will turn on warnings, turn off optimizations for a faster edit-compile-test cycle, and automatically recompile and run the test suite every time a source file changes.

Installation

If for some reasons you want to actually install disco on your computer, follow the below instructions. (If you want to contribute to disco development, you should skip to the instructions about building with stack.)

Note, if you are a student, you should not need to do this! The above instructions about using disco on replit.com should be all you need. The below instructions are kept here for completeness.

If you encounter any difficulties, please let me know --- either come talk to me or open a GitHub issue. These instructions will be kept up-to-date with whatever helpful tips or workarounds I learn. So even if you encounter a difficulty but figure out the solution youself, let me know --- that way I can include the problem and solution here so others can benefit!