Code Monkey home page Code Monkey logo

go-lisp-book's Introduction

Let's Write an Interpreter

Idea

Book on writing scheme/clojure like interpreter in Go.

Learning Goals

Always compare our lisp to Go and talk on design decisions

  • Overview - How programs are written
  • A look at Scheme/Clojure
    • syntax
    • types
  • Lexing & Parsing
  • Evaluation of simple math expressions
    • operators
    • precedence
  • REPL

  • Variables & environments
    • lisp1 vs lisp2
    • what do we expose to the user (types)
  • Logic (booleans, if, or ...)
    • what is true/false?
    • lazy evaluation
  • Functions & callables
    • scope
    • closure
  • Adding strings
    • strings & bytes
    • string syntax (quote, raw ...)
    • type system discussion
  • Error handling
    • types of error handling
    • exceptions
    • multiple return values
  • Optimizations
    • Types of optimization
    • Example: constant folding
  • Generating bytecode & creating a VM
    • web assembly? llvm?
  • A standard library & package managers
    • library design
    • lisp vs go in stdlib
    • package management problem
    • writing a package manager
  • Tooling
    • debugger
    • profiler

Optional Subjects

  • type composition (cons, car, cdr ...)
  • syntactic sugar (defn, defstruct ...)
  • error handling
  • concurrency
  • OO
  • macros

Resources

Chapters

  • Introduction to Go
  • Our toy language (scheme-ish/clojure)
  • Interpreter overview
  • Lexer
    • Strings in Go
    • slices
    • struct & methods
    • NewLexer
    • pointer receivers
    • commenting methods
    • Test
  • Parser
  • Eval
  • Parallel eval

License

Attribution 4.0 International (CC BY 4.0)

Copyright © 353solutions & Miki Tebeka

go-lisp-book's People

Contributors

tebeka avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.