Saturday, September 20, 2008

Shed Skin 0.0.29

I have just released version 0.0.29 of Shed Skin, an experimental (restricted) Python-to-C++ compiler. It's been a while since the last release (well, just under 4 months), because of work and vacation, but mostly because there have been so many changes.

Thanks to the work of Karel Heyse, Pavel Vinogradov, FFAO and David Marek, there is now a pretty much complete implementation of the datetime module. Thanks to a suggestion by Albert Hofkamp, I added support for most of the ConfigParser module (by compiling it with Shed Skin of course), which led me to fix several outstanding but important problems. For example, support for inheritance hierarchies was greatly improved, and mapping keys should now work, too ('%(key)x..' % some_dict).

Since the previous release, I've also gone through the pains of installing FreeBSD, OpenSolaris and 64-bit Ubuntu on a spare PC and testing Shed Skin on each of them, with the result that these platforms are now 'officially' supported. Please see the updated 'installation' section of the tutorial. I also received some GCC 4.3 patches (Seo Sanghyeon and Winterknight), which should work fine now, too. So I guess most platforms should be covered now.

Some other improvements:

-improved support for importing from nested modules such as os.path
-__init__ methods are much less a special-case
-improved support for calling ancestor methods (e.g. Parent.__init__)
-all example programs (ss-progs) now compile as extension modules
-staticmethod and property decorator support (Seo Sanghyeon)
-Shed Skin doesn't crash on highly dynamic/recursive types anymore, making it easier to debug programs to get them to compile
-several fixes in the re module, e.g. re.sub now accepts a replacement function
-tuple hash caching was disabled, as CPython doesn't do this either

For the full changelog, see the release notes wiki at the Googlecode site. Please try out the new release, and let me know about any problems. Note that I probably won't be very responsive for at least a week or so - it has been a somewhat difficult release, and I could use some rest.. :)

22 comments:

joep said...

I worked my way through the first two tutorrial examples on WindowsXP, hello world worked instantly.

With the extension simple_module, I had two problems:
The include path for python is hardcoded in ss.py to c:/Python24, while my python is c:/Programs/Python24. This requires changes to the make file or finally I edited ss.py. Making the path configurable would be better in this case.
The second issue, I had, are the run time requirements, running the extension example from the initial command window worked fine. Running it from a different python shell or in IDLE I got a dll load error. I finally copied gc.dll into the working directory, since I don't want yet to put it on the permanent Windows path. After that, the example ran as described. Mentioning the runtime dependencies (on gc.dll, and anything else?) in the tutorial, would be helpful.

Otherwise, this version looks quite good so far (after 1 hour). I tried out previous versions and never got the compilation of a python extension to work.

Josef

srepmub said...

thanks for mentioning these problems.

I forgot about this semi-hardcoded path to c:/PythonX.X, and will have a look at setting the correct path automatically.

the runtime dependencies on gc.dll and libpcre-1.dll are actually mentioned in the tutorial, albeit perhaps not very prominently ^^

thanks again!
mark.

joep said...

my mistake, looking again at the tutorial the dependency on the dll's is pretty clear. I was reading too fast.
Josef

DD said...
This comment has been removed by the author.
IanOzsvald said...

Just to give you a Thumbs Up - I used ShedSkin 0.0.29 on Ubuntu to speedup some neural network code and I achieved a huge speedup with 5 hours effort (significantly faster than when using psyco).

I've yet to confirm all the output, once completed I'll post results to my blog and link again here.

I just wanted a chance to say thanks! It was painless, required just the removal of some Raise statements and then It Just Worked with g++.

Ian. (ianozsvald.com)

srepmub said...
This comment has been removed by the author.
srepmub said...

hi ian,

thanks for sharing this. it's nice to hear there are actual out-of-the-box experiences with Shed Skin.. :) typically, I have to fix a few minor things here and there to get something non-trivial to compile.

did Shed Skin give you clear error messages about the unsupported raise statements, or was there some other problem here?

please let me know if I can help debug things, if the output ends up being incorrect.

IanOzsvald said...

@srepmub the error was clear enough, I think it told me that the keyword was unsupported (or something like that), it was a simple matter to comment out those lines.
I'm about to revisit the project (to move the cpps to a different machine for timing tests), once I've confirmed all my code I'll do a blog post and link it here.
Much obliged!
Ian.

IanOzsvald said...

I should add that I hadn't expected anything to work since I'd never read of 'success stories' from others, I just didn't know if shedskin was mature enough.
This is why I'll do the blog post - I want to show others that it is worth trying your project because the speedups are pretty amazing :-)
Ian.

srepmub said...

@ian:
I wouldn't call Shedskin mature, but it certainly improves a lot with every release. I'm almost at a point where I'd like to release a 0.1.

note that the speedup greatly varies with different kinds of speed bottlenecks. if the bottleneck is in the builtins (typically str or set), compilation can actually make things slower; if the bottleneck is in allocating many small objects, C++ typically also won't help a lot; for pure integer/floating-point calculations and inheritance hierarchies the speedup can be huge.

kiss said...

Weekends to peopleig2tmean that they can have a two-day wowgold4europe good rest. For example, people gameusdcan go out to enjoy themselves or get meinwowgoldtogether with relatives and friends to talk with each storeingameother or watch interesting video tapes with the speebiewhole family.
Everyone spends agamegoldweekends in his ownmmoflyway. Within two days,some people can relax themselves by listening to music, reading novels,or watchingogeworld films. Others perhaps are more active by playing basketball,wimming ormmorpgvipdancing. Different people have different gamesavorrelaxations.
I often spend weekends withoggsalemy family or my friends. Sometimes my parents take me on a visit to their old friends. Sometimesgamersell I go to the library to study or borrow some books tommovirtexgain much knowledge. I also go to see various exhibition to broadenrpg tradermy vision. An excursion to seashore or mountain resorts is my favorite way of spending weekends. Weekends are always enjoyable for me.

vivian said...

I like your blog, it's very good!
By the way, do you like spyder down jackets, I think they are very fashionable and chic, especially the spyder ski jackets, I love them so much. In my spare time, I also like playing tennis rackets, it can keep healthy, what do you like to do?
kids north face jackets
polo vest
polo jacket
abercrombie fitch mens shirts
polo jackets for men
polo jackets for women
burberry shirts for men
polo hoodies for women
columbia jackets women
polo sweatshirts for women
north face jackets on sale
polo shirts for women
polo shirts wholesale
spyder jackets
ralph lauren polo shirt
polo pants for men
abercrombie fitch shirt
wholesale abercrombie fitch shirts
polo vests
polo jackets
polo hoodies for men
burberry shirts for women
burberry shirts on sale
polo shirts for men
north face jackets cheap
north face jackets for women
north face jackets for men
polo sweatshirts for men
columbia jackets for men
columbia jackets discount
spyder jackets for men
discount spyder jackets
cheap spyder jackets
spyder jacket
spyder jackets for women
tennis rackets
cheap tennis rackets
discount tennis rackets
tennis rackets on sale
prince tennis racquets
head tennis racquets
wilson tennis racquets
babolat tennis racquets

lady said...

I like the side of the article, and very like your blog, to write well and hope to continue their efforts, we can see more of your articles. ed hardy clothes. After reading this article has strong feelings, the future will be ed hardy womens longsleeve.ed hardy longsleeve
ed hardy hoodies
ed hardy jeans
ed hardy
ed hardy clothing
ed hardy t-shirts
cheap ed hardy clothing
ed-hardy.co.uk
ed hardy shirts
wholesale ed hardy clothing
ed hardy outerwear
ed hardy mens outerwear
ed hardy womens outerwear
ed hardy clothes
ed hardy boots
ed hardy outerwear
ed hardy hoodies
ed hardy Jeans
ed hardy hoodies
ed hardy jackets
ed hardy womens jackets
ed hardy mens jackets
ed hardy bags
ed hardy trousers
ed hardy shoes
ed hardy longsleeve
ed hardy mens longsleeve
ed hardy womens longsleeve
ed hardy jackets
ed hardy suits
ed hardy clothing
ed hardy shoes
ed hardy jeans
ed hardy boots
ed hardy mens sweater
ed hardy womens cotton
ed hardy womens boots
ed hardy
ed hardy womens clothing

nike said...

Nike shoes
puma shoes
Cheap nike shoes
NIKE’s headquartered in Beaverton, Oregon.Nike may be one of the youngest of the major brands, but it is the dominant brand around the world.In 1963-1964 when University of Portland track coach, Bill Bowerman, and Phil Knight, a mid-distance runner joined forces to import and provide low-cost, high tech running shoes from Japan in order to provide alternatives to the German-dominated athletic shoe market.
Discount nike shoes
Wholesale nike shoes
Nike shox r4
Operating under the name Blue Ribbon Sports, Bowerman and Knight began to sell the Japanese Onitsuke Tiger (Nike SB) running shoes. Jeff Johnson, a former rival of Knight, joins the company in 1965 as their first full-time salesperson and sells shoes from the back of his van at local and regional track meets until opening Blue Ribbon Sports’ first retail outlet at 3107 Pico Blvd, Santa Monica California.
nike shox shoes
nike air max
nike running shoes
The Superstar is one of the first designs the Adidas manufactured.The tongue is leather on the outside and cloth of the inside and is thick enough to feel padded, but thin enough to not feel like an obstruction. The heel of the shoe holds up well the curve of the front is great for any kind of feet.
cheap puma shoes
discount puma shoes
nike air max tn
Therefore, Adidas is a collection of trust and respect. Product and marketing initiatives at Adidas primarily focus on five global priorities: football, running, training, basketball and Adidas Originals sneakers. Adidas sports the recognizable logo of three slanted parallel bars of ascending height.
puma mens shoes
puma running shoes
wholesale puma shoes
Everybody like beauty, which is quite commen, especailly womens. Welcom to our store which is focused on sellingghd hair straighteners mk4and hair straightners. For women, especially the young girls, this ghd iv styler hair straightener is the best choice. ghd hair straightners is famouse for the pretty outlook and the top quality. The price of this cheap ghd hair straighteners is acceptable and rational. Ed Hardy Jeans, Ed Hardy Hoodies ed hardy shirts ed hardy clothes ed hardy clothing
ed hardy trousers

