2.9 KiB
2.9 KiB
title, description, type
| title | description | type |
|---|---|---|
| Documentation | ƿit language documentation | docs |
ƿit is an actor-based scripting language for building concurrent applications. It combines a familiar C-like syntax with the actor model of computation, optimized for low memory usage and simplicity.
Key Features
- Actor Model — isolated memory, message passing, no shared state
- Immutability —
stone()makes values permanently frozen - Prototype Inheritance — objects without classes
- C Integration — seamlessly extend with native code
- Cross-Platform — deploy to desktop, web, and embedded
Quick Start
// hello.ce - A simple actor
print("Hello, ƿit!")
$stop()
pit hello
Language
- ƿit Language — syntax, types, and operators
- Actors and Modules — the execution model
- Requestors — asynchronous composition
- Packages — code organization and sharing
- Shop Architecture — module resolution, compilation, and caching
Reference
- Built-in Functions — intrinsics reference
- text — text conversion and manipulation
- number — numeric conversion and operations
- array — array creation and manipulation
- object — object creation, prototypes, and serialization
Standard Library
Modules loaded with use():
- blob — binary data
- time — time and dates
- math — trigonometry and math
- json — JSON encoding/decoding
- random — random numbers
Tools
- Command Line — the
pittool - Semantic Index — index and query symbols, references, and call sites
- Testing — writing and running tests
- Compiler Inspection — dump AST, mcode, and optimizer reports
- Writing C Modules — native extensions
Architecture
ƿit programs are organized into packages. Each package contains:
- Modules (
.cm) — return a value, cached and frozen - Actors (
.ce) — run independently, communicate via messages - C files (
.c) — compiled to native libraries
Actors never share memory. They communicate by sending messages, which are automatically serialized. This makes concurrent programming safe and predictable.
Installation
# Clone and bootstrap
git clone https://gitea.pockle.world/john/cell
cd cell
make bootstrap
The ƿit shop is stored at ~/.cell/.
Development
After making changes, recompile with:
make
Run cell --help to see all available CLI flags.
