Skip to content
Longterm Wiki

Squiggle 0.10.0

web

Metadata

Cited by 2 pages

PageTypeQuality
QURI (Quantified Uncertainty Research Institute)Organization48.0
SquiggleProject41.0

Cached Content Preview

HTTP 200Fetched May 17, 202610 KB
After a six-month development period, we’ve released Squiggle 0.10.0.

This version introduces important architectural improvements like more robust support for multi-model projects and two new kinds of compile-time type checks. These improvements will be particularly beneficial as laying a foundation for future updates.

This release also includes UI improvements, as well as several new functions and bugfixes.

Note: During this period, our development time was split between Squiggle and Squiggle AI (a separate project on top of Squiggle programming language). You can find out more about Squiggle AI in our recent [EA forum post](https://forum.effectivealtruism.org/posts/jJ4pn3qvBopkEvGXb/introducing-squiggle-ai?ref=quantifieduncertainty.org).

## New project architecture

`SqProject` subsystem — the part of Squiggle that's responsible for orchestrating model runs, which can be quite complicated in case of multi-module programs — got a complete rewrite.

Pre-0.10, `SqProject` APIs were imperative, which caused issues at the boundary between Squiggle language and Squiggle React components. Sometimes this led to bugs and playground crashes, and sometimes it was preventing new features: it worked in simple cases, but wouldn't behave correctly if we tried to do something more advanced.

The new rewrite is quite radical in its functional approach, and is inspired by Git architecture. The new `SqProject` stores every version of Squiggle module on edits, and every version of Squiggle module outputs, as content-addressable immutable objects in a tree of dependencies. When the data is no longer needed, it gets garbage-collected.

If you're interested in more technical details on this, check out [Multi-module projects](https://www.squiggle-language.com/docs/Internal/SqProject?ref=quantifieduncertainty.org) in Squiggle documentation. In Squiggle playground, you can check out "Dependency Graph" viewer mode to see how the tree evolves when you do edits or add imports.

## Web Worker runners by default

In Squiggle v0.9.4 and v0.9.5, we had an experimental "Web Worker" runner that you could enable in Playground settings.

In v0.10, it's enabled by default. `SqProject` rewrite is one change that allowed us to stabilize this, and the implementation of a [reliable serializer for DAGs](https://www.npmjs.com/package/@quri/serializer?ref=quantifieduncertainty.org) is another piece of the puzzle.

With Web Workers, all Squiggle code runs in a separate Web Worker thread, and the results are marshaled back to the main JS thread asynchronously. So, the UI should freeze much less often now.

More detailed documentation on runners can be found [here](https://www.squiggle-language.com/docs/Internal/Runners?ref=quantifieduncertainty.org).

## Type inference

In v0.10, we for did some groundwork on compile-time type inference and semantic analysis.

Previously, Squiggle code execution went through this pipeline:

1. Parse source code to AST
2. Compile AST to Intermediate Rep

... (truncated, 10 KB total)
Resource ID: d80eeab456450a93 | Stable ID: sid_py9pybLzgA