second commit of spec

This commit is contained in:
Quinn Dougherty 2022-03-25 17:08:13 -04:00
parent b1887064a7
commit 7933b2632c
7 changed files with 64 additions and 5 deletions

View File

@ -20,7 +20,7 @@ The playground depends on the components library which then depends on the langu
# Develop # Develop
For any project in the repo, begin by running `yarn` in the top level (TODO: is this true?) For any project in the repo (`packages/`), begin by running `yarn` in the top level (TODO: is this true?)
``` sh ``` sh
yarn yarn
@ -39,5 +39,16 @@ codium
The `nix develop` shell also provides `yarn`. The `nix develop` shell also provides `yarn`.
# Alpha syntax specification
You can render a pdf of the syntax specification.
``` sh
cd syntax
nix-build
o result/squiggle-spec.pdf
```
Where `o` is `open` if you're on OSX and `xdg-open` if you're on linux.
# Contributing # Contributing
See `CONTRIBUTING.md`. See `CONTRIBUTING.md`.

View File

@ -2,7 +2,8 @@
We give the syntax in a BNF-like specification We give the syntax in a BNF-like specification
## Render
``` sh ``` sh
nix-build nix-build
``` ```
shall dump `squiggle-spec.pdf` in the `result` directory. Shall dump `squiggle-spec.pdf` in the `result` directory.

View File

@ -3,3 +3,27 @@
title = {Practical Foundations for Programming Languages}, title = {Practical Foundations for Programming Languages},
year = {2016} year = {2016}
} }
@article{@SqgCodePlan,
author = {Ozzie Gooen},
title = {Squiggle Alpha 0.1 Code Plan},
year = {2022},
url = {https://docs.google.com/document/d/1oKTxolRrs-0g0TGEvqCMdhY2FdIjcDj678WUk1iMpx8/edit?usp=sharing}
}
@book{@CraftingInterpreters,
author = {Robert Nystrom},
title = {Crafting Interpreters},
year = {2021},
url = {https://craftinginterpreters.com/contents.html}
}
@article{@SqgSequence,
author = {Ozzie Gooen, Nuno Sempere},
title = {Squiggle (Sequence)},
year = {2020},
url = {https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3}
}
@article{@BNFWiki,
author = {Foundation Wikimedia},
year = {2022},
title = {Backus-Naur Form},
url = {https://en.wikipedia.org/wiki/Backus-Naur_form}
}

View File

@ -1,5 +1,19 @@
\documentclass[../main.tex]{subfiles} \documentclass[../main.tex]{subfiles}
\begin{document} \begin{document}
\section{Design goals of Squiggle} \section{Squiggle: the current document}
The current document is a formal description of the syntax that Squiggle will target in it's alpha release, scheduled for Q3 2022. It is initially drafted for consumption by the team, not by the user base.
For an informal story of what we are about to see, consult \cite{@SqgCodePlan}.
We proceed by a BNF (\cite{@BNFWiki}), and take nods about how to communicate about programming languages from \cite{@CraftingInterpreters}, neglecting lessons from \cite{@PFPL}.
\subsection{Design goals}
We would like, as a programming language, a \textbf{specification} for \textit{expressing beliefs}.
One key difference between this vision and probabilistic programming languages (PPLs) is that for us, the ingest of data is not a factor. See discussion with John Wentworth in \cite{@SqgSequence} for background on the PPL comparison.
TODO
\end{document} \end{document}

View File

@ -13,7 +13,7 @@
\usepackage[backend=biber, hyperref=true, citestyle=authoryear]{biblatex} \usepackage[backend=biber, hyperref=true, citestyle=authoryear]{biblatex}
\addbibresource{biblio.bib} \addbibresource{biblio.bib}
\title{Squiggle-alpha specification v0.0.1} \title{Squiggle-alpha specification v0.0.1 (INTERNAL)}
\author{Quinn Dougherty} \author{Quinn Dougherty}
\date{April 2022} \date{April 2022}

View File

@ -2,4 +2,6 @@
\begin{document} \begin{document}
\section{Semantics}\label{section:semantics} \section{Semantics}\label{section:semantics}
TODO: Some way of expressing the evaluation and execution model.
\end{document} \end{document}

View File

@ -1,7 +1,14 @@
\documentclass[../main.tex]{subfiles} \documentclass[../main.tex]{subfiles}
\begin{document} \begin{document}
\section{Syntax}\label{section:syntax} \section{Syntax}\label{section:syntax}
\subsection{Base types and 44 ast nodes}
At a high level, we will first be slightly dishonest because the different types of distributions make the story more intricate. Details about assignment and arithmetic on floats will follow eventually, but I want to sketch out a theory of combining distributions, first.
\subsection{THE FOLLOWING IS HERE FOR TEMPLATE SO I DON'T FORGET HOW TO BNF IN LATEX. }
In regex notation, we provide the following means of describing literals as well as the specification of the constants T and F. In regex notation, we provide the following means of describing literals as well as the specification of the constants T and F.
\begin{center} \begin{center}
\begin{tabular}{c c c} \begin{tabular}{c c c}