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 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 ### Subtraction
A horizontal left shift 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 ### Multiplication
TODO: provide intuition pump for the semantics 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 `*` 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 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 ### Exponentiation
TODO: provide intuition pump for the semantics 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 ### 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 ### 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` 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 #### Validity
@ -186,31 +215,55 @@ Base `x`
TODO: this isn't in the new interpreter/parser yet. 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 ### Pointwise subtraction
TODO: this isn't in the new interpreter/parser yet. 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 ### 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 ### 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 ### 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 ### Pointwise logarithm
TODO: write about the semantics and the case handling re scalar vs. dist and log base. 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 ## Standard functions on distributions

View File

@ -49,7 +49,7 @@ const config = {
sidebarPath: require.resolve("./sidebars.js"), sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo. // Please change this to your repo.
editUrl: editUrl:
"https://github.com/quantified-uncertainty/squiggle/tree/master/packages/website/", "https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/",
remarkPlugins: [math], remarkPlugins: [math],
rehypePlugins: [katex], rehypePlugins: [katex],
}, },
@ -57,7 +57,7 @@ const config = {
showReadingTime: true, showReadingTime: true,
// Please change this to your repo. // Please change this to your repo.
editUrl: editUrl:
"https://github.com/quantified-uncertainty/squiggle/tree/master/packages/website/", "https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/",
}, },
theme: { theme: {
customCss: require.resolve("./src/css/custom.css"), customCss: require.resolve("./src/css/custom.css"),
@ -73,7 +73,7 @@ const config = {
title: "Squiggle", title: "Squiggle",
logo: { logo: {
alt: "Squiggle Logo", alt: "Squiggle Logo",
src: "img/logo.svg", src: "img/quri-logo.png",
}, },
items: [ items: [
{ {
@ -85,7 +85,7 @@ const config = {
{ to: "/blog", label: "Blog", position: "left" }, { to: "/blog", label: "Blog", position: "left" },
{ to: "/playground", label: "Playground", position: "left" }, { to: "/playground", label: "Playground", position: "left" },
{ {
href: "https://github.com/QURIresearch/squiggle", href: "https://github.com/quantified-uncertainty/squiggle",
label: "GitHub", label: "GitHub",
position: "right", position: "right",
}, },
@ -103,7 +103,7 @@ const config = {
}, },
{ {
label: "GitHub", 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() { export default function Home() {
const { siteConfig } = useDocusaurusContext(); const { siteConfig } = useDocusaurusContext();
return ( return (
<Layout <Layout title={`${siteConfig.title}`} description="An estimation language">
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
>
<HomepageHeader /> <HomepageHeader />
<main> <main>
<HomepageFeatures /> <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