smλ

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.s"
import "std/io.s"

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 
    f = edit file::open web:get README # parentheses optional for one argument
    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.

Ergonomic

High-level syntax. Interceptable errors get out of the way.

Fast

Scripting abstractions yet minimal memory indirection.

Duck and linear types

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

Supported

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