Browse documentation
aner.dev · Reference

Interactive Aner notebooks

Use .anernb documents with native persistent sessions, Markdown, and images in VS Code.

Implemented

Begin with the aner.dev overview for the module API and runnable entry point.

Aner notebooks use .anernb (Interactive Aner Notebook) for the document and .aner for plain source. The Aner extension provides Markdown, image attachments, highlighted Aner code, saved outputs, an offline training report viewer beside the notebook, and two document execution modes. Development/production is a separate runtime setting; production is the default:

ModeUse it forState between cells
Shared variables (default)Direct statements, interactive variables, and experiments split across cellsNative values, imports, and functions remain available until the session ends
Independent programsSeparate scripts or complete fn main() -> Unit programsEach cell runs in a fresh process

Aner — notebook follows the execution mode saved in the document. New notebooks use shared variables. Aner executes each cell directly in its native runtime. Persistent sessions retain values and definitions between cells.

Open and run

Install a compatible Aner executable for your operating system and the VS Code extension supplied with the same release, when available. See installation and release availability and Aner in VS Code. The setup uses installed binaries; no language source checkout is needed.

  1. Open your own project folder in VS Code. To use the supplied examples, open the folder that contains their examples/ directory.
  2. Open variables across cells, or use Aner: New Notebook in the Command Palette.
  3. If the file appears as JSON, choose Reopen Editor With… → Aner Notebook from its editor tab's context menu.
  4. Save a new notebook as a .anernb file inside your project, then run its code cells in order or choose Run All. If prompted for a kernel, choose Aner — notebook.

After updating the extension, run Developer: Reload Window. The cell status shows the effective execution mode. Reloading clears live notebook state, so rerun the defining cells before using their variables.

For a notebook containing full main programs, run Aner: Use Independent Programs. The Iris neural classifier and hello notebook already specify independent mode in their metadata. Use Aner: Use Shared Variables, or an independent cell’s Use shared variables status action, to change a notebook to shared state. Save the document to persist a mode change. Changing mode cancels old work and clears session state; neither command executes or replays cells. Rerun from the first defining cell afterward. The mode applies to the whole notebook and is not inferred from cell source.

Add Aner code cells for calculations and Markdown cells for explanations or images. The active light or dark theme controls Aner syntax colors. Execution requires a trusted workspace; viewing and editing remain available without trust. The extension invokes your installed Aner executable.

Binding declarations and strict declaration policy

Use let when a name keeps its value and var when a later statement or cell needs to reassign it. For example, a retained array can use let while its elements change: a fixed binding does not imply deeply immutable storage.

With matching updated native and editor development builds, aner.strictDeclarations defaults to false. Enable it in VS Code Settings or workspace settings to require let/var for new bindings. Bare = then updates only a visible existing binding; an unknown assignment target reports E1010 and the cell does not execute. Existing type and mutability rules remain in force. Without the setting, a previously unknown name assigned with = still becomes a mutable binding.

Changing this setting cancels work and clears live notebook sessions without replaying cells. Rerun defining cells afterward. An explicit top level declaration can still reinitialize a binding from an earlier cell when type and mutability match; strict declarations do not prevent ordinary compatible declaration reruns. Duplicate declarations within one cell remain errors.

Nonfatal W1001 suggests let for an explicit var binding with no syntactic reassignment. Persistent top level bindings are excluded because a later cell can update them, while locals in newly checked functions and methods are still checked. Array element writes and object/collection content mutations are not rebinding; class fields and legacy implicit bindings are excluded. The analysis does not prove that a write executes or that an object is immutable. Warnings do not turn successful cells into failures.

Direct native clients select the same policy with aner session --stdio --strict-declarations. This is independent of the notebook's shared-variable/independent-program and development/production modes. Older native binaries may reject the flag. See the declaration contract.

Interactive geographic charts

With the chart enabled native runtime and compatible Aner extension, geographic .show() outputs support offline pan and zoom. Open the interactive Boulder notebook and run its first chart without any map pack. The optional second chart requires only usa.co; install its matching local .anermap file before running that cell.

