# Cell

![image](wizard.png)

Cell is an actor-based scripting language for building concurrent applications. It combines a familiar JavaScript-like syntax with the actor model of computation.

## 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

```javascript
// hello.ce - A simple actor
log.console("Hello, Cell!")
$stop()
```

```bash
cell hello
```

## Documentation

- [**Cell Language**](cellscript.md) — syntax, types, and built-in functions
- [**Actors and Modules**](actors.md) — the execution model
- [**Packages**](packages.md) — code organization and sharing
- [**Command Line**](cli.md) — the `cell` tool
- [**Writing C Modules**](c-modules.md) — native extensions

## Standard Library

- [text](library/text.md) — string manipulation
- [number](library/number.md) — numeric operations
- [array](library/array.md) — array utilities
- [object](library/object.md) — object utilities
- [blob](library/blob.md) — binary data
- [time](library/time.md) — time and dates
- [math](library/math.md) — trigonometry and math
- [json](library/json.md) — JSON encoding/decoding
- [random](library/random.md) — random numbers

## Architecture

Cell 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

```bash
# Clone and bootstrap
git clone https://gitea.pockle.world/john/cell
cd cell
make bootstrap
```

The Cell shop is stored at `~/.cell/`.