DIY Lang

Make your own programming language

Welcome to the DIY Lang workshop. The goal of the workshop is to write a language capable of evaluating, for example, the following code:

(define fact
    ; Factorial function
    (lambda (n)
        (if (<= n 1)
            1 ; Factorial of 0 is 1, and we deny
              ; the existence of negative numbers
            (* n (fact (- n 1))))))

(fact 5) ; The result of this should be 120
    

The workshop has eight parts:

  1. parsing
  2. evaluating simple expressions
  3. evaluating complex expressions
  4. working with variables
  5. functions
  6. working with lists
  7. using your language
  8. final touches

There are also

The full materials for the workshop are located at github.com/kvalle/diy-lang. Go there, and clone the repo to get started.

Contact/Help

If you are doing the workshop, and you get stuck, feel free contact us at kjetil.valle@bekk.no or bendik.solheim@bekk.no.