<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 28, 2014 at 11:41 PM, Fernando Perez <span dir="ltr"><<a href="mailto:fperez.net@gmail.com" target="_blank">fperez.net@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="im"><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 6:11 PM, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, that is probably true in general. But Calico is a very different kind of beast. It doesn't run the languages independently in their own space... all of the languages run in the same space. They can share data and functions and memory, but not by marshaling between systems. </blockquote>
</div><br></div>Actually, that's sort of how the %julia magics work: we initialize the julia interpreter in-process, by dlopen'ing libjulia and then create a julia interpreter, passing it a pointer to the underlying Python VM. This allows the two languages to seamlessly share data structures in-memory.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I'm not saying that you shouldn't build your own native kernel, as there's obviously a ton of things that should be done that way (and that's why, in addition to %julia, there's also a real, native julia kernel as Brian mentioned). I just wanted to point out that language %magics in the IPython kernel aren't limited to working out-of-process.</div>
<div class="gmail_extra"><br></div></div></blockquote><div><br></div><div>That's interesting... IJulia using the Python VM... Then, this is very similar to Calico. Because all of the languages share memory, I was able to put a global object in there. I have now written display(), HTML(), Image(), and Audio(), and all is working very well. HTML, Image, and Audio all have a specially named method (similar to Python's __rep__) that when called, returns the dictionary of mime-types and strings, and display() sends the proper message. Demo to follow...</div>
<div><br></div><div>-Doug</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"></div><div class="gmail_extra">Cheers,</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">f</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br clear="all"><div><br></div>-- <br>Fernando Perez (@fperez_org; <a href="http://fperez.org" target="_blank">http://fperez.org</a>)<br>
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)<br>fernando.perez-at-berkeley: contact me here for any direct mail<br>
</div></font></span></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div></div>