Ted Leung on the air : ShedSkin

Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
2005年9月27日
ShedSkin

Thanks to Luis Gonzalez for pointing me to Mark Dofour's ShedSkin project. ShedSkin is a Python to C++ compiler based on Mark's master's thesis work, and was one of the Python Software Foundation's Google Summer of Code projects. It looks like ShedSkin can compile a subset of Python, and runs on Windows, Linux, and OS X. Unfortunately, there are no published benchmarks, so it's hard to get an idea of how much of an improvement ShedSkin actually produces. Mark is looking for additional help, so you should definitely drop by his blog if you are interested.

[23:26] | [computers/programming/python] | # | TB | F | G | 3 Comments | Other blogs commenting on this post
Describing ShedSkin as a Python to C++ compiler is a bit of a misnomer, as it supports so very little of Python's language semantics, and virtually none of its library. The code it generates doesn't interoperate with any existing Python implementation, and I don't believe you can call C++ libraries from it either.

The most generous way to describe it would be that it provides you with a Python-like syntax and type inference for C++. (And in fact, the author describes it as letting you write Python "in a relatively static C++-style, in essence enabling users to specify C++ programs at a higher level.".)

I'm pointing this out, not to be critical of the project, but to remind people not to get their hopes up: it's a research compiler, not a development tool, so any performance improvement it has over standard Python is moot. Until you've actually implemented something resembling Python, the performance improvement is just a theory.

PyPy, on the other hand, has implemented a much bigger chunk of Python's semantics. It would be interesting to see if they could use ShedSkin as an RPython compiler. (RPython is a statically type-inferable subset of Python used by PyPy to implement the core interpreter, and ShedSkin's subset of Python seems rather similar to it.)
Posted by
Phillip J. Eby at Wed Sep 28 07:09:25 2005

The above comments by Phillip Eby are mostly correct.
However, Shed Skin doesn't require a "python-like" syntax as he said. With Shed Skin, you use plain and regular python. The only distintion is that the programmer has to restrict his coding style, avoiding dynamic features such as eval or exec, for example.
Note that Shed Skin has been released recently (current version is 0.0.4), and a lot of work remains to be done.
It will be able to import modules, as long as these modules are written with the mentioned restricted style. So it will take some colaboration from interested developers to support more and more features.

At its curent state, it is very useful for writing algoritmic code or simple programs (that don't require the use of libraries) that need to be executed at very high speed.
Posted by
Luis Gonzalez at Wed Sep 28 09:00:01 2005

By the way...
It's worth mentioning that Shed Skin produces stand alone executables, completely independent from any interpreter or vistual machine.
Posted by
Luis Gonzalez at Wed Sep 28 09:04:35 2005

You can subscribe to an RSS feed of the comments for this blog: RSS Feed for comments

Add a comment here:

You can use some HTML tags in the comment text:
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are: <a href>, <em>, <i>, <b>, <blockquote>, <br/>, <p>, <code>, <pre>, <cite>, <sub> and <sup>.

You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk

Name:


E-mail:


URL:


Comment:


Remember my info?


twl JPG

About

Ted Leung FOAF Explorer

I work at the Open Source Applications Foundation (OSAF).
The opinions expressed here are entirely my own, not those of my employer.

Creative Commons License
This work is licensed under a Creative Commons License.

Now available!
Professional XML Development with Apache Tools : Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Technorati Profile
PGP Key Fingerprint
My del.icio.us Bookmarks
My Flickr Photos


Syndicate
RSS 2.0 xml GIF
Comments (RSS 2.0) xml GIF
Atom 0.3 feed
Feedburner'ed RSS feed

< September 2005 >
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30

Archives
2006
2005
2004
2003

Articles
Macintosh Tips and Tricks

Search
Blogs nearby
geourl PNG

Categories
/ (1567)
books/ (33)
computers/ (62)
hardware/ (15)
internet/ (58)
mail/ (11)
microcontent/ (58)
weblogs/ (174)
pyblosxom/ (36)
www/ (25)
open_source/ (145)
asf/ (53)
osaf/ (32)
chandler/ (35)
cosmo/ (1)
operating_systems/ (16)
linux/ (9)
debian/ (15)
ubuntu/ (2)
macosx/ (101)
tips/ (25)
windows_xp/ (4)
programming/ (156)
clr/ (1)
dotnet/ (13)
java/ (71)
eclipse/ (22)
lisp/ (34)
python/ (86)
smalltalk/ (4)
xml/ (18)
research/ (1)
security/ (4)
wireless/ (1)
culture/ (10)
film/ (8)
music/ (6)
education/ (13)
family/ (17)
gadgets/ (24)
misc/ (47)
people/ (18)
photography/ (25)
pictures/ (12)
places/ (3)
us/ (0)
wa/ (2)
bainbridge_island/ (17)
seattle/ (13)
skating/ (6)
society/ (20)



[Valid RSS]

del.icio.us linkblog

www.flickr.com

Blogroll

java.blogs
Listed on BlogShares


Where are visitors to this page?


pyblosxom GIF

AltStyle によって変換されたページ (->オリジナル) /