Drag to pan, use +/−, double click or Ctrl/Cmd + wheel to zoom, and choose Reset for the original view. Focus the map for arrow key panning, +/− zoom and Home reset. Navigation stays within the initial chart extent. Markers and text retain their drawing sizes; default collision aware labels are laid out again after navigation and can appear when space becomes available. Choose point_labels("all") or point_labels("none") for the other label modes.

The renderer is bundled with the extension and makes no network or kernel requests. Saved .anernb outputs contain their geographic scene and static SVG fallback, so a compatible extension can reopen and navigate them offline without the source packs or a live session. Rerunning map code requires its packs again. Navigation does not alter source, retained native chart values or static exports, and view changes are temporary. Large scenes fall back to static SVG. See the plotting contract for payload bounds, projections and reproducible viewports. The optional Jupyter integration retains SVG display; the daily site dashboard below additionally supplies an isolated HTML view when frontend policies permit it.

Interactive 3D and scalar color

Open the synthetic Boulder 3D notebook with the matching updated native runtime and compatible Aner extension. scatter3d(x, y, z, values) supplies three coordinates plus an independent scalar color channel; the Boulder notebook reads a local CSV through an explicit schema and bounded data.collect, then calls plot.scatter3d_frames_table(table) for six captures with a time slider and Play/Pause. Its 378 synthetic rows cover 63 stable site IDs; later frames deliberately shuffle rows to demonstrate identity alignment. The trajectory and surface notebook demonstrates line3d and an explicit gridded surface3d. Code cells match the corresponding .aner and Jupyter examples; notebook files start with empty outputs.

Drag inside the 3D plot with the mouse to orbit the camera, or use Rotate plot X/Y/Z degree fields and ±15° buttons for direct axis turns. Reset and Home restore source authored camera/XYZ/zoom while retaining the current frame, observation and page; XY/XZ/YZ clear XYZ offsets for plane views. The renderer provides local zoom, orthogonal views and exact values in a paged table. The X/Y/Z turns act on the scale normalized plot, in fixed X then Y then Z order, before camera orbit; they are temporary view controls rather than edits to raw coordinates. Frame changes preserve these angles and selection; manual rotation pauses playback. Source .view(...), .rotation(...), .view_zoom(...), .time_frame(...), aspect, labels and color limits define the reproducible initial figure; browser camera choices do not mutate the native Chart. chart.save("fresh.html") embeds everything for offline viewing, and chart.save("fresh.svg") exports the initial static view. No map pack or extra positional datatype is needed. The Boulder coordinates and temperatures are invented Cartesian teaching data, not terrain or municipal measurements. See 3D and fourth variable contracts.

The matching optional Jupyter adapter presents spatial HTML in an opaque origin sandbox with local scripts, blob image rendering and user triggered downloads enabled; external connections remain disabled. Saved notebook trust and frontend script policies still apply; native SVG of the source selected frame and authored view remains the fallback. The Boulder source authors XYZ angles 15°, −10°, 20°, zoom 1.2 and zero based frame 2 (UI capture 3/6). Playback opens paused at that capture, advances once per second and stops at the last capture without interpolation. The assigned UTC labels are supplied text, not parsed calendar values. Shared coordinate/color domains, the camera and selected observation index persist between frames; the inspector and table update to the current capture. The table adapter requires complete time/site/x/y/z/value cells and exactly one row per time/site pair. First seen time and global site order define frames and stable observation indices; site IDs align records but are not displayed. Duplicate or absent pairs and missing cells reject, and coordinates may move. Primitive Float64 columns require finite values; Int64 inputs are limited to ±9,007,199,254,740,992 (±2^53), including the endpoints. A complete table has at most 120 frames and 10,000 total pairs; the original scatter3d_frames(...) remains available for explicit frame major matrices. Saved HTML includes every frame and needs no kernel or packs to play; native SVG exports the labeled source selected capture. General 4D spatial rotation, interpolated animation and volume rendering remain unimplemented.

Run the 3D CSV notebook from the project root containing examples/fixtures/plot_boulder_3d_frames.csv: relative paths use the process or kernel working directory, not the notebook folder. Downloaded examples need that folder tree or a consistent path edit in all three formats. Construction needs the local CSV and no map packs or network. Run All writes no files; add an export cell with fresh paths. A retained Chart and its HTML/SVG exports own the captured data, so later CSV edits or removal do not change them. Reread and reconstruct to adopt edits; saved HTML needs neither the CSV nor a kernel to view offline.