Bruce said...

Today,we are proud to announce the launch of the new wedding support service sell ffxi gil,packed with features sure to sell ffxi gils delight adventurers across Vana'diel looking to exchange eternal vows with their beloved!Responding to player demands for greater customization,the new service will grant brides and grooms freedom in choosing location,timing,dialogue,and sell Final Fantasy XI Gil more for their ceremony,allowing them to create a truly memorable event all their own.Information on all the features,including in-game sell ffxi gil item vendors and wedding certificates,can be found on the new wedding support site,so head on over sell ffxi gils and get started planning the wedding of your dreams sell Final Fantasy XIGil!

Vinny said...

I definitely feel that the answers presented is relevant to absolutely everyone . Thank you .
locksmith miami

Latest nike shoes said...

This Nike soccer cleats ultra vibrant New nike soccer shoes ...The Nike soccer cleats has a huge army of fans across the globe, and if you're one of them we know you love them to be bright, flashy and in-your-face colours. Checking out these nike mercurial vapor superfly III fg versions, part of Nike's Fall seasonal releases, we're sure you're going to love these Nike Football Cleats too, they combine Laser technology and Nike Mercurial Vapor Superfly with the Vapor series!especially once they start appearing en masse on pitch. You can click "VIEW MORE" for more detailed pictures. New levels of performance after nike mercurial vapor superfly III new levels of performance after.

London Crumpet said...

London escorts directory London Crumpet is created to expose Independent escorts and escort agencies in London. Everybody can post their advert on this directory for FREE.

Bayan Ankara Escort said...

Ankara Escort, Escort Ankara, Escort Ankara Bayan
Escort Ankara, Escort Ankara Bayan, Ankara Escort Bayan
Bayan Ankara Escort, Ankara Bayan Escort, Ankara Escort Kızlar
Escort Kızlar Ankara, Escort Bayan Ankara, Escort Bayanlar Ankara
Escort Bayanlar Ankara, Ankara Bayan Escortlar, Ankara Eskort Bayan
Escort Kızlar Ankara, Ankara Escort Kadınlar, Ankara Eskort Bayanlar
Ankarada Tele Kızlar, Ankara Escort Kızlar, Ankara Eskort Bayan
Bursa Escort, Bayan Escort Bursa, Bursa Eskort Bayan
Kayseri Escort, Bayan Escort Kayseri, Kayseri Eskort Bayan
Escort Bayan Ankara
Escort Bayan
Escort Ankara
Escort Ankara Bayan

Escort Bayan Ankara,
Escort Bayan,
Ankara Escort,
Ankara Escort Bayan,
Escort Bayan Ankara,
Escort Bayan,
Escort Ankara Bayan,
Ankara Escort,
Ankara Escort Bayan,
Escort Bayan Ankara
Ankara Escort Bayan
Escort Ankara
Bayan Ankara Escort
Escort Ankara
Escort Bursa
Escort Ankara Bayan
Ankara Escort Bayan
Escort Bayan Ankara


Ronit Roy said...

What a girl, really Stunning, She was truly blessed girl I dream for. - Soumya looked cute in her stockings, suspenders and short skirt, Very receptive to DATY and then really hot sex with CIM to finish. She is top girl who offer me excellent Jaipur escort service.

kabir khan said...

I am Kabir from Punjab, I was in Delhi for spending my vacation, when I was in Delhi I hired Preet Singh, She is completely stunning Delhi Escorts. It's like being in love, fun! All services with a lovely smile. I would really like to keep her for myself. Thanks DEH for helping me.

Ankara Kızlar said...

ankara escort,
escort ankara,

ankara escort,
escort ankara,

mersin escort,
izmir escort,
bursa escort,
bodrum escort,
seks hikayeler,