smoλ

Script ergonomics and safety at wire speed.

➔ Install 📚 Learn

Quickstart

repo "https://raw.githubusercontent.com/maniospas/smoll/refs/heads/main/std/" as "std/"
import std.core
import std.io

def README = "https://raw.githubusercontent.com/maniospas/smoll/refs/heads/main/README.md"
def main()
    # EFFECTS to automatically pass around (some functions grab these by name).
    CLI = edit console()
    CHARS = edit circular alloc 4096

    # Easy function synthesis because parentheses are optional for one argument.
    f = edit file::open web::get README
    size = mut 0
    for line in f
        size = size+len line
    print(size, " bytes downloaded\n")

Features

Safe

Automatically apply and guard resources. Opt into unsafe C only explicitly.

Finite

Tuple-based type system reads sequentially. Less wading through magic.

Fast

Scripting abstractions, minimal memory indirection, ιnterceptable errors get out of the way.

Duck and algebraic types

Functions define types. Interact with those with zero runtime overhead.

Supported

Compiler, LSP, interpreter to test unsafe code, web import, web playground.