On Sun, 15 May 2005, Kevin Tew wrote:
I've taken the code from http://www.intertwingly.net/stories/2004/10/05/pyrate.zip, which I assume to be Sam's code. It was basically stubs with a few AST nodes implemented when I started with it.
Er. Yes. I can't speak for Sam, but I interpreted his post as a spike of how a pirate refactoring could go, not a call to start a whole new incompatible project.
And am working to generate a python to pir translator/compiler that uses Sam's python pmc's I've attached the source as it stands now. I'm just an aspiring parrot hacker. I'm sure that there are a lot of things I'm doing wrong or inefficiently. I'm looking for feedback and suggestions for improvement. Please comment.
Well, one thing that's innefficient is to write your own compiler when there are already two mostly working examples out there.
I want to get my patches on top of Sam's initial work imported into the parrot SVN tree.
I believe that having the python compiler code in parrots svn tree is imperative to build a python/parrot community.
I'm absolutely bewildered that you would take that route in order to build a community. Between pie-thon and pirate there already are two python compilers, and pie-thon already *is* in the parrot tree... As far as I can tell, you didn't approach either existing group and see if you could help. You just went off and did your own thing. You're not building a community, you're creating yet another faction.
A python compiler in the parrot tree will lead to more widespread exposure to other parrot developers, increased peer review, testing by more people on a greater variety of platforms, etc.
This is a great goal, but I'm not sure it follows that having it in the source tree would lead to more exposure.
To me, if you want exposure, a much better idea would be
to *talk* to people, either on mailing lists or blogs or whatever. In other words, market the project. You need things like documentation and a website. Where the code lives is a fairly trivial concern. It sounds like you just
want parrot developers to stumble on to your code in the
tree and pitch in.
In my mind, the target audience for pirate is python developers (like yourself). People who might have heard about parrot, but don't necessarily know much about it or how it works. But if you can tell all the nice things we get:
- this buys us continuations without the genius-level hacks required by stackless
- we'll be able to leverage CPAN and code written in other languages...
- we'll have a native call interface
- (etc)
... then maybe python hackers will be interested. So they should be able to download a python file and run it. The python file should work like every other python file, and leverage the distutils. It should have a setup.py install script and if necessary, a windows installer and rpms. There should be a link to download a binary version of parrot so that the first step isn't to compile a virtual machine they know nothing about - especially if they're developing on windows without a compiler. To me, having the code burried in the middle of the parrot tree is a huge barrier to entry to new developers.
Of course if you're targeting parrot developers who may or may
not know python, that's another story... But from what I can tell, the other compilers in the parrot svn tree just aren't
getting the kind of exposure you're talking about.
I don't know, maybe I'm just rambling, but I don't see how putting the source in the parrot repository is either necessary or sufficient for widespread exposure. :/
Michal could you expound on your thoughts here, they sound interesting.
I'm not sure what Kevin meant by self hosted but I've been thinking about this lately, and what we can do today is creating a back-end for the compiler that emits simplified python code in a way that would give us things like continuations (though with some loss of speed) without the need to duplicate the python library.
Sure. This is kind of off topic for the parrot list. I posted a blog entry here:
http://sabren.com/index.php?p=62
I meant a python to pir translator/compiler written in python.
Like this one: http://pirate.tangentcode.com/ ??
I've looked at the PyPy project. They are doing cool stuff. I would eventually like to use their work to emit optimized pir for python, but they still have work to do.
So why don't you want to help them with that work? Right now you're just reinventing the wheel. If you were writing a backend for pypy, that would be one thing. That would actually be useful. Better yet, not write up a little report about what it would take to get pirate to work with pypy? We could almost certainly leverage their type inference engine. I'd love to see pirate become just another backend for pypy. It seems to me that would do a lot more to build community than the approach you're taking.
- Michal http://withoutane.com/