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/Packages: versioned dependencies, minimum version selection (ADR 0088)il y a 4 j
docs/Packages: versioned dependencies, minimum version selection (ADR 0088)il y a 4 j
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/Packages: vectors, packed f32 rows ranked by a C top-k kernelil y a 5 j
runtime/std/file/stream: open files read and written in chunks (ADR 0087)il y a 5 j
scripts/Moved to louise-lang/louise and louise-lang/packagesil y a 3 j
std/std/file/stream: open files read and written in chunks (ADR 0087)il y a 5 j
tests/std/file/stream: open files read and written in chunks (ADR 0087)il y a 5 j
.gitattributesstd/io: read standard input line by line (#479, ADR 0086)il y a 5 j
.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.lockBump the workspace to 0.21.0il y a 5 j
Cargo.tomlBump the workspace to 0.21.0il y a 5 j
maskfile.mdCI: every step timed, every job's memory peak (gabla108/toboggan#147)il y a 3 sem.
README.mdMoved to louise-lang/louise and louise-lang/packagesil y a 3 j
rust-toolchain.tomlBuild: smaller release binaries; ADR 0042il y a 1 mois
README.MD

Louise

This repository has moved. The language (compiler, runtime, std, tooling, docs) is now louise-lang/louise, and the packages (json, web, postgres, …) are louise-lang/packages, each released on its own. This repository is archived: its tags, releases and history stay readable, so builds pinned to them keep working. Install from the new home: curl -fsSL https://toboggan.cloud/louise-lang/louise/raw/main/scripts/install.sh | sh.

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).