Perl 6 summary, 26 Nov - 3 Dec, 2006

kudra on 2006-12-03T14:30:00

This week on the Perl 6 mailing lists

"... On the sixth day of Chritmas my true love sent to me,
Six versions of Perl,
FIVE LANGUAGES COMPILING!
Four bytes of bytecode,
Three POST nodes,
Two ASTs,
And a Partridge with a parse tree."

-- Jonathan Worthington, 'Naming PAST-pm compiler tool chain'

Language

Smart Matching clarification

Earlier, Jonathan Lang inquired about the matching operator for hash keys had changed. This led to a discussion about Sets, Seqs and Bags.

This week, in the subthread 'Set-returning .keys', Darren Duncan clarified his views, stating that while he saw Bags as a superset of Sets, he did not mean to suggest that their implementations should be related. TSa suggested that in a hypothetical inheritance structure, Set would be the main type and Bag would extend it. Ruud H.G. van Tol disagreed, stating that Set is more complex to modify than Bag.

Some discussion of the appropriate return values and operations also came up. For example, Darren proposed that a union of two sets would return a Set, and that Set operations should be terse as they would be common.

The thread 'beg for Bag' followed from this discussion.

implementation for subset types

Last week, TSa wanted to propose an addition to the subset type definitions, namely an implementation body like classes and roles. A rectangle example from an earlier thread was included. Jonathan Lang replied with an alternate code example.

This week, TSa responded to Jonathan's post, wondering how a general polygon would become an instance of an anonymous class once it was modified to become a rectangle. The purpose of the proposal was clarified as providing a means to attach methods to subset types.

beg for Bag

TSa started this new thread from the discussion in 'Smart Matching clarification'. He proposed the addition of a Bag type which completes the set of immutable types. Smylers wondered how this would differ from the Bag which is mentioned in Synopsis 3. Darren Duncan replied that while Bag is mentioned in examples, it is not included in the list of built-in types in Synopsis 6.

An exchange between Tsa and Jonathan Lang on the set operations of Seq was also part of this thread.

[svn:perl6-synopsis] r13483 - doc/trunk/design/syn

In this patch, Larry Wall distinguished Set and Bag values from KeySet and KeyBag containers, which made several people rather happy.

Interrogating closures

Yuval Kogman wrote in praise of the partial unification of objects and code references, and closures in general. He proposed allowing closures to declare that captured variables are an instance, and provided a code example. The purpose would be to give the option of inspecting what a closure is encapsulating.

Larry Wall replied that he would look for a declarative solution rather than a callback, which would mean the closure could have a declarator which explicitly captures a lexical and makes it available as an attribute. Yuval responded that the have syntax proposed by Larry looked nice.

Parrot Porters

