Skip to content
Menu

Learn Bert

A guide that takes you through the language a chapter at a time, and tutorials that build a whole program.

The guide

9 chapters

The language a chapter at a time, from your first program to modules and tests.

  • 1. Start

    What Bert is, how to install it, and your first program.

  • 2. Basics

    Names, numbers, text, and yes and no.

  • 3. Functions

    Make your own functions, and hand them to other functions like any value.

  • 4. Lists

    Many values of one type, and how to work with them.

  • 5. Variants and patterns

    Values that are one of several choices, and taking any value apart with match.

  • 6. Records

    Grouping named values.

  • 7. Errors

    When something can fail: Ok, Err and the ? shortcut.

  • 8. Modules

    Splitting a program across files.

  • 9. Tests

    Checking that your code works, right next to it.

Tutorials

2 tutorials

Whole programs, built step by step.

  • A command-line program

    Read from stdin, write to stdout, and ship a single .wasm file.

  • A web server

    Write a request handler in Bert, package it as a WebAssembly component, and serve it with Wasmtime.