#eLucid8 Playground Tutorial
The eLucid8 Playground runs the eLucid8 engine entirely in your browser: you write a program, give it data, ask for one value at one point, and see every demand the engine made to answer it. This tutorial teaches the playground itself. The language is covered in the eLucid8 Tutorial, so read that first if fby, next and x[t = 4] are new to you.
Each lesson takes 5–10 minutes and starts from one of the built-in examples. Nothing you do is saved in the playground itself: reloading the page or picking another example starts fresh, and other people with the link have their own separate copy. On the website, signed in, Save stores the program in My programs (see Versions, Undo and Save).
The numbers and messages this tutorial quotes are checked against the engine by a test (packages/evaluator/test/playground-tutorial.test.ts).
#Tour of the screen
The page has two columns, each with tabs: on the left, what to compute (the Program tab) and the data it reads (the Data In/Out tab); on the right, the question and its answer, always in view, and under them the Visualize, Trace and Service calls tabs. Drag the line between the columns to make either one wider (or move it with the arrow keys, Home and End); the page remembers it. Tabs move with the arrow keys too. On a phone the site shows the phone viewer instead of the playground (on a screen 760 px wide or less, or a phone held sideways; a tablet gets the playground). The viewer shows finished programs, read-only: a list in two parts, eLucid8 (the examples, in their groups, each with a small picture) and Mine (your entries, once you sign in). Tap one: its answer is at the top and its picture under it, at once from a sketch it keeps and then computed live; tap a cell to ask about it. A row (a value over one dimension, as in The basics) has a cursor: ◀ ▶ and Play move it along the row, asking each point in turn, and the answer follows it. At the bottom, Ask asks for another value or point, Why? shows what the answer depended on, and Program shows the code and its data. Nothing there edits or saves: open the same page on a computer to change a program, and it opens as a copy. Each entry has its own address (/e/heat); Share on eLucid8's entries sends it. A share link (/p/…) opens read-only too, under "A shared program, not an entry: it may change, or not work yet."
Add to my entries…, next to Save on a computer, makes an entry of a finished program: a copy of the program as applied, with its question, its picture as you left it and a title and one line on what it shows. It checks first that the changes are applied, that it compiles, that its question answers and that its picture draws, and that program and data are within 64 KB; any ✗ stops it. The program is saved first if it has changes not saved. Your entries are on My programs (with Open, Add again, which replaces an entry and keeps its link, and Remove), at the end of Examples, and on your phone under Mine; only you can see them, unless you choose Anyone with the link for one on My programs: then anyone with its address can open it without signing in (on a phone in the phone viewer, on a computer as an Entry, read-only until you change it), Share sends it, and it is never listed anywhere. Only me again stops the link working. Changing the program later does not change its entry: add it again. After a new release, an entry that no longer works is marked Needs updating, with the reason, and kept.
The playground asks a program's question as soon as the program is there: an example picked, a link opened, a saved program, a reply to the prompt, or the program edited (once you pause typing for 0.6 seconds and it compiles; until then the last version stays, and Update shows what is wrong). The answer and, on the Visualize tab, the value around it are drawn together, with no button to press; a long computation shows its progress and Stop, and a change stops a computation it replaces. Run query asks again after you change the question. The view then stays open as you ask for other values, step through ticks or change the program.
| Area | What it holds |
|---|---|
| Left column, above the tabs | Examples menu, labelled "Open an example…" (it comes back to that after each pick): the examples in groups (Start here, Lists, records and sets, Sensors and time, Real time, Operations, Grids and simulation, Data science and ML, Business, Outside services), with 45 examples, then a New group with Empty program and Start from my data; the page opens on The basics. When the column is narrow, the menu has a row of its own above the tabs. On the website the menu is not shown: Examples and New ▾ in the site's header take its place |
| Program tab | A line saying what the program reads and calls, with a link that opens Data In/Out ("Reads data: reading (a table, 10 rows). See or change it in Data In/Out"), then · Cheat sheet, a link that opens it over the editor (on the website, those who can describe a program have a Prompt tab before Program: Lesson 9). Once you have opened Data In/Out, the line is shorter: each name is the link to its card ("Reads data: reading (a table, 10 rows) · Cheat sheet"). When the program has comment lines, the line ends with · Hide comments (17 lines): each run of comment lines becomes one line, --▸ 17 comment lines, so that the equations come first; Show comments brings them all back. Click a --▸ line, or put the cursor inside it and press Enter, to show that run alone. You can edit the equations with comments hidden; the comments stay in the program as they were (Save, Download and share links keep them), and the page remembers the setting, on the phone too. Then the program editor, as tall as the column, with long lines wrapped. The Cheat sheet lists each construct with an example and Insert, which puts the example on a line of its own, after the line the cursor is on, or at the end of the program if you have not clicked in it since it was loaded, and closes the sheet; like any edit to the program, it applies by itself; × or Escape closes it too. Below both left tabs, always in view: Update, then Undo (when there is a version to go back to) or Undo changes (while you have changes not applied), and Changes not applied when it applies; under them, the version line ("Version 1: as the example came"); and a status line for compile errors (with a clickable line number) and notes |
| Data In/Out tab | Data sources (data that already exists, which the program reads): one card per source, and Add source. Data services (data made on request, by a program outside eLucid8): a card per data service the program calls, titled with what it answers ("echo · simulated: answers with what it is sent"), with the two times that matter most on the card, Takes and Deadline, and everything else (what it answers, how much its time varies, how often it fails, what to try again, whether to reuse answers) folded under More settings; Add a call; a folded Data services reference. Outputs: one card per output the program names (report = CSV(total)), and Add output, which writes one into the program. The tab shows a dot while a card has changes not applied |
| Right column, top | On some examples (The basics, Calling a service: an echo, A fraud check that can't wait, Correcting data, Maintenance), a Tour: one line of fixed height, "Tour 3 of 5", the step to do, Show me and Close. Point at the step for why it matters and what you should see. When a step ticks, the line says what you should see now, for a few seconds, then shows the next step. Show me takes you there: it opens the tab the step needs, opens any fold on the way, scrolls to the control, puts the cursor in it and draws a ring round it until you use it; for a step that is a change and then Update, once you have made the change, Show me takes you to Update. Once a tour is done, it names the example to try next. Close puts the tour away; a small link stays at the right of the question row: Tour ✓ · Replay once it is done, Tour · Resume at step 3 if you closed it part-way, Tour · 5 steps if you closed it before the first step. The page remembers this for each example. |
| Right column, the question | "Ask for [value] at t = [4] Run query": the value to ask for (the menu lists names only), one box per dimension, and Run query; at the right end, Hints: on; Running… n s with Stop while a query or view takes more than a moment. Under it, the answer alone ("total[t = 4] is 14"), and on one line under that: Why?, its timestamp ("timestamp 0 ms · what is this?") and the work done ("computed 5 values, read 5 data points") |
| Visualize tab | A row, a grid or a picture of the value around the point, with its controls, and under it what the view computed |
| Trace tab | Show every step at the top, then the Demand tree; pressing Why? opens it. Click a row and it is explained beside the tree (below it on a narrow tab): how it was produced, its result in two columns, Value and Time, and any data service call or alignment record |
| Service calls tab | Every attempt of every service call the last question made: the value and point that made it, the service, what it was sent, its start and when it answered, and its answer; late and failed calls in red. After a question that made calls, the tab shows how many ("1"), in red when any was late or failed ("1 late", "2 failed") |
An edit in the program editor is applied by itself once you pause typing and it compiles. Changing anything on Data In/Out changes nothing until you press Update (or Cmd-Enter, Ctrl-Enter on Windows and Linux, from anywhere in Program or Data In/Out), which also applies a program edit at once: then all of it is compiled and, if it compiles, it becomes the next version, and the answer, the data panel, the value list and the view all refresh. Until then, the card you changed is marked "Changed: press Update (⌘↩) to apply" (Ctrl+Enter on Windows and Linux), Changes not applied shows beside Update, and the line under the answer says the answer is from the version before your changes. Press Run query (or Enter in a coordinate box) to ask for another point; asking for another value keeps the coordinates of the dimensions the two share.
Coordinates you typed stay when an Update keeps the value you asked for. A note an Update adds to the status line, such as "running no longer exists, so the query now asks for x.", stays until your next query.
After each step the page says what you can do next, under the answer: "Next: click another cell to ask for it, or change reading's data and press Update."; after an Update, "Next: press Undo to go back to version 1, or pick another example."; after Why?, how to explore the tree and the view. While a tour shows a step, it is the next step, and that line is not shown.
#Hints that fade
The tours, the Next lines and the explanations on Data In/Out are there to teach, and they step back once they have. A Next line stays in full until you have done what it suggests (clicked a cell and pressed Update, pressed Undo, pressed Why?, clicked a row of the tree); after that, the line under the answer ends with · Hint, which shows it again for that answer. The line above the editor drops "See or change it in Data In/Out" once you have opened Data In/Out. Nothing shrinks before you have used it, and nothing goes without a way back.
Hints: on, at the right end of the question row, turns them all off at once: tours and their links, Next lines, and the explanations on Data In/Out. Answers, errors, Why?, Undo, the version line, "Changes not applied", the Cheat sheet and its link always show. Hints: off brings everything back in one click: a finished tour as Tour ✓ · Replay, a Next line you have used as · Hint. The page remembers the setting, the tours you finished or closed and what you have used, in this browser (on the website, the site keeps it for the playground).
Queries and views run in the background, so the page stays usable however long they take. When one takes more than a moment, Running… n s appears over the bottom of the question with a Stop button, and on the Visualize tab the picture dims a little under a small turning ring that says what is being computed ("Computing v[x = 48, y = 48, time = 3000]…"; with reduced motion, the ring stands still), until the answer and the picture arrive. Nothing on the page moves to make room for either. Stop ends it at once and restarts the engine, which forgets the values it remembered from earlier queries; the next query computes everything again. (Where the browser does not allow a background engine, queries run on the page itself: the page says so as soon as a query starts, and waits until it ends, without Stop.)
#Versions, Undo and Save
A version is everything that can change an answer: the program, every source's data (whether it is a table, a formula or an example's built-in data, and its text), and the data services' settings. Each successful Update is a new version, and the version line under Update says what it is: "Version 2: echo's settings changed (version 1 was as the example came)", or later "Version 3: reading's data changed (Undo goes back to version 2)". Loading an example, a saved program or a shared link starts at version 1 ("as the example came", "as it was saved"). The playground keeps up to 50 versions while the page is open, and forgets them when you reload it.
Undo, beside Update, does one thing at a time. While you have changes not applied, it is Undo changes: it puts back the program, data and settings of the current version, exactly as they were (a table you switched to a formula comes back character for character). With no changes, it is Undo: it goes back to the version before, and applies it.
If the program, or a formula, does not compile, the status line shows the error ("Line 4, column 9: …", with a clickable line number), and the answer and the view stay those of the last version that worked; the status line says so, and that Undo changes returns to it. Update stays enabled until you fix it.
On the website, Examples and New ▾ are in the site's header, beside With your agent, Learn, Play and Download, and a bar under it names the program you are in, with a label that says whose it is: Example (one of eLucid8's, or a Learn page's), Shared (someone's program by its link) or Entry (an entry by its link) are read-only; Draft is a program of yours not saved yet; My program is one saved in My programs. Ask for values, press Why? and Play as much as you like: the program stays an Example. Your first change to the program, its data or its settings (a keystroke is enough, before Update) makes it a Draft, titled "(my version)", and the example itself never changes; Undo back to version 1 makes it the Example again, and Reset to example puts the example back (with Undo for 10 seconds). Drafts are kept in this browser, up to 10, and never sent to the site: choosing another example asks nothing, and the note "Your draft … is kept in this browser" offers it back; Examples lists them first. The bar holds the program's actions and Feedback on this program, and the playground below fills the window.
Save as my program always makes a new program in My programs, so an example, a shared program or an entry is never written over: it opens a field with the name it will have ("Heat diffusion over time and space (my version)", numbered if you already have one), and saves under it. Signed out, it is Save as my program ▾: sign in (you come back to the same draft, its name field open), Copy a link to this draft (the program and its data travel in the link; nothing is stored), or Save as file (the program's text). On My program, Save writes your changes over it, and More holds its title, who can see it, its description, Save as new and Download. Download needs no Save first: the program downloads as the playground shows it (its changes applied first, as Save applies them). Saving stores the last version that compiled, with its data and settings, so a saved program is always one that ran. If you have changes not applied, it applies them first, as Update does, and saves only if they compile; otherwise it shows the compile error and saves nothing. Once saved, the website says "Saved to My programs." After a change to My program that you have not saved, even one to data or settings, the website shows Not saved.
On the website, Examples opens the same list, with a search field first ("heat", "missing data", "forecast") and your drafts in this browser before it: choosing an example opens it as an Example, at version 1, with its data and query, at its own address (/e/heat). New ▾ starts a program of your own, a Draft: Empty program ("Untitled program"), Describe it in words (where the program writer is available) or Start from my data. A Learn page's Open in playground opens its example as an Example, with "From the Tutorial, §1 · Back to the Tutorial" in the bar; a program from a chat's link opens as a Draft "From a link". Escape or Close closes Examples and changes nothing.
#Start from my data
Start from my data, under New ▾ (and in the Examples menu's New group when the playground is open on its own), starts a program from your own files. It asks three things, one step at a time:
- Inputs: add a CSV or JSON-lines file (up to 5 MB; it is read in the page and sent nowhere), a program that answers on demand (simulated in the playground), or sample data. For a file it shows each column, what it looks like and how it is used: a dimension, each row's time, a value, or not used. Columns of values are read as one input over a dimension that names them, unless you tick Read each column as its own input instead. Under the table, "In the program, this input is:" shows the line it will write, and changes with every choice.
- Outputs: each result the program writes, and the dimensions it is over. None is a complete answer: press Continue with no outputs.
- Your program: the starting program, which runs as it is. Start with this program puts it in the editor as the next version, fills the Data In/Out cards and asks its first question. Undo gives back the program you had.
A file larger than a saved program may hold (64 KB of program and data) runs in the playground, but Save keeps the program without the file's rows; its card then says to load the file again.
#Lesson 1: Run your first query
You will ask for the running sum of a six-number stream and get 14.
- Choose Streams: first, next, fby from Examples. The program is written in the language's notation v0.2, as every example is.
x = input("x", t : 6)is the data source x, data that already exists (Where data comes from and where it goes), bounded to its six readings, t = 0 to 5, and there are four values:n,running,deltaandsince_start. - Open the Data In/Out tab and look at the card data source x. It is a table:
t,valuethen the rows 0,3 · 1,1 · 2,4 · 3,1 · 4,5 · 5,9. - On the right, the question reads "Ask for running at t = 4", and under it, asked as the example opened: "running[t = 4] is 14" (3 + 1 + 4 + 1 + 5), and on the Visualize tab,
runningover t, with its line chart. - On the line under the answer: Why?, the answer's timestamp, and the work done: how many values were computed, whether the answer was reused from an earlier question, how many data points were read, and how many service calls were made. A count that is 0 is left out. A large view (4,096 cells or more, such as the 96 × 96 dish of Reaction–diffusion: coral from a square) is computed first, and the answer taken from it, so that the same work is not done twice: the line then says "computed … values for the answer and its view". Numbers are shown with up to six significant digits (0.0026693, 1.1195, 2/3 as 0.666667), whole numbers whole; point at an answer or a cell for the number in full, and the trace's details give it too.
- Change t to 5 and press Enter: 23. Change it to 6: eod (no data), because
next.t xat t = 5 asks for x[t = 6], beyond its six readings.
Try the other values at t = 4: delta is 4 (9 − 5), since_start is 2 (5 − 3) and n is 4.
#Lesson 2: Read the demand tree
The demand tree shows every value the engine asked for to answer your query, nested under whatever asked for it. Run query gives the answer alone, which keeps big queries fast; Why? beside the answer gives its tree.
- Stay on Streams with
runningat t = 4, asked. On the Trace tab you will see "Press Why? beside an answer to see what it depended on." Press Why? under the answer: the tab opens. - The same query runs again from scratch, so the tree shows the whole computation (values remembered for later queries are kept).
- The root row is
runningat t = 4. Each row shows the point asked for, a coloured label saying how it was produced, and→its outcome. The first three levels open automatically; click ▸ to open deeper ones. - Under the root you will find
runningat t = 3 (thefbystep back) andxat t = 4 labelled read. Followrunningdown to t = 0 to see the whole iteration. - Click any row: beside the tree, it names the row, explains its label in one sentence and shows its result under Value and Time (here 14 and 0).
- Press Run query again without changing anything. The line under the answer says "reused from an earlier question": it was computed by the first query (Lesson 4).
#Views: rows, grids and Play
Two dimensions make the picture, one may be played, the rest are held. Each view says which in one line under it: heat: a stream of x × y pictures along time.
The Visualize tab shows the queried value around your point, drawn with the answer, by itself when the program opens or changes and again when you press Run query: one cell per coordinate, coloured by its answer. Click a cell to query it. It stays open as you ask for other values or press Update. A view too large to draw at once (more than 65,536 cells, or more than 16 for a value in a program that calls a data service, so that a view never sends many calls you did not ask for) waits for Draw it: "density over x × y is 400 × 400 cells. Draw it". The whole view is asked for together, which gives each cell exactly what asking for it alone gives, and computes each step of an iteration once for the whole board. Views of a value that calls a data service are asked for one cell at a time. The line under the picture says which, and counts the work.
- One dimension (Streams'
running): a row over that dimension: the value's bounds (its boundrestrict … to (t : 6) end, given directly or through the values it reads), or else 48 coordinates around your point (from 0 when your point is near it). When the answers are numbers, a line chart is drawn under the row, to scale. eod and Error points are gaps in the line, marked below it with a grey ring and a red ×, never drawn as zeros. ◀ ▶ and Play move a cursor along the row and mark its point on the chart. - More dimensions: View ▸, at the right end of the controls under the view, opens the view's settings: a line saying why the view is what it is ("Automatic. heat is defined step by step along time, so time plays; x and y make the picture."), or "Your view" with Reset, which returns to the automatic one; then three slots. Picture over has a menu for each side, with its arrow (→ across, ↑ up; a table's rows ↓ and columns →) and Swap. Plays along chooses the dimension that Play and the slider move, or nothing. Held at has a control for each dimension held at one coordinate:
k = 3 of 0–9with ◀ and ▶ (a list for text labels); the first two are also under the view, and "+2 more ▸" opens View ▸ for the rest. Only the dimensions a slot can take are offered, and Show values | timestamps only where the view has timestamps. Escape closes it. Picking a dimension that already has a place swaps the two, and the line under the view changes to say what is drawn. - Two dimensions (Heat's plate, Life's board): a picture of the whole plate when both of its bounds are at most 256, with each cell as large as the Visualize tab allows (one pixel at the least; a 256 × 256 plate gets two pixels a cell on a 1280 × 800 screen at the split the page starts with, 38% for the program column). Under it is one row of controls: on the left what moves the view (Play, ◀, the tick shown, ▶ and a slider for the dimension played; the steppers of fixed dimensions), on the right how it looks (Colours with a bar of its colours, the least value under its left end and the greatest under its right, in timestamps mode the times, and a swatch for eod and Error cells where it has them; the choices are Classic, Viridis and One colour, and Diverging around 0 where the values cross zero; Classic repeats its colours over a fractal's escape counts, with the set black, when the view gives the set's value, as the home page's Mandelbrot does; Size), then Full screen and View ▸. Under the controls, the status line says what the picture is ("heat: a stream of x × y pictures along time") and what was computed. The plot's corners give each side's direction and its first and last coordinates (
0,x → 127,y ↑ 127); point at a corner and its label fades. The tick shown is named:time = 24 of 0–9,999. Beside the picture is a card: the cell you point at, and a key with the ring round your question's cell, "your question, x = 64, y = 64", and the marks while they are on. On a short tab (a 1280 × 800 screen) the controls stand at the top of that column instead, so the picture keeps its size. Size fit | 1:1 | larger draws it fitted to the tab, one pixel a cell, or twice the fitted size (scrolled); Full screen shows the picture on the whole screen, with its controls under it and the answer, Why? and the card beside it, and Escape or Close full screen returns. Point at a cell to see its coordinates and value in the card, the cell ringed (the arrow keys move the ring, and Enter asks); click it to ask for it (on a touch screen, tap it to see it, and tap it again to ask for it). A larger plate, or one with no bound, is shown as a window of 48 × 48 cells around your point, and the picture's title says why ("density has no bound along x or y, so this is a 48 × 48 window from 0. Drag it, or use the arrows, to move it."); the corner labels give the part shown (x 56 · y 0,x → 103), the arrows move it by half a window, dragging the picture moves it too, and a small overview shows where the window is. In the Game of Life example,densityhas no bound of its own (off the board it is 0), so it is shown as such a window, whilealive, bounded by the board, is shown whole. Ask fordensityafteralive: the coordinates the two share (x, y and time) are kept, and the view stays open. Opened from the home page's Mandelbrot, the picture drawsshade, its smooth colour, while your question, the card's readout and Why? stay on the countn_steps, the number the home page shows. - What is played by default: the dimension the value iterates along (
timefor Heat and Life,kfor Mandelbrot,stepfor the network's weights), or, for a value that is not itself an iteration, a dimension along which the program's iterations run. With two dimensions, one of them the iteration's, the default is a row over the other, played along the iteration; in View ▸, pick the iteration's dimension for the picture's up side for a grid instead. - Dimensions whose coordinates are texts, such as the sensors example's
sensor, bounded by its list{"north", "south", "east"}, can be a side of the picture: their labels are the texts the program writes for them, and a grid with one is a table. - Why? for a cell: click a cell to ask for it, then press Why? beside its answer (or beside the step in the trace): the view marks with a dot every cell that answer depended on, at the fixed and played coordinates shown. Mark on the picture (Mark on the view for a row), after Why? beside the answer, turns the marks on and off; ticking it before Why? presses Why? for you.
On Heat diffusion over time and space, once the picture is drawn (by itself), press Play under it to watch the heat spread tick by tick. Play runs from the start on to the example's end (Life's 300 generations, heat's 400 ticks; elsewhere the larger of the queried tick and 100 ticks), a frame every 50 ms (about 20 a second) where each is computed in time; a longer run is shown in at most 400 frames, each a few ticks on, so Reaction–diffusion: coral from a square, asked at time 3000, plays in frames of 8 ticks. While it plays, the colour scale holds still (it only widens), so the plate visibly cools as the heat spreads. With Mark on the picture ticked, Play keeps a slower pace, 450 ms a frame, to watch the marked cells. The played dimension starts at the queried tick; ◀ and ▶ move it one step, the box between them is the tick shown (type one and press Enter), and the slider under them goes straight to a tick. Then in View ▸, pick time for the picture's up side and set Plays along to nothing: heat: an x × time picture, at y = 64, the plate's middle row through time.
A value with two small dimensions and no steps (at most 16 coordinates each), such as the matrix example's C, is a table: its first dimension down the rows, its second across the columns, each cell with its number. A grid over a dimension of texts, such as sales planning's products and zones, is a table too.
#Lesson 3: Write your own program and give it data
Every source you declare gets a data box, and you choose how it supplies values.
- Add source, at the bottom of the Data In/Out tab, opens a small form: the source's name, its dimensions with their sizes (one dimension
tof size 10 to start with; Add a dimension for more, a whole number orinffor no end), and whether its data is a table or a formula. OK addsname = input("name", t : 10)at the end of the program and a card for it marked "New: added to the program, which applies it by itself" until it does, a moment later. A name already in use, or one that is not a name, is refused with a reason. Once applied, the source answers an error at every point,input "name" has no data: give it rows, or a provider that answers it, until you give it data; once its table has rows, a point it does not list is eod. - A source's sizes are boxes on its card,
(x : 128, y : 128): a whole number, orinffor no end. Changing one changes the source's line in the program, and nothing else of it; like any edit to the program, it applies by itself. When other values are bounded with the same size along the same dimension, the card offers to change them too ("Also change alive to 256 × 256?"). Life's random board follows its size: at 256 × 256 it is random everywhere, with the 128 × 128 board in its corner. The Alps temperatures are recorded, so their sizes cannot be changed. After Update, if a value still has a smaller size than a source it reads (heat still 128 × 128 reading initial at 256 × 256), the status line says so ("heat is still 128 × 128, so it reads only part of initial (256 × 256). Change heat too?") with a button that makes the change. - A table's tools, under its box: Load file… reads a CSV or JSON-lines file from your computer into the table, as a change to apply (in the page: nothing is sent anywhere). JSON lines are one object a line with the source's dimensions,
valueand, optionally,ts; they become CSV rows. A file whose columns are not the source's opens a mapping step to choose how they are used (Lesson 9). A file that is not a table is refused with its line ("input x (bad.jsonl): line 2 has no field t, a dimension of x; its fields are value. The table is unchanged."), and a file over 5 MB is refused too. Open as a table shows the rows as a grid: edit a cell, Add a row, or delete one with ×; the text follows, and Edit as text returns to it. Copy table copies the text, to paste into a file. Save as file saves it asname.csv; when the playground runs on its own in its sandbox, saving is not possible and the card says so ("Saving a file is not possible here: the playground runs in a sandbox. Copy the table and paste it into a file."). A table that lists points beyond the source's size says so ("1 row lies outside customer : 8"): those rows are not read until the size includes them. - Outputs, the last section of the Data In/Out tab, write values out as records, one record per point of their bounds. An output is a line of the program,
output("report") = total: the output channelreportwritestotal, and its card is marked named in the program. The card says its rows ("Rows: t = 0..9.": the coordinates the program lists for a dimension, else its bounds; a dimension with neither is written over the coordinates the data its value reads lists along it, each once, sorted, with no row for a gap) and where it is written: Written to its own file, whose name and format (CSV, JSON lines, Parquet or Arrow) you set on the card, or beside another channel, in that one's file, a column each ("In the Download, out/running.csv holds running, risk side by side: a column each."). Channels written side by side must have the same dimensions and the same rows; otherwise the card says so in the command's words and the Download refuses them. In its own file, a channel may be written wide (from 0.22.0): Columns by one of its dimensions writes a column per coordinate of it and a row per coordinate of the others ("Written wide along col: a column per coordinate of col."), and rows numbered by another writes the rows in its order with no column of its own, as a table read withrowandwideis written back as it was read; JSON lines are never wide, and a channel beside others is not either (the card says so in the command's words). Leave out rows that are eod leaves out the records whose value is eod (written wide, the rows whose every cell is eod; beside others, the records where every channel is eod); an error is never left out. The program's line says what the channel is: change the line to change it. Show in the program selects the line on the Program tab; Remove takes the line out of the program. Add output asks for a name, the values (tick one or more) and a format, and OK writesoutput("name") = valueat the end of the program, a channel for each value (written side by side, into one file named after the output, when you tick several). Each is a change not applied: Update applies it and Undo takes it back, as for any change to the program. Download results computes the records here, each value's outcome as asking for it alone gives it, and saves them as CSV or JSON lines; written wide, the CSV is the wide table, and with eod rows left out they are left out here too; for a channel written as Parquet or Arrow the buttons say which (Download results as CSV, Download results as JSON lines), and a line under them says that the Parquet or Arrow file itself comes from running the Download with elucid8; a box of more than 100,000 records is refused with a plain message ("This output has 2,560,000 records; …"). Where the playground cannot save a file, the button is Copy results. In CSV, a text that a spreadsheet would read as a formula (one starting with =, +, - or @) is written with a'before it, so opening the file in a spreadsheet runs nothing; the card says so. The Download's zip names each channel's file indeploy.json(each CSV file with"spreadsheet": true, so the command guards it the same way), and./elucid8 run plan.json --config deploy.jsonwrites exactly these records; its README lists each file. - Remove on a source's card asks first, in the card, and names the definitions that use it ("doubled, total, last3, alarm, capped and checked use reading: they will show an error until you change them"); Cancel keeps it. Removing takes the source's equation out of the program, which applies by itself, like any edit to the program; Undo brings back the line, the card and its data exactly.
- You can also write the equation yourself; the line under the button says so ("Add an input with the button, or write name = input("name", t : 10) in the program."). The Empty program has no inputs, and the Data In/Out tab says "No inputs yet."
Start from any example and replace the program with this; it is applied by itself once you stop typing:
temp = input("temp", t : 4)
change = next.t temp - temp
warming = change > 0
- The version line should read "Version 2: the program changed (version 1 was as the example came)". If the status line shows a compile error instead, click the line number in the message to jump to the problem.
- A source temp card appears with the header
t,value. Add the rows 0,10 · 1,12 · 2,11 · 3,15, one per line, and press Update: "Version 3: temp's data changed". - Ask for
warmingat t = 2 and press Run query: "warming[t = 2] is true" (15 − 11 = 4). At t = 3 it is eod, becausetempends at t = 3 (its bound,t : 4), sonext.t temphas nothing there. - Switch the card's mode from table (CSV) to formula. It starts with a formula that works,
#t * 10(for a table of only 0s and 1s, such as a board,if #t < 3 then 1 else 0), and the line under it explains: "Each point's value from its coordinates, for example #t * 10 or if #t < 3 then 1 else 0." Replace it with10 + #t * 0.5and press Update. Now every t from 0 to 3 has a value, sochangeis 0.5 at t = 0, 1 and 2 (and still eod[t = 3]). - Press Undo twice: once to version 3 (the table), then to version 2 (no rows). Switching to the formula and back before an Update finds your table again; Undo changes puts it back too.
The three data modes:
| Mode | What you type | Points with no data |
|---|---|---|
| table (CSV) | A header of the source's dimensions plus value, then one row per point. Values can be numbers, true/false, eod (end of data) or error: message. A quoted field ("a, b", with "" for a quote) is always text; read exactly as the elucid8 command reads a CSV file. A ts column, if there is one, holds each row's timestamp in milliseconds | eod |
| formula | One eLucid8 expression using #t, #x and so on | None: every point has a value |
| built-in example | Nothing; offered only where an example supplies its own function (the Alps data, the Game of Life seed) | Decided by that function |
Values computed before an Update or a data edit are reused only where nothing they depend on has changed.
#Lesson 4: Reusing earlier answers
The playground remembers every value it computes, so later queries reuse earlier work. A remembered value is reused only while nothing it depends on has changed: not its equation, and not the data it read.
- Load Streams: first, next, fby again: it is asked by itself,
runningat t = 4 is 14, and the line under it says "computed 5 values, read 5 data points". - Query t = 5: 23, "computed 1 value, read 1 data point":
runningat t = 4, and everything before it, were reused from the first query. - Edit source x, changing the first row to
0,4, and press Update: the answer becomes 24, "computed 6 values", because every value read the old first row. - Press Run query again: "reused from an earlier question".
In a tree (Why?), a value reused from an earlier query is labelled reused; within one query, a value asked for twice is computed once, and the second time it is labelled already computed.
#Lesson 5: Service calls, deadlines and late
A data source is data that already exists, which the program reads: a table, a file, a database. A data service is data made on request: at each point the program asks an outside program, such as an AI model or a web API, and the answer is data stamped with the time it arrived. Where data comes from and where it goes says more about both, and about outputs. In the program both are inputs: echo = input("echo", n : inf) is an input whose values a program answers on demand, and answer = echo[n = reading] sends reading at each point to echo and takes its answer. Whether an input's values are stored or answered on demand is its card's choice, under Inputs on Data In/Out, not the program's. An outside program may be slow, or fail. Its deadline (how long its answer may take), which failures to try again and whether to reuse answers are the input's settings, on its card, not part of the program. An answer that comes after the deadline is late: an error, which you see, never a number made up in its place.
Choose Calling a service: an echo (in Outside services). echo is the simplest data service there is: it answers with what it is sent, 5 ms later, with a 20 ms deadline. A Tour above the question goes through it a step at a time, and ticks each step as you do it; Show me takes you to the place each step needs:
- Asked as the example opened: "answer[t = 2] is 20", with timestamp 5 ms. echo was sent
readingat t = 2, which is 20, and sent it back. The Service calls tab shows 1. Press Run query, as the Tour's first step asks: echo is called again (its answers are reused only when its settings say so), with the same answer, and the tab still shows 1. - Open the Service calls tab: one call, echo, sent [20], started at 0 and answered at 5 ms.
- Make echo take 30 ms, longer than its 20 ms deadline: on echo's card (Data In/Out), set Takes to 30. The card is marked as changed.
- Press Update: "answer[t = 2] is late", and under it, in plain words, "echo answered after 30 ms, past its 20 ms deadline." The Service calls tab shows "1 late", in red, and the version line reads "Version 2: echo's settings changed (version 1 was as the example came)".
- Press Undo, beside Update: back to version 1, where echo takes 5 ms, and the answer is 20.
When the answer matters: a fraud check that can't wait. Choose A fraud check that can't wait. An AI model, fraud_model (simulated), scores each card payment for risk; a payment must be decided within 200 ms, and when the model is late or fails, a rule decides instead (approve under 500):
payments = input("payments", t : 8)
fraud_model = input("fraud_model", amount : inf)
risk = fraud_model[amount = payments]
approve = if iserror(risk) then payments < 500 else risk < 70
approve at t = 1 is false: the model was too slow for the payment of 1250 (ask for risk at t = 1: "risk[t = 1] is late", and under it "fraud_model answered after 257 ms, past its 200 ms deadline."), so the rule rejected it. At t = 6 the model failed ("risk[t = 6] is an error", and under it "fraud_model answered with an error (overloaded).") and the rule approved 310. Ask for approve at t = 6 and press Why?, then click approve in the tree: beside it, the trace says "risk[t = 6] is an error (service error: overloaded), and approve[t = 6] is still a value: its equation tested for the error and took the branch that reads payments[t = 6]." On fraud_model's card, set Deadline to 300 ms and press Update: no answer is late any more, and approve at t = 1 follows the model (risk 37: approved).
Your own program, with retries. Start from any example and replace the program with this:
x = input("x", t : 4)
sum_service = input("sum_service", n : inf)
total = sum_service[n = x]
alarm = total > 15
Once the program is applied (by itself, when you stop typing), switch the input "x" card to formula, enter
10 * #tand press Update. The inputsum_servicehas no data, and its channel is the playground's stand-in, so its card under Inputs says that sum_service answers it on demand ("sum_service, answering on demand" in its menu): "sum_service answers the sum of the point's coordinates", with Takes 5 ms. Set Deadline to 20 ms. Open More settings: set Try again onoverloadedup to 2 attempts in all, and press Update ("Version 4: sum_service's settings changed").Query
totalat t = 2: 20, with timestamp 5 ms. A call starts at the latest timestamp of its inputs; the formula's data carry none, so it starts at 0 ms and answers at 5 ms, inside its 20 ms deadline, and the answer is stamped with that time. Press Why? and click the call in the tree, the rowsum_service[n = 20], and read the Data service call table beside it: the deadline, each attempt's start and finish, and the result. There is one attempt.Query
alarmat t = 2: true (20 > 15).Set Takes to 30 and press Update: the delay is part of the version ("Version 5: input sum_service's settings changed"), and
totalis asked for again: "total[t = 2] is late".alarmat t = 2 is now "Error via total ← sum_service[n = 20]: late (30 ms > deadline 20 ms)": the lateness is passed on, never replaced by an ordinary answer.The retry setting allows a second attempt when the service fails with the error code
overloaded, before the deadline.sum_servicenever fails, so the table still shows one attempt: a late answer is not retried.On the Visualize tab,
totalover t: with the delay at 30, all four cells are purple (late). Press Undo (the delay back at 5, version 4) and they show 0, 10, 20 and 30.Open the Service calls tab: the last question's call, its start and completion, and its answer, in red when it was late.
Two services, two deadlines. A program's settings belong to its input, so to give one call a longer deadline than another, read two inputs. Add these two lines to the program; they are applied by itself once you stop typing:
quick_sum = input("quick_sum", n : inf)
quick = quick_sum[n = x]
quick_sum has no data yet: its card offers a table. Choose a simulated program, answering on demand in its menu instead. A simulated program answers a sum, a score or a formula, optionally with a delay and a failure rate: the sum, mean or largest of the coordinates it is asked at, a score from 0 to 100, or a formula over them (x1 * 2 + x2); a delay fixed, or varying between two values; failures from 0% to 50% of attempts, with an error code. A new one answers the sum after 5 ms and never fails. Its times and failures come from what it is asked, so the same question always gives the same answer. Set its answer to the largest (under More settings) and its Deadline to 2 ms, press Update, and query quick at t = 2: "quick[t = 2] is late", and under it "quick_sum answered after 5 ms, past its 2 ms deadline.", while total keeps its own deadline. In a deployment, the two inputs are two entries in deploy.json, which may be answered by the same real program.
An input is answered on demand only when its card says so: by sum_service, the playground's stand-in, or by a simulated program you set up. The Services reference describes them. Misspell the stand-in's name, input("sum_servce", n : inf), and the input is just one with no data: its card offers a table, and total is an error saying so, input "sum_servce" has no data: give it rows, or a provider that answers it, until you give it data or choose a program that answers it.
A call on a stream with timestamps. A call starts at the time of the data it is given (the latest timestamp of its inputs), and the deadline counts from there. The data's own times come in through a table's ts column, and two streams at different rates meet through them (Lesson 6 explains asof, hold and window in full). Here a reading every 100 ms is multiplied by the latest calibration at or before its time, and the result is sent to the service:
reading = input("reading", s : 4)
calibration = input("calibration", c : 3)
calibrated = reading * asof.c calibration at time(reading) end
sum_service = input("sum_service", n : inf)
total = sum_service[n = calibrated]
Once the program is applied (by itself, when you stop typing), give reading the table s,value,ts with rows 0,10,0 · 1,11,100 · 2,12,200 · 3,13,300, and calibration the table c,value,ts with rows 0,1,0 · 1,2,150 · 2,3,250, and press Update. Keep the service's deadline at 20 ms.
- Query
calibratedat s = 2: 24, with timestamp 200 ms (12 × 2: at 200 ms the latest calibration is the one from 150 ms).totalat s = 2 is 24 too, with timestamp 205 ms: the call starts at 200 ms, the time of the data it is given, and answers 5 ms later. - Replace
asof.c calibration at time(reading) endwithhold.c calibration at time(reading) within 40 end; once you stop typing it is applied, andcalibratedat s = 2 is now missing data (an error of kindmissing), because the latest calibration is 50 ms old, more than the 40 ms allowed, and a later one follows at 250 ms.totalat s = 2 is that error as well: the service is not called with an error. - Use
mean calibration over (c : window.c 200 at time(reading)) endinstead: at s = 3 (300 ms) it is 32.5, 13 times the mean of the calibrations from 150 and 250 ms. - Set Takes to 30 on sum_service's card and press Update: every call with an answer is late. At s = 2 the call starts at 200 ms and answers at 230 ms, after its deadline at 220 ms. The answer reads "total[s = 2] is late", stamped 220 ms, and its row in the trace says "late: answered at 230 ms, after its deadline at 220 ms".
#Lesson 6: Align two streams by time
In the v0.2 notation, data can carry timestamps: each value is its data and a time in milliseconds. The playground shows a value's timestamp under its answer ("timestamp 390 ms") and in the trace; Timestamps says more. Two streams at different rates meet through their timestamps: asof.d(v, T), hold.d(v, T, max) and window.d(v, T, w) choose values of v along d by their timestamps, and time(e) reads the timestamp of e.
Choose Two streams and alignment by time. A reading arrives at 0, 98, 203, 300, 390, 401 and 499 ms (time_s 0 to 6) and is multiplied by a calibration from 0, 230, 380 and 401 ms (time_c 0 to 3). Both are tables whose ts column holds each row's timestamp. The calibration table is 1.0, 1.05, an empty cell, 1.1: the calibration at 380 ms did not come, so it is missing data (an error of kind missing, at its row's time). asof takes the latest calibration whatever it is, so where that is the missing one, the answer is its error; hold writes skip missing, and steps back over it; a mean over a window leaves it out, and the answer warns how many points it left out.
| time_s (reading's time, ms) | asof | hold, less than 100 ms old, skip missing | window, 200 ms (mean) |
|---|---|---|---|
| 1 (98) | 11 | 11 | 11 |
| 2 (203) | 12 | Error: hold: no data within 100 ms before 203 (missing: the latest calibration is 203 ms old, and the next comes at 230 ms) | Error: mean of no elements (no calibration in the window) |
| 3 (300) | 13.65 | 13.65 | 13.65 |
| 4 (390) | Error via calibration[time_c = 2]: the calibration at 380 ms is missing | Error: hold: no data within 100 ms before 390 (missing: past the missing one, 1.05 is 160 ms old, and 1.1 comes at 401 ms) | 14.7: the missing one left out, with "Warning: aggregates left out 1 missing point of input calibration" |
| 5 (401) | 16.5 | 16.5 | 16.125: mean of 1.05 and 1.1 |
- Query each of the three values at time_s 1 to 5 and compare with the table.
- Press Why? beside any answer and open its tree: it lists the reading and every calibration row the alignment examined; click a row to see its timestamp beside the tree.
- Edit a
tscell or the calibration table, press Update, and watch the answers change. Lesson 4 applies: every value that read the old data is computed again.
#Timestamps
Every value has a timestamp: the time of the latest data it was computed from, in milliseconds since 1970 (0 when nothing it read carries a time). The line under the answer always shows it ("timestamp 0 ms · what is this?"), and the trace shows it for the row you select.
- On Two streams and alignment by time,
calibrated_windowat time_s = 4 reads "calibrated_window[time_s = 4] is 14.7", with "timestamp 390 ms" under it: the reading it used arrived at 390 ms. - Times of an hour or more, up to early 1973, are shown as a duration from 0 with their milliseconds: a timestamp of 561,060,000 ms reads "timestamp 6 d 11:51 (561,060,000 ms)". Times from early 1973 on are shown as dates. On Alps temperature (real data, Open-Meteo) the answer reads "anomaly[time = 36, x = 4, y = 2] is -9.96667", with "timestamp 2026-10-03 12:00 UTC" under it, and the trace gives the number of milliseconds as well.
- In a view, Show values | timestamps draws each cell's timestamp instead of its value, with the same colours as numbers (and the line chart likewise); an eod or Error cell stays grey or red.
- Any table in a v0.2 program may have a
tscolumn: each row's timestamp in milliseconds. On Streams: first, next, fby, change the header of x's table tot,value,tsand give every row a time:0,3,1000,1,1,2000,2,4,3000,3,1,4000,4,5,5000,5,9,6000, and press Update. Thenrunningat t = 4 is 14, with timestamp 5,000 ms (it read x up to t = 4);deltaat t = 4 is 4, with timestamp 6,000 ms (it read x[t = 5]); andnat t = 4 is 4, with timestamp 0 ms, since it reads no data.
#Lesson 7: Show every step
The playground computes values that iterate along a dimension, such as heat over time or a network's weights over training steps, a whole step at a time: fast, but the demand tree then shows each step as one row. Show every step, at the top of the Trace tab, computes one value at a time instead, so the tree shows every value being asked for. The answer is the same either way; off is faster on large grids.
- Choose Heat diffusion over time and space, set time to 5 and x to 40, and press Run query:
heatat time 5, x 40, y 64 is 26.9136, near the edge of the hotter disc. - Press Why?. The tree has 6 rows: the answer, labelled computed together because each step of the plate was computed at once, then one row for each earlier step, naming the cells of the plate computed at that step.
- Tick Show every step: the query is asked again, with its tree. The answer is still 26.9136, but the tree now has 1607 rows: every value of the light cone is computed one at a time (286 values), from the 121 data points it reads.
- Tick Mark on the view, after Why? beside the answer: the marks are the same with Show every step on or off.
Click a step's row: its details explain the step and offer Show every step for the value asked about, which asks for it again with the full tree, every value one at a time. On Heat diffusion over time and space, showing the whole plate at time 20 takes a fraction of a second with Show every step off and a few seconds with it on.
#Lesson 8: Missing data, errors and program mistakes
An answer is a value, eod (end of data: the point is past the data) or an Error, and every Error names the point where it started. Missing data is an Error of kind missing: a reading that should be there and is not. Choose Missing and failed readings (missing data and errors): reading's table has an empty cell at hour 5 (the reading did not come: missing data) and error: sensor fault at hour 9 (the sensor reported a fault).
| Query | Answer | Why |
|---|---|---|
doubled at t = 5 | Error via reading[t = 5]: input reading has no data at this point | Strict: missing data is an Error, passed on like any other |
doubled at t = 9 | Error via reading[t = 9]: sensor fault | The Error names the point where it started: the input reading (day is that input, over one day) |
safe at t = 9 | 0 | The guard is false, so the bad reading is never asked for |
window3 at t = 6 | 33, with "Warning: aggregates left out 1 missing point of input reading" | An aggregate leaves missing data out, and says how many points it left out: 16 + 17, hours 6 and 7 |
window3 at t = 10 | Error via reading[t = 9]: sensor fault | Any other Error is kept: the window t 9–11 reaches the fault |
change at t = 0 | eod | Hour 0 has no hour before it: past the data, not a gap |
Then empty hour 9's cell in reading's table and press Update: hour 9 is missing too, and window3 at t = 10 is 41 (20 + 21), with the warning. The same hour, missing rather than failed, is left out instead of passed on. To give a missing reading a value of your own, write default(day, 0, "missing"); to say that the gaps are expected and need no warning, sum day over (t : #t - 1 .. #t + 1) skip missing end.
The playground catches three kinds of program mistake:
- Compile errors appear in the status line with a clickable line number when you press Update (an edit that does not compile is not applied by itself), and the answer stays that of the last version that worked; Undo changes returns to it. Try deleting the end of a line.
- Unguarded cycles are caught at compile time.
a = restrict b + #t to (t : 4) endwithb = restrict a to (t : 4) endgives "unguarded cycle: a -> b -> a". - Cycles through other points stop with a message, instead of running for ever.
f = restrict f[t = 9 - #t] to (t : 10) endasks for f[t = 7] to answer t = 2, and for t = 2 to answer t = 7: it ends with "Stopped: demand cycle: f[t = 2] -> f[t = 7] -> f[t = 2]". A chain of demands too deep to finish stops after 100,000 steps with "Stopped: demand depth limit (100000) exceeded …".
If a query ever stops with "Stopped: the engine broke one of its own rules", that is a fault in eLucid8, not in your program: report it with the program and the query that caused it.
#Lesson 9: Describe what you want to compute
On elucid8-lang.org, signed in with an account that has it (for now, the eLucid8 reviewers), the left column has three tabs, Prompt, Program and Data In/Out. Prompt holds a box, Describe what you want to compute, as tall as your description. Under it, one line says how to ask: "Say what the data is (or none), what to compute, and what you want to see."; the box shows an example in that order, changing every few seconds until you click in it. Under that line, four chips (Try: Mandelbrot you can zoom, Sales, 7-day average, Heat on a plate, Life from a random seed) each put a whole description in the box, which you can edit; nothing is sent until you press the button. Write what you want in plain words and press Generate and run program: an AI writes the program in eLucid8. Once the program is your own (you changed it, saved it, opened it from a link, or it was written from a description), the button is followed by or change the current program, which changes it instead. Being on Prompt pauses a tour ("Tour paused · Resume at step 1"). ⌘↩ in the box writes a new program, or a change when your description starts with "Change:". × in the box empties it. The box writes programs only: anything else is answered with a card, "This box writes programs that compute something.", a link to the Learn page that fits (the Quick reference for a question about eLucid8), and, where one fits, the request reworded as a computation, which Put this in the box puts in the box. The playground on its own, outside the site, has no box.
- One press shows the result. While the program is being written, Prompt says "Writing your program… 12 s" under the box, with what you asked and Cancel, and the program, answer and picture are marked as the previous program's; the AI runs the program at a few points to check it, so it can take up to a minute. Whatever works arrives applied at once, as the next version, a change as much as a new program: its question is asked and its picture drawn on the right, and Prompt shows a card in place of the box. The card says You asked: (your description), I read this as: (each data source and each value, with its dimensions and sizes, read by the page from the program, and the AI's few words for what each value means; how it is shown; and what the AI assumed where your description left it open), and Checked: ("The program runs: no errors or warnings.", then each point the AI checked, run again by the page, with ✓ only when the page gets the same answer: "✓ heat[x = 32, y = 32, time = 1] is 100: the centre starts hot."). Press a point to ask for it. Change it brings back the box with your description, to change the program by describing what to change; Start again empties the box; Show the program opens the Program tab, where a line at the top says "✓ Written from your description, and checked · See the description". A failure, Cancel or an error stays on Prompt, the reason under the box. The version line quotes your description ("Version 2: written from your description “square, the square of each whole number…” (version 1 was as the example came)").
- A new program's data sources hold made-up sample data (each card marked Made-up sample data): a table, or, for a source too large for one, a formula that varies; the card says so ("your data over shop × day (3 × 30): made-up values for now, change them in Data In/Out"). If a check does not match ("✗ … the writer worked out 1234, but the program gives 1230"), the card's edge turns red and says how many did not match: read I read this as before you trust the program.
- Its name. A new program is named by the AI ("Weekly exchange-rate forecast") unless you have named it yourself; the website shows Not saved until you save it, and the first Save shows the name in a field to keep or change (Escape or Cancel keeps it unsaved).
- A data service the playground does not have. If the written program calls one (an image model, a weather API), the playground makes it a simulated data service, so that the program runs: it answers a score from 0 to 100 from what it is sent, the same score for the same inputs, after 50 ms. Its card says "image_tagger · simulated: a stand-in for your own service. Replace it with your service when you deploy.", its settings can be changed as for any simulated data service, and the reply says which data services are stand-ins. A simulated data service answers numbers only, so where the program compares the answer with a name (
tag == "forest") or uses it as true or false, the card and the reply say what that means for the answers. The Download binds it as a simulated service, and its README lists it among the stand-ins to replace. - A change keeps your data exactly: only the data sources it adds get made-up data. The card lists only what the change added (new) or changed (changed), what it removed, and "your data: as it was"; what you had changed but not applied becomes part of the version. If the change does not work with your data, it is not applied: it is in the editor as changes not applied, with the error at its line ("With your data, it stops at line 4: unknown name salse. It is in the editor as changes not applied: …"); press Update to see it, then fix it, or press Undo changes.
- Writing clears the last attempt (its reply, an error, the question below). Typing another description marks the reply that is still shown "For your previous description." A new program over changes you have not saved asks first: "Your changes are not saved. Write a new program anyway? Undo can bring them back during this visit.", with Keep my program to stay. A tour ends when a written program replaces the example; Undo back to version 1 offers to resume it.
- When no program compiles after the AI's own fixes, the reply says "✗ Could not write a program that compiles." and where the last attempt stopped ("The last attempt stopped at line 4: unknown name salse."), or why ("The reply was too long and was cut off."). When that attempt had a program, Load it anyway puts it in the editor as changes not applied, with sample data for its new data sources; In plain words is then marked "not checked: the program did not compile". Press Update to see the error at its line, then fix it, or press Undo changes.
- In plain words, under the editor, says what each definition is, one line each; for a change, the definitions it touches are marked Added, Changed or Removed. Click a name to select its definition in the editor. A definition you edit afterwards says "Edited since: this may no longer describe it."
- Use my own data on a sample card opens Load file…. A file whose columns are not exactly the source's (its dimensions,
value, andts) opens a mapping step: each column, what it looks like ("dates, 2026-01-03 to 2026-12-30", "names: north, south, east, west") and what to use it as, which you can correct. A date column counts days, hours or months from the first date, and gives each row its time. The step lists what changes in the program (a source's size, the names a list holds) and what stops it, in plain words. Apply puts the table and the program's changes in as changes not applied; Update applies them as one version ("sales's data from sales.csv"). The mapping step works for any table source, with or without the AI. When your description names your own file ("my own file sales.csv"), the reply offers Choose the file now, which does the same for the data source the file goes into; the file is read in your browser only, and the check waits until it is in ("Check once your file is in: …").
Examples to describe. Under the box on Prompt, a fold, More examples to describe · and how to describe a program, opens the list of ready-made descriptions: one on real data (the European Central Bank's euro–dollar rates, which the page fills in instead of made-up data), ten new programs from simple to complex, a folded group From science, engineering, history and AI (simplified models, for learning), and changes, each shown only with the program it fits. Each is written in five parts, a line each: Data, Compute, Show, Check and Output; How to describe a program, at the top of the list, says what goes in each. Generate and run this program (for a change, Generate and run this change) writes it at once, its description put in the box so that you can change it and write it again. If it replaced your own text, Put back your description restores it. The ready-made descriptions are answered with programs the AI wrote for them earlier, so trying them costs nothing; any edit to the description writes a new one. Prompts 8 and 9 bring in a file of your own; beside them, sales.csv to try it with saves a 14-day example file (north's last 7-day average is 17, south's 10.4286). At the foot of the list, Cheat sheet opens the code constructs over the editor.
Your description, and for a change your program and a few rows of your data, are sent to Anthropic to write the program: the Privacy page says what is sent and kept. Tick Share my description to help improve this, under the box, to let the eLucid8 team keep that description and the program written for it; unticked, nothing is kept. Each account has 10 requests a day. The AI can write a wrong program: check the answer it names by hand, and read the program before you rely on it.
#Quick reference
Controls
| Control | Default | Effect |
|---|---|---|
| Run query | Asks the question: the answer, and the view around it | |
| Update (Cmd-Enter or Ctrl-Enter anywhere in Program or Data In/Out) | disabled until you change something | Compiles the program with its data and settings; if it compiles, it becomes the next version and everything refreshes |
| Undo changes | shown while you have changes not applied | Puts back the program, data and settings of the current version |
| Undo | shown, beside Update, when there is a version to go back to | Goes back to the version before |
| Show me (in a tour) | Takes you to the step's control: its tab, open, scrolled to, focused and ringed | |
| Hints: on / off (right end of the question row) | on | Off hides tours, Next lines and the explanations on Data In/Out; on brings them back |
| Tour ✓ · Replay, Tour · Resume at step n (question row) | shown once a tour is done or closed | Opens the tour again, at its first step or where you left it |
| · Hint (under an answer) | shown once you have done what its Next line suggests | Shows that answer's Next line in full |
| Why? (under an answer, and beside a step in the trace) | Asks for the same point again from scratch, with its demand tree; an open view marks the cells it depended on | |
| Show values | timestamps (in a view) | values | Draws each cell's value, or its timestamp |
| Show every step (top of the Trace tab) | off | Computes one value at a time, so the tree shows every value asked for; the answer is the same |
| Generate and run program / or change the current program (the Prompt tab, on the website) | the change link once the program is your own | Asks the AI to write a program, or to change this one; what works is applied at once as the next version, its question asked and its picture drawn |
| × (in the box) | shown with text in the box | Empties the box and clears the last attempt; the program is unchanged |
| · Cheat sheet (line above the editor) | Opens the code constructs over the editor, with Insert | |
| · Hide comments / · Show comments (line above the editor) | Folds each run of comment lines into one --▸ line, or shows them all | |
| Generate and run this program (Examples to describe, the Prompt tab) | Writes a ready-made description at once |
Demand tree labels
| Label | Meaning |
|---|---|
| computed | Computed from its equation |
| computed together | Computed with the other values of its step, at once |
| computed with neighbours | Computed together with the points around it |
| read | Read from the program's data |
| read already | Read earlier in this query |
| read before | Read by an earlier query; the data has not changed |
| reused | Computed by an earlier query; nothing it depends on has changed |
| already computed | The same value earlier in this query |
| service called | A data service was called |
| answer reused | A service's successful answer from an earlier query, used again because of reuse successes |
Answer colours in the view: true, false, text, late (purple), eod (grey), Error (red), and a shaded scale for numbers.