[perl #40729] [TODO] Tcl - implement [file extension]

Nuno Carvalho responded to ticket [perl #40729] with a patch which implements the first version of file extensions for Tcl.

RFC: Proposal for dynamic binding

This thread was started by Bob Roger's proposal for dynamic binding. He compared two options, and later gave an analysis of a third (STM) at Leopold Toetsch's request.

This week, Allison Randal responded to the proposal with the question of why dynamic binding should only apply to globals. She stated that the proposed implementation was not being approved, but noted that one of Bob's ideas concerning threads was of particular interest and likely to be included at some point. Bob replied in depth to the points she raised and asked if he could improve the proposal or if he should give it up.

[perl #40978] [PATCH] Clean up parts of the MMD system

Ticket [perl #40978] contains a patch from Matt Diephouse to clean up portions of the MMD system. chromatic replied that the patch worked for him.

[perl #40990] [BUG] Parrot segfaults in perl6 08-regex.t (GC/pointer bug?)

Patrick R. Michaud reported a segfault in ticket [perl #40990]. The problem appears in r15837 and happens when the -G flag is not present. Later he reported a second problem as ticket [perl #41035].

[perl #39826] [CAGE] convert C<perl -w> to C<use warnings;>

Paul Cochrane replied to ticket [perl #39826] to report that a Perl::Critic policy has been added which requires use warnings in place of -w.

Naming PAST-pm compiler tool chain

Allison Randal proposed the name 'Partridge' for the PAST-pm compiler tool chain. Jonathan Worthington poetically agreed with the name.

[perl #40991] [PATCH] PAST-pm: Unnecessary dummy 'root' rule in POST transformation

Allison Randal submitted a patch which removes a dummy 'root' rule from PAST.pm's transformation grammar. It was ticket [perl #40991].

Initial feedback on PAST-pm, or Partridge

Allison Randal initiated a discussion on Partridge (PAST-pm) with a post of her comments on user experience and implementation.

Patrick R. Michaud noted that Partridge should not be considered complete, so many of the missing items Allison noted are things which simply haven't been implemented yet. He also added a more detailed response to her specific points.

Several sub-threads developed. One involved the standardization of compiler tools, for example the question of whether each language subclass of HLLCompiler should override the compile method. Some changes were committed as r15882, which Allison liked. She added a patch to keep strict boundaries and makes it possible to override the grammar. There was a discussion on giving each stage a compiler, which both Patrick and Allison wanted. However, Allison wanted each stage to act independently, with only the HLLCompiler controlling the order of the steps.

In another sub-thread, Allison responded to comments concerning types, layers of abstraction and tracking information as part of the compilation process. She was quite satisfied with the work which has been done so far, but had a few more thoughts.

Another response dealt with the remaining points. Leopold Toetsch also joined in, noting that the discussion of Parrot limitations related to :init methods had come up previously.

Finally, Patrick asked which constructs in Punie weren't working yet. Allison responded, and Patrick replied that he was going to be refactoring the HLLCompiler soon.

[perl #40998] [PATCH] Fix build error on Win32

Nikolay Ananiev reported that if the build directory contains spaces the build process fails. A patch was submitted as ticket [perl #40998]. Ron Blaschke proposed escaping or quoting the paths instead. Nikolay Ananiev replied that quotes would require refactoring some of the scripts in the build tree. He submitted a revised patch which only adds a short path if a space exists.

[perl #40999] Latest version of parrot doesn't make test

In ticket [perl #40999], Bob Wilkinson reported that the latest version of Parrot did not pass make test. He included the errors. Patrick R. Michaud gave some suggestions on how to fix the problem, which may be related to an earlier installation of Parrot.

[perl #41000] Can't compile simple parrot example with latest stable parrot

Bob Wilkinson reported that he could not compile an example with the latest stable Parrot. This was noted in ticket [perl #41000]. Patrick R. Michaud replied that he thought the example was out-of-date. Matt Diephouse agreed that the example needed to be updated. This was made into a cage task and fixed.

[perl #41014] [PATCH] Autobox Native Types for MultiSubs

Matt Diephouse created ticket [perl #41014] to address bug ticket [perl #40968]. He decided to match native types using their autoboxed PMC types rather than change _ to mean any PMC in a :multi signature.

Leopold Toetsch replied that he felt that this was not the best choice because it prevented native type optimizations. Patrick R. Michaud agreed with Leopold, but felt that in the short term the patch was better than the current situation. There was some discussion concerning an example of how this would be a problem.

The issue was resolved with r15910.

Interesting post on concurrency models

Allison Randal posted a link to a post on concurrency models.

[perl #41020] [PATCH] pmc2c.pl functionality extracted into separate package

In ticket [perl #41020], James Keenan supplied a patch to make pmc2c.pl easier to test. This involved putting most of the subroutines in a new package.

[perl #40815] Summary of 'make test' failures on Darwin

Earlier, in ticket [perl #40815], James Keenan sent a summary of Parrot test
failures on Darwin. Steve Peters reported that one of the problems had
been fixed in r40818.

This week, James noted that the problem persists. Andy Bach suggested that the problem might have to do with the compiler version. chromatic found it odd that Configure is using g++ as the linker and cc as the compiler. Nicholas Clark replied that this was due to ICU.

[perl #41020] [PATCH] pmc2c.pl functionality extracted into separate package

James Keenan reported in ticket [perl #41020] that he had fixed problems with GetOptions. This led to a discussion of the problems he had with compilation, and a question of what tests on build tools were meant to accomplish.

[perl #41021] [NEW] Parrot::Pmc2c::Utils and t/tools/pmc2cutils/*.t

James Keenan sent in 8 new files in a patch as ticket [perl #41021]. These were created as a result of refactoring pmc2c.pl to make it easier to test.

Acknowlegements

This summary was prepared using Mail::Summary::Tools, available on CPAN.

If you appreciate Perl, consider contributing to the Perl Foundation to help support the development of Perl.

Thank you to everyone who has pointed out mistakes and offered suggestions for improving this series. Comments on this summary can be sent to Ann Barcomb, kudra@domaintje.com.

Distribution

This summary can be found in the following places:

See Also