This week on the Perl 6 mailing lists
"The whole point of reserving these namespaces is not to prevent users from misusing them, but to ensure that when we eventually get around to using a particular block name, and those same users start screaming about it, we can mournfully point to the passage in the original spec and silently shake our heads. ;-)"
-- Damian Conway, on POD specifications
Language
"Don't tell me what I can't do!"
Last week, Jonathan Lang initiated a long discussion by objecting to programming styles where a programmer can intentionally prevent someone else from taking what is otherwise a legitimate action. Most of the comments focused on lexically scoped pragmas and policy meta models.
This week, Trey Harris clarified what he had said earlier, describing
how the documentation of some modules assumed that use strict
and
use warnings
were not enabled, which led to difficulty understanding
which part of strict/warnings were being ignored.
Jonathan Lang wanted to know how Perl 5 regexes containing modifiers which are not present in Perl 6 could be ported. He proposed giving the Perl 5 modifier an optional argument which would provide support for the modifiers which can't be easily changed to Perl 6. Larry Wall explained how the regexes could be ported.
Synopsis 26 - Documentation [alpha draft]
Damian Conway released a draft for S26 on documentation, noting that he had almost completed a Perl 5 implementation of a parser for the Perl 6 POD format.
Jonathan Lang requested a more flexible syntax for formatting codes, and a wiki-style dialect. Damian replied that restricting delimiters to angles was a deliberate decision. The wiki-type of markup would be Kwid, which has been proposed as a standard Perldoc dialect.
Dave Whipp wanted to know if the reserved typenames would generate errors. Damian replied that the standard parser will become extremely unhappy when it encounters unknown block names.
Tim Bunce expressed his concern that this would cause problems when people using older parsers encountered newer POD. Jonathan suggested having POD declare a version. Damian thought it was best if the parser always attempted to render the document, even if it didn't understand all directives.
Brent 'Dax' Royal-Gordon asked if there could be a code to mark the title of the document, which could be used for cross-referencing. He had a few other comments. Damian asked if Brent had a letter in mind for the citation code.
Yves brought up the topic of comments within qw//
or qqw//
.
Juerd elaborated further, suggesting that #
be used, since it can already
be escaped or quoted with qqw
.
Juerd suggested that S03 be modified to make standard hypers non-recursive, and introduce a new operator which would recurse. He offered a syntax suggestion. Larry Wall replied that he felt conformancy was the real issue, and recommended reading the latest S03 changes.
[svn:perl6-synopsis] r12875 - doc/trunk/design/syn
Larry Wall committed r12875, which replaced Perl 5's s[pat][repl]
syntax
with s[pat] = "repl"
in S05.
This led Juerd to wonder why the s
was being retained, and offer
some syntax suggestions. Larry answered that there had been a decision
to keep the intent obvious.
Aaron Sherman wanted to know how embedded closures would be handled.
He asked if s:g[\W] = qq{\\{$/}};
would do what he expected, and
asked about how the Parser would define it. Larry Wall answered that
the example would work as expected: the right side is implicitly
closurized and evaluated repeatedly by the left side. He also explained
that 'quotelike forms' are situations where you can choose your own
quote characters.
In 's[pattern] = { doit } illegal, why?',
Jonathan Lang expressed concern over a limitation stemming from the
implicit curlies rule. He wanted to know if it could be changed so that
if you supply your own closure to the right, the substitution algorithm
accepts it as is. Larry Wall replied that it was possible, but that
outlawing it for the moment keeps people from converting Perl 5's
s{foo}{bar}
in to Perl 6's s{foo}={bar}
without understanding what
they are doing.
[svn:perl6-synopsis] r12933 - doc/trunk/design/syn
In r12933, Larry Wall made a change to S02 which allows quote and regex adverbs to take only parentheses as brackets.
Bytes make no sense on text strings
Juerd wondered how :bytes
for things like s///
useful. He suggested
that :bytes
on a text string should cause an exception. Larry Wall
replied that a string object can present multiple interfaces. Strings
which don't support the :bytes
abstraction will throw exceptions.
Capturing subexpression numbering example
Aaron Sherman felt that the S05 example for subpattern numbering is not adequate. He supplied a patch to give more information to the reader.
signature subtyping and role merging
TSa asked for some help on the topic of subtyping signatures in the context of deriving a type lattice from role definitions. Mark A. Biggar replied that it is safe to assume that two methods with the same name are semantically unrelated, which makes the signature merge nonsensical in a general case. Jonathan Lang agreed, requesting that no attempt be made to merge signatures. He suggested multiple dispatch instead.
[svn:perl6-synopsis] r13096 - doc/trunk/design/syn
With commit r13096, Larry Wall changed enforced backtracking from
+
to !
.
Related files were changed in '[perl #40524] [TODO] PGE - need tests for greedy backtracking '.
Parrot Porters
[svn:parrot-pdd] r14784 - trunk/docs/pdds/clip
Previously, Jonathan Worthington committed a draft of the Bytecode PDD
and received comments. Karl Forner had suggested working around the need
to specify the absolute path by using the env
command.
Jonathan replied that the suggestion was still *nix specific.
Heads up: Dynamic environment now captured in continuations
Earlier,
Bob Rogers announced that as of r14830, continuations capture the
dynamic environment in order to restore it properly on invocation.
He also noted that moving the control_stack
slot broke coroutines,
but that he suspected this was due to problems with coroutines. This
led to a discussion on the problems of coroutines in Lua.
This week, Bob and François Perrad continued the discussion. François noted two specific problems with Lua, and posted the error message. Bob suggested a workaround, and noted that he has used this in Parrot. He supplied the Parrot::Coroutine patch.
Bob also reported that he had moved the control_stack
slot in r14876.
He noted that there could still be problems with coroutines, and he is
considering deprecating Coroutine.pmc
until it can be redesigned.
Leopold Toetsch replied that he would like to see some specifications
first. Bob explained how it would be used, and Leopold replied that he
now saw the use for it, but still would like to see a proposal.
No summary provided.
The following people participated in this thread:
[perl #40455] [PATCH] Bring dotnet back into unified languages testing
Ticket [perl #40455], by Bernhard Schmalhofer, contained a patch
to extend the library search path to fix failing tests for
languages/dotnet
.
This week, Jonathan Worthington thanked everyone who had worked on getting the dotnet translator back in to unified language testing. He discussed what his needs were for working on the translator, and Will Coleda also added his suggestion that languages become more self-contained.
Bob Rogers found a ctx
member which is used for the autoclose
feature and doesn't appear to be documented. He suggested some
alternate syntax and included a patch. Leopold Toetsch reported
that Audrey Tang had wanted it, but agreed that it should be
eliminated. Bob suggested that in light of the effects the patch
had on Lua, a period of deprecation before removing ctx
might be
a good idea. There was some additional discussion.
What does 'input in flex scanner failed' really mean?
Bob Rogers reported an error he did not understand which came from
attempting to use load_bytecode
.
Leopold Toetsch replied that a test was missing to check if the
file is a directory. chromatic offered a patch.
External PMCs and GC Implications
chromatic has been working on the embedding interface and wondered what the implications are for garbage collection, given that some Parrot functions may send and receive PMCs. Leopold Toetsch answered.
chromatic submitted a patch which makes Minesweeper run again.
[perl #40472] APL test failures
Will Coleda reported that a number of tests in languages/APL
are
failing. This was noted in ticket [perl #40472].
chromatic posted some experimental OO code for the Class PMC. It did not work, and he wondered if anyone could explain why. Leopold Toetsch offered a suggestion.
C-coda and C standard patches, and other corrections
Paul Cochrane submitted a number of patches related to ensuring quality C code:
.pmc
files and add a check for the C coda test.Prolific Paul also submitted several other beauty patches this week:
// comment
comments in PMC files to /* comment */
style comments. t/tools
from the list of directories searched for PMC files[perl #40482] [PATCH] Perl::Critic policy for perl -w, and unix-specific shebang lines
In ticket [perl #40482], Paul Cochrane supplied a patch to add a
new Perl::Critic policy to check that the shebang line does not use
perl -w
instead of use warnings
, and that the shebang itself is
not *NIX-specific. He asked if all coding standards should be grouped
in a single directory.
Will Coleda replied that the coda should remain where it is, but other coding standard tests should be grouped. He also requested a small change to the patch, and pointed out where svn keywords are checked. Chris Dolan cited an instance where the patch would give a false negative. Paul and Chris discussed the example and solutions.
What are the final words on GMP, BigNums and *BooleanArrays ?????????????
Karl Forner noted that it can be difficult to contribute to Parrot because the specifications and design documents do not always contain enough information. He wanted to know what decisions had been reached on the subjects of GMP, BigNums and *BooleanArrays. Jerry Gay tried to clarify goals with regard to these topics, and apologized for slow responses. Leopold Toetsch provided some answers on *BooleanArrays.
Paul Cochrane reported an error with Configure.pl
in r14862.
Jerry Gay fixed it in r14863.
[perl #40490] Flat/Slurpy Named Parameter Passing Errors
chromatic noted some errors with named parameter passing, which he documented in ticket [perl #40490].
Null PMC access while parsing javascript
Mehmet Yavuz Selim Soyturk reported that js.pg
gives a 'Null PMC access'
error when using the compiled .pir file. Kay-Uwe Hull suggested that
it might be a garbage collection bug, and offered a workaround.
Mehmet replied that it looked like an incomplete grammar. Patrick
R. Michaud offered a temporary solution, and stated that he would examine
the grammar soon.
MakeObject - an Object Instantiation Experiment
chromatic posted some experimental code to make creating objects easier from PIR. Leopold Toetsch pointed out some related documentation.
[perl #40503] [PATCH] Removal of .imc filename change paragraph
Paul Cochrane asked some questions about .imc files in
'Questions about DEPRECATED.pod'.
Based upon Bernhard Schmalhofer's answer, Paul submitted ticket
[perl #40503], in which he proposed removing a paragraph
in DEPRECATED.pod
which mentioned .imc files.
Jerry Gay wasn't sure if this should be done, because the
most recent edition of 'Perl 6 and Parrot Essentials' still refers to .imc files. He referred the matter to Chip Salzenberg.
[perl #40511] [PATCH] Removal of deprecated fetchmethod opcode
Paul Cochrane submitted a patch to remove the deprecated fetchmethod
opcode from several places. Ticket [perl #40511] contains the
patch.
[perl #40513] [CAGE] add flex/bison files to c coding standard tests
In ticket [perl #40513], Jerry Gay asked for the cleaners to check Flex and Bison files against the C standards. Shawn H. Corey commented on the relationship between Flex and C, and Bison and C.
[svn:parrot-pdd] r14903 - in trunk: . docs/pdds/clip
Allison Randal committed an update to the threads PDD. Leopold Toetsch reminded her not to forget STM, which is implemented and solves many PMC sharing problems.
chromatic asked who was responsible for the cage cleaners. He noticed a number of patches but wasn't sure who was monitoring the efforts. Andy Lester replied that he was responsible, and asked for volunteers for the position. Hal Wigoda asked for an overview of the job description, and chromatic responded.
[perl #40219] [TODO] - Steal Perl5's sprintf tests
Patrick R. Michaud looked at why a number of sprintf tests were failing. He added skips for tests containing Perl 5 features, Parrot conversions, and modifiers the harness can't deal with. He noted the remaining tests should be fixed or marked as todo. This was part of ticket [perl #40219].
[perl #40523] [TODO] adjust string_append function and usage
Leopold Toetsch requested the removal of string_append
, in ticket
[perl #40523].
[perl #40524] [TODO] PGE - need tests for greedy backtracking
Patrick R. Michaud requested some tests for the greedy backtracking modifier. The related PGE was recently changed to reflect the change described in '[svn:perl6-synopsis] r13096 - doc/trunk/design/syn'.
Users
Ovid reported some problematic edge cases with runtime roles. He wondered what would happen if there was an instance of a class in another scope which did not want a runtime role applied, and how roles could be removed from classes. Finally, he asked if there was an error in the section on precomposed roles in S12.
Tim Bunce replied that he believed that when a role is applied at runtime, it actually creates a new anonymous subclass, leaving the original class unaffected. Audrey Tang agreed, and added an example. Ovid asked if the Moose documentation was accurate for Perl 6. Audrey answered that Moose is currently the metaobject layer when the VM which runs Perl 6 is Perl 5.
The thread was also discussed in 'Runtime role issues'. There, TSa suggested an intermediate class for applying a role and questioned whether roles should be removed. Aaron Sherman thought that typically the objects rather than the classes needed to be changed. There were further comments.
Acknowlegements
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.
Thanks to Yuval Kogman for his help.
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
Yves brought up the topic of comments within qw// or qqw//. Juerd elaborated further, suggesting that # be used, since it can already be escaped or quoted with qqw.
Re:Other way around
kudra on 2006-10-16T18:11:54
Sorry for the error, and thank you for correcting me.Re:Other way around
Juerd on 2006-10-17T08:35:15
Thank you for summarizing everything in the first place. Your work is excellent!