[IPython-dev] A 'static demo' mode for the notebook, so we could keep a more visible version of the examples up?

Bob McElrath bob+ipython at mcelrath.org
Sun Jun 10 02:48:19 EDT 2012


Satrajit Ghosh [satra at mit.edu] wrote:
> it would be cool if this could be done with a client side javascript viewer? so
> no server to instantiate at all.

Is anyone familiar with TiddlyWiki (tiddlywiki.org)?  It's a single-html file
application for personal note-taking.  People have written server-side
implementations (including me) but the single-file html paradigm is very
powerful.  It's easily thrown on the web, and easily passed around.  I've been
using it as a "scientific notebook" for years (I wrote a tex plugin for it).

Anyway, I think the single-html-file could be a very powerful paradigm for an
IPython notebook.  All necessary javascript, json worksheet, css, etc can be
embedded in the file.  The "worksheet" part (json) could be programatically
extracted to upgrade.  (TiddlyWiki does all that)  Plugins could interface
python, sage, maple, mathematica, or start remote server (ec2) instances.

Some years ago I built an interface in TiddlyWiki that communicated with the
computer algebra software Axiom, it was extremely similar to the IPython
notebook (though, less developed).

Currently I'm already interfacing TW and IPython, in that I've embedded the
dashboard in a tiddler (iframe).  ("tiddler" = single, titled note in the wiki)
I can't embed worksheets currently because IPython does not produce stable URL's
-- the URL hash changes when the server is restarted.  For me, it's important to
link an idea/note in my wiki with a corresponding calculation in a worksheet.
Notes are always idea->discussion->literature search->calculation->graph->more

I think the concept of a "unit" of code as a tiddler may also be a very powerful
paradigm.  It aligns with the "light table" idea that has gotten a lot of press
recently.  Something I've been thinking about a lot...

Any takers?  It would be fairly straightforward to write a TiddlyWiki plugin
containing the existing IPython notebook javascript and CSS.  It would have to
be served from the IPython HTTP server, due to cross-origin restrictions.

I do have some concerns about how to make a consistent "state" of the kernel
when the code can be spread around in multiple "tiddler", that's a challenge
shared with the light table idea.  But one worksheet per tiddler is an easy way
to start.

Cheers, Bob McElrath

"The individual has always had to struggle to keep from being overwhelmed by
the tribe.  If you try it, you will be lonely often, and sometimes frightened.
But no price is too high to pay for the privilege of owning yourself." 
    -- Friedrich Nietzsche

More information about the IPython-dev mailing list