# $Id: README,v 1.10 2005/07/22 20:17:44 michal Exp $ #################################################### # # PIRATE # #################################################### ## status ######################################### Pirate is an attempt to get python running on the parrot virtual machine. It was originally based on amk's parrot-gen.py: http://www.amk.ca/conceit/parrot.html But has been extended considerably and updated to work with parrot's intermediate code compiler. Currently, pirate supports: - simple lists, strings, ints, dicts, and floats - assignment and multi-assignment ( x,y=1,2 ) - while/else, for/else, if/elif/else, break, continue - try...except blocks - raise and assert - math operations (+, -, *, /, %) - boolean logic (and, or, not) - comparison operators - functions and function calls - lambdas - parrot calling convention for functions - list comprehensions - generators - proper scoping ## to-do list ##################################### - classes - import - lots of little details ## help wanted #################################### - bug reports! :) - anything on the above list - __builtin__ routines - standard library (hopefully w/help from pypython?) - optimization of generated code - run C modules from parrot's native call interface PMCs are sead to be very similar to PyObjects. It would be awesome if things like Numeric, pygame, etc could "just work" somehow... :) Jack Jansen of MacPython fame says: """ ... bidirectional bridging of Python objects to a similar object architecture is definitely doable. Look at PyObjC for a project that does a pretty complete bridge between Python and Objective-C. """ Also, ponie seems to be doing the same for perl5/XS, and XS is a lot stranger than PyObject. ## cvs access #################################### To get the code: cvs -d:pserver:anonymous@pirate.versionhost.com:/cvs/pirate login [no password] cvs -d:pserver:anonymous@pirate.versionhost.com:/cvs/pirate co pirate If you want write access to cvs, drop me an email at michal@sabren.com ## pair programming? ############################## I'd also love to do some pair programming on this. If anyone's interested, let me know and we can meet up online and share a terminal session on my server. Just let me know! :) ## test first! #################################### This code is being written test-first. Don't break the tests, and don't check in any code that doesn't have a test case. Tests go in PirateTest.py and to test, just do this: python PirateTest.py Note the run() function has two keyword arguments: dump=0 and lines=1. Set dump to 1 to show the generated code for a test, set lines to 0 to hide the line numbers (in case you want to pipe it to an *.imc file to play around with manually).