Perl 6 summary, 15-21 October, 2006

kudra on 2006-10-22T12:51:00

This week on the Perl 6 mailing lists

"The | notation is mentioned in S012:1029, by the way. Obviously you still haven't quite memorized all the synopses. :-)"

-- Larry Wall, in 'class interface of roles'

Corrections

Last week I mistakenly wrote that Juerd suggested using # for comments in qw// and qqw//, when in fact he suggested integrating it with qqw// and not qw//, because qqw// has generic quoting options.

Language

class interface of roles

This long-running thread continued. Previous highlights included discussion on how a role can require a target class to implement a method or do another role, and whether there is a use for forbidding the implementation of methods.

This week, Jonathan Lang and TSa discussed various ways of controlling dispatch rules, and agreed upon some terminology to assist the discussion.

Meanwhile, Jonathan and TSa talked about the distinction between mixins and roles. Larry Wall offered some clarification, which led to a discussion on the | notation. This eventually morphed in to a thread about
the syntax for unordered composition.

"Don't tell me what I can't do!"

Two weeks ago, Jonathan Lang initiated a discussion on programming styles which allow a programmer to prevent another person from taking an otherwise legitimate action. The discussion moved on to lexically scoped pragmas and policy meta models.

This week Smylers wondered how it is possible for a module to require undeclared package variables, and asked Trey Harris for an example of a module with undeclared symbolic references.

Synopsis 26 - Documentation [alpha draft]

Last week, Damian Conway released a draft for S26 on documentation. Some people expressed opinions on it.

This week, Smylers stated that he thought the only standard XML entities are <, > and &. Defining further entities is allowed; for example, this is what HTML does. Danny Brian responded by expanding the list of default entities to include ' and ". Damian Conway corrected the document accordingly.

Edge case: incongruent roles

Jonathan Lang initiated a discussion on collisions which might occur from creating a class which inherits from two classes with unrelated concepts which happen to share a method name. Trey Harris thought that the combination of multiple inheritance, multiple dispatch, traits and DBC offered a more sophisticated way to resolve conflicts than dispatch by name. Jonathan agreed that was how it should work, but was not convinced it worked that way in practice. Larry Wall suggested that S12 might resolve the issue, but Jonathan explained that it did not cover the case he was trying to express. Larry elaborated on the documentation.

Meanwhile, TSa launched a subthread containing an example with numbers. There was further discussion on numeric comparisons in this context.

The thread spawned 'set operations for roles'.

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

Larry Wall made a commit to S05, noting that the new regex syntax defines word boundaries in terms of \w, not \s.

set operations for roles

Jonathan Lang replied to a comment in the thread 'Edge case: incongruent roles'. The discussion involved the syntax for ordered and unordered composition. He proposed some syntax. TSa and Jonathan discussed possibilities, and Larry Wall added his thoughts.

Interrogative statements

Jonathan Lang suggested that $expression?; should have the same meaning as $_ = $expression. He wondered if Perl 6 makes this possible, or if the parser would need to be modified. Juerd replied that it was possible if you modified the Perl 6 grammar.

Threads, magic?

Relipuj wondered how threaded data collection could be accomplished in Perl 6, citing an example of how it is done in Python.

Parrot Porters

[TODO] :init attribute

In the thread 'Implement .loadlib pragma in IMCC', dating to July, Patrick R. Michaud summarized the issue of :init pragmas for subs as discussed in a recent #parrotsketch meeting. Ticket [perl #39926] relates to the task. In addition to giving a status report on :init, Patrick invited people to contribute tests and code to help create :init.

Meanwhile, Leopold Toetsch replied to Kevin Tew's patch attempt in 'sub :init implementation', commenting on the use of the flag PBC_POSTCOMP, which he described as an unfortunate choice. He made some alternate proposals. Kevin thanked Leopold, and asked for a summary of how flags are used, which Leopold provided.

Parrot::Coroutine

The discussion which began as a notification from Bob Rogers on continuations continued with the thread concerning problems with coroutines. Last week, Leopold Toetsch requested a description from Bob on his proposal for rewriting coroutines.

This week, François Perrad reported that as of r14936, he has removed the LuaThread PMC so that it does not depend upon coroutines.

Leopold issued a reminder about making namespaces useful.

