multiline initialSquiggleStrings; favicon!

This commit is contained in:
Quinn Dougherty 2022-04-20 16:50:43 -04:00
parent 8b83c9ec84
commit be6beac944
5 changed files with 74 additions and 24 deletions

View File

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

View File

@ -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",
},
],
},

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB