This message was deleted.
# show-and-tell
s
This message was deleted.
πŸ™ŒπŸ½ 1
πŸ™Œ 1
f
Awesome notebook!
πŸŽ‰ 1
r
it makes me want to hook up my not-quite-fully-baked equation parser and code/latex generator to observable plot
e.g.
Copy code
viewof eqn = parse('y = mx + b')

Plot.line(eqn.tabulate({x: [0, 10], m: 1, b: 2}), ...)
opinion: there's no reason you should have to deal with linspace just to plot a math function
f
yes, let's do it!
r
Here's a quick first cut at expression parsing, serialization (to string and to tex) and to a `new Function`: https://observablehq.com/d/240cf5d3d11abd78
πŸ‘ 1
πŸ‘πŸ½ 1
stretch goals: 1. complex numbers (analyze and assign metadata like "definitely real", "maybe complex", etc to each node to help guide checks for complex values and selection of function??) 2. glsl generation 3. adaptive evaluation to handle discontinuities nicely 4. constant folding
anyway, gotta leave it there at the moment!
Oh, my inorder traversal is totally broken and doesn't add any parens. Back to the drawing board. 🀷 we'll call it v0.0-alpha.
yay, got most of the details more or less worked. I don't love it yet, but it feels like it could be pretty extensible
Yikes! So I've taken this pretty far…
And stdlib docs and nice function-specific tex formatting as well
f
wow crazy