Perl 6 Design Minutes for 08 October 2008

davorg on 2008-10-16T09:23:00

The Perl 6 design team met by phone on 08 October 2008. Larry, Allison, Patrick, Will, Jerry, Jesse, Nicholas, and chromatic attended.

Larry:

  • things are proceeding apace
  • spent most of the week either in Illinois or traveling to and from it
  • a really good conference, ACM Reflections/Projections
  • University of Illinois at Urbana-Champaign
  • 500 attendees, a wide variety of interesting speakers
  • gave two talks, good attendance
  • good hobnobbing with Al Aho too
  • think Awk, Dragon Book, regular expressions
  • he had some very good questions
  • had a great time naming the ten most influential programming languages over lunch
  • despite that, I also did a fair amount of hacking
  • wrote a little parse tree to AST transformer
  • thought it would be complicated
  • did it all pretty much with an AUTOLOAD
  • basically comes out with a typed parse tree
  • I noticed some infelicities in the AST
  • some artificial nodes, particularly in nodes
  • just a leftover from the mechanism
  • I stole an idea from Haskell then
  • the ~ macro knows about parsing something between two delimiters
  • hacked that into the specs and STD.pm
  • it seems to work now
  • cleans things up considerably, including the AST
  • allows for better error messages
  • in the talk on a derivative of APL that Morgan-Stanley uses, Q, I noticed the ability to do something missing in Perl 6
  • the ... infix operator iteratively applies a function to the tail of a list as it's generated
  • now it's trivial to implement Fibonacci
  • lots of hanging out on the mailing lists and IRC
  • keeping people feeling like they know what's going on
  • a bunch of bug fixes
  • more accurate parsing of goal-oriented constructs, such as the end of argument processing

Allison:

  • merged in the MMD branch this week
  • has been a big thing for the past longer-than-it-should-have-taken
  • a couple of issues in some languages after the merge
  • most of them will be resolved by dispatch system cleanup
  • there are two dispatch systems, PCCINVOKE and the old runops_from_c system
  • a few strange issues like results registers not existing when you try to access them
  • caused some segfaults
  • Andrew and I will try to rush through the first two items and merge that back as soon as possible
  • should resolve some issues in Rakudo
  • seems to be what's left after we fixed the other problems
  • also starting the IO milestone branch
  • talked to Simon Peyton-Jones in the UK about some of the stuff we're doing with concurrency and encapsulated dispatch CPS
  • didn't plan to meet with him, but my advisor called him over

Patrick:

  • two focuses this week
  • getting HLL type mapping to work in Parrot and PCT
  • language translators need to run in their own namespace
  • Stephen Weeks has helped out in a big way
  • should open up quite a few avenues for development and make other things easier
  • a longstanding issue was moving some of the compiler tools to Parrot's model of namespace handling
  • until now, they used a flat namespace
  • we're almost ready to merge that branch back in to trunk
  • then we can put Rakudo and Cardinal into their own HLL namespaces
  • then we can do HLL typemapping
  • an integer PMC in Parrot will map to a Perl6Int rather than an Integer PMC

Jesse:

  • I thought a discussion in Copenhagen had Allison saying that that automapping shouldn't happen

Patrick:

  • it's not cross-language type conversion
  • inside of Parrot, in PIR, if I have an Integer constant promoted into an object, what kind of object should it become?
  • that depends on the active HLL

Allison:

  • it's not really a coersion
  • "in this context, Integers autobox to this type of PMC"

Patrick:

  • each HLL gets to decide how to autobox low level types

Will:

  • is this in PCT?

Patrick:

  • yes
  • but in the process, we find places where Parrot doesn't do what we want
  • I file tickets for those
  • because of the MMD merge, Rakudo is failing 74 new tests, most of them due to the Complex PMC
  • a little regression there
  • I'm sure the problem is the IM and RE macros

Allison:

  • I'm not sure
  • in theory, it's actually dispatching to the proxy complex object within the Perl 6 complex object
  • it may be there's a problem still with Object
  • it still uses the old dispatch for subroutines within C
  • I've manually updated them to the new approach and it fixes them

Patrick:

  • I traced it in gdb
  • I get to the appropriate sub and the RE macro doesn't get the right value

Allison:

  • I'll try updating Complex to remove those and see if that does it

