3 ms·
> For example, I once wrote a library for a computing in particular area of mathematics, but I also wanted to see some symbolic equations. I just changed the ba
by ssivark 4y ago
> For example, I once wrote a library for a computing in particular area of mathematics, but I also wanted to see some symbolic equations. I just changed the basic evaluation semantics of my numeric operators to operate on symbols as well as numbers and to run some simplification logic and boom.
This is very much something I find fascinating (and a reason I’m quite excited by Julia). Can you point me to any examples where you feel this has been tastefully done? (yours or otherwise)
- JHonaker 4y agoWell I did it in Scheme, but there's no reason it wouldn't have worked in Julia. If you're interested in this, the relatively recent Software Design for Flexibility by Chris Hanson and GJS [1] has a pretty good couple of chapters on creating a generic procedure system (and a lot of other really cool things). Edit: In fact, it has an example doing just this example: symbolic alternative evaluation. Where they get the closed form solution from a simple differential equation solver without changing any code in the solver. Now that I think about it, this idea is pretty much how automatic differentiation works in Julia. (Really everything in Julia.) You can look at the libraries Flux.jl and Zygote.jl. There are probably more now, I've been out of the Julia ecosystem for about a year or so. [1] https://mitpress.mit.edu/9780262045490/ https://mitpress.mit.edu/9780262045490/