PACT - Design Notes

TL;DR: https://github.com/parrot/PACT

So after my last blog post, I started a gist to keep track of "how would I write PCT". I called it PACT, the Parrot Alternate Compiler Toolkit. I suppose I could have called it PCT2, but I really don't want to try to claim it will 100% replace PCT. PCT's very valuable to the people using it right now, but there's no small desire to add to it and I'd like to help it be better. Parrot's main audience, to my mind, is prospective compiler writers and the easier we can make their lives the better.

In proper standing on the shoulders of giants fashion, I want to take as much from the design and implementation of PCT as I can. In some ways, PACT should be viewed as more a kind of violent refactoring of PCT than a rejection of it. The lesson I learned from GSoC is that PCT really relies on PIR right now and changing that will involve some serious reworking everywhere. And if we're doing that much major work, we can do some serious thinking about the overall structure while we're at it.

What I want to do is rebuild a PCT-like toolkit from the ground up, starting at Parrot bytecode instead of PIR. Then we can add is useful things like a new version of PASM based on the low levels of PACT and start grabbing features back from PCT. Modularity and bytecode are really the two key points of the entire effort.

As other projects progress, I want to integrate them as early as possible. soh_cah_toa's debugging segment and 6model are both things I want to grab as quickly as they're pulled into Parrot.

A few other people started expressing interest and dukeleto++ said it should move into a repo so others could hack on it. I expressed the concept that anyone else interested could do so... And whiteknight++ did. Which left my pile of disorganized notes in a public repository. Bleck. My class today was cancelled so I started hacking at it. The result can be found at https://github.com/parrot/PACT All that's in the repository right now is a set of documents describing the structure of the system as I see it.

I'm back in school and starting work on my thesis in addition to a part time job. So hopefully other people with more spare time can start hacking on it and I can act as some kind of advisor on "how I think it should be." I'll warn people now, I'll be somewhat opinionated but I will admit that someone actually producing code gets a lot more credit than some wannabe academe producing manifestos design documents.