Greg Hewgill (ghewgill) wrote,
Greg Hewgill

psil compiler

My Psil-to-Python compiler (which I can't resist but call "psilc") can compile a lot of nontrivial code now. The performance improvement over the interpreter is about a hundred times faster, which is great for working on Project Euler stuff. I've still got some bugs and things that need work, mostly to do with the funny Python scoping rules (Python 3.x gets a nonlocal keyword to express some things you can't in 2.x), tail recursion, and a minor thing with the annoying Python print statement (print will be an actual function in Python 3.x, so that problem will go away).

I've pushed up all the latest code to the psil repository on Github. It's pretty rough right now, and tries to run the compiler by default. The Compile = True switch near the top currently controls whether it runs the compiler or the interpreter.
Tags: psil

  • 2013 in review

    2013 is the year when everything changed. The biggest event was the birth of our daughter Lily. She was born prematurely in Shanghai while we…

  • 2012 in review

    2012 has been fairly quiet. Maybe it just seems that way because I haven't actually written anything new in this blog since last year's annual…

  • new photo galleries

    I've been busy processing photo galleries from the last year (or two) and putting them online for your perusal. Vancouver 2010 Northland…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded