Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 917 Bytes

README.md

File metadata and controls

56 lines (46 loc) · 917 Bytes

Monkey

            __,__
   .--.  .-"     "-.  .--.
  / .. \/  .-. .-.  \/ .. \
 | |  '|  /   Y   \  |'  | |
 | \   \  \ 0 | 0 /  /   / |
  \ '- ,\.-"""""""-./, -' /
   ''-' /_   ^ ^   _\ '-''
       |  \._   _./  |
       \   \ '~' /   /
        '._ '-=-' _.'
           '-----'
  • mathematical expressions
  • variable bindings
  • functions
  • application of those functions
  • conditionals
  • return statements
  • higher-order functions
  • closures
  • data types
    • integers
    • booleans
    • strings
    • arrays
    • hashes
  • bytecode compiler
  • virtual machine

Eval

go run main.go

VM

go build -o monkey . && ./monkey

Benchmark

go build -o fibonacci ./benchmark
./fibonacci -engine=eval
./fibonacci -engine=vm

Writing An Interpreter In Go

Go there and buy this now: https://interpreterbook.com/