The same Aner program creates this experience: .show() supplies notebook interaction and .save("fresh.html") directly writes the standalone page with its data and renderer. Add a fresh export cell; the supplied Run All remains display only. No separate website implementation is needed. After exploring, Download PNG and Download SVG capture the current labeled figure; Save interactive HTML retains every frame and the current camera/XYZ/zoom/frame/inspection state, reopening paused. All downloads stay local and leave the kernel Chart and source unchanged. PNG is rasterized proportionally to at most two million pixels and 4,096 pixels per dimension; SVG stays vector with exact current frame metadata.

Use the expandable Recreate this view in Aner code when camera/XYZ/zoom/frame choices should be reproducible in source. Replace its placeholder chart with boulder (or your Chart variable), assign the returned copy, and save to a fresh path. .rotation(x,y,z) takes finite angles within ±180°, .view_zoom(zoom) accepts 0.5…3, and .time_frame(frame) takes a valid zero based captured frame index. These return immutable copies. Native .save uses source authored state; viewer download buttons use live view state. Reset/Home retain the current frame and inspection state while restoring the original authored orientation and zoom. HTML viewing needs neither the CSV, map packs nor a running kernel; constructing a new chart still needs the local CSV and matching development runtime.

One dashboard in .anernb and Jupyter

Open the Boulder dashboard .anernb with the matching development runtime and VS Code extension. Run All reads the local CSV through an explicit aner.data schema and bounded collection, then constructs plot.site_dashboard_table(table). .show() displays date controls, site checklist, interactive map, bar chart, daily trends, availability heatmap and table together. The 42 records cover six sites and seven dates; every observation is synthetic. Run from the project root, with examples/fixtures/plot_boulder_sites.csv relative to the kernel working directory. The first example needs no map packs. The notebook explains an optional boundary variant requiring only usa.co.

Filters operate on the embedded snapshot without rerunning Aner. The map keeps its viewport as totals and trends update. Saved outputs reopen with the compatible renderer and no running kernel; source code must be rerun to restore native variables. dashboard.save("boulder-dashboard.html") creates a standalone offline page, and dashboard.html() returns that document as a String. Export in a new code cell with a fresh filename, since existing files are never replaced. The analysis code cells are byte identical in both notebook formats and form the analysis prefix of plot_site_dashboard.aner. From the project root, aner run examples/plot_site_dashboard.aner reads the same CSV, constructs the same chart and exports the page. For a standalone download, preserve the relative CSV folder tree or edit the path consistently. Exported HTML and saved outputs embed the validated snapshot, so recipients need neither the CSV nor map packs to view it offline. Editing a CSV affects only a new read: rerun the analysis and export a fresh filename to update the page.

Standard Jupyter notebooks

.anernb is Aner's VS Code notebook format. Standard Jupyter uses the corresponding .ipynb file with the optional Aner kernel. Install the kernel adapter from a compatible distribution, using the setup in tools/jupyter/README.md, and select Aner in Jupyter. The native Aner executable remains necessary for execution; the adapter connects Jupyter to that runtime.

The adapter renders this dashboard in an HTML iframe with scripts restricted to an opaque origin sandbox and network connections disabled by its content policy. An untrusted saved notebook or restrictive frontend may suppress interactive HTML; review source and outputs before applying the frontend's normal trust operation. The initial static SVG remains available, and the exported HTML can be opened separately in a browser. Ordinary geographic charts retain SVG in standard Jupyter; the compatible VS Code renderer supports their interactive geographic scenes.

For missing observations, run the missing data .anernb or matching .ipynb with its CSV. Both use the analysis prefix of the .aner source, including a nullable count column and missing: "NA". Unquoted NA counts and absent site/date rows become missing values. The adapter expands the calendar between the first and last represented dates, so even a Wednesday absent for every site creates a line gap. It cannot infer dates outside that interval or a wholly absent site. The fixture also contains a measured zero: unknown observations remain distinct from zero in every output.

