Standard Library

Visuall ships with a growing standard library of modules. All modules are written in Visuall (with a small C runtime for primitives).

math

Mathematical functions and constants.

FunctionSignature
sqrt(x: float) -> float
sin(x: float) -> float
cos(x: float) -> float
tan(x: float) -> float
log(x: float) -> float
pow(base: float, exp: float) -> float
abs(x: float) -> float
ceil(x: float) -> int
floor(x: float) -> int
ConstantsPI, E

string

String manipulation utilities.

FunctionSignature
split(s: str, delimiter: str) -> list
join(parts: list, delimiter: str) -> str
replace(s: str, old: str, new: str) -> str
upper(s: str) -> str
lower(s: str) -> str
trim(s: str) -> str
starts_with(s: str, prefix: str) -> bool
ends_with(s: str, suffix: str) -> bool

collections

Data structure classes: Stack, Queue, and Set.

ClassMethods
Stackpush(v), pop() -> T, peek() -> T, is_empty() -> bool, size() -> int
Queueenqueue(v), dequeue() -> T, peek() -> T, is_empty() -> bool, size() -> int
Setadd(v), remove(v), contains(v) -> bool, size() -> int

io

File I/O operations.

FunctionSignature
read(path: str) -> str
write(path: str, content: str)
append(path: str, content: str)
list_dir(path: str) -> list
open(path: str) -> File

random

Random number generation.

FunctionSignature
randint(lo: int, hi: int) -> int
uniform(lo: float, hi: float) -> float
choice(items: list) -> T
shuffle(items: list) -> list
seed(s: int)

datetime

Date and time manipulation.

import datetime

now = datetime.now()
print(now.format("%Y-%m-%d %H:%M:%S"))

tomorrow = now.add_days(1)
d = datetime.Date(2026, 5, 24)

json

JSON parsing and serialization.

import json

obj = json.parse('{"key": [1, 2, 3]}')
s = json.stringify(obj)

network

Socket programming and HTTP client.

import network

## Low-level sockets
sock = network.Socket(network.AF_INET, network.SOCK_STREAM)
sock.connect("example.com", 80)
sock.send("GET / HTTP/1.1\r\nHost: example.com\r\n\r\n")
response = sock.recv(4096)
sock.close()

## HTTP client
client = network.HTTPClient()
html = client.get("http://example.com/")

sys

System-level utilities.

Function / VarDescription
argsCommand-line arguments (list of str)
exit(code: int)Exit the process
env(name: str) -> str?Read environment variable
time() -> floatCurrent Unix timestamp