The full method-level reference for built-in classes and the standard library ships with each release for NDA partners. The page below summarises which classes exist and points to the relevant example files.
Core
Array and String use 1-based indexing per Smalltalk convention for at: / at:put: / indexOf: / copyFrom:to: and related index-bearing methods; at: 1 is the first element.
| Class | Notes |
|---|---|
Integer, Float | Standard arithmetic, factorial, negated, timesRepeat:, to:, to:do:, bit ops, comparisons (min: / max: via Comparable) |
Boolean, True, False | ifTrue:, ifFalse:, ifTrue:ifFalse:, and:, or:, not |
String | Slicing, concat:, asUppercase, asLowercase, trimmed, regex match, size, at:, lines, replaceAll:with:, < |
Char | Character predicates and conversion |
Regex | compile:, then match:, matches:, findAll:, replaceAll:with:, split: (the String regex helpers dispatch through this) |
DateTime | now, parse:, fromMs:, y:m:d:h:min:s: (+ ms:), formattedAs:, isoString, and year … millisecond field accessors (millisecond precision) |
Error | Error raise: to signal, Error try:onError: to catch — the handler receives the message string (no exception-type hierarchy) |
Array | Persistent 32-way trie, with:, at:, at:put:, size, do:, collect:, select:, inject:into:, sort:, indexOf:, , |
Dict | Persistent HAMT, new, from:, at:, at:put:, at:ifAbsent:, at:ifPresent:ifAbsent:, includesKey:, keys, size, associations, iteration |
Set | Built on Array |
Maybe | Parameterised absence type, none, some:, ifPresent:ifAbsent:, isPresent |
Block | value, value:, value:value:, ... valueWithArguments:, whileTrue: |
Class | Class meta-operations, reflection |
Object | printNl, print, =, ~=, asString, printOn:, className, isKindOf:, fieldNames, atField:, atField:put:, asObject, perform:, perform:withArgs: |
WriteStream | << dispatching through printOn:, nl, space, tab, position, isEmpty, reset |
Comparable, Enumerable | Protocol-bound mixins (Enumerable includes detect: / anySatisfy: / min / max) |
Actor and Concurrency
| Class | Notes |
|---|---|
Actor | self, spawn:, !, receive, receive:, receive:after:do:, ask:, monitor:, linkTo:, trapExits: |
Future | await, await:, resolved?, pending?, resolve:, fail:, new (manual construction) |
Down, Exit | Monitor / link failure envelopes carrying actor ref + reason |
Service Layer
| Class | Notes |
|---|---|
HTTP, HttpServer, HttpResponse, HttpRequest | HTTP server takes a block as handler; chunked + keepalive supported; HTTP parseMultipart:boundary: → MultipartPart (name / filename / contentType / bytes) for file uploads |
LpHttpClient | HTTP client — get:retries:, post:body:contentType:retries: → HttpResponse |
TCP, TCPSocket, TCPServer | Bounded socket I/O integrated with the actor scheduler |
TLS, TLSSocket | Tls.Engine driven, handshake / read / write park on I/O wait |
UDP, UDPSocket, UDPDatagram | datagram sockets — bind: / bindHost:port:, sendTo:port:data:, receiveFrom / receiveFrom:; a received UDPDatagram carries the source host / port for replies |
WebSocket | accept:on:, isUpgrade:, readFrame:, writeText:to:, writeBinary:to:, writePong:to:, writeClose: |
JSON | parse:, serialize: |
JsonRpcServer, JsonRpcClient | JSON-RPC 2.0 dispatch — single, batch, notifications, error envelopes |
Remote | Remote at:for:id: — proxy to a remote class over JSON-RPC; typed against the target class's protocol when built with a literal class (a non-literal for: stays dynamically typed) |
TeriosServer, ServiceDispatcher, Res | TERIOS-style serviceName / requestDto / responseDto / errorInfoList envelopes |
Runtime
| Class | Notes |
|---|---|
File | read:, write:contents:, delete:, exists:, mkdirP:, rename:to:, listDir:, isDir:, isFile: |
OS | stdinLine, stdinAll, stdinPasswordLine (suppresses echo on Windows console + POSIX TTYs), hostname, env vars with defaults; subprocess & watchdog — exec: / exec:input:, fire-and-forget spawn: / spawn:output:, running: liveness probe, kill:, gracefulShutdown: |
Log | Structured logging (info:, warn:, error:, key-value fields) |
Data
| Class | Notes |
|---|---|
DB, DBConnection | SQLite (built in) — open:, exec:, exec:params:, query:, query:params:, close |
Postgres, PostgresConnection | PostgreSQL via Dynlink plugin (interpreter / AOT) |
Mariadb, MariadbConnection | MariaDB / MySQL via Dynlink plugin (interpreter / AOT) |
Redis, RedisConnection | Redis / Valkey via Dynlink plugin (RESP2 over scheduler-integrated non-blocking TCP), ping / get: / set:value: / set:value:ex: / del: / incr: / decr: / exists: / expire:seconds: / keys: / auth: / multi / exec / discard / cmd: / close |
TORM | Doma-compatible 2-way SQL templates + DAO / Entity macro DSL (dao: / entity: keywords) |
Crypto
| Class | Notes |
|---|---|
Hash | SHA-256, SHA-512, HMAC-SHA-256 (hmacSha256:key:) |
Aes | AES-256-GCM |
Argon2 | Argon2id password KDF (RFC 9106), backed by system libargon2 |
JWT | Sign / verify |
Random | Random hex: — random hex string |
Operations
| Class | Notes |
|---|---|
LpCache | In-memory cache builtin with size / TTL bounds (start:, at:, at:put:, at:put:ttl:) |
LpChannel | In-process pub/sub. subscribe:do: / publish:message: / subscriberCount |
Supervisor | One-for-one / one-for-all / rest-for-one strategies on top of monitor + spawn |
Metric | Named in-memory counters for service-level instrumentation |
Test | run:do:, assert:, assert:message:, assertEqual:to:, fail:, summary |
Standard Library Modules
These ship as .lp files under stdlib/ and are loaded with module Main imports: (...). The standard library stays intentionally small; the modules below are the full set.
Core protocols
comparable.lp—Comparableprotocol with<-based defaults (>,min:,max:, ...)enumerable.lp—Enumerableprotocol withdo:-based defaults (collect:,select:,inject:into:, ...)set.lp— persistentSetbacked byArray,add:/remove:/includes:ordered_dict.lp—Dictvariant that preserves insertion order on iterationassociation.lp— (key, value) pair object; element type ofDict>>associations/Dict>>associationsDo:
Service runtime
http.lp— accept loop and keep-alive aware connection handler on top of theHTTPbuiltinjson_rpc.lp— JSON-RPC 2.0 server and client over HTTP (single / batch / notification / error)lp_server.lp— one-line exposure of an LP service as a JSON-RPC 2.0 endpointsse.lp— Server-Sent Events writer on top of HTTP/1.1 chunkedcache.lp— actor-owned KV cache with capacity (LRU) and optional TTLgrain.lp— virtual actors (grains):GrainServer/GrainStore/RedisGrainStore, directory + owner + lease single-activation, cross-node leasing with a fence token, pluggable store
Connection pools (Dynlink plugins — interpreter / AOT)
postgres_pool.lp— fixed-size pool over thepostgresplugin,withConn:APImariadb_pool.lp— fixed-size pool over themariadbplugin (MariaDB / MySQL)redis_pool.lp— fixed-size pool over theredisplugin (Redis / Valkey)
Supervision
supervision.lp— one-for-one / one-for-all / rest-for-one strategies onmonitor:+spawn:
TERIOS toolkit (stdlib/terios/)
terios/rpc.lp— TERIOS RPC envelope dispatch (serviceName/requestDto/responseDto/errorInfoList)terios/auth.lp— bearer-token auth scaffold + HTTP middlewareterios/transformer.lp— declarative JSON reshaping engine (DataTransformer port)terios/validators.lp— declarative validators for thevalidates:class-decl keyword
TORM toolkit (stdlib/torm/)
torm/entity_listener.lp—EntityListenerprotocol withprePersist:/postLoad:style hookstorm/select_options.lp— Doma-style immutable SELECT options (paging / lock hints)