a Pippy equivalent for JavaScript + <canvas>

S Page info at skierpage.com
Mon Feb 23 23:11:36 EST 2009


"Don't bet against the browser" part XIV:

Looking at the Pippy Python graphics code examples, they remind me of 
some of the bits of <canvas> tag programming around the net.  So one 
could imagine bundling a JavaScript editor with some glue HTML and 
making a Pippy equivalent.

It's been done, http://billmill.org/static/canvastutorial/  It runs in 
good browsers (i.e. anything but IE), and thus mostly runs in Browse 
v.98 on 8.2.1!  It uses the CodeMirror interactive textarea with syntax 
coloring.

In some ways it's better than Pippy, because the code and window are on 
the same page so the edit-run loop is tighter.  The whole tutorial could 
be packaged as a downloadable .xol collection.  It's using the jQuery 
library which could and should be factored out for the XO since browser 
incompatibilities aren't a factor.  Fantasizing, maybe the Disqus online 
login in its Comments tab could be replaced by XO collaboration and a 
pink pony.

Interactive animation is slow on the XO, but if and when Browse gets 
updated to XULRunner 1.9.1 and picks up TraceMonkey, the JavaScript will 
get faster.  Maybe newer cairo (8.2.1 has cairo 1.6.4) will speed up the 
graphics.

Cheers,
--
=S Page



More information about the Devel mailing list