There’s this swell python to c++ compiler called shedskin. It’s really interesting. I took a few hours tonight to make it do something:
Yep those are real-time julia fractals If you dare – check it out (make sure python and SDL-devel are all setup):
wget http://www.imitationpickles.org/tmp/juliashed.zip ; unzip juliashed.zip ; cd juliashed ; python ss.py test.py ; make ; ./test
I’ve sent Mark an excessively long e-mail with my comments. I’ll spare you the trouble and just give the highlights:
- My C++ skills don’t exist
- python descriptors are probably the feature I would like to see most – so I could implement pygame.Rect style Rects!
- misc packaging issues (see his previous blog post)
- The README says it “does not scale very well beyond a few hundred lines” – so I guess I’ll wait a while before I try to make a game with it. (Even simple games I make are around 1500 lines.)
Anyway, it’s a cool project. I plan to keep an eye on it.
This just in – I made a python+pygame equivalent. The shed-skin version is ~100x faster! Also, the black areas in the middle of the shapes are caused by my access of out-of-bounds palette entries. I added the -b (bounds check) to the command line and fixed the bug. The bounds check gave me no noticeable speed penalty.