Re: [q-lang-users] Strong examples of Q equational programming wanted
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2006-09-29 10:51:11
|
Thanks a lot, Greg, for the very illustrative examples. You might wish to compare those with the Q script at http://q-lang.sf.net/examples/symbolic.q This illustrates my point very well -- even though those rules are in fact fairly trivial, you really have to go to some lengths to implement them in a more conventional language. Q makes this kind of stuff very easy precisely because expressions are first-class and "definitions" are just rewriting rules, so that you can just write down the rules "as is". I really ought to code a more substantial symbolic example in Q, like a complete normalizer for multinomials including factorization, symbolic differentiation and all that. I'll probably do so for my book. But right now I have to prepare my stuff for ICMC 2006. Maybe someone else on this list with some background in symbolic algebra wants to give it a try? Cheers, Albert Greg Buchholz wrote: > FWIW, here's what one solution to the symbolic differentiation problem > looks like in Haskell... > > http://www.haskell.org/pipermail/haskell/2004-November/014939.html > > ...and my interpretations of something similar in Common Lisp and Ruby... > > http://sleepingsquirrel.org/lisp/sym_diff.lisp > http://sleepingsquirrel.org/lisp/diff2.rb -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |