I'd like to start learning Lisp as it sometimes leads to interesting answers on this site with concepts borrowed from this language, so I'm curious. As I already spend most of my programming time in Mathematica, is there a way to execute Lisp programs from the Mathematica frontend?
-
2$\begingroup$ I suppose you've seen this: stackoverflow.com/a/5451304/695132 Are you looking for a way to run some other language from the front end or to call it from the kernel? $\endgroup$– SzabolcsApr 13, 2012 at 7:19
-
$\begingroup$ @Szabolcs: I guess what he wants is something like MathLink, but for Lisp. $\endgroup$– celtschkApr 13, 2012 at 7:45
-
$\begingroup$ @Szabolcs yes I was looking for something like in the answer of WReach. The link of rubenko seems to do this. $\endgroup$– faysouApr 13, 2012 at 8:37
-
$\begingroup$ One possible appraoch is to use a Lisp that runs on the JVM (for instance, ABCL), and then get at Mathematica through J/Link. $\endgroup$– PillsyApr 13, 2012 at 13:49
-
$\begingroup$ @Pillsy I think your comment could be an answer even if it's not tested yet. $\endgroup$– faysouApr 13, 2012 at 13:56
5 Answers
Clojure is often described as a "modern-day LISP" (hosted on the JVM) that offers strong support for multi-threaded code.
If the Clojure dialect of LISP is an option for you then you might want to investigate using the JLink-based interface to Clojure provided courtesy of this package: Clojuratica
Regarding Haskell and OCaml, your best bet may be trying to access F# (which is closely related to Haskell and OCaml) through .NETLink.
-
-
$\begingroup$ I didn't downvote but it seems clojuratica support has somewhat ended. $\endgroup$– WilliamSep 11, 2015 at 22:14
I haven't actually tried this, but you might want to investigate using one of the Lisps for the JVM, such as Armed Bear Common Lisp, and interface to Mathematica through J/Link.
These pages contain related links about a lisp interpreter in Mathematica:
http://www.umcs.maine.edu/~chaitin/#LISP
http://library.wolfram.com/infocenter/MathSource/729/
http://mathematics-diary.blogspot.fr/2011/10/limits-of-mathematics-or-lisp.html
For creating this Common Lisp package, Richard Fateman was reportedly once threatened with a lawsuit by Wolfram: