disco: Functional programming language for teaching discrete math.

[ bsd3, language, library, program ] [ Propose Tags ]
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0, 0.1.3.1, 0.1.4, 0.1.5, 0.1.6
Dependencies algebraic-graphs (>=0.5), arithmoi (>=0.10 && <0.13), base (>=4.8 && <4.17), containers (>=0.5 && <0.7), directory, disco, exact-combinatorics (>=0.2 && <0.3), exceptions (>=0.10 && <0.11), fgl (>=5.5 && <5.8), filepath, haskeline (>=0.8 && <0.9), integer-logarithms (>=1.0 && <1.1), lens (>=4.14 && <5.2), megaparsec (>=6.1.1 && <9.3), mtl (>=2.2 && <2.3), oeis (>=0.3.10), optparse-applicative (>=0.12 && <0.17), parser-combinators (>=1.0.0 && <1.4), polysemy (>=1.6.0.0 && <1.8), polysemy-plugin (>=0.4 && <0.5), polysemy-zoo (>=0.7 && <0.8), pretty (>=1.1 && <1.2), pretty-show (>=1.10), QuickCheck (>=2.9 && <2.15), simple-enumeration (>=0.2 && <0.3), split (>=0.2 && <0.3), splitmix (>=0.1 && <0.2), transformers (>=0.4 && <0.7), unbound-generics (>=0.3 && <0.5) [details]
License BSD-3-Clause
Copyright Disco team 2016 (see LICENSE)
Author Disco team
Maintainer byorgey@gmail.com
Category Language
Source repo head: git clone git://github.com/disco-lang/disco.git
Uploaded by BrentYorgey at 2022-01-17T18:02:49Z
Distributions
Executables disco
Downloads 495 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-01-17 [all 1 reports]

Readme for disco-0.1.0.0

[back to package description]

Build Status Contributor Covenant

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

Installation

If you just want to use disco (i.e. if you are a student), follow these instructions. If you want to contribute to disco development, you should skip to the instructions below about building with stack.

  • Follow the instructions to install ghcup by opening a terminal or command prompt and copy-pasting the given installation command. You can just accept all the defaults. If you don't have Windows Subsystem for Linux (if you don't know what that is, then you don't have it), see the instructions here for a PowerShell command to run.

  • Now run cabal install disco at a command prompt.

  • If it works, you should be able to now type disco at a command prompt, which should display a message like this:

    Welcome to Disco!
    
    A language for programming discrete mathematics.
    
    Disco>
    

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!

Design principles

  • Includes those features, and only those features, useful in the context of a discrete math course. This is not intended to be a general-purpose language.
  • Syntax is as close to standard mathematical practice as possible, to make it easier for mathematicians to pick up, and to reduce as much as possible the incongruity between the language and the mathematics being explored and modeled.
  • Tooling, error messages, etc. are very important---the language needs to be accessible to undergrads with no prior programming experience. (However, this principle is, as of yet, only that---there is no tooling or nice error messages to speak of.)

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.