multiline initialSquiggleString
s; favicon!
This commit is contained in:
parent
8b83c9ec84
commit
be6beac944
|
@ -131,19 +131,31 @@ Using javascript's variable arguments notation, consider `mx(...dists, weights)`
|
|||
|
||||
A horizontal right shift
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 + dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 + dist2`}
|
||||
/>
|
||||
|
||||
### Subtraction
|
||||
|
||||
A horizontal left shift
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 - dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 - dist2`}
|
||||
/>
|
||||
|
||||
### Multiplication
|
||||
|
||||
TODO: provide intuition pump for the semantics
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 * dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 * dist2`}
|
||||
/>
|
||||
|
||||
We also provide concatenation of two distributions as a syntax sugar for `*`
|
||||
|
||||
|
@ -153,27 +165,44 @@ We also provide concatenation of two distributions as a syntax sugar for `*`
|
|||
|
||||
TODO: provide intuition pump for the semantics
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 / dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 / dist2`}
|
||||
/>
|
||||
|
||||
### Exponentiation
|
||||
|
||||
TODO: provide intuition pump for the semantics
|
||||
|
||||
<SquiggleEditor initialSquiggleString="(0.1 to 1) ^ beta(2, 3)" />
|
||||
<SquiggleEditor initialSquiggleString={`(0.1 to 1) ^ beta(2, 3)`} />
|
||||
|
||||
### Taking the base `e` exponential
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist = triangular(1,2,3); exp(dist)" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist = triangular(1,2,3)
|
||||
exp(dist)`}
|
||||
/>
|
||||
|
||||
### Taking logarithms
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist = triangular(1,2,3); log(dist)" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist = triangular(1,2,3)
|
||||
log(dist)`}
|
||||
/>
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist = beta(1,2); log10(dist)" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist = beta(1,2)
|
||||
log10(dist)`}
|
||||
/>
|
||||
|
||||
Base `x`
|
||||
|
||||
<SquiggleEditor initialSquiggleString="x = 2; dist = beta(2,3); log(dist, x)" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`x = 2
|
||||
dist = beta(2,3)
|
||||
log(dist, x)`}
|
||||
/>
|
||||
|
||||
#### Validity
|
||||
|
||||
|
@ -186,31 +215,55 @@ Base `x`
|
|||
|
||||
TODO: this isn't in the new interpreter/parser yet.
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 .+ dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 .+ dist2`}
|
||||
/>
|
||||
|
||||
### Pointwise subtraction
|
||||
|
||||
TODO: this isn't in the new interpreter/parser yet.
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 .- dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 .- dist2`}
|
||||
/>
|
||||
|
||||
### Pointwise multiplication
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 .* dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 .* dist2`}
|
||||
/>
|
||||
|
||||
### Pointwise division
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 ./ dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 ./ dist2`}
|
||||
/>
|
||||
|
||||
### Pointwise exponentiation
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dist1 .^ dist2" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dist1 .^ dist2`}
|
||||
/>
|
||||
|
||||
### Pointwise logarithm
|
||||
|
||||
TODO: write about the semantics and the case handling re scalar vs. dist and log base.
|
||||
|
||||
<SquiggleEditor initialSquiggleString="dist1 = 1 to 10; dist2 = triangular(1,2,3); dotLog(dist1, dist2)" />
|
||||
<SquiggleEditor
|
||||
initialSquiggleString={`dist1 = 1 to 10
|
||||
dist2 = triangular(1,2,3)
|
||||
dotLog(dist1, dist2)`}
|
||||
/>
|
||||
|
||||
## Standard functions on distributions
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ const config = {
|
|||
sidebarPath: require.resolve("./sidebars.js"),
|
||||
// Please change this to your repo.
|
||||
editUrl:
|
||||
"https://github.com/quantified-uncertainty/squiggle/tree/master/packages/website/",
|
||||
"https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/",
|
||||
remarkPlugins: [math],
|
||||
rehypePlugins: [katex],
|
||||
},
|
||||
|
@ -57,7 +57,7 @@ const config = {
|
|||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
editUrl:
|
||||
"https://github.com/quantified-uncertainty/squiggle/tree/master/packages/website/",
|
||||
"https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/",
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
|
@ -73,7 +73,7 @@ const config = {
|
|||
title: "Squiggle",
|
||||
logo: {
|
||||
alt: "Squiggle Logo",
|
||||
src: "img/logo.svg",
|
||||
src: "img/quri-logo.png",
|
||||
},
|
||||
items: [
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ const config = {
|
|||
{ to: "/blog", label: "Blog", position: "left" },
|
||||
{ to: "/playground", label: "Playground", position: "left" },
|
||||
{
|
||||
href: "https://github.com/QURIresearch/squiggle",
|
||||
href: "https://github.com/quantified-uncertainty/squiggle",
|
||||
label: "GitHub",
|
||||
position: "right",
|
||||
},
|
||||
|
@ -103,7 +103,7 @@ const config = {
|
|||
},
|
||||
{
|
||||
label: "GitHub",
|
||||
href: "https://github.com/QURIresearch/squiggle",
|
||||
href: "https://github.com/quantified-uncertainty/squiggle",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -22,10 +22,7 @@ function HomepageHeader() {
|
|||
export default function Home() {
|
||||
const { siteConfig } = useDocusaurusContext();
|
||||
return (
|
||||
<Layout
|
||||
title={`Hello from ${siteConfig.title}`}
|
||||
description="Description will go into a meta tag in <head />"
|
||||
>
|
||||
<Layout title={`${siteConfig.title}`} description="An estimation language">
|
||||
<HomepageHeader />
|
||||
<main>
|
||||
<HomepageFeatures />
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 6.5 KiB |
BIN
packages/website/static/img/quri-logo.png
Normal file
BIN
packages/website/static/img/quri-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue
Block a user