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 Oct 3, 20266 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 .

 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 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 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 .

 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:

 Parse source code to AST
 Compile AST to Intermediate Representation
 Run the IR
 Now we have one additional step between steps 1 and 2: transforming AST to typed AST. This step does type checks and gradual type inference.

 Several consequences of this feature you might notice:

 In the playground, you'll see inferred types on hover. For now, this only works on top-level variables, but types for local variables in blocks and functio

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