D extensions to python, inline in an ipython/jupyter notebook

John Colvin via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Jun 16 06:11:49 PDT 2015


On Monday, 15 June 2015 at 19:35:16 UTC, Laeeth Isharc wrote:
> On Monday, 15 June 2015 at 17:28:52 UTC, John Colvin wrote:
>> On Monday, 15 June 2015 at 17:11:26 UTC, Laeeth Isharc wrote:
>>> On Monday, 15 June 2015 at 06:51:44 UTC, John Colvin wrote:
>>>> [...]
>>>
>>> Yes - I had noticed same, but don't yet have the experience 
>>> (and don't have available time for now) to do much about it.  
>>> Was looking at Facebook torch to see how that fitted with 
>>> bokeh and inotebook, but glad you actually did something to 
>>> make it happen.
>>
>> I haven't looked at torch much, is it up to the hype?
>
> To be direct: I don't know, as I haven't used it.  I was just 
> interested in seeing how it fitted with ipython and bokeh in 
> particular.
>
> I liked your talk at dconf.

Thank you :)

> Looks like progress is being made on planting the seeds of a 
> matrix implementation and computation library on top.

Ilya Yaroshenko is doing great work here.

> Having a way to use D code to explore data within an approach 
> of rapid iteration will be useful too, and I think your work is 
> a great start on this (seems like its value as it is is very 
> much greater than you modestly suggest, and also I am amazed by 
> how short the code is).

Well, as i briefly mentioned in my talk, it's really very easy to 
do, Jupyter/IPython makes it simple. Of course, behind the scenes 
Pyd is doing the hard work.

> At the moment I am using a combination of the python interface 
> to Bokeh and D code to do the work.  It would be great to port 
> the bokeh server side stuff to D - I have made a start, but I 
> haven't the space for a concerted effort.  The funny thing is 
> there is nothing to the server side - all you do is have a 
> shallow layer that translates the cumulative state from API 
> calls to JSON; the hard work of drawing stuff is done in 
> Javascript on the client.
>
> Whether it's Bokeh or not, having some kind of visualisation 
> solution that fits well with iteratively exploring data in D 
> will be nice.  (What you have done means it's already enough to 
> be very usable, but there may be benefits to moving the 
> charting itself to D).

Visualisation is one of those things that no-one seems to have 
got right, despite the huge efforts that have gone in to it. I 
have ideas about D-based visualisation and already my own basic 
3-D plotting library for huge datasets, but for now the link to 
python is key to get quick and easy access to the latest tools 
that the scientific and finance world are creating.

> Perhaps not for scientific applications, but for finance: 
> reporting is also something that is an important and rising 
> theme in use cases.  Not just for accounting, but for example 
> to understand portfolio risk in a richer way.  You have for a 
> long time been able to hook up reportlab with D code using PyD, 
> but this element of rapid iteration was not so easy - small 
> frictions have large consequences when you don't have a big 
> team.
>
> So in any case, I really appreciate your work.
>
> One more thing - any thoughts on best spreadsheet like 
> interface either purely on browser or within ipython to display 
> results and allow user to enter parameters?  My friend, Giles 
> Thomas, wrote Resolver but that's too big and aimed at 
> something different, and I don't know if it is being maintained 
> properly.

There is http://nbviewer.ipython.org/gist/rossant/9463955 (see 
https://www.youtube.com/watch?v=_JZFSFR6Yeo for demo) which looks 
like a good starting point, but it's very basic.

If https://github.com/quantopian/qgrid supported editing (perhaps 
it does already, but I can't see any mention of it) then that 
would probably be better.


More information about the Digitalmars-d-announce mailing list