v0.7.0
0.7.0
Published April 10, 2023
@quri/squiggle-lang
Language:
- New functions:
List.concat,List.uniq,List.append,List.flatten,List.join,Dict.mapKeys. stdevandvariancework for all kinds of distributions.- Support for
==,!=and+on strings. - Support for trailing comma in arrays:
arr = [5,6,]is now allowed. Plot.fnallows for programmatical control ofmin..maxrange in charts.- Support for
{ p10: ..., p90: ... }and{ p25: ..., p75: ... }innormal()andlognormal(). - Non-integer key lookups in arrays are now disallowed;
arr[1.5]andarr[3/0]will result in error; previously non-integer keys got rounded to 0 or the closest integer. - Fix for zero parameter function quirks; the checks are now stricter and some existing code might break.
- Fix for
normal(5,2) * 0special case. - Fix for summary stats and
invfunction onpointMassdistributions. - Fix for
invandsampleon discrete distributions.
JS API:
sqfunction allows to embed Squiggle code in JS with syntax highlighting in VS Code (when VS Code extension is installed).value.asJS()method for easier conversion of results to JS values.
Other:
- ES6 modules build (we still provide CommonJS build as well).
@quri/squiggle-components
UI:
- New code editor based on Codemirror, with the improved syntax highlighting and auto-completion for variables and stdlib functions.
- Charts are now implemented in pure Canvas with D3 (instead of Vega), with some improvements in UI and rendering speed.
Other:
- This package is now ESM-only! We depend on D3, and D3 is ESM-only, so squiggle-components has to be ESM-only as well. If your project still uses CommonJS and you doesn't use Next.js or other smart transpiler, you might encounter problems. See this document for advice.
- Much smaller bundle size, thanks to removing some heavy dependencies.
oneLineprop inSquiggleEditorremoved (probably no one used it).