diff --git a/packages/website/docs/Api/DistGeneric.mdx b/packages/website/docs/Api/Dist.mdx similarity index 100% rename from packages/website/docs/Api/DistGeneric.mdx rename to packages/website/docs/Api/Dist.mdx diff --git a/packages/website/docs/Guides/DistributionCreation.mdx b/packages/website/docs/Guides/DistributionCreation.mdx index 23a4bf0e..a0833a6d 100644 --- a/packages/website/docs/Guides/DistributionCreation.mdx +++ b/packages/website/docs/Guides/DistributionCreation.mdx @@ -1,5 +1,5 @@ --- -title: "Distribution Creation" +title: "Distributions: Creation" sidebar_position: 2 --- diff --git a/packages/website/docs/Guides/Functions.mdx b/packages/website/docs/Guides/Functions.mdx index 843cf888..4a4bc170 100644 --- a/packages/website/docs/Guides/Functions.mdx +++ b/packages/website/docs/Guides/Functions.mdx @@ -1,5 +1,5 @@ --- -title: "Distribution Functions" +title: "Distributions: Key Functions" sidebar_position: 3 --- diff --git a/packages/website/docs/Guides/Language.mdx b/packages/website/docs/Guides/Language.mdx index 61882308..c5b92fd1 100644 --- a/packages/website/docs/Guides/Language.mdx +++ b/packages/website/docs/Guides/Language.mdx @@ -5,63 +5,93 @@ title: Language Basics import { SquiggleEditor } from "../../src/components/SquiggleEditor"; -## Expressions +Squiggle supports some simple types and language features. -### Numbers +## Numbers -### Distributions +## Distributions +There are several ways of easily entering distributions. See the [documentation](/docs/Api/Dist/) on distributions for a complete API. -### Lists +## Lists +Squiggle lists can accept items of any type, similar to those in Python. [API](/docs/Api/List). - - -### Dictionaries +## Dictionaries +Squiggle dictionaries work similarly to Python dictionaries. [API](/docs/Api/Dictionary). -### Functions +## Functions -### Anonymous Functions +## Anonymous Functions -### Comments +## Comments - -### Pipes +## Pipes - truncateLeft(3) |> SampleSet.fromDist`} /> +Squiggle features [data-first](https://www.javierchavarri.com/data-first-and-data-last-a-comparison/) pipes. Functions in the standard library are organized to make this convenient. + truncateLeft(3) |> SampleSet.fromDist |> SampleSet.map({|r| r + 10})`} /> -## See more +## Standard Library -- [Distribution creation](./DistributionCreation) -- [Functions reference](./Functions) -- [Gallery](../Discussions/Gallery) +Squiggle features a simple [standard libary](/docs/Api/Dist). + +Most functions are namespaced under their respective types to keep functionality distinct. Certain popular functions are usable without their namespaces. + +For example, + SampleSet.fromList // namespaces required +b = normal(5,2) // namespace not required +c = 5 to 10 // namespace not required +""`} /> + +## Number Prefixes +Numbers support a few scientific notation prefixes. + +| prefix | multiplier | +|-----|-------| +| n | 10^-9 | +| m | 10^-3 | +| k | 10^3 | +| M | 10^6 | +| B,G | 10^9 | +| T | 10^12 | +| P | 10^15 | + + + + +## Gotchas and Key Limitations +**** \ No newline at end of file diff --git a/packages/website/docs/Overview.md b/packages/website/docs/Overview.md index a843c162..ef330ae4 100644 --- a/packages/website/docs/Overview.md +++ b/packages/website/docs/Overview.md @@ -22,6 +22,13 @@ All of the components used in the playground and documentation are available in **[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)** There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. +## Very simple model + +```squiggle +//Write comments like this +/* +``` + ## Squiggle Vs. Other Tools ### What Squiggle Is diff --git a/packages/website/docusaurus.config.js b/packages/website/docusaurus.config.js index 3f7a046f..f48ac952 100644 --- a/packages/website/docusaurus.config.js +++ b/packages/website/docusaurus.config.js @@ -68,7 +68,7 @@ const config = { }, { type: "doc", - docId: "Api/DistGeneric", + docId: "Api/Dist", position: "left", label: "API", },