The Genetic Algorithm Used by Audrey

agent on 2006-04-08T06:18:49

I've been reading #perl6 IRC logs for more than a year and it's a very good way to sync with the rapid Perl 6 development.

Sometimes I find something really, really interesting so I'd like to quote them here. After all, I know there're many Perl 5 programmers (like me!) who love to learn more about Perl 6 and the future of Perl 5.

2006-04-06 ----------- [04:55] by the way, how much of "the perl 6 grammar" exists at the moment? [04:58] depends on how you count, I suppose. rule syntax is fairly well characterized by now. a lot of it is specced pretty well, for some definition of pretty that ain't pretty. [04:59] so at least we can have something like the grammar grammar [04:59] Most of the operator precedence is not done with rules at all. [04:59] Yes, the grammar grammar is already bootstrapped approximately twice. [04:59] it's kinda hard to keep track of all the stuff going on... [05:00] there'e very little top-down grammar over the bottom-up expression parser. [05:00] more top-down involved in scanning complex tokens containing subexpressions. [05:00] but the main complication remaining is just making sure all the grammatical categories work as envisioned. [05:01] Then there's just little detail of attaching semantics to the parse... :) [05:01] s/little/the little/ [05:02] that can be left as an exercise to the implementors : ) [05:02] But audreyt says that Perl 6 now fits in her head, so that should be finished a day or two after the grammar is done. [05:04] that would be most awesome [05:05] well, even a month or two would be awesome. a year or so is more likely before we have something really, really solid. Still, I'm very happy with how it's going. [05:05] well, I'm happy that you're happy, and that it's going [05:05] I guess it's not entirely obvious from here [05:06] and all the various bootstrap efforts and targets and so on are confusing [05:07] Hmm, yes. Audrey [05:07] Audrey's development methodology resembles a flooding algorithm at times... [05:08] Or maybe a genetic algorithm.

__END__

Yeah, in the last year, I was also confused by the JavaScript, Perl5, and all other backends for Pugs. I was asking in my mind, "why can't autrijus focus on parrot, which is believed to be the only VM Perl 6 should be run on? Isn't it possible that the various backends will slow down the roaring speed of Pugs?" Now I finally understand the approach Audrey has been taking -- genetic algorithm or something like that. Given that there're always more than one way to do it, how can we figure out the "best" way if we haven't tried others yet? And furthermore, never forget that -Ofun is always the meta goal of the Pugs project. :)

parrot may not be the only choice and may not be the best choice, as evidenced by the following conversation:

2006-04-06 ----------- [05:11] what's going on with parrot, by the way? [05:12] and how does any of that connect to any of this? [05:13] Parrot is sort of the other end of the world from me, so I just follow along in p6i mostly. I hear conflicting things, but I think it'll get there eventually, for some definition of "there". [05:14] Whether it will be "the" Perl platform or "a" Perl platform, or somewhere in between, remains to be seen.

__END__

P.S. I must admit, Audrey's "Genetic Algorithm" is funny and helpful even in a general sense. I've successfully applied that to most of my open source projects. Multiple approaches and multiple perspectives often lead to surprisingly deep insights. That may be the most useful "algorithm" I learned from Audrey++. ;-)


This is why Open Source works so well

Alias on 2006-04-08T07:04:27

Whenever I here someone say "Why are we wasting time doing $this_thing, when we should be doing $that_thing" I get a little annoyed, and it someone you have to guard yourself against.

Whether $this_thing is the JavaScript backend, or Strawberry Perl, or PPI (ALL of which I've seen people use) it's inevitably wrong, because this isn't business, and you don't have to just pick one.

Open Source coding is far more like evolution, you can go BOTH ways at the same time if you can find two people to work on it, and then pick the best one and discard the worst, or keep BOTH of them and use whichever one is the most applicable.

And to make it worse, most of the time people saying this sort of thing consider it a limited resource because they themselves aren't working on anything and think that one person is the only one capable of working on it (which is rarely the case) and thus that it's a limited resource.

Which means they are mistaking the entire point of a meritocratic system (if they REALLY wanted to they COULD do it themself) and that under no circumstances should they really be saying this, as they don't pay that person's bills.

Aside from making gentle suggestions, if you don't pull the purse strings, you don't get to say what happens, or even what should happen.

Not that I'm saying YOU fit into this situation, you only thought it.

I did too, but more from a "how curious, I wonder where they are going with this..." perspective.

Because the answer to "Why don't they just ..." is almost always "Because they understand the problem better than you".

... For Various Values of "Works"

chromatic on 2006-04-08T18:37:05

Whenever I here someone say "Why are we wasting time doing $this_thing, when we should be doing $that_thing" I get a little annoyed, and it someone you have to guard yourself against.

Me too.

However, I find the existence of multiple Perl 6 "implementations" that implement basically only the procedural part of Perl 6 exceedingly uninteresting. I could do that, and the only computer science or software development class I've ever taken was in Apple II BASIC in 1983 or 1984.

I suppose it's nice that people understand Perl 6 or compilers or grammars or parsers well enough to implement a subset of the language and I guess it's a good thing that the usual suspects aren't the only ones writing code, but translating from one procedural language to another doesn't even interest me in theory.

I've been waiting for Pugs to support roles since last August or so, and I've been wishing Pugs were faster for almost that long. In the meantime, a bootstrapping subset of Perl 6 can now run on Perl 5 in two independent implementations.

I could be wrong. I could wake up tomorrow and the P6 on P5 implementations could merge and suddenly surge and, if I could write the Perl 6 code I really want to write to run on that implementation, I would.

I just don't expect that to happen and remain fairly disinterested in this approach. That doesn't mean anyone should stop working on it. It just means I don't particularly care about it.

I just want one good implementation of Perl 6 running on something, not a half-dozen half-hearted implementation of Perl 6 running on anything.

Re:... For Various Values of "Works"

audreyt on 2006-10-01T13:23:59

This is just a quite note saying Pugs has been supporting roles, in the form of simple mixins, for more than a month now, and full-fledged role support via Moose/MO is coming up right after this release.

Also, Pugs is (at least on this MacBook) about 5x faster than it was compared to this April, and the smoke test takes less than 15 minutes here. It's not as fast as I'd like it to be, but it's not as painful anymore.

Re:This is why Open Source works so well

agent on 2006-04-09T12:19:51

Whenever I here someone say "Why are we wasting time doing $this_thing, when we should be doing $that_thing" I get a little annoyed, and it someone you have to guard yourself against.

I knew such remarks could be both offensive and stupid, so I simply said that in my mind. Don't worry. :)

I think open source development is all about freedom...not only the freedom of the products it produces, but also the freedom of the design decisions the developers make. The audience may have the right to make comments, or to ask questions, but never have the right to make or modify a decision for the developers.

I did too, but more from a "how curious, I wonder where they are going with this..." perspective.

me too. ;)