4 ms·
Algorithms through the lens of symbolic pattern matching
- SPACECADET3D 2y agoAuthor of the blog post here. I am happy to answer any questions about the article, pattern matching in general or about Symbolica!
- BoiledCabbage 2y agoI believe there is a family of programming languages named OBJ that are known as "term re-writing" languages that operate at this symbolic/syntatic level. Are you familiar with them? How does Symbolica compare/contrast with them? https://en.m.wikipedia.org/wiki/OBJ_(programming_language) https://en.m.wikipedia.org/wiki/OBJ_(programming_language) (While OBJ is old, there are some newer /recent decendents from its family)
- adamnemecek 2y agoNot the author of Symbolica but I will take a stab at responding. Symbolica is fundamentally a CAS (computer algebra system) so it should be compared with other CAS. And compared with other CAS, Symbolica aims to provide much better performance. In addition it is much more hackable, being written from scratch in Rust.
- genter 2y agoWhat software did you use to generate the graphs?
- agumonkey 2y agomost probably https://mermaid.js.org/syntax/flowchart.html https://mermaid.js.org/syntax/flowchart.html
- SPACECADET3D 2y agoI used mermaid, which gets live-compiled on the website, that is built using quarto. Here is an example: ```{mermaid} flowchart LR A -- 1 --- B B -- 2 --- C B -- 8 --- E C -- 3 --- D C -- 9 --- F D -- 10 --- E D -- 4 --- G G -- 5 --- H G -- 6 --- F E -- 9 --- F ```
- mmaul 2y agoThis reminds me a lot of Pure (https://agraef.github.io/pure-lang/ https://agraef.github.io/pure-lang/). What I liked about Pure is the symbolic rewrite + the Haskell-esque syntax with out the strictness + easy ffi. I really do like how you have smoothly integrated this into Python. Though the symbolic pattern matching is well pretty amazing and make me think about things a little different now. You could probably implement something like this in Julia with it's macros and flexibility in manipulating the AST. I hate Python, but I'm forced to bow to the ecosystem.
- SPACECADET3D 2y agoPure looks interesting! You can also use Symbolica in Rust, which also has operator overloading so it will look quite similar. At some point I will also add Julia bindings.