This week on the Perl 6 mailing lists
"And here I thought you were a responsible, law-abiding citizen... :P "
-- Jonathan Lang, commenting on Larry Wall's
self.HOW does Hash
TSa wondered how typing of mixins would look in Perl 6. A code example of how it might look was included. There were also some questions on roles in Perl 6.
Responding to an earlier thread, Austin Hastings asked if Capture literals would replace or unify "assuming"/"currying".
In a previous week, Audrey Tang quoted a section of S05 concerning subrules. She found the 'quantified' clause to be unintuitive and wondered if it would be possible to modify it to produce Match objects and to reserve Array only for noncontiguous same-name subrules. Patrick R. Michaud and Flavio S. Glock made some alternate suggestions.
More recently Audrey replied to the thread, wondering if there was a
hidden cost to making
/<foo>+/ always react so that
returns something. Masak preferred the proposed semantics and asked if
the question had been discussed off-list.
Sam Vilain sent some code on Perl 6 core types as collections and asked if anyone would like to poke holes in it. TSa applauded the use of functions but wondered if it would work. Several other people followed up on that thought.
Aaron Sherman pursued a conversation which began in IRC. He listed some immutable types declared in S06 and noted that there appear to be three core attributes (Mutability, Laziness and Ordered), each of which has two states (true or false). From this he derived 8 types of containers.
Dave Whipp thought there was a fourth attribute, exclusivity. Sam Vilain felt that ordered was not an attribute of a collection.
In a recent commit, Larry Wall removed the special
[,], which is now
just a list op form of
[...]. In order to support the
| became the new disigilized
Luke Palmer replied in support of
the new syntax. TSa also approved, but would have liked the new operator
spelled. Aaron Crane thought that was undesirable because there are
already terms which begin with
/, namely regular expressions.
Brad Bowman wondered if there was a common element to a serialization
role which could be included in the default implementation.
Mark Stosberg noted that there is already a
.yaml and a
to serialize to these formats, but he did not know if they were suitable
substitutes for the role-based approach Brad had in mind. He included
a code sample. Aaron Sherman and Luke Palmer offered additional code
examples. Larry Wall commented that it makes a big difference whether
the entire string must be held in memory or not.
Audrey Tang committed a change which introduced the
$$x form in
adverbial pair parsing to S02 and canonicalized the term 'item'
in S02 and S04.
In S03, Audrey Tang noted that chained comparisons short-circuit and never evaluate arguments more than once.
Aaron Sherman wrote to suggest a signature prototype that all multis defined in or exported to the current namespace must match, as a means of implementing the paradigm of programming by contract.
Trey Harris felt that the point of multiple dispatch is that arguments are not bound to a single type, and the proposal might defeat this use, although junctive types, subsets and roles make 'single type' less of a constraint. Miroslav Silovic was bothered by the possible duplication of functionality and believed that declarative requirements should go in to roles. Many other people responded to this thread.
In addition, there was a discussion on the terminology of libraries in Perl 5 and Perl 6--'package' being the Perl 5 term, and 'module' the Perl 6 term. The definition of 'programming by contract' was also discussed.
There was also a discussion on whether 'package' implied a Perl 5 library and 'module' suggested a Perl 6 one. Larry Wall attempted to clarify.
David Brunton posted about an IRC conversation from earlier. He
listed the seven special named assertions found in S05, and the twenty-four
docs/Perl6/Overview/Rule.pod. He found another one in
t/regex/from_perl6_rules/stdrules.t. In his opinion, it was worth
creating a single place in S05 where all of these named assertions
Patrick R. Michaud disagreed with the inclusion of
<"..."> as named assertions. He stated that he would compare the
list with what PGE has implemented and report differences.
Mark A. Biggar noted that the documentation should distinguish between
pre-defined character classes and special builtins. Patrick responded
with PGE's view on what constitutes a special builtin.
Bob Rogers sent a patch to create a
Leopold Toetsch replied that separate stacks are good, but wondered
if a return stack per context was desired. Bob Rogers replied in detail
and included another patch.
Leopold Toetsch has been working on
postgres.pir and reported several
changes, including a new test file. Bob Rogers sent a patch to make it
more forgiving of an absent
libpq.so. It was applied.
In ticket [perl #40410], Jonathan Worthington reported a segmentation fault in generating a packfile for compiled PIR generated by .Net. Later he found the bug and implemented a workaround.
Leopold Toetsch referred to the recently improved smoke tests for Pugs, and wondered if it would be possible to do something similar for Parrot. Jerry Gay replied that he'd been working on a Parrot implemention.
chromatic reported that he had added details to the external API draft
PDD and welcomed comments on
François Perrad supplied a patch to make Parrot-Embed compile and run on Win32.
Leopold Toetsch wanted people to know about alternate syntax for
generating PIR calls from a compiler:
Allison Randal replied that she felt the problem was one of inconsistency. She gave a few suggestions, which Leopold Toetsch responded to. Jonathan Scott Duff also proposed a slight modification of syntax. A discussion on the syntax followed.
Allison Randal made some modifications to PDD22 to create a first release candidate of the I/O PDD.
Allison Randal posted that the single most important thing in the project is shipping a 1.0 release of Parrot, which is now very close. She called for functionality over elegant theory for the moment.
Watson Ladd asked how call and ret opcodes will interact with continuations. chromatic replied that the opcodes invoke the appropriate continuations.
Allison Randal announced that she'd committed an updated I/O PDD. She requested feedback, especially on which lightweight concurrency model to use for asynchronous operations. She also asked for a reaction on async ops returning status objects while sync ops return integer error codes.
chromatic suggested that ops could always return PMCs, and simply check the intval if required. Tim Bunce wondered if speed-sensitive ops which might be used in loops could be given the PMC to reuse.
Leopold Toetsch remarked that he did not like I/O opcodes and explained why. chromatic disagreed with one of the arguments and Leopold replied.
Joshua Hoblitt asked for more details on Allison's comment about concurrency models: was she speaking of the Parrot API, the actual implementation, or both? He felt that the implementation would need to be highly platform specific.
Will Coleda created a perlcritic tests,
which isn't run by default. It currently reports only a few rules.
He suggested that Cage Cleaners could run this test to receive a long
list of things to fix. He offered some advice on addressing the issues
which show up.
In ticket [perl #40419], Will Coleda reported that there are two PDDs numbered 07.
Allison Randal summarized a telephone conversation with Leopold Toetsch. They discussed proposals on variable-sized PMCs and a shared base class for PMC types ('Two new pdds'). In Allison's opinion, variable-sized PMCs are a step toward closing the gap between low-level PMCs and higher-level Parrot Object PMCs. She also thought there were several good ideas in the shared base class proposal. The new PMCs will be implemented first as prototypes, and assessed/rewritten without changing the existing system.
Leopold Toetsch announced two new documents in
docs/pddfs/clip as of
pddXX_cstruct.pod is the metaclass of all publically
accessible C-derived structures used in Parrot. The other,
pddXX_pmc.pod, describes the general structure of PMC internal
Jonathan Worthington replied to the commit ([svn:parrot-pdd] r14774 - in trunk: . docs/pdds/clip) to give his thoughts on Leopold's proposals.
A related thread is 'Prototyping variable-sized PMCs'.
Leopold Toetsch announced that his job will require him to reduce his Parrot commitments, but that he would continue to follow development as time permits. Allison Randal thanked him for his contributions.
Nicholas Clark replied to an older thread. He said that there are two problems to be solved, namely parsing C header files and identifying the constants, and injecting identified constants in to Parrot appropriately. Nicholas explained a little about how this is going in Perl 5.10.
Joshua Hoblitt was reminded of the question of whether anyone had looked at APR for doing portable I/O.
Karl Forner wanted to call the
elements() method on a FixedBooleanArray,
or add a custom method
get_allocated_size() to the FixedBooleanArray.pmc.
Leopold Toetsch replied with suggestions.
Allison Randal announced that Jonathan Worthington had written a draft PDD for Parrot's bytecode format, which was checked in as '[svn:parrot-pdd] r14784 - trunk/docs/pdds/clip'. Later some additional changes (based upon a conversation with Allison) were also committed.
In 'Bytecode PDD' Jonathan asked for feedback. Leopold Toetsch offered a few comments.
Ben Morrow wanted to know if pbc files could allow an optional
line so that they could be used as executables. Jonathan replied that
he had considered this, but rejected it because it is UNIX-specific.
There was additional discussion on the topic.
Allison Randal asked for a volunteer to write up the requirements for a mini transformation language to use the compiler tools. The job would involve spending time with Allison and Patrick Michaud and combining their ideas along with your own perspective. Adriano Ferreira offered some opinions on the subject, and Markus Triska volunteered to do it if it relates to his area of expertise.
In ticket [perl #40428], Paul Cochrane submitted a patch to return the names and locations of the perl script and module files within the Parrot distribution.
Paul Cochrane supplied a patch in [perl #40429] to add a test for the Perl code coda. Will Coleda rejected the patch because he'd just added the same test as a Perl::Critic policy class.
Paul Cochrane renamed the C coda test and removed Perl-specific code from the test. It was applied as r14812. The ticket for this patch is [perl #40430].
This week the long-running CGI thread splintered in to the question of how to pass a reference from a language with no references when Mark Stosberg replied to a discussion on how Perl 5 embeds in Perl 6.
Mark saw some recent Pugs commits on Perl 5 embedding, which encouraged him to experiment with passing hashes and arrays. In his tests, he was able to send an array as an arrayref, but was unable to get a hashref. He wondered if there was another way to do it. Aristotle Pagaltzis replied.
Last week, Fagyal Csongor asked if someone was willing to write a Perl 6 style guide. This led to a discussion on other resources, desired and existing. This week, Chris Dolan asked if anyone wanted to start a port of Perl::Critic.
Fagyal Csongor included some code which gave an unexpected result and
wondered if the code or Pugs was at fault.
A. Pagaltzis replied that the
xx operator is list-repeat rather
than string-repeat. Juerd also explained further, and the code was
Agent Zhang reported that the synopses on the smoke server are out of date--r12432 as compared to version r12466 on feather, which syncs every hour.
This summary was prepared using Mail::Summary::Tools, now available on CPAN.
If you appreciate Perl, consider contributing to the Perl Foundation to help support the development of Perl.
Jamie Cheetham supplied server access this week.
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, firstname.lastname@example.org.
This summary can be found in the following places: