<br><br><div><span class="gmail_quote">On 10/22/07, <b class="gmail_sendername">Cale Gibbard</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Uh, not quite. My code essentially treats mathematica as a function on<br>strings, (and involves some additional shell wrapping), since there's<br>essentially no processing to do on the Haskell side there. If you<br>wanted to do it right, you'd probably want to write an FFI binding to
<br>MathLink.<br><br>On 22/10/2007, Stefan O'Rear <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<br>> On Mon, Oct 22, 2007 at 07:20:47AM -0400, Brent Yorgey wrote:<br>> > * returning a lazy infinite list for infinite sequences via an embedded
<br>> > general AI and Mathematica interpreter.<br>><br>> Assuming you have a licensed copy of Mathematica, get in touch with Cale<br>> Gibbard; he has done all the work for interfacing Mathematica with<br>
> Haskell (cf 'mbot' on freenode).</blockquote><div><br>well, at any rate, I was mostly joking about the embedded Mathematica interpreter. =) The point is, what you'd *like* (say) extendSequence [1,2,5,14,42] to do is return the *infinite* list of Catalan numbers, but that's very, very difficult to do in general! Interpreting the Mathematica code given for some sequences would require a lot of effort (I'm not even sure that the Mathematica code for different sequences is generally organized in some standard way), and still wouldn't really get you all that much anyway.
<br><br>Now, if the OEIS stored *Haskell* code to generate sequences...<br><br>-Brent<br></div><br></div>