[perl #40509] [NEW] Line endings test

In ticket [perl #40509], Paul Cochrane reported that this patch is superceeded by one attached to ticket [perl #40544].

sprintf() Checkins #14922-14924 Break Linux/PPC Tests

chromatic reported a series of failing tests. Leopold Toetsch reported that it was fixed in r14926. The problem involved formatting a long long with '%ld', which does not work on all systems. He suggested some solutions in case the current '%lld' breaks other compilers.

sprintf 64 test

Leopold Toetsch noted that he is getting different results from Perl 5 and libc when using printf/sprintf. He wondered if it was a problem with his test. Sadahiro Tomoyuki replied with some information about the specification, and another test case where Perl 5 gives unexpected results. A patch to correct the situation was applied as r29025.

Re: [perl #40543] [NEW] Test for space after curly braces

Paul Cochrane created ticket [perl #40543] to deliver a patch to test for extra whitespace after a curly brace at the end of the line. chromatic wondered why this should only apply to curly braces and not extra whitespace at the end of any line, and Jerry Gay agreed. Jerry included vim settings to assist in finding trailing whitespace. Other people also expressed their dislike of excessive whitespace.

Jerry asked that the test be rewritten to involve just one test, instead of around 700. He also wanted it expanded to cover Perl files, and listed some other candidates for the check. Will Coleda disagreed, because perlcritic tests address this for Perl files.

[perl #40545] [PATCH] Addition of tests to Parrot::Distribution tests

Paul Cochrane supplied a patch in ticket [perl #40545]. The patch adds tests for yacc, lex and pmc files, and also fixes a test which was giving a false positive.

configure bug

Kevin Tew reported a problem with generating makefiles in step gen::makefiles.

Re: [perl #40559] AutoReply: $FindBin::Bin has a trailing / in scripts on Perl 5.8.3

Kevin Tew submitted a patch in ticket [perl #40559]. This patch solves a problem which was preventing gen::makefiles from running. Jerry Gay advised committing the patch.

Coding Standard Questions

Kevin Tew listed a few things he encountered in Parrot internals which he did not like but which are not against the current coding standards. He wondered if they are acceptable style. One of the issues had been addressed in PDD07. There was some discussion on the other points. Andy Lester begged for an end to the discussion, asking everyone to follow whatever is in the PDD. Kevin noted earlier that he was not trying to start a war, but to get a ruling on issues which are not currently in the specifications.

[QUESTION] PMC Pre-allocation

Karl Forner asked if there was a way to specify the minimum allocation size for PMCs. Leopold Toetsch replied that the issue had come up a number of times. He explained the history behind it, and offered suggestions for resolving the legacy confusion.

PMCs exact allocated size

Karl Forner noted that it would be useful to know the exact amount of memory a PMC is using.

[perl #40560] [PATCH] minor languages/regex/lib/Regex/Grammar.y fix

In ticket [perl #40560], Paul Cochrane provided a patch to make regex/lib/Regex/Grammar.y pass t/codingstd/cppcomments.t.

[perl #40562] [TODO] add 'list policies' option to t/op/perlcritic.t

Jerry Gay created ticket [perl #40562] to suggest adding a command-line option to perlcritic tests which would display a list of policies.

requirements gathering on mini transformation language

Earlier, Allison Randal asked for a volunteer to write up the requirements for a mini transformation language to use the compiler tools.

This week, Markus Triska linked to a section of Stefan Karl's master's thesis on the implementation a rule-based peep-hole optimizer which Markus felt might relate to the current discussion.

[perl #40564] [TODO] fix perlcritic Subroutines::RequireFinalReturn policy

In ticket [perl #40564], Jerry Gay requested that the perlcritic policy be changed to ignore subroutines which exit or die when checking for explicit return statements. Chris Dolan replied that it was fixed in Perl::Critic r737, which will be included in the next release of Perl::Critic.

[PATCH] today's build failed because of a missing 'use'

Karl Forner reported that his Parrot build failed due to a missing use File::Spec. He included a patch, which Kevin Tew applied.

classnames and HLL namespaces -- help!

Patrick R. Michaud wrote of his confusion on how to deal with classname conflicts when multiple HLL namespaces are involved, now that PDD21 has changed. Matt Diephouse, Allison Randal, Leopold Toetsch and Will Coleda joined the thread. The conclusion seemed to be that namespace pollution still needs to be resolved and the object model is due for discussion as well.

[HOWTO] add a C file to get archived in libparrot.a

Karl Forner asked what he needed to do to have his .o file added in libparrot.a.

Users

[ANNOUNCE] Pugs 6.2.13 released!

Audrey Tang announced the release of Pugs 6.2.13. Her message detailed the many changes which have been made in the last four months.

Embedded perl5 modules

Richard Hainsworth has been trying to test GUI Perl 5 modules in Pugs 6.13. He showed an example of how he modified his code, and the error it returned. Steffen Schwigon had a suggestion on how to correct the Perl 6 code.

Compiler

[patch] no strict for -e scripts

Sean O'Rourke submitted a patch to remove strict 'vars' for -e scripts. Gaal Yahas reported that they will continue transitioning to the new AST, which will allow lexical pragmas.

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


Hi.

nigelvrm on 2006-11-16T20:20:42

Hi. I'm new here And I see that PERL is a thriving community. People help each other a lot here. No braggarts so far. I'm into just recently and I'm wondering where I should start if I am to learn Thanks for the info! Kepp up the good work!