tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

NomDernier commitDate
.toboggan/Distribution, stage 1: actors across hosts, typed on the wire (#404, ADR 0072)il y a 2 sem.
crates/Tooling: preserve REPL transactions, diagnostic bounds and completion (#341)il y a 1 sem.
docs/Tooling: make bounded REPL sessions robust under wider CLI tests (#341)il y a 1 sem.
editors/Types: match arms recovery fabricated are not checked (#371)il y a 3 sem.
examples/Distribution, stage 1: actors across hosts, typed on the wire (#404, ADR 0072)il y a 2 sem.
fuzz/Fuzzer: fresh lambda names (#424); simplifier: case-of-case counts every use of its scrutinee (#425)il y a 2 sem.
packages/Postgres: exercise commit cleanup in CIil y a 1 sem.
runtime/Runtime: prove handler pool bounds, hibernation and teardown (#329)il y a 1 sem.
scripts/Postgres: exercise commit cleanup in CIil y a 1 sem.
std/HTTP: limit suppression to final 204 and 304il y a 1 sem.
tests/Runtime: prove handler pool bounds, hibernation and teardown (#329)il y a 1 sem.
.gitignoreBuild: build files go in the package's build/ directory (issue #91)il y a 1 mois
AGENTS.mdCI: the sanitizers on their paths and nightly; AGENTS.md (gabla108/toboggan#147)il y a 3 sem.
Cargo.lockTooling: transactionally parsed REPL input and session frontend (#341)il y a 1 sem.
Cargo.tomlInterpreter: bounded value results and immutable-data foundation (#339)il y a 1 sem.
maskfile.mdCI: every step timed, every job's memory peak (gabla108/toboggan#147)il y a 3 sem.
README.mdDistribution, stage 1: actors across hosts, typed on the wire (#404, ADR 0072)il y a 2 sem.
rust-toolchain.tomlBuild: smaller release binaries; ADR 0042il y a 1 mois
README.MD

Louise

A statically typed language built on algebraic effects, with actors, reference counting instead of a garbage collector, and a compiler that emits C.

import std/io
import std/list

/// Search as an effect: `choose` returns once per candidate.
effect search
{
  multi ctl choose :: from: Int to: Int -> Int
  final ctl fail :: -> Never
}

/// Every answer the search reaches.
fn every :: action: fn() -> a / <search | e> -> List<a> / <e>
{
  handle
  {
    [action ()]
  }
  with
  { choose from to -> list.range from to |> list.flat_map resume, fail -> [] }
}

/// Right triangles with integer sides up to `n`, written as if there
/// were only one.
fn triangles :: n: Int -> List<(Int, Int, Int)>
{
  use <- every
  let a = choose 1 n
  let b = choose a n
  let c = choose b n
  if a * a + b * b != c * c
  {
    fail ()
  }
  (a, b, c)
}

pub fn main :: -> () / <io>
{
  io.println "{triangles 20}"
}

triangles reads as if choose returned one number. The every handler resumes it once per candidate and collects every answer; use <- every installs it for the rest of the function.

Features

  • Typed effects: functions declare what they do (/ <io, sql>) and handlers decide what that means: exceptions, generators, search with multi-shot resume, dependency injection, test doubles. No monads.
  • Actors: typed processes with links, monitors and OTP-style supervisors, scheduled preemptively on every core.
  • No garbage collector: Perceus reference counting frees memory as soon as it is unused and updates unshared values in place; defer runs cleanups.
  • Types: inference, traits with @derive and user-defined derives, associated and higher-kinded types, GADTs, opaque types, exhaustive pattern matching.
  • Ergonomics: functions are curried and called without parentheses (f x y), with ~ labels where a definition declares them; pipes with placeholders (x |> f a _), string interpolation, early return, Result and Option chained with use.
  • For the web: type-checked HTML literals and pug/html templates, an HTTP server with streaming and server-sent events, a TLS client, and packages for Postgres, argon2 and UUIDs.
  • Native code: compiled through C, with list pipelines fused and Int/Float arithmetic unboxed. Small benchmarks run in the range of GHC and Go, and a release hello world is a 387 KB static executable (performance).
  • C interop: call C and Rust libraries, declared in louise.toml, with bindings generated from headers.
  • Tooling: dependencies from paths or git with a lockfile, a formatter, a test runner, a language server (VS Code), a tree-sitter grammar (Neovim, Helix), and louise self update.

Louise is pre-alpha: the language and its standard library still change.

Getting started

Prebuilt (x86-64 Linux): installs the latest release into ~/.local/bin, then louise self update keeps it current.

curl -fsSL https://toboggan.cloud/gabla108/louise/raw/main/scripts/install.sh | sh

From source: Rust (pinned in rust-toolchain.toml) and, for native builds, clang 13+ or GCC 15+.

cargo build --release -p louise -p louise_rt
alias louise=$PWD/target/release/louise

Then:

louise run hello.lse    # run a program
louise build            # compile the package to build/<name>
louise test             # run its @test functions (--watch: again on every change)
louise fmt              # format it

Documentation

Louise was named tilcayo until v1 (ADR 0021).