Documentation

Learn Langoost

Everything about the language as it takes shape — from a first Hello, world to structured concurrency. Start with the tour, then dive into the topics below.

Get started

Language

Language tour

A fast tour of Langoost syntax — variables, types, functions, control flow, arrays, objects, template strings, classes, and error handling, with runnable examples.

Read →

Types & values

Langoost's value types — int, float, bool, string, array, object, void/nil, any, and the json/yaml/xml data types — plus number literals, template strings, and conversion.

Read →

Functions

Functions in Langoost — declarations, optional type annotations, anonymous functions and closures, variadic parameters, the spread operator, recursion, and hoisting.

Read →

Value methods

Built-in methods you can call directly on Langoost values — string methods, array methods, and numeric methods on int, float, and bool.

Read →

Classes & types

Object-oriented Langoost — class declarations, methods, single inheritance with extends and super, named type declarations, and object construction.

Read →

Control flow

Conditionals and loops in Langoost — if / else if / else, while, for..in over arrays and ranges, and the break and continue loop-control keywords.

Read →

Arrays

Working with arrays in Langoost — literals, indexing, negative indices, the append built-in, and the full set of array methods like map, filter, reduce, push, and sort.

Read →

Error handling

Handling errors in Langoost with try, catch, throw, and defer, plus the runtime.error and runtime.panic helpers.

Read →

Modules & imports

Importing standard-library and local modules in Langoost — namespace imports, named imports, sub-module access, and module resolution order.

Read →

Backend

Standard library

Standard library overview

Index of the Langoost standard library — text, data, encoding, math, collections, time, filesystem, OS, networking, crypto, data stores, and concurrency modules.

Read →

strings

String utilities — search, slice, split, join, replace, trim, case, padding, classification, formatting, and a string builder.

Read →

regex

Regular expressions in Langoost — match, find, findAll, replace, split, capture groups, and pattern validation.

Read →

types

Runtime type checks and conversions for int, float, bool, char, string, and null/void.

Read →

json

Parse, query, edit, merge, and pretty-print JSON, plus streaming parse of arrays and NDJSON.

Read →

yaml

Parse and serialize YAML, and convert between YAML and JSON.

Read →

xml

Validate, pretty-print, query, and convert XML to JSON or an object tree.

Read →

url

Parse and build URLs and query strings, with percent-encoding helpers.

Read →

encode

Encoding helpers — base64, hex, CSV, binary integers/floats, and JSON/XML, organized into submodules.

Read →

serialize

Binary serialization with msgpack and a simplified protobuf, to and from JSON strings.

Read →

compress

Compress and decompress data with gzip, zlib, lz4, and brotli. All I/O is base64.

Read →

math

Math utilities — basic arithmetic, trig, logarithms, random, constants, bitwise ops, clamping, and interpolation.

Read →

collections

Data structures — stack, queue, set, ordered map, heap, trie, ring buffer, list, tuple, and array helpers.

Read →

time

Time and dates — clock, date components, timers/sleep, durations, and formatting, organized into submodules.

Read →

date

Convenience date API over Unix timestamps — now, parse, format, component extraction, and arithmetic.

Read →

timer

Async timers — setTimeout, setInterval, and clear, with callback functions.

Read →

io

Filesystem access — read/write/append files, directories, streaming for large files, and path helpers.

Read →

os

Operating-system access — environment, process info, signals, permissions, syscall info, and args.

Read →

exec

Run shell commands and programs, read exit codes, and access env and the working directory.

Read →

signal

Register POSIX signal handlers (SIGINT, SIGTERM, etc.) with callback functions.

Read →

terminal

Terminal/TUI control — raw mode, key reading, size, and ANSI colors, cursor, and screen sequences.

Read →

runtime

Runtime introspection and a process-global shared key-value store, plus reflect, error, panic, and env helpers.

Read →

memory

Byte buffers, string interning pools, and allocator/GC introspection.

Read →

logging

Leveled logging — debug, info, warn, error, fatal — with a global debug toggle.

Read →

net

Networking — TCP, UDP, TLS, DNS, and an HTTP client, using integer connection handles.

Read →

http

HTTP client — get, post, put, patch, delete, head, status, and a generic request with custom headers.

Read →

crypto

Cryptography — hashing, HMAC, AES, RSA, Ed25519, secure random, certificates, and TLS info.

Read →

redis

Redis client — connect and run key/value, list, hash, and pub/sub commands over integer handles.

Read →

sql

SQL databases — open SQLite, Postgres, or MySQL and run exec, query, queryOne, queryValue, and transactions.

Read →

mongo

MongoDB client for Langoost — connect and run insertOne, insertMany, find, findOne, updateOne, deleteOne, and count over an integer handle.

Read →

Reference