Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

agent (5836)


Agent Zhang (章亦春) is a happy Yahoo! China guy who loves Perl more than anything else.

Journal of agent (5836)

Saturday April 08, 2006
01:18 AM

The Genetic Algorithm Used by Audrey

[ #29258 ]
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.

[04:55] <arcady> by the way, how much of "the perl 6 grammar" exists at the moment?
[04:58] <TimToady> 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] <arcady> so at least we can have something like the grammar grammar
[04:59] <TimToady> Most of the operator precedence is not done with rules at all.
[04:59] <TimToady> Yes, the grammar grammar is already bootstrapped approximately twice.
[04:59] <arcady> it's kinda hard to keep track of all the stuff going on...
[05:00] <TimToady> there'e very little top-down grammar over the bottom-up expression parser.
[05:00] <TimToady> more top-down involved in scanning complex tokens containing subexpressions.
[05:00] <TimToady> but the main complication remaining is just making sure all the grammatical categories work as envisioned.
[05:01] <TimToady> Then there's just little detail of attaching semantics to the parse...  :)
[05:01] <TimToady> s/little/the little/
[05:02] <arcady> that can be left as an exercise to the implementors : )
[05:02] <TimToady> 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] <arcady> that would be most awesome
[05:05] <TimToady> 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] <arcady> well, I'm happy that you're happy, and that it's going
[05:05] <arcady> I guess it's not entirely obvious from here
[05:06] <arcady> and all the various bootstrap efforts and targets and so on are confusing
[05:07] <TimToady> Hmm, yes.  Audrey
[05:07] <TimToady> Audrey's development methodology resembles a flooding algorithm at times...
[05:08] <TimToady> Or maybe a genetic algorithm.


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:

[05:11] <arcady> what's going on with parrot, by the way?
[05:12] <arcady> and how does any of that connect to any of this?
[05:13] <TimToady> 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] <TimToady> Whether it will be "the" Perl platform or "a" Perl platform, or somewhere in between, remains to be seen.


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++. ;-)
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • 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
    • 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 peo

      • 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.
    • 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