Atlas

Release 0.74.0

What changed in Atlas 0.74.0

Atlas 0.74.0 draws one program the same in Python, Rust and TypeScript in many more places: an input you may leave out, a field, a method a family only declares, a decorator, a value a route gives back. The overview opens on the shape of the program, in four columns with its libraries and places folded, and a route draws the chain its data takes, with what only says how (the instance a step runs on, an error it hands on) said on the step. A program that reads TypeScript libraries is read five times faster.

Was drawn wrong, now drawn right

Each of these drew something your code does not do. In a picture of Atlas, a red outline is what only the release before draws, a green one what only this release draws.

Every route ends where its value lands

A route that gives back a number, a string, a list or an option drew a box that gave nothing: loudest -> float ended at no place. It now ends at a box labelled by the type it gives back, as a route that gives back a type of the program does. A record built from its fields (a dataclass, a struct) ends at the record it builds.

0.72loudest gives nothing
0.74loudest ends at float

#439

A call at the edge of a large route shows what its whole body does

A large route is drawn to a depth, and each call beyond it stands for its body. That stand-in now takes and gives what the body does when opened: news.read.headlines builds its Feed inside the route, where it was drawn taking a Cached from outside, as if another object were read.

opened ▾ headlines Feed() Feed feed.lines() Cached.read list[bytes] at the cut ▸ headlines list[bytes] the same lines as opened, then closed Cached 0.72: taken from outside pill: a call · box: a value · green: the step at the cut, drawn as its body closed · red: drawn by 0.72 only
Decided from principle (#438): a step drawn at the cut is its whole body opened and closed again. An illustration on the diamond pair.

#438

A focus shows what its box takes on the left and gives on the right

A focus on a module drew it with a border of its own: one type coming in, nothing going out, and the rest of the code twice. A focus is now the part of the overview that touches the box, and reads as its arrow: the types its own functions take on the left, the ones they give on the right, 4D → fold → 3D. Shift-click puts any box in focus, a package, a class or a base class, and a box inside the focus narrows it, along a path in the bar above the picture (harvest › store › ReadingStore).

0.72one type in, nothing out, and the rest drawn twice
0.74fold takes a 4D tensor and gives a 3D one

#399, #459, #469

A folder's listing reads what is written inside it

A route that writes data/raw/{kind}/download.json and a route that lists data/raw/ drew separate places with nothing between them. A place now lies in every folder above it and in every pattern that holds it, so File(data/raw/) · 2 is one box the downloads write and the listing reads; opening it shows what lies inside.

0.72three places, no line between the writes and the listing
0.74one box the package writes and reads

#381

An input you may leave out writes where its default says

save_report("draft") beside save_report("final", Path("out/report.txt")) writes one file, whether the default is the parameter's, a fallback in the body (path ?? …, path or …) or an Option the function unwraps. A fallback is completed by the callers, and an empty default (process.env.RAW ?? "") keeps the root of the path it is joined into.

def save_report(name, path = Path("out/report.txt")) save_report("draft") save_report("final", p) File(out/report.txt) File(p) path left out: the default path handed: what the caller hands 0.72 drew File({path}) path: str = … ≡ path ?? … ≡ path or … ≡ path.unwrap_or(…) a parameter's default, a fallback in the body and an Option unwrapped are one construct pill: a call · box: a place · green: drawn by 0.74 only · red: drawn by 0.72 only
Decided from principle (#428): an input the caller may leave out is its default wherever no caller hands it, and what the caller hands where one does. An illustration of the rule.

#428, #383, #350, #427

An object reads and writes where it was set up

A field is what the constructor that built the value set it to: Shelf::new(PathBuf::from("drafts")).index() reads drafts/index.txt alone, not the index of a shelf another function builds. A step reads where its own object was set up, not every object of its class, and a call in a loop is handed what the round before made. A variant's field is carried through the match that takes it apart.

Shelf("drafts") Shelf("out") Shelf · drafts Shelf · out drafts.read() File(drafts/report.txt) File(out/report.txt) 0.72 also drew a field is what the constructor that built the value set; a step reads where its own object was set up pill: a call · box: a value or a place · green: drawn by 0.74 only · red: drawn by 0.72 only
Decided from principle (#395, #368): a field is what the constructor that built the value set, and a step reads where its own object was set up. An illustration on the shelves of the order pair.

#395, #407, #349, #368, #354

A method a family only declares draws nothing of its own

An @abstractmethod, a Protocol's method, a trait method without a body, or a TypeScript abstract or interface method runs no code, yet the overview drew its signature as if it did: BaseAggregator took a 3D tensor and gave a 2D one. Now such a method takes and gives nothing, and a call of it draws the members that fill it in.

publish Exporter.export · one of 2 CsvExporter.export JsonExporter.export File(out.csv) File(out.json) Exporter.export declared, no body: takes and gives nothing 0.72 drew Exporter.export as Report → Receipt, code it does not have dashed pill: a declared method · frame: a call that runs one of its members · red: drawn by 0.72 only
Decided from principle (#430): a method with no body has no arrow of its own, and a call of it runs one of its members. An illustration on the abstract pair.

#430

A decorator is a mark on its function, and its errors are the function's

A decorator written as a call (@strict(least=1), @jaxtyped(typechecker=beartype)) was drawn as a step of its module, and one written as a name (@guarded) not at all. Both are now part of the definition: a mark guarded on the function they stand above, and a call of that function hands on what the decorator may raise, tidy guarded +1 error type. Wrapping a function by hand (tidy = guarded(_tidy)) is still a step.

0.72tidy drawn as if undecorated
0.74tidy, scale.apply and mean each marked guarded, with the error the check may raise

#463

TypeScript reads what its tsconfig compiles, and says what it left out

A TypeScript package is read as its compiler reads it: the files tsconfig.json names by files and include, less exclude and outDir, along extends and references. A script beside src/ that a package.json command runs is that command's route. What was found and not read is said, with its folders:

0.72   digest · digest · 3 modules · 0 entries
0.74   digest · digest · 5 modules · 1 entries · 1 file not read: functions/ 1

#472

Smaller things that were drawn wrong

  • atlas changes says what a changed step was wherever a route reaches it, also in one reading only (#385).
  • route's text numbers a choice inside an arm within that arm, as the page draws it (#393).
  • A TypeScript library installed as a link in node_modules is read anew when its code changes (#441).
  • An environment variable whose fallback is the same variable is that variable (#424).
  • A type written in full, torch.nn.Module, is that type; its module nn is no longer drawn as a type of its own (#445).
  • A Python package's exported function draws the places its users hand it, as Rust and TypeScript do (#435).
  • The view of every command draws each route from what it does, starting at the command line it is run from (#437, #434).
  • A file its caller hands is drawn by the parameter that names it, whatever its format: Disk(load.path) for pd.read_csv(path) (#449).
  • An opened step gives back its call's result also where its written shape is another shape of the same tensor (#456).
  • A literal only a test hands is a place of the test's route, never of the command's; check no longer names a file nothing writes (#473).
  • An overview where one package only writes, beside types that cross between packages, draws instead of stopping with a layout error (#471).
  • A loop over a literal written in place is named by what it binds and how many members it holds, for layer in 4 layers (#480).
  • A call through a table the module keeps, ACTIVATIONS[config.activation](), is a choice between the table's entries, one arm per key (#480).
  • Opening a step that runs on an instance draws no line from the instance that the closed step did not draw (#482).

#385, #393, #441, #424, #445, #435, #437, #434, #449, #456, #473, #471, #480, #482

Same meaning, same picture

Forms that say the same thing now draw the same picture, in Python, Rust and TypeScript alike.

Twelve forms in three languages, now one picture each

A form written differently in Python, Rust and TypeScript, but saying the same thing, is now read as one construct and drawn as one picture: a test, a value nobody reads, a local named like a module's function, a method changing its struct through a counter, a tuple bound at once, two versions of one library, a package meant to be imported.

Python def test_short(): Rust #[test] fn short() TypeScript it("short", () => …) read as a test drawn as test · short a route of its own left: what the author writes · middle: what Atlas reads · right: what it draws · green: the one picture
Decided from principle: forms that say the same thing are one construct, and one construct draws one picture, in every language. Applied this release to twelve forms, each in its issue.

#363, #375, #394, #436, #417, #376, #380, #403, #404, #347, #240, #377, #378

Studio, the page and the agent

The overview opens on the shape of the program

The overview drew every place and every library type loose, wherever the layout put them. It now stands in four columns, so the same things are found in the same place: what the packages read of the world, the packages, the types that cross between them, what they write. A library is one box (torch · 13 types), the program's own crossing types are one box (expenses · 6 types), and the places stand in their kind (from Disk · 5, into Disk · 2); a click opens each. Picking a kind of route (All CLI, All API) draws the same overview of only the code those routes reach.

0.72places, types and packages wherever the layout put them
0.74what is read, the packages, the types between them, what is written

#464, #465, #431, #470

A route draws the chain its data takes

A step built with its settings and then run (scale = Scale(2.0), later scale.apply(readings)) drew a line from the instance to the step. The route now says it on the step, scale.apply, and what is left is the chain the data takes. A line from an instance that stays is a fact: the step takes it as an input. The chip said by name ✕ above the picture draws the lines again.

0.72lines from scale and shift cut across the chain
0.74scale.apply and shift.apply say what they run on, the chain reads straight

#461

An error a step only hands on is counted on the step

An error that only leaves, handed on from step to step up to the route's border, was drawn as a box at every step. It is now counted on each step that hands it on (parse +1 error type) and on the frame of an opened step. An error a later step takes stays a box. A click on a count draws the errors as boxes again.

0.72NotACount drawn three times
0.74counted on parse, total and the route

#462

A torch module opens on its forward pass

A class whose call runs a method a library names (torch's Module runs forward) is a route of its own, Class · Head: its forward pass from input to output, each stage a step, the constructor no step of it. A folder whose scripts run one outermost module opens on that route. The shapes open closed in their rank families (Float Tensor · 2D); the button shapes opens every family into its shapes, each axis in the name its signature gives it (batch × hidden · h). A stage marked @option("skip") titles the choice it runs under option skip · if self.config.skip.

0.74the module closed, its stages in rank families
0.74shapes opened, each axis named

#478

Lines are round, and the page keeps your choices

The picture's lines open round, each corner an arc; square lines are one click away, in the switch beside the zoom buttons, and the route of a line is the same either way. The choices made on the page (the lines' shape, the code panel, the legend's help) are kept in ~/.config/atlas/viewer.json, so every repository atlas-code serve or Studio opens shows them.

0.74, squarethe lines as 0.72 drew them
0.74, roundthe same routes, each corner an arc

#468, #476

atlas-code changes says each change once

atlas-code changes printed a change once for every route it is on: a new step in a method ten commands pass through stood ten times. The changes on the same routes now stand together, once, under those routes, the first three by name and the rest counted, and a changed place says the arrows it gained and lost. On Atlas's own last fifteen commits the report went from 3924 lines to 467.

~ CLI · five
~ CLI · four
~ CLI · one
  and 4 more routes
    + step clean.Cleaner._prepare
    ~ place Screen: + test_three prints (test)

#474

Studio gives the picture more room, and opens a library file as its module

The sidebar took 264 pixels from the picture. The button at its top, ⌘B (Ctrl+B) or View › Toggle Sidebar folds it to a rail that keeps the two section icons; Studio remembers the choice. A click on a library file opens the focus on its module, all of its functions with what they take and give, where it opened the route of one class.

0.74the sidebar folded to its rail

#432, #460

Speed

A program with TypeScript libraries reads five times faster

A Python program with a TypeScript app beside it that uses @tanstack and @vitest read cold in 89 s; it now reads in 16 s. What a TypeScript name holds is found once and shared by every place that names it, where it was unfolded anew at every call. The picture is byte for byte the same.

0.720.74

Python + TypeScript program, cold
89 s
16 s

atlas-code analyze --no-cache, release builds before and after the change, on a developer machine; the output is the same bytes for that program, for Atlas and for the 460 programs under engine/tests.

#401

A Python program reads a third faster

A cold read of a Python program spent most of its time asking where each name stands in its file. A body's structure is now read once while the body is read, as the Rust reader does. Nothing Atlas draws changes.

beforeafter

goad_toolkit cold
0.601 s
0.295 s
vectormesh cold
0.766 s
0.384 s

atlas-code --no-cache view --no-open --timings at --libraries 1, an empty cache and no index, release builds before and after the change, seven interleaved rounds on a developer machine, the median of each.

#410

Every program of the benchmark reads faster cold

The three programs Atlas is measured on, read by 0.72.2 and by 0.74.0's code in turn on one machine: a cold read is faster in each, most in the program with TypeScript libraries, 166 s against 25 s. A warm read stays under a second. The peak memory of a cold read rises by up to 15 %.

−9.2 %0.74.0 against 0.72.2: the geometric mean of after / before over 9 measures, 9.2 % faster; 5 of them changed beyond noise.
bar: the mean over the programs; dot: one program, grey within noise
← ×1/2 fasterslower ×2 →
cold read
−50 %Python + TypeScript, 49k lines: −85 % · Python, 13k lines: −11 % · Rust, 60k lines: −5.5 %
peak memory
+9.1 %Rust, 60k lines: +3.1 % · Python, 13k lines: +9.4 % · Python + TypeScript, 49k lines: +15 %

Within noise on every program: warm read.

Every measure, per program

0.72.20.74.0

atlas-0.70.0

Rust · 117 files · 60,291 lines · 117 modules · 2,986 functions · 3,785 nodes · 15,736 edges · 4,143 library bodies

cold read ×0.95
19.1 s
18.0 s
warm read ×1.52
0.64 s
0.97 s
peak memory ×1.03
392 MB
404 MB

vectormesh-locked

Python · 48 files · 13,124 lines · 48 modules · 437 functions · 796 nodes · 1,761 edges · 11 library bodies

cold read ×0.89
7.0 s
6.2 s
warm read ×1.46
0.05 s
0.07 s
peak memory ×1.09
618 MB
676 MB

A private Python + TypeScript program

Python + TypeScript · 327 files · 49,494 lines · 345 modules · 2,078 functions · 3,338 nodes · 8,472 edges · 750 library bodies

cold read ×0.15
166 s
24.7 s
warm read ×1.17
0.43 s
0.50 s
peak memory ×1.15
642 MB
739 MB
Every release since the series began, on its night
atlas-0.70.0, cold read
0.70.0: –
0.71.0: –
0.74.0: 11.2 s
atlas-0.70.0, warm read
0.70.0: –
0.71.0: –
0.74.0: 0.73 s
atlas-0.70.0, peak memory
0.70.0: –
0.71.0: –
0.74.0: 404 MB
vectormesh-locked, cold read
0.70.0: –
0.71.0: –
0.74.0: 4.2 s
vectormesh-locked, warm read
0.70.0: –
0.71.0: –
0.74.0: 0.06 s
vectormesh-locked, peak memory
0.70.0: –
0.71.0: –
0.74.0: 676 MB
Python + TypeScript, 49,494 lines, cold read
0.70.0: –
0.71.0: –
0.74.0: 15.5 s
Python + TypeScript, 49,494 lines, warm read
0.70.0: –
0.71.0: –
0.74.0: 0.48 s
Python + TypeScript, 49,494 lines, peak memory
0.70.0: –
0.71.0: –
0.74.0: 739 MB

Each pair: 589f715 (0.72.2) and da90174 (0.74.0) measured interleaved on one runner, the median of 3 rounds each (the run); da90174 is the commit of next that the latest weekly run measured, before the viewer's work of this release landed. Over the releases: each release's night since the series began, on its night's runner (docs/reference/performance.md).