Live data from Hacker News

A Haskell kernel for IPython

github.com

11–20 of 33 posts

Re: A Haskell kernel for IPython

#12
post #6

It's like org-mode, but without all the emacs! :) I actually was just discussing with coworkers how I wish tools around org-mode could actually create an "editable" final state that didn't require emacs. I've been introducing iPython as a way around this, but I've been disappointed with forcing everyone into using python for our analysis work. Only one of my coworkers really uses emacs, and so sharing perf data and a…

It would be awesome to have a org mode -> ipython export that also supports all the languages that org mode supports (or rather, the main subset, I guess), though I think that that's a long way of. Julia lang also supports an iPython notebook implementation, but if I remember correctly, they replaced python with julia in there. It would probably be a lot of work to support all different languages within ipython. Actu…

There is a ipython emacs frontend, but I'm not familiar enough with emacs to say if it would help at all.

Re: A Haskell kernel for IPython

#13
post #12

Earlier quoted context omitted.

It would be awesome to have a org mode -> ipython export that also supports all the languages that org mode supports (or rather, the main subset, I guess), though I think that that's a long way of. Julia lang also supports an iPython notebook implementation, but if I remember correctly, they replaced python with julia in there. It would probably be a lot of work to support all different languages within ipython. Actu…

There is a ipython emacs frontend, but I'm not familiar enough with emacs to say if it would help at all.

I'm pretty sure that it only exports the structure, but it doesn't allow editing and running of the code in ipython since that would require having support for the plethora of languages.

Example: There's a c extension to babel/org-mode that allows you to write a document like this in normal text, and then type:

+begin_src c int test = 42; printf("%i", test); +end_src

and then run and execute this code block in the document, and have the results appear underneath it. That is already pretty cool.

But even cooler is that you can have a python block, and a R block and a ruby block, and then define a variable in python, and have ruby do something with that variable (i.e hand it over) and then create a new variable based on the ruby transformations, and hand it over to R to do some statistics processing with the data. Finally, You take the R output, display it as a table, and generate a plot for it.

All in one text file. Truly awesome.

Re: A Haskell kernel for IPython

#14
Very cool. Agree about the rebranding of IPython, but I'm sure that'll come as the community matures.

IHaskell specific: As a beginning Haskell learner, is there a simple graphing framework that can make graphs shown inline in IPython (of course bindings to D3 etc to make web native graphs would be awesome, but even just images are fine) ... I'm currently learning maths/stats by implementing basic functions and experimenting with them in R, Julia, possibly Haskell etc. Being able to easily do simple graphs is crucial.

Re: A Haskell kernel for IPython

#15

Very cool. Agree about the rebranding of IPython, but I'm sure that'll come as the community matures. IHaskell specific: As a beginning Haskell learner, is there a simple graphing framework that can make graphs shown inline in IPython (of course bindings to D3 etc to make web native graphs would be awesome, but even just images are fine) ... I'm currently learning maths/stats by implementing basic functions and exper…

IHaskell in its current state is the very first step towards that experience. I'm hoping that graphing and numeric support will come in the next few weeks to months. I'm also not sure that the Haskell community really has something as powerful and standard and nice interface-wise as NumPy, and if not, I'd be interested in creating it. (Currently playing around with building a nicer interface on top of hmatrix. REPA is pretty good, but doesn't use LAPACK/ATLAS/etc in the backend.)

Re: A Haskell kernel for IPython

#16

This is great to see. The IPython project has grown to be much more than just a collection of nice interactive interfaces to Python. It is a well-designed JSON-based protocol between interactive interfaces and execution kernels – which can execute any language, not just Python. The fact that you can do things like IHaskell and IJulia is a testament to how well the IPython team has designed the protocol. The best part…

Thanks for the encouraging comments! I started working on this by looking at IJulia (huge fan of Julia!) and reading the source code and using that to figure out exactly what I should implement.

Re: A Haskell kernel for IPython

#17

Author here - didn't expect this to end up on Hacker News, given the niche interest :) Happy to answer any questions you guys have. (And if anyone has an interest in contributing, please get in touch!)

Can you give more details on the development? Do you use any IPython code, or do you just follow the specification? What would be necessary if I wanted to implement this for another language? Thanks!

Re: A Haskell kernel for IPython

#18

Author here - didn't expect this to end up on Hacker News, given the niche interest :) Happy to answer any questions you guys have. (And if anyone has an interest in contributing, please get in touch!)

This is really cool, well done!

Be sure to send a message to the IPython-dev mailing list if you're happy to recieve contributions and/or feedback (also from IPython developers).

Re: A Haskell kernel for IPython

#19
post #17

Author here - didn't expect this to end up on Hacker News, given the niche interest :) Happy to answer any questions you guys have. (And if anyone has an interest in contributing, please get in touch!)

Can you give more details on the development? Do you use any IPython code, or do you just follow the specification? What would be necessary if I wanted to implement this for another language? Thanks!

In addition to publishing the code, the IHaskell page also links to a blog post about how to go about implementing IPython kernels [0]. The implementation is entirely in Haskell and doesn't use any IPython code, but simply communicates with the frontends via ZeroMQ networking library.

[0] http://andrew.gibiansky.com/blog/ipython/ipython-kernels/

Re: A Haskell kernel for IPython

#20
post #17

Earlier quoted context omitted.

Can you give more details on the development? Do you use any IPython code, or do you just follow the specification? What would be necessary if I wanted to implement this for another language? Thanks!

In addition to publishing the code, the IHaskell page also links to a blog post about how to go about implementing IPython kernels [0]. The implementation is entirely in Haskell and doesn't use any IPython code, but simply communicates with the frontends via ZeroMQ networking library. [0] http://andrew.gibiansky.com/blog/ipython/ipython-kernels/

This is amazing, thanks!
Post reply on HN