This repository contains my code following along the book "Build your own Lisp" by Daniel Holden.

Zelphir Kaltstahl a77faef27d started with chapter about evaluation 5 lat temu
C 35039c295f add readline support example with Rust 5 lat temu
Rust a77faef27d started with chapter about evaluation 5 lat temu
.gitignore 35039c295f add readline support example with Rust 5 lat temu
README.md 324be3749f add ideas 5 lat temu

README.md

Conventions

  • The book uses the C99 standard. This means we compile using the -std=c99 parameter.
  • We print all warnings, to avoid getting into bad practices. This means we compile using the -Wall flag.
  • When we compile, we specify an output file with a readable name using the -o parameter.
  • The names of C code files are all lower case letters and a few special symbols (possibly only the underscore) to increase readability.
  • The C code files have the file ending .c.
  • The output files of compilations of C code files do not have a file ending.

Compilation

Example commands

  • For GNU compiler collection:
  gcc -std=c99 -Wall hello_world.c -o hello_world
  • With warning for unused parameters:

    gcc -std=c99 -Wall -Wunused-parameter hello_world.c -o hello_world
    

Hints

  • Valgrind might help finding memory leaks.

Progess in the book

  • on page 19 out of 206 (end of learning material in the book).

Ideas

  • Maybe I can do the whole book in Rust or/and Guile? In Guile it would probably be easier to get the ideas right, as it probably already has many of the semantics of the Lisp I am writing. In Rust I would have static type checking and loads of type inference. Maybe Rust would prevent many kinds of mistakes, that I would make in C.