Period totals are N/A if any selected observation is missing. Observed subtotal and coverage are shown separately; a range with no measured data has an N/A subtotal. Weekday/weekend means require complete coverage in each included group. Incomplete map totals use neutral 5 px markers, while measured zero has zero area. The native static SVG, .anernb, sandboxed Jupyter output and exported HTML all retain the same missingness. The missing fixture has 31/42 measured observations and an observed subtotal of 13,780; Wednesday has 0/6 coverage with all six sites selected. No pack is needed, and adding optional usa.co boundaries leaves these rules unchanged.

The coverage heatmap, labeled Observation coverage, retains every site and date in the snapshot. Its colors show observed versus missing data, not count magnitude; measured zero counts as observed. Tooltips and accessible cell labels give the site, ISO date and count or N/A. Active sites and dates are highlighted without removing the surrounding availability context, and date/checklist changes update the map, bars, trends and table together. The grid reports full snapshot coverage; the status and summary table report coverage for the selected range.

Drag a rectangle across coverage cells with a mouse to select its inclusive site rows and date range, then release to update the map, bars, trends and summary together. Reverse dragging works too, including missing and measured zero cells. Ctrl/Cmd/Shift-drag adds those rows to the sites selected before the gesture while focusing the brushed date window; modifier click still toggles one site. The preview does not change filters until release. Escape during the gesture or pointer cancellation discards it and preserves the previous selection. Hold near or beyond a table edge to scroll to more cells; releasing outside uses the nearest visible cell at the current scroll position. The table may remain scrolled after cancellation.

Touch and pen retain table scrolling and single cell tap selection. Date inputs, the checklist, row buttons and keyboard controls remain available. The same .aner analysis supplies this brush in .anernb, Jupyter and offline HTML, with no additional API, data or map dependency. Use the updated native runtime and the matching Aner extension for .anernb; export a fresh HTML file to include the controls. Static SVG keeps its availability view and does not support brushing.

Click a cell to focus that site and single day. Ctrl/Cmd/Shift-click toggles the site and focuses the day, retaining other selected sites. A row header button focuses or modifier toggles a site while preserving the date range. Arrow keys and Home/End move focus; Enter or Space activates a cell. Large grids scroll within their own table. In the missing data example, Wednesday is missing in all six rows; North's Sunday is observed zero. Clicking either produces the same N/A/coverage or zero/coverage result in every view. The native SVG includes the initial grid, with stacked sections and repeated headers for long calendars; exact counts remain in cell titles when space is limited. .anernb, Jupyter and exported HTML add the linked controls and local table scrolling with no extra API or pack.

plot.site_dashboard_table requires a complete materialized table, required date/site/position metadata, consistent WGS84 coordinates per site, up to 32 sites and an inclusive span of at most 366 ISO calendar days. Duplicate combinations, missing metadata and invalid nonmissing counts remain errors. Tables from other loaders use the same contract. Empty CSV fields become missing only if the scan explicitly uses missing: ""; this example uses NA. plot.site_dashboard remains available for existing Lists. This is a daily count recipe rather than an arbitrary dashboard builder. See plotting and export details for input bounds, comparison rules and offline behavior.

Concise neural network notebook

Open the concise Iris notebook from an installed release that includes this example and its matching editor extension. It contains separate cells for imports and splitting, network topology, fitting, and held out evaluation. Choose Run All. The notebook explicitly uses shared variable mode; no function wrapper or controller switch is needed.

Named arguments and typed methods keep each cell short: flowers.split(test: 0.2, seed: 2026), network.dense(inputs: 4, outputs: 8), and pipeline.fit(split.train(), epochs: 2000, rate: 0.1). A leading . continues a chain across lines. fit returns a fresh fitted snapshot, learns the standardizer only from training rows, and does not change the configuration or a previous fitted result. Evaluating test rows reuses the fitted statistics. See the neural API and limits.

