All Projects → disco-lang → disco

disco-lang / disco

Licence: other
Functional teaching language for use in a discrete mathematics course

Programming Languages

haskell
3896 projects
TeX
3793 projects
Agda
84 projects

Projects that are alternatives of or similar to disco

teaching
Courses & workshops led by members of the Krishnan Lab.
Stars: ✭ 23 (-82.58%)
Mutual labels:  teaching
teach-r
List of Resources for Teaching R
Stars: ✭ 16 (-87.88%)
Mutual labels:  teaching
calfem-matlab
CALFEM - a finite element toolbox for MATLAB
Stars: ✭ 53 (-59.85%)
Mutual labels:  teaching
teaching-computational-geophysics
Additional material for computational geophysics course
Stars: ✭ 35 (-73.48%)
Mutual labels:  teaching
deep learning ecology
Educational Resources on Neural Networks for Ecology and Remote Sensing
Stars: ✭ 45 (-65.91%)
Mutual labels:  teaching
TankLogo
1v1 tank war model built by NetLogo 💥
Stars: ✭ 50 (-62.12%)
Mutual labels:  teaching
geodaData
Data package for accessing GeoDa datasets using R
Stars: ✭ 15 (-88.64%)
Mutual labels:  teaching
safari-training-react
Code examples and exercises for Safari LiveTraining course.
Stars: ✭ 12 (-90.91%)
Mutual labels:  teaching
playgrounds
DEPRECATED. A collection of playgrounds for teaching Swift programming concepts.
Stars: ✭ 45 (-65.91%)
Mutual labels:  teaching
seb-mac
Safe Exam Browser for macOS and iOS
Stars: ✭ 74 (-43.94%)
Mutual labels:  teaching
Notes
My notes are about everything related to programming.
Stars: ✭ 104 (-21.21%)
Mutual labels:  discrete-mathematics
School-Programming
Хранилище за свободно учебно съдържание по програмиране, информатика и ИТ за българските училища
Stars: ✭ 82 (-37.88%)
Mutual labels:  teaching
wye
Wye is a workshop collaboration software
Stars: ✭ 66 (-50%)
Mutual labels:  teaching
stack-cs-activities
A stack of activities to teach advanced computer science (developed by the Teaching Lab community at the Faculty of Informatics, Masaryk University)
Stars: ✭ 20 (-84.85%)
Mutual labels:  teaching
R-data-wrangling
Materials for my my R data workshop. https://cengel.github.io/R-data-wrangling/
Stars: ✭ 17 (-87.12%)
Mutual labels:  teaching
ontask b
A platform offering teachers and educational designers the capacity to use data to personalise the learner experience.
Stars: ✭ 31 (-76.52%)
Mutual labels:  teaching
how-to-api
Workshop to teach how to use and make an API
Stars: ✭ 16 (-87.88%)
Mutual labels:  teaching
full-teaching
A web application to make teaching online easy. WARNING: the updated version of this repo is now in the link below
Stars: ✭ 34 (-74.24%)
Mutual labels:  teaching
dsge
Course on Dynamic Stochastic General Equilibrium (DSGE): Models, Solution, Estimation (graduate level)
Stars: ✭ 41 (-68.94%)
Mutual labels:  teaching
reinforcement learning course materials
Lecture notes, tutorial tasks including solutions as well as online videos for the reinforcement learning course hosted by Paderborn University
Stars: ✭ 765 (+479.55%)
Mutual labels:  teaching

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.

    • If you use PowerShell, note that after running the magic PowerShell command to set up ghcup, you need to close and reopen PowerShell in order for it to recognize the cabal command.
  • Run cabal update, which will download the latest information about Haskell packages.

  • Now run cabal install disco at a command prompt.

    • Note that this may take a very long time, on the order of an hour or so.

    • The good news is that most of this work only needs to be done once, even if you later install an updated version of disco. Even if installation fails partway through, the work already completed up to that point need not be redone.

    • On OSX, if building fails with an error like ghc: could not execute: opt, it means you need to install LLVM. The easiest way to do this is to first follow the instructions to install Homebrew (if you don't already have it), and then type

      brew install llvm
      

      at a terminal prompt.

      • If this fails with an error like Could not resolve HEAD to a revision, then try running these two commands at a terminal prompt:

        rm -rf $(brew --repo homebrew/core)
        brew tap homebrew/core
        

        Then re-run the brew install llvm command.

      • After installing llvm, you may need to close and re-open the terminal before running cabal install disco again.

  • 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 installation seems like it succeeded but the disco command is not recognized, it may be an issue with your path environment variable settings. Try running disco using an explicit path:

    • ~/.cabal/bin/disco on Linux or OSX
    • C:\cabal\bin\disco on Windows
    • If those don't work, poke around and see if you can figure out where the cabal/bin folder is on your computer, and run disco from there.
    • If you wish, you may add the cabal/bin folder (wherever it is located) to your Path (Windows) or PATH (Linux/OSX) environment variable, so that you can run disco simply by typing disco. However, this step is optional.
  • On Windows, if disco crashes with an error about foldr after you try to type anything (or if it simply closes the entire window when you type anything), the problem is probably that you need to enable UTF-8 mode.

    • Open a command prompt, and type

      chcp 65001
      
    • Now start disco as before (by typing disco or C:\cabal\bin\disco or whatever worked).

    • You will have to do this every time you run disco. Alternatively, you can create a file called disco.cmd containing those two commands, for example:

      chcp 65001
      C:\cabal\bin\disco
      

      Now you can simply double-click on disco.cmd to run 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].