Skulpt dis branch

10 views
Skip to first unread message

Gabriel Jacobo

unread,
May 22, 2011, 7:32:23 PM5/22/11
to sku...@googlegroups.com
Hi all, I find the Skulpt project very interesting.
I've seen in the open issues listing that basic Python stuff like decorators
and exceptions are not yet implemented. I've also read on your blog that Scott
(at least at some point), toyed with a separate branch (which I believe is
this one: http://code.google.com/r/sgraham-dis/), where you let the CPython do
part of the heavy lifting as you explain: "The second branch is one based on
using the CPython compiler to compile to bytecode, and then a program to
decompile from bytecode to Javascript. This involves reconstructing the basic
blocks out of the bytecode and emulating a virtual stack during the
compilation process to recreate the flow of the Python."

So, my question is, what happened to that branch? Simple lack of time or is
there some fundamental technical reason that prevents an implementation with
this approach from succeeding? Could this approach, if feasible, help in
implementing more easily the missing Python language features?

Thanks again for your good work.

Gabriel.

Scott Graham

unread,
May 23, 2011, 7:20:07 AM5/23/11
to sku...@googlegroups.com
Hi,

I think the 'dis' approach would work OK, but I sort of didn't like
the weight that the compiler took on. Because you have to use CPython
to compile to a .pyc and then take that and feed it to the skulpt
compiler, it was a bit awkward to work with, and the "interactive"
demo is gone also.

But yes, I think it could have worked fine, and would have probably
been less code to write to get equivalent features. It is currently
out of date with the Skulpt runtime code and would take some work to
bring up to date, but it could be done in theory.

scott

Reply all
Reply to author
Forward
0 new messages