The document starts with empty outputs and preserves Iris attribution. Production returns text results; Development additionally supplies bounded variable/object observations and captured loss after each completed cell. Open the development Iris notebook for custom initialization and warm start cells. Use Inspector and Aner: Open Development Training Report for its recorded state. Fitted models can be saved and loaded separately; saved notebook output itself is not a checkpoint. Editing a configuration does not retrain a retained model: rerun fitting and evaluation explicitly. Restart followed by Run All gives a clean experiment. Streaming during execution and pause/step debugging remain future work.

Titanic and Diabetes classifier notebooks

Download the Titanic notebook or the Pima Diabetes notebook. Each pairs with its runnable source example and separates loading, splitting, model configuration, training, preprocessing inspection and held out evaluation into individual cells. No CSV files or dataset download are required. Use the current native Aner runtime with the Titanic and Diabetes loaders and a compatible VS Code extension with Development notebook inspection.

Open the .anernb file in VS Code, choose Aner — notebook, and run code cells from top to bottom or choose Run All. Both notebooks save Shared variables and Dev modes, so later cells reuse the dataset views, fitted model and learned preprocessing from earlier cells. Downloaded notebooks contain no saved outputs or execution counts; the results appear when you run them.

After a completed cell, use Inspector to inspect the dataset and partition summaries, model configuration, fitted model, learned center/scale tensors and evaluation report. The notebooks print the first feature's learned statistics and evaluation summary as well. Use Aner: Open Development Training Report to review recorded topology and available training observations. Training observations may be retained as historical after a later cell finishes. These are observations from completed execution, not a paused live debugger.

If you change data, split settings or model configuration, choose Aner: Restart Notebook Session and Run All to recreate a consistent experiment. Reopen or restart also clears live native state; saved notebook outputs do not restore it. Keep test rows outside fitting and do not use test outcomes to select the training settings.

Titanic uses the four selected numeric predictors from the Vanderbilt passenger data. Pima Diabetes retains original zero measurement placeholders; this tutorial standardizes without imputing them. See the dataset guide and each notebook's attribution section for representations and source status.

Development and production controls

Choose Dev in the notebook toolbar to record observations and Prod to disable them. This choice is independent of Shared variables versus Independent programs. Changing runtime mode cancels queued/active work and clears the session; rerun setup cells. Choosing the already active mode retains the current state. Save the notebook to retain metadata.aner.runtime_mode: "development"; missing metadata selects production.

Inspector displays typed globals, bounded collection/object trees and reference diagrams, named captures, and per fit loss after execution completes. Int64 values retain exact decimal text. Set aner.notebook.developmentValues to opt into bounded raw tensor/neuron values; it defaults to false. Source edits mark observations stale, and restart, Stop, timeout, runtime failure, or mode changes invalidate live inspection state. Static errors preserve earlier variables; failure observations are labeled historical.

Aner: Open Development Training Report opens the captured native tensor topology, activations, and available gradients from a completed training cell. A later cell may retain that training view as historical, with the originating execution number, while the variable table represents the current completed cell. Inspection does not evaluate user expressions, edit variables, rewind training, or pause execution.

See the mode guide for limits, linked list observations, neural configuration, checkpoints, and performance. Use the linked list development notebook to inspect append, prepend, and removal across cells.

Open a recorded training report

The notebook toolbar and code cell status bar provide Open training report. The Command Palette equivalent is Aner: Open Training Report. It opens an existing report beside the notebook without running cells or generating a report.

First generate a report in the terminal from the corresponding source program, using a new output directory. For the detailed Iris example, run from the folder containing examples/:

sh
aner run examples/neural_iris.aner --debug-viz reports/iris-notebook --debug-values

With neural_iris.anernb active, click Open training report and select either reports/iris-notebook/index.html or reports/iris-notebook/trace.json. Keep both files in the same directory. The viewer displays recorded network states, the loss chart, and available values and gradients. Use the captured step slider or a loss chart point to select a snapshot; select a neuron and batch row to inspect recorded values.

The extension remembers the selected report for that notebook in the current workspace. Later Open training report actions reuse it; Aner: Choose Training Report selects a different report. This association is workspace state and is not saved inside the notebook or included when sharing it.

These are historical captures from the selected report. Opening it does not connect to the notebook session, track training, or verify that its source matches the notebook. Editing either source does not update or mark the report stale. Generate a fresh report in another new directory and choose it when you need observations from changed code. See visual training reports for capture limits and controls.

