Giter Site home page Giter Site logo

00mjk / write-you-a-programming-language Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stereobooster/write-you-a-programming-language

0.0 0.0 0.0 15 KB

List of small programming languages that you can implement in a relatively small amount of time for educational purposes.

License: Creative Commons Zero v1.0 Universal

write-you-a-programming-language's Introduction

Write you a programming language

List of small programming languages that you can implement in a relatively small amount of time for educational purposes. Read my blogpost about this list.

Tutorials

Host Language Type Target Features
(many) Lisp (MAL) Interpreter - TCO, macros, bootstrapping
Assembly Forth Compiler
C C Interpreter - no parser generator, bootstrapping
C LBaC Compiler x86
C C(SubC) Compiler Assembly
C (not free book) C(SubC) Compiler x86-64 It can compile itself and passes gcc -Wall -pedantic
C (online book) Lisp Interpreter - macros
C Lisp Interpreter - macros, TCO, continuations, GC
C Scheme Interpreter -
C++ Kaleidoscope Compiler, Interpreter LLVM procedural language that allows you to define functions, use conditionals, math, JIT
C++, Flex, Bison C-like Compiler LLVM
Go C(SubC) Compiler x86-64 It can compile itself and passes gcc -Wall -pedantic
Haskell, parsec Kaleidoscope Compiler LLVM procedural language that allows you to define functions, use conditionals, math, JIT
Haskell, Parsec (online book) Scheme Interpreter -
Haskell, Parsec Scheme Interpreter -
Haskell LBaC Compiler
Haskell MiniAgda
Idris TinyIdris typechecking, evaluation, unification (video)
Java Enkel Compiler JVM
Java (online book) Lox Interpreter -
JavaScript λanguage Compiler JavaScript
JavaScript Lisp Interpreter - The code is 116 lines
OCaml Lisp Interpreter -
OCaml C Compiler x86
Python Lisp Interpreter - Lisp interpreter in 90 lines of Python
Python Python Interpreter - Python interpreter fits easily into the 500-line size restriction
Python Interpreter -
Python Lisp Interpreter -
Racket (online book)
Ruby Compiler
Ruby Markdown Compiler HTML
Ruby Ruby Compiler
Scheme Scheme Interpreter - First-class (run-time) macros and meta-circular evaluation
Scheme Scheme Compiler C Compiling Scheme to C with closure conversion
Scheme Scheme Compiler Java
Scheme Scheme Compiler Lambda Calc
Swift Lisp Interpreter -
Turbo Pascal 4.0 LBaC Compiler x8086
TypeScript Compiler WebAssembly
🚧 C Lisp Compiler
🚧 Haskell Haskell(fun)

Toy languages

Toy languages, or mini languages, or tiny languages come with code but don't have explanations (unlike tutorials). So you are on your own.

Host Language Type Target Features
C Lisp Interpreter - GC
C Scheme Interpreter - GC
C TCL Interpreter - a Tcl interpreter in 550 lines of C code
C Lisp Interpreter - Lisp In Less Than 200 Lines Of C
C++ Lisp Interpreter - interpreter in 90 lines of C++
Haskell, parsec Haskell(Duet) Interpreter - type classes, non-strict, but is not lazy
Idris minihaskell Interpreter - lazy, functional, integers, booleans, lists, recursion, statically typed
JavaScript, babylon JavaScript Interpreter -
OCaml, menhir miniml Compiler, Interpreter Abstract eager, functional, recursive functions, statically typed, compiler, abstract machine
OCaml, menhir miniml_error Compiler, Interpreter Abstract like miniml that can also abort execution
OCaml, menhir minihaskell Interpreter - lazy, functional, integers, booleans, lists, recursion, statically typed
OCaml, menhir miniprolog Interpreter - logic programming, Horn clauses, unification
OCaml, menhir levy Interpreter - call-by-push value, statically typed
OCaml, menhir comm Compiler Abstract a simple procedural langauge
OCaml, menhir calc Interpreter - integer arithmetic
OCaml, menhir sub Interpreter - an eager purely functional language, mutable records, statically typed, subtyping
OCaml, menhir boa Interpreter - object-oriented, eager, first-class functions, dynamic types, extensible objects
OCaml, menhir lambda Interpreter - untyped λ-calculus, several evaluation strategies
OCaml, menhir poly Interpreter - lazy, functional, statically typed, parametric polymorphism, type inference
OCaml, menhir poly Interpreter - lazy, functional, statically typed, parametric polymorphism, type inference

See also:

Type systems

  • Cubiml is a simple ML-like programming language with subtyping and full type inference. You can try it out online in your browser here. Cubiml is not intended to be used in its own right, but rather to serve as a tutorial for implementing cubic biunification, and therefore has a deliberately minimal feature set.
  • Tiny OutsideIn(X). This is a simple reference implementation of OutsideIn(X) type inference algorithm.
  • Elaboration zoo. This repo includes a series of Haskell implementations for elaborating dependently typed languages, where packages add progressively more power and functionality. Currently, packages focus on basics of unification, inference and implicit argument handling, and we don't have any inductive types or modules (yet).

Courses & Books

Related

Quotes

Most likely you will find one of those quotes in tutorials

If you don't know how compilers work, then you don't know how computers work.

-- Steve Yegge

If you can’t explain something in simple terms, you don’t understand it

-- Somebody smart

Dr. Hoenikker used to say that any scientist who couldn't explain to an eight-year-old what he was doing was a charlatan.

-- Kurt Vonnegut, Cat's Cradle (said by Dr. Asa Breed; chapter 15)

What I cannot create, I do not understand.

-- Richard Feynman

write-you-a-programming-language's People

Contributors

stereobooster avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.