Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What is lil?

lil is a small dynamically-typed programming language. It supports two modes of execution:

  • Interpreted mode: the lil binary reads your script, parses it, and runs it immediately through its bytecode VM.
  • Compiled mode: the lil binary generates a C file from your script, then compiles it with gcc into a standalone executable.

The syntax is minimal. There are no classes, no modules, no type annotations. Just variables, control flow, functions, and a few built-in libraries.

If you already know Python or Lua, you will pick up lil in a few minutes.