Object oriented structures notebook

Open objects and data structures with the matching installed Aner executable and editor extension. Run All defines and exercises a linked list, a cyclic graph, and a binary search tree in shared state. The tree is not a multiway B tree.

Run class definition cells once per session. Class definitions cannot be replaced while live objects may refer to them. To edit or rerun those definitions, choose Aner: Restart Notebook Session, then Run All. Demonstration cells can reuse the checked definitions. Objects use reference identity: aliases observe writes to declared mutable fields. Nullable links allow direct use after a null check proves they are nonnull; .unwrap() remains available for unguarded extraction.

After a successful cell, Aner traces live global object references and reclaims unreachable objects, including cycles. Collection does not run during a cell; object/field allocation ceilings still apply. Runtime errors, including unwrapping null, clear the session. Saving source and outputs does not save the object heap. See the OOP guide for the limits and semantics.

Private state and generic classes

Open the generic linked list notebook with the matching installed Aner executable and editor extension. Four code cells define Node/LinkedList/Employee, use numeric lists, store Employee references, and construct nested generic nodes. Use Run All after a fresh session.

Fields are private by default; methods are public by default, with explicit public/private available for both. The synthesized constructor accepts initial values for all fields, including private ones. The examples access state through methods. Node<Int64> and LinkedList<Employee> require explicit type arguments and retain static typing. Aner 0.0.4 or newer also supports Int32, the full signed/unsigned 8/16/32/64-bit integer family, and Float32; see integers and Float32. The structure examples mark fields accessed externally as public.

Class templates and concrete specializations persist with notebook objects. Restart before redefining templates or rerunning the definition cell. Static errors preserve prior state and roll back new specializations; runtime errors clear the session. Generic expansion and object allocations have separate limits; see the OOP guide. No checkpoint or live object serialization is implied by saved output.

Concise object methods

Open concise methods with the matching installed Aner executable and editor extension. Four code cells define Cell<T>, construct and update a value, demonstrate a local variable shadowing a field, and reset by calling another method implicitly. The output groups are 10, 25, then 0, 25, then 0.

The getter is fn get() { return value }; the setter keeps its input type and uses self.value = value to distinguish the field from its parameter. Aner infers result types statically; explicit self and result annotations remain valid. Value return inference cycles still need annotations. Run the definition cell once per session, or restart before Run All. The structures and generics notebooks also use concise methods.

Variables without a function

Run this first cell in shared variable mode:

aner
var a = 10
let b = 20
c = 30

Then run a second cell:

aner
a = a + 5
a + b + c

The second cell displays 65. No fn main is needed. var creates a mutable binding, let creates an immutable binding, and a bare assignment creates a mutable binding when the name is not already visible. For an existing name, assignment updates its value and must respect its type and mutability. Thus b = 25 is an error because b was declared with let.

Aner infers Int64 for these integer literals. The type remains fixed: a = 2.5 is an error rather than silently changing a to Float64. Use a different name for a different type. Explicit annotations such as var a: Int64 = 10 are also available.

At the outermost level of a persistent session cell, a scalar expression such as a or a + b displays its result. print(a) also works. This automatic display does not apply inside function bodies, nested blocks, or standalone .aner programs. Composite values such as tensors and datasets still need their module accessors or summaries.

Semicolons are optional at a line break, the end of the source, or a closing brace. A continuing expression can span lines: 1 + followed by 2, or a multiline function call, remains one expression. An operator at the start of the next line can also continue the previous expression; use an explicit semicolon when that boundary must end the statement. Separate multiple simple statements on the same line with semicolons. A bare return at a line break returns Unit and is only valid inside a function.

What persists and how to restart

Each open notebook has its own native session process, created on its first persistent execution. Cells execute against the current state in the order you run them. Imports, typed global bindings, datasets, tensors, gradient state, user functions, class definitions, and object references can carry between cells. Defining a function does not require a main function. Imports must precede functions and executable statements within each cell; an import used in an earlier successful cell remains available.

