Stories
Slash Boxes
Comments
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 ]

Journal of luqui (5770)

Wednesday November 02, 2005
08:40 PM

Today's Perl 6 Meeting Notes

[ #27425 ]

Allison:
        - almost finished with the tree transformation thing that takes a grammar
        - last remaining piece is tricky
        - if you use compreg and compile a subroutine on the fly from a string of
            PIR text, can you have parameters in that?
        - can you accept subroutine parameters?
        - do you have to declare it as a named subroutine?

Patrick:
        - you have to compile it as a named subroutine
        - you can make it anonymous
        - give it a name, but put :anon pragma after it

Allison:
        - that's exactly what I need

Patrick:
        - you get back a PMC that you can call like any other subroutine in a PMC

Allison:
        - I'll have a version of the engine that uses grammars by the end of this
            call
        - parses the tree grammar file using PGE
        - does a tree transformation on the match result
        - then loops through the tree (an array of rules, where each rule is a
            hash)
        - compiles rules for an attribute grammar from that result
        - you can compile from a tree grammar file to a working tree grammar
        - you use a tree grammar to use this

Luke:
        - an abstract syntax?

Allison:
        - your attribute grammar
        - I can create that from a syntax file
        - I do that using attribute grammars

Luke:
        - for me, it ended up being less readable than doing it by hand
        - but it's fun to bootstrap

Allison:
        - it was my way of testing if I can use an attribute grammar
        - before I put it into the repository, I want to make sure that I can
            parse the output from a PGE match and transform it
        - this proves that that is possible
        - also Roberta and I finished our final draft of the Artistic Licence 2.0
            and the contributor agreement
        - the next step is to solicit reviews from a few interested parties,
            including the patent lawyer
        - then we'll do a general public review

Nick:
        - will Perl 5 come under this agreement as well?

Allison:
        - we took that into account for the contributor agreement

Nick:
        - can you have the Perl 5 cabal review it too?

Patrick:
        - PGE has grown by leaps and bounds
        - converted it to use a shift-reduce parser internally
        - everyone else can use that parser
        - probably 25% shorter in parsing code, much faster
        - also added support for custom whitespace rules
        - create a grammar with its own rule
        - now does closures; can embed them in a rule
        - can specify what language it'll send to which Parrot compiler

Luke:
        - can you give it a lexical pad to start with?
        - does Parrot already do that?

Patrick:
        - haven't done anything with that yet
        - shouldn't be hard
        - we can do whatever we want
        - I'm still waiting for the dust to settle on the design

Luke:
        - suppose I wrote a lexer for a LALR(1) grammar?
        - can I have PGE understand that?

Patrick:
        - as long as it understands match objects
        - you can control how it handles tokens
        - "give me a match object"
        - "call this subroutine which tells me how much to consume"
        - the subroutine can be a rule
        - go from recursive-descent to shift-reduce or vice versa at any point
        - we don't have to worry about backtracking over Perl comments, for
            example
        - they're atomic
        - pretty straightforward

Luke:
        - can you commit yet?
        - will that allow us to clean up memory that we don't need?

Patrick:
        - not yet
        - but I know how to do it
        - you can take any match object and call the same rule
        - it gives you a match object that starts there
        - drop the old object and the GC will clean it up
        - continue from where that match started
        - I can build that trivially in about 15 minutes now
        - I did lookaheads
        - I'll do lookbehinds in the near future, with a naive implementation
        - particle on IRC has committed around 200 tests for PGE
        - I'll clear off a lot of the TODOs there to reward him for his work there
        - my next plan is to start parsing Perl 6 expressions
        - I'll go as far as possible
        - should be able to go quite a ways
        - already an expressions parser in the examples directory
        - you can get back a parse tree with precedence taken into account
        - now that that's a rule, I'll start working on statements
        - we'll see where it goes from there
        - probably can produce fairly complete parse trees for Perl 6 programs in
            two weeks
        - may not have all of the esoterics in there, but most will be available
        - one question
        - I can fairly rapidly build an interpreter based on the match tree
        - is that a direction to bother going down?

Allison:
        - it would be useful just in a sense of having bits and pieces being
            usable right away

Patrick:
        - that's the way I want to go
        - I'll start building an interpreter
        - it may be slow
        - my intermediate goal is to get the language interpreter far enough along
            that it can run the Pugs test harness

Luke:
        - that's what Pugs did for a while
        - that sucks
        - all of your special cases get into the big, bloated runtime

Allison:
        - we're working on the syntax tree at the same time
        - we will do that
        - it's just nice to have something running

Patrick:
        - I think Luke means "don't go too far with it"

Luke:
        - you don't want to go too far in that direction
        - people could spend their time adding features to a bloated interpreter
            rather than building a small, scalable one
        - where do you stop?
        - where do you throw it out and start with PIL?

Allison:
        - when I push the tree transformations two steps further and Patrick can
            use that instead of the interpreter

Patrick:
        - PIL and the interpreter aren't entirely in conflict
        - my goal is the compiler
        - I don't want to target PIL directly
        - I need something to evaluate my syntax trees relatively interesting

Luke:
        - you don't want to go too far, like Pugs in throwing so much away

Allison:
        - the best way to check the grammar and PGE is to have something that
            actually works while he's at it

Patrick:
        - you can help out, Luke
        - when you think it's going too far, say so

Luke:
        - it goes too far with other contributors, not you

Allison:
        - we don't really have other contributors now

Patrick:
        - we could get some very quickly

Luke:
        - "thanks for your help, but we're throwing it away now"

Patrick:
        - we'll just tell them up front
        - I'll create a new languages/ directory so it's clear it's not the
            official Perl 6 system
        - we will watch for that very carefully
        - if this system doesn't have a release schedule but the Perl 6 compiler
            does, it'll be clearer about our priorities

Luke:
        - okay
        - one more thing though
        - Perl 6 is a complex language
        - I think that interpreter will be bigger than you expect it to be

Patrick:
        - I don't expect to write a complete interpreter
        - I expect to write enough to get me to a compiler in a comfortable
            environment
        - after writing PGE as a compiler, I know that's how I want to go

Jesse:
        - describing it as a development aid and experiment might help

Patrick:
        - I'm planning to send out an e-mail later tonight if I can stop coding
            long enough to document things

Luke:
        - I'm happy that everyone else is making good progress
        - I didn't this week mostly because of school
        - I was going to write a couple of things, but they're still on my queue
        - also going to port Language::AttributeGrammar to Perl 6

Jesse:
        - are you blocking on anything else?

Luke:
        - only learning my way around the new Parrot

c:
        - working on the book
        - writing a proof of concept in Perl 5 that I can port to PIR pretty
            easily
        - requires the OpenGL bindings

Jesse:
        - are those maintained?

c:
        - I have a proof of concept on my hard drive
        - I think it'll be pretty easy
        - don't need to wrap them in a nice interface as I did SDL
        - should be a quick port

Jesse:
        - Autrijus and Liz have been enumerating their desires for S17 and
            concurrency in Perl 6
        - once they feel like they have a draft they like, should they send it to
            the cabal and ask where to go from there?
        - maybe the answer will be "no, this isn't what we want!"

Allison:
        - yes, that is the right way to go

Nick:
        - I remember discussions from Perl 5 several years ago
        - someone needs to go over the proposal and see if there are portability
            problems and guarantees
        - they're talking about STM for this
        - seems like a disconnect between what Ponie wants
        - the fact that everything in Ponie goes through a vtable means that
            there's no speed hit for going through non-shared code
        - there'll probably need to be the concept of closing in Parrot
        - as soon as you start a thread, you'll have to replace the parent vtables
            with shared ones
        - this probably needs Chip
        - don't know how much Chip has thought about it yet

Allison:
        - it sounds like the right thing to do is to pass the draft around to
            everyone who's thought about threading in Perl 5

Jesse:
        - next week, the call will be at the DST time
        - 10 pm UK
        - GMT now

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.