From 09583a312c149732a21b4df486d1b2efc92252cd Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 3 Jun 2024 09:28:16 +0200 Subject: [PATCH] add spec for more expressive DSL --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index bce85c0..1bd3477 100644 --- a/README.md +++ b/README.md @@ -105,3 +105,22 @@ Conceptually clearer to have all the multiplications first and then all the divi - [ ] Think of some way of calling bc - [ ] Think how to integrate with squiggle.c to draw samples - [ ] Think about how to draw a histogram from samples +- [x] Display output more nicely, with K/M/B/T +- [ ] Consider the following: make this into a stack-based DSL, with: + - Variables that can be saved to and then displayed + - Other types of distributions, particularly beta distributions? => But then this requires moving to bags of samples. It could still be ~instantaneous though. + +Some possible syntax for a more expressive stack-based DSL + +``` +1B to 20B +* 1 to 100 +/ beta(1, 2) +=: x # content of the stack at this point saved into x + +1 to 10 +10 to 100 +=: y # content of the stack at this point saved into y + +x - 10B * y # if interpreting x and y as list of samples, you could do - and + operations as well +```