Rerunning an explicit top level declaration such as var a = 10 or let b = 20 reinitializes that binding if its type and mutability match the previous declaration. This supports rerunning setup cells; it does not make a later assignment to let legal. Duplicate declarations within one cell remain errors. An unchanged top level function declaration from an earlier cell can be rerun when its complete source text matches exactly, including internal spacing and comments. Aner retains the existing checked definition; other statements in the cell still execute normally. Changing the signature, body or any other declaration text requires a restart. Class redefinition remains unsupported. This requires the updated native runtime: restart an existing notebook session once after updating the executable. Repeating Run All still executes the requested workload again.

The entire cell is parsed and statically checked before any statement executes. A syntax or type error preserves the existing session state. An error during execution clears the entire session, including previously successful cells' values, functions, and imports. Earlier output or other external effects are not rolled back. After such an error, rerun the cells that establish the state you need.

Use Aner: Restart Notebook Session in the Command Palette to clear the current notebook's state. Stop, an execution timeout, notebook closure, or extension reload also ends its process and releases its values. Stopping is cancellation, not a pause that can resume later. The next user execution starts a fresh session; it does not restore or replay earlier cells. A failure stops the remaining cells in the same execution request.

The compatible plotting renderer supports .link(group, ids) for local selection across geographic points, bars and line series. Exact String IDs follow records across differently ordered charts in the same notebook document. Selection highlights existing values without rerunning cells or changing scales; site buttons, Clear selection and Escape provide keyboard access. Saved scenes reopen offline with no selection, without a running kernel or installed source packs. Rerunning boundary code still needs its explicitly installed pack. See Aner Plot.

Saving the notebook stores source, document content, runtime mode metadata, and outputs, not live variables or a model checkpoint. Use fitted.save(path) and ml.load_classifier(path) for an explicit neural model checkpoint. Reopening a notebook can show historical outputs while its new session has no variables. Development inspection marks source edits stale and tracks the completed cell identity. Ordinary saved text outputs are historical content; changed external data is not automatically tracked. Restart and run the required cells in order when checking that the notebook is reproducible.

Data structures across cells

Built in data structure values and their aliases persist between successful cells in a shared session. Runtime failures clear session state; static failures preserve previous cells. Development observations retain bounded values and object identities after each completed cell.

The collection notebook demonstrates interactions between values across cells. Its examples are a tutorial; declaration, method, error, and complexity contracts are defined separately in the Array, Dictionary, DynamicArray, List, NDArray, Set, and Tensor references.

Installed executable and working directory

If the installed aner command is available on VS Code's PATH, the extension can use it. For a specific installation, set Aner › Notebook: Executable (aner.notebook.executable) to the full path of your installed aner binary, or aner.exe on Windows. That explicit setting takes priority. See executable setup in VS Code for examples and troubleshooting.

The working directory is the notebook's containing workspace folder, or its saved directory when outside a workspace. Relative CSV paths use that directory. For supplied examples, open the folder containing examples/ so paths such as examples/fixtures/visits.csv resolve correctly. Save a new notebook before executing it.

The same VSIX can be installed on macOS, Windows, or Linux; each machine needs a native Aner executable built for its own operating system and architecture. Check release availability and installation before choosing a package. Install the binary and extension versions recommended together by that release. Updating the VSIX alone does not update an older executable or copy the new example files.

Persistent notebooks require a release with native session support. The extension handles the session connection; you do not need to start a separate kernel service. Notebook execution uses the installed Aner executable and the compatible VS Code extension.

Execution limits and diagnostics

LimitShared variable modeIndependent program mode
Aner source per cell1 MiB of UTF-8 bytes1 MiB of UTF-8 bytes
Captured output per execution1 MiB text response payload, including a 16 KiB diagnostic reserve; stdout is limited to 1008 KiB1 MiB combined stdout and stderr
Native development observationAt most 512 KiB per response, with explicit omissions/truncationBounded report files; editor loading remains bounded
Execution timeout120 seconds per cell120 seconds per cell
Default native execution steps1,000,000 per cell1,000,000 per program
Persistent global bindings4,096No state retained between executions
Persistent functions1,024No state retained between executions
Retained function/class source8 MiB per sessionNo state retained between executions

