Wednesday, December 11, 2013

On interactive python books, & hi-performing python=>javascript translators...

These may be of more interest to the programmers in our midsts -

Python Data Structures - Interactive Book


http://interactivepython.org/courselib/static/pythonds/index.html

One of a set of interactive books.

The source (should you want to try to write your own book this way) is at https://github.com/bnmnetp/runestone - note: it presents a http://sphinx-doc.org book as a web2py application (note: web2py is notoriously non-pythonic in its code base, but interactive and used in teaching web programming).  In any case, the questions and running code, and other extensions do not appear to rely on web2py, but rather run in the browser - so you can actually have a reasonably interactive static site - for an example, see the overview page:
http://interactivepython.org/runestone/static/overview/overview.html

It's instructive to compare this way of having interactive python with http://ipython.org/notebook.html (and blogging w/ same).

It's also instructive to compare this (rather complicated) way of running interactive python with the golang blogging tool (see, for example, http://blog.golang.org/slices - and the elegant source for the tool which accomplishes writing interactive code in a simple post - https://code.google.com/p/go/source/browse?repo=blog).

Python to Javascript compiler - Wait, what?!

This may sound a little gimmicky, but it seems to be a simple parser - so even though it's only ben in existence under a month, the code seems like it should be functional.

https://pypi.python.org/pypi/pythonium/0.4.7

But it doesn't end there - there's competition afoot, with some pretty extreme performance claims:

http://pyppet.blogspot.fr/2013/11/brython-vs-pythonjs.html
https://github.com/PythonJS/PythonJS

which is understandable, since pythonium is a fork of pythonJS - and thus a little history (albeit slanted) might help:  http://hypermove.net/notes/projects/pythonium.html

Why ever write javascript?!




Subscribe via email

Enter your email address:

Delivered by FeedBurner

Followers

google analytics