Learn

Contents

How eLucid8 fits together

What you need to know to go from an idea to a running program, and which page to read for each step. For the language itself, see the tutorial.

One model

You write a program. An engine answers questions about it, in your browser, on your computer or on a server, and every engine gives the same answers. A view is a question you can move. What a value is belongs to the program; which values a view draws and how they look (palette, region, zoom) belong to the view, and never change an answer. A deployment says where a program's data comes from and where its results go. A service is an engine that stays on while data arrives; an app is views and controls in a window, and what a person does there becomes data.

An engine runs in three places: in your browser (the home page, the playground); on your computer (the elucid8 command: run answers and stops, serve stays on, window opens an app, playground opens the playground (macOS, Windows and Linux), and repl and mcp ask in other ways); on a server (elucid8 serve --http, and the hosted MCP server at elucid8-lang.org/mcp).

The big picture

flowchart LR
  W["write and try it<br/>in the playground"] --> S["save it in My programs<br/>(signed in)"]
  S --> D["Download:<br/>a zip of the program and its data"]
  D --> R["elucid8 run<br/>answer queries, then stop"]
  D --> V["elucid8 serve<br/>keep answering"]
  D --> A["elucid8 window<br/>an app"]

Each word, and where to learn it

wordwhat you usewhere to learn it
programA program, in the notation v0.2, defines values over named dimensions (time, space, steps, sensors). Every answer is data, eod (end of data) or an error that names where it started, with a timestamp: the time of the newest data it was computed from, in milliseconds. Streams at different rates meet through asof, hold and window, which choose data by its timestamp. input("name", t : inf), an input that names its dimensions (t : inf: as many as its data has; t : 1000: exactly 1,000), is data that comes from outside the program; input("name") is one value. A program compiles to one versioned JSON file, the plan (plan.json), which every eLucid8 engine runs.Tutorial, Values and timestamps
engineThe playground in your browser: write a program, give it data (type or paste a table), ask a question and see why each value was computed: the demand tree, pictures and Play over time; everything runs in the page. The elucid8 command, for macOS, Linux and Windows: run answers the queries and stops, check checks everything without computing, info lists what a program needs; no browser, nothing else to install. The playground on your computer, elucid8 playground (macOS, Windows and Linux): your own data of any size, every version kept in folders.Playground Tutorial, Deploy tutorial, The playground on your computer
questionYou ask for a value at a point, running[t = 4], or over a region, running[t = 0..5], and only what that answer needs is computed: in the playground, asked by itself when a program opens or changes, and by Run query; --query on the command, a query request to a service.Tutorial
viewA question drawn as a picture: the playground's Visualize tab, the Player in a browser, a picture in an app. Each dimension has a role (across, down, played over time), and moving in the view asks for other points.Playground Tutorial, The long-running service
deploymentdeploy.json binds each input to a file (CSV, JSON lines, Apache Parquet or Apache Arrow), a program that serves its rows, or a data service: a program outside eLucid8, such as an AI model or a web API, that answers when asked at a point, model[amount = x], with its deadline and what to try again as its settings. Download, in the playground, gives a zip with everything needed to run a program outside the browser: the plan, its data, a deploy.json with your query, and a README.Deploy tutorial, Data services
serviceelucid8 serve keeps a program loaded, takes new data as it arrives, and answers queries as they come, reusing what earlier queries computed; its own page in a browser is the Player.The long-running service
appelucid8 window opens a program's views and controls in a window on your screen; the pointer, keys and a clock arrive as rows of an input.Programs in a window

Words used in these pages

The documentation, the guides for AI tools and the site use these words in one sense each:

Ways to run a program

The elucid8 command runs a program in several ways. Each uses the same program and deployment and gives the same answers; what differs is where the questions come from and where the answers go.

waywhat it isquestions come fromanswers go to
elucid8 runcomputes once, then stopsthe deployment's queries and outputsfiles, or the terminal
elucid8 servea long-running servicerequests on standard input, or over HTTP with --httpreplies, subscriptions, the Player in a browser, Grafana, your own programs
elucid8 windowan app in a window on your screenthe pointer, keys and a clock, sent to the program as rows of an inputthe pixels in the window
elucid8 repla prompt for asking a running serviceyou, typing queriesyour terminal
elucid8 mcptools for an AI assistantthe assistant's tool callsthe assistant; its show starts a service and opens the Player

serve and window side by side. elucid8 serve is a service: other programs, scripts and browsers ask it for values, it takes new data as it arrives, and it runs with or without a screen, on your computer or a server. elucid8 window runs the same engine in one process, with no HTTP and no browser: what you do in the window becomes rows of an input, and the window draws the values its deployment names, which is what makes drawing and games quick. A click or a key in a window is the same as new rows sent to a service, and its picture is the same as asking for the value at the newest turn, so the same program can also run under serve and be shown in the Player.

Learn more: Deploy tutorial (run), The long-running service (serve, and repl), Programs in a window (window), Using eLucid8 with AI coding agents (mcp).

One answer everywhere

The playground, the elucid8 command and the service are different engines. You can rely on them agreeing because:

A program's journey

  1. Write it in the playground. For example, a running sum and a ratio that fails where the data is 0:

    -- A running sum, and a ratio that fails where x is 0.
    x = input("x", t : inf)
    running = x fby.t (running + next.t x)
    ratio = running / x

    Give the input x the table t,value with rows 0,3 · 1,1 · 2,4 · 3,0 · 4,5 · 5,9. Query running at t = 4: the answer is 13 (3 + 1 + 4 + 0 + 5). running at t = 5 is 22, and ratio at t = 3 is Error: division by zero, because x is 0 there. Press Why? beside an answer to see every demand behind it.

  2. Save it. Sign in and press Save as my program. It appears in My programs, where you can open it again, share it or delete it.

  3. Download it. Press More ▾, then Download (or Download beside the program in My programs). Changes made since the last save go into the zip without being saved. The zip holds plan.json, data/x.csv (your table), deploy.json (which file is which input, and your query) and a README.

  4. Run it on your computer. Install the elucid8 command with pip install elucid8, or download it from the Download page and put it in the unzipped folder. In that folder, run elucid8 run plan.json --config deploy.json (./elucid8 run plan.json --config deploy.json for the file in the folder). It prints the same 13. The Deploy tutorial goes step by step, including the one-time steps macOS needs.

  5. Use your own data. Replace x.csv with your data and run again: change t = 4 to 50 and running at t = 5 becomes 67. Each file's version is a fingerprint of its contents, so a run records exactly which data it used.

  6. Keep it running. elucid8 serve plan.json --config deploy.json answers queries one per line for as long as it runs, from what earlier queries computed. See The long-running service.

Saving and sharing

Where eLucid8 runs

The same program and deploy.json run unchanged from a Raspberry Pi to a cloud server, with the same answers to the last bit. What changes is speed, memory, and which way of running suits the place. The elucid8 command is built for macOS (Apple silicon and Intel), Linux (x86-64 and ARM64) and Windows (x86-64); the playground runs in any modern browser.

wherethe elucid8 you userunservewindowreplmcphow you see results
Raspberry Pi (3, 4, 5 or Zero 2 W, 64-bit Raspberry Pi OS)Linux ARM64yesyesthe desktop buildyesyesthe Player in a browser, on the Pi or across your network; files for other tools
A MacmacOSyesyesyesyesyesthe window, the Player, notebooks, charts
A Windows PCWindows x86-64yesyesyesyesyesthe window, the Player, notebooks, charts
A Linux desktopLinux x86-64 or ARM64yesyesthe desktop buildyesyesthe Player, notebooks, charts
A server or virtual machineLinux x86-64 or ARM64yesyes, with --http, a token and HTTPS in frontno screenfrom anywhere that can reach ityesthe Player in users' browsers, Grafana, files and databases
A container (Docker, Kubernetes)Linux, in the image from Running eLucid8 as a serviceyesyesnofrom outsiderarelyas for a server
Python and notebooks (Jupyter, Colab, scripts)the elucid8 package, pip install elucid8, with the command insideelucid8.runelucid8.ServicenononoDataFrames (pandas, Polars, pyarrow), to_xarray, the Player in a notebook cell
A web browser, on a computer, tablet or phonethe playground at elucid8-lang.orgin the pagenonononothe playground's pictures, charts and Why?; on a phone, the examples and your entries, their answers and pictures, Why? and Play
AI assistantselucid8 mcp on your computer, or the hosted server at elucid8-lang.org/mcpyesthrough shownonoyesthe assistant's answers; show opens the Player
A phone or tablet appnone on the device: the app asks an elucid8 serve running elsewhere over HTTPnoelsewherenononoin the app

"The desktop build": on Linux, elucid8 window opens with the desktop build from the Download page, which needs WebKitGTK 4.1 (Programs in a window).

In the cloud

In the cloud, eLucid8 runs as a Linux program on a virtual machine, or as a container. Either way it is elucid8 serve --http behind HTTPS, with a token (Running eLucid8 as a service):

providervirtual machinescontainers
Amazon Web ServicesEC2, on x86-64 or ARM (Graviton)ECS and Fargate, EKS, App Runner
Google CloudCompute Engine, on x86-64 or ARM (Tau T2A, Axion)Cloud Run, GKE
Microsoft AzureVirtual Machines, on x86-64 or ARM (Ampere)Container Apps, AKS

How results are drawn

howwherewhat draws it
elucid8 window on macOSApple silicon and Intela native window, its pixels drawn with Metal
elucid8 window on Windowsx86-64a native window, drawn with GDI
elucid8 window on Linuxthe desktop build, x86-64 and ARM64a native window under X11 or Wayland
The Playerany modern browser, from elucid8 serve --httpthe browser, updated live as data arrives
The playgroundany modern browserthe page itself
Chartsanywherea Vega-Lite file (--format vega-lite), drawn by Vega, Altair or Jupyter
Arrays and tablesanywhereZarr and NumPy files for matplotlib, xarray, Plotly, napari and hvPlot; Arrow and Parquet for pandas, Polars and DuckDB (Seeing your results)
Dashboardsa serverGrafana, reading values from elucid8 serve's /values
The terminalanywhere elucid8 repl runssmall charts of text characters (spark)

Not built: a build for 32-bit ARM (older Raspberry Pis), a build for Windows on ARM, running inside a phone app with no connection, and the web embed (your program on any web page).

What you can use today