Output limit failures clear session state. Aner's existing call depth, tensor, graph, and data operation bounds also apply. These limits are not a process memory quota; several retained values can consume more memory than any one operation's budget. Restart or close the notebook to release its session.

The editor records execution order and shows stdout and diagnostics beneath the cell after execution completes. A runtime error inside a function retained from an earlier cell uses that function's stored source in its diagnostic. Complete program mode writes a unique temporary .aner file, removes it after execution, and may name it in diagnostics. Persistent mode sends the original source through the native framed protocol without generating wrapper code.

Document content and storage

The document uses nbformat 4.5 JSON. The serializer preserves cell IDs, metadata, Markdown, raw cells, attachments, execution counts, and supported outputs through open/save operations. Raw cells remain document content and are not executed. The .anernb suffix selects Aner's notebook editor; it does not make an arbitrary JSON file executable.

ContentCurrent behavior
Aner codeHighlighted source with persistent session or independent program execution
MarkdownEditable explanations, headings, lists, tables, and other VS Code Markdown content
Image attachmentsEmbedded images referenced by Markdown, including the Iris SVG diagram
Program outputSaved text streams, diagnostics, SVG charts and bounded interactive geographic, linked and spatial scenes associated with a code cell
Raw contentPreserved without executing it as Aner code
Development observationsRead only variables, object references, named captures, and loss from completed cells
Development training reportsOpen native topology and available values/gradients from the recorded training cell
Separately generated training reportsOpen a historical CLI report beside the notebook; its file association is stored in workspace state
Streaming charts and paused frame debuggingFuture work

Authored diagrams are separate from computed observations. The Iris topology image explains a 4 → 8 → 3 network; it does not display captured activations or weights. Image attachments do not become Aner language syntax. The renderer displays supported attachments in image contexts, preserving their source content in the document.

Examples are distributed with empty saved outputs and no execution counts. The Iris notebook embeds its complete .aner program; the variables notebook demonstrates shared state. Editing a notebook does not change its corresponding .aner file. The Iris example retains source citations and CC BY 4.0 attribution; see the Iris notices. Its teaching result is not a general benchmark.

Development mode enables native neural observations, including explicit viz.capture calls, and makes their completed cell training view available automatically. Production disables recording. The separate Open training report workflow still accepts historical CLI reports generated through the terminal workflow; opening that report does not associate its source with the live session.

Other editors and planned tools

The optional Aner Jupyter integration executes .ipynb notebooks through the native session engine. Select the Aner kernel in a configured notebook application and open the development example.

Use %aner dev, %aner dev values, %aner prod, %aner variables, or %aner reset in separate control cells. Jupyter provides read only variable/object views, per fit loss, and an operation topology summary after cells complete. Mode changes/reset clear state. Full recorded neuron/dependency/gradient controls remain available in the standalone report. .anernb remains the VS Code document suffix; a custom JupyterLab .anernb file editor and automatic import/export remain future work.

Streaming charts while a cell runs, pause/step debugging, source/data dependency analysis, and a general model/data explorer remain future work. See inspection status and remaining work.

Shaped arrays across cells

The multidimensional notebook uses built in NDArray, shared fixed reshape, detached transpose/flatten, broadcasting and matrix products. Dev Inspector reports dtype, dimensions, element strides and stable storage IDs. Views survive successful cell boundary collection through their own buffer ownership. Runtime shape/numerical/quota errors still clear the session, while static dtype failures preserve previous cells. Read multidimensional contracts and complexity.

Neural research example

The research notebook uses explicit CPU placement, He/Xavier initialization, Adam, measured fixed epoch progress, and a genuine warm start. The Aner extension shows Tensor placement and measured timing in Inspector after each completed cell. The same workflow in Jupyter uses the optional Aner kernel. Progress is buffered until a notebook cell returns; live notebook streaming remains future work. See the neural workflow for full API and hardware limits.

Notebook cells default to a 120 second timeout. Set aner.notebook.timeoutMs to an integer from 1 through 86,400,000 before a longer run; 600000 permits ten minutes. Changing the resource setting preserves session state and affects subsequent cells. An active request retains its original deadline; timeout still terminates the process and clears variables. See the editor guide.

Aner documentation · Reference and guides