Lisp as a Base for a Statistical Computing System
On Wed, Jan 26, 2011 at 10:28 AM, Andrew Piskorski <atp at piskorski.com> wrote:
On Tue, Jan 25, 2011 at 11:17:45AM -0500, Dominick Samperi wrote: Subject: Re: [R-SIG-Finance] R to common lisp translator
The paper by Ross Ihaka and Duncan Temple Lang titled "Back to the Future: Lisp as a Base for a Statistical Computing System" discusses building a new foundation for R on top of Common Lisp, but I don't know if any work is being done in this direction.
Btw, when I read that paper a few years ago, it was interesting, but it also sounded a lot like its authors largely picked their solution (Lisp) first, and then thought about how to justify it. ?Lisp probably WOULD be a pretty good base for building a next-generation R-like tool, but their discussion of possible alternatives seemed quite cursory, as did their "Backward's compatibility?" section.
The solution (Lisp/Scheme) was picked a long time ago and led to what we call R today. At its core R is still Lisp-based, with some optimizations like replacing lists with vectors. The Lisp-based foundation is well-hidden by the R language, a kind of syntactic sugar for Lisp (according to the original creators of R). What this paper suggests is that statisticians (and Wall Street quants) could spend more time solving problems if they didn't have to spend so much time reinventing the wheel by building and tweaking a home-grown Lisp-like platform. They were arguing for an engine replacement, not for a new car. Dominick
?http://lambda-the-ultimate.org/node/3726 If I had both the time (a lot of time!) and a real mandate to do R&D on something like that, I'd also look into LuaJIT, Erlang, and SciDB, and think hard about what R problems I really want to solve and what I could learn about solving them from those other tools. ?However, despite these criticisms, I do hope that Ihaka and Lang proceed further with their ideas, and look forward to reading more about it. Of course, this is all pretty much off topic... For the original poster who sparked this thread: ?Trying to speed up your R code by auto-translating it to Lisp is a crazy, totally impractical idea. ?You are confusing someone's brief dead-end R&D exploration with something you could actually use for real. ?Profile your R code and figure out what is really slowing it down, then proceed from there. ?There isn't any magic Lisp bullet to solve things for you. -- Andrew Piskorski <atp at piskorski.com> http://www.piskorski.com/