Jerry:

  • on my way to Portland to give a hands-on Rakudo presentation tonight
  • I may be able to get them passing by the time I arrive
  • but I can explain them away
  • we'd like to get them passing before PPW
  • it's probably time to make the spectests in Rakudo the default make test target
  • spent my week trying to get is export to work
  • found a few rabbitholes along the way
  • added the apostrophe and other identifiers to the grammar
  • added some magical $* variables based on a contribution
  • ran into a problem where namespaces aren't working properly
  • Patrick's looking at that
  • Jeff Horwitz found something similar when working on mod_perl6
  • glad to see the MMD branch merge
  • but some of the failures make it harder to see if I broke anything
  • would like to see that cleaned up in the next couple of days
  • or we'll mark those tests as TODO for PPW so that we have clean results
  • I have the next release on the 18th
  • one of my targets is to get 4500 Perl 6 tests working
  • we're at 4300 now, with the failures
  • it's a reasonable target
  • will be attending PPW

Patrick:

  • my focus for PPW is Rakudo
  • trying to get people to contribute code or test suites
  • I'll conduct sessions to walk people through the steps they need to contribute to either or both

Will:

  • moved Partcl out of the Parrot repository into its own repository
  • sent out URLs and notifications
  • that'll give me a way to target a very specific version of Parrot
  • rather than working against what's currently in HEAD
  • should give me the ability to make more progress
  • have made some, but not as much as the infrastructure changes

Jesse:

  • probably won't be here next week
  • what do people need?
  • okay, that was quiet

Patrick:

  • Larry, you mentioned that the .match method sets its caller's $/, is that correct?

Larry:

  • yes
  • it seems consistent
  • essentially an implementation routine for if you use it directly

Patrick:

  • Allison, on the calling conventions page, the :lookahead option isn't there
  • is that an oversight?

Allison:

  • it's there in a sense of "What's this going to do?"
  • do you have a ticket for what we talked about in Copenhagen?

Patrick:

  • I thought the notion of using a Capture-like object for the calling conventions is a big plus

Allison:

  • that's done
  • but not pervasive throughout the system yet

Patrick:

  • can I put a note in there "don't forget about :lookahead"?

Allison:

  • there are no details about what it should do or how
  • add to it or create and link to a ticket

Patrick:

  • the design seems okay to me
  • I'm looking more for an implementation than anything else

Nicholas:

  • p6l has gone off about rationals and floating point numbers
  • seems to have lost all basis of rationality of implementation
  • not sure that any implementor has commented on it
  • was that intentional?

Larry:

  • on my part, yes

Patrick:

  • I'll describe what Rakudo does and what the spec says, but I avoid discussions as to what Perl 6 should be doing

Larry:

  • notice the spec hasn't changed

Patrick:

  • that said, I agree with the notion that Parrot's Integer should have BigInt semantics without having to change its type
  • not that it's always a BigInt, but it could seamlessly change from the default Integer type without having to change its type

Allison:

  • that might solve our horrible problems with the overflow code

Patrick:

  • I know that Allison mentioned on IRC that morphing maybe should go away
  • it has problems with subclassing

Larry:

  • Perl 6's view is that it's always a BigInt
  • it can cheat on a faster storage format if it can

Patrick:

  • Rakudo has a similar view
  • the morphing issue...
  • Rakudo may end up with its own PMCs for everything

Allison:

  • I expected that from the start
  • one of the ways an HLL customizes the virtual machine is by providing its own PMCs
  • we ended up with a lot of PMCs for some reason

Patrick:

  • it would be nice if Parrot supported that natively

c:

  • it'd be nice to have a vtable swapping technique that let us get rid of all of those switch statements
  • it's just a table full of function pointers
  • we can avoid morphing in some cases
  • take the Key PMC for example

Allison:

  • getting rid of morphing would be nice
  • some MMD default variants that set native numbers morph Integers into Floats transparently
  • the Integer overflow code is broken
  • mostly the problem is that it's doing direct MMD rather than a vtable call
  • a vtable call would let BigInt override some of those vtable functions
  • would resolve a lot of problems there

Nicholas:

  • signed integer overflow is undefined in C
  • 64-bit Irix bit me
  • unsigned overflow is well-specified

Patrick:

  • are any of the n_* opcodes sticking around?

Allison:

  • a few
  • the ones that didn't have a funky alternate dispatch system
  • I didn't modify them because they caused test failures
  • assume they're going away
  • not and abs

Patrick:

  • and neg, or one other one too

Jerry:

  • do we need to deprecate them?

Allison:

  • we'll do that in the calling conventions cleanup
  • when I deprecated them, I think I said "all n_* ops"