Saturday, August 12, 2006

Shed Skin 0.0.14, 1600-line program

hi all (two readers :-))

it's been a while, but I've been hard at work improving Shedskin. I actually got paid for about a month, to support a certain 1600-line program. it compiles fine now, so that means it's a new record :-) I'm hoping very much to find another job like this, so if your boss might be interested in paying me to do a 'cheap' translation of some Python program to C++, please let me know. I don't need a lot of money to support myself :-)

okay, so what's new in this release:
- string formatting has been hugely improved, so most combinations of flags and types should give the same result as in Python now
-several new imports are supported now: getopt.getopt, cStringIO.StringIO, string.*, os.{getenv, getcwd}, and shedskin-specific (typed) versions of struct.{pack, unpack}: struct.{pack_ints, unpack_ints}, that may be useful.
-many, many bugfixes, resulting from debugging a 1600-line program :-)

interestingly, getopt.getopt is supported by taking a pure Python implementation (in this case, from the PyPy project) and compiling it to C++ :-) in the future, I think this technique can be used to support several other modules (possibly 're'), helping me locate bugs in Shedskin and improve the amount of supported libraries at the same time.

5 comments:

Anonymous said...

Congrats :D

Happily i was going from one statically typed language to another, so my work was all in converting the type system, so no special casing was necessary, other than the one primitive op module :D

Anonymous said...

Oh, that's not quite true... the damned big integer library still doesn't go... largely because the haskell sources assume they're working with gmp.. when they're not :(

John Mudd said...

Is there an easy way to parse an XML file usng Python that can be compiled by Shed Skin?

srepmub said...

hello john,

not right now - but it is probably possible to add bindings to SS, to allow compiled programs to use an xml standard library module. please send me an email if you'd like to discuss this further.

alejolp said...

Hello!! Nice tool, really interesting :)

are you planning to fully develop the program, or only to play around for some short time ? this project might get interest from a lot of people... including me.

cheers!
alejandro