This week on the Perl 6 mailing lists
This summary has been posted early because I will be going to OSCON Europe on Sunday. Next week's summary will include any threads which were not included this week.
Mark Stosberg wanted the specifications to address what should happen
in MMD when optional arguments are present (S12). He patched
mmd-draft.txt and sent the text to the newsgroup. Luke Palmer
offered a suggestion.
Ph. Marek wondered if there will be MMD based on the value of parameters, as in Haskell. Audrey Tang confirmed this and pointed to S06. Trey Harris updated it with a reference to S12. Ruud H.G. van Tol also offered an example of syntax.
This week, Larry Wall clarified further, noting that every scalar value is a one-element subset of its type.
Mark Stosberg was unable to find the formal definitions for
true. Later he found them, and was able to add smart links.
Audrey Tang noted that S03 was inconsistent about the treatment of assignment operators in the reduction operator. Audrey further commented that she doesn't see a problem with supporting assignment reductions as a syntactic exception. Larry Wall replied that it was worth supporting.
Steve Lukas quoted S04: "If you declare a lexical twice in the same
scope, it is the same lexical." He felt that declaring the same lexical
should give an error, because when he does this, he's made a mistake.
Rick Delaney disagreed; for development or debugging he will often add
a second declaration line to temporarily override the first.
Juerd agreed with Steve. He appreciates that
my $foo always gives
a new variable, so he does not need to know anything about the surrounding
code. Carl Mäsak also wanted the compiler to catch second declarations.
Mark J. Reed noted that according to S05, the string method equivalent of
subst. He felt it might be easily confused with
A long discussion on how the method would actually work followed.
Recently, Larry Wall noted that he should clarify the role of
with regard to preceding declarators. They control how often the
expression is evaluated.
David Brunton noted that S12 specifies
$obj.META, but in Pugs it is
$obj.meta. He wanted to know if he could change
META. Larry Wall replied that he was considering renaming the
method to use interrogative pronouns. David Green commented on Larry's
proposed names, and Larry responded.
Sam Vilain wondered if upper case was needed. Jonathan Scott Duff thought that it fit in with Perl's culture. Aaron Sherman had some other suggestions for avoiding namespace pollution.
David Brunton wanted to know if there was some reason that the meta methods could not be part of a default function package. Aaron Sherman gave two reasons why this was not desirable.
Gaal Yahas wondered if
:(:$x) was a single named parameter called $x
or a default invocant and a single required positional named $x.
Audrey Tang replied that a default invocant would not make sense
because there is nothing to default to. Gaal then wondered what
invocant is constructed for
method foo ($just_a_named_param). Larry
Wall replied, and Mark Stosberg also commented. Audrey answered too.
Larry Wall made a commit to S03, which led Ruud H.G. van Tol
to ask if
[=] $x, @y was equivalent to
$x = @y = @y = @y ... @y[-2] = y[-1]. Larry replied
that they were. Ruud asked for additional clarification.
Gaal Yahas asked for some clarification on the intent in S06's "Unpacking
tree node parameters" so that he could introduce the optional use of the
colon more gradually.
This week, Audrey Tang replied with answers to Gaal's questions.
Several threads grew from Larry Wall's commits on the
Darren Duncan expressed his appreciation for it.
Miroslav Silovic asked if it would be possible
next to pass arguments to the 'nexted' iterator.
In thread [svn:perl6-synopsis] r11971 - doc/trunk/design/syn, Daniel Hulme requested a variant which does the diagonal order.
[svn:perl6-synopsis] r11975 - doc/trunk/design/syn led to
additional comments. Carl Mäsak wanted to know why
X already concatenates strings. Daniel Hulme
thought it was an incomplete change which should have read
XX. Carl agreed, but thought
X,X would be nicer.
Aaron Sherman wondered if it would be possible to treat named parameters
as lvalues, so that
foo(:a<1>, :b<2>) could become
Aaron Sherman raised ambiguity issues between identifiers with dashes in their
names, like the file test operators, and unary minus (-4). Juerd replied with
proposals for phasing out
-e and friends in favour of some more
flexible/modern approaches. Larry Wall cleared up the syntax for calling
prefix operators as methods, and other funny method names.
Acording to S05, due to the longest token rule
-e will be parsed as the prefix
-e, and not as prefix unary minus and call to
e. However, this is only
the case if the prefix operator
-e is actually defined.
A discussion on identifiers with funny characters in them also started under this thread.
Will Coleda announced that he had added a JSON compiler with help from Jerry Gay and Nuno Carvalho.
Leopold Toetsch announced that he'd created a Parrot-based slide presentation program. He requested improvements and suggestions.
Fonseka created ticket [perl #40316] to include a patch for a script which outputs the opcodes not covered by tests. Currently all but 7% of the opcodes are used in real tests.
The thread continued in Re: [perl #40316] [NEW] opcodes not tested script, after the code was committed as r14594. Leopold Toetsch commented on how disassemble was largely untested, and Fonseka replied.
In ticket [perl #40319], Nuno Carvalho reported that he
t/compilers/pge/06-grammar.t and included a
patch. Patrick R. Michaud noted that test 10 was marked 'todo'
but passed, and wanted to know why it was marked 'todo'. Patrick
applied it as r14606 and r14607.
has been trying to improve
compilers/imcc to make it reentrant
by removing globals and creating an object with the variables which
is relevant to the parser. He noted that an Interp structure is
being passed, but believes this does not duplicate the functionality
he is creating, and asked for a confirmation.
Ron Blaschke reported a fatal error when linking
Windows XP with Visual C++. Will Coleda applied the patch as r14586
and asked for someone using GCC on Win32 to confirm that the code still
chromatic posted a link to thoughts on method dispatch by Piers Cawley and Avi Bryant. He wondered if it was similar to PIC. Andy Armstrong replied that the articles describe branch prediction for method dispatch, which he felt was different from PIC. Leopold Toetsch thought there were some similarities, and that further optimization was possible.
Karl Forner included a patch to revise
to address some bugs and improve speed. The algorithm was explained
in detail. It was applied as r14621. Leopold Toetsch commented on
Karl Forner is working on [perl #40064]. He is wondering how
he can run the script with options, and wanted to know if
would be an appropriate choice. Leopold Toetsch suggested subclassing
requested that anyone who found a global variable under
parser add a 'HITME!' comment near it and alert him.
wanted to know if
imcc.y had the same meaning
as the one in
imc.h. He wanted to merge them.
Leopold Toetsch noted that GMP 4.1.1 segfaulted during multiplication. He corrected the problem by compiling and installing a new GMP, but he would like to create a diagnostic to warn about the bad GMP version.
Darren Duncan made the suggestion that CGI.pm be improved for Perl 6 rather than simply ported. He listed a few ways in which it could be improved. Mark Stosberg replied and mentioned some of the points he considered most important. These suggestions in particular received further discussion: removing HTML generation methods, renaming the module, and incorporating session management.
Trey Harris agreed with Mark's sentiment
about excluding HTML methods from CGI.pm, but felt this could lead to
limited Perl 6 adoption. Thomas Wittek suggested
for legacy support and allowing CGI.pm to develop. Amir E. Aharoni
was also in favor of the backwards-compatibility module, and an improved
default. David Cantrell wondered if anyone was actually using HTML-generation.
In Andy Dougherty's opinion, there are probably many people using
it that way, because it features heavily in the documentation.
Leon Timmermans admitted to using them a few times, and wanted
a modern equivalent, but in a separate module. There were a number
of other comments. The general gist seemed to be that HTML-generation
functionality is used and should still be available, but optional.
The discussion of HTML methods led to Steffen Schwigon's observation that CGI.pm could use a name change to make it appear more modern. Darren Duncan and Juerd also disliked the current name. David Cantrell and Darren discussed whether 'CGI' implies an implementation or a standard interface.
In CGI Session management (was Re: the CGI.pm in Perl 6), Michael Snoyman suggested making session management easier, and perhaps integrating it. Yuval Kogman requested that session handling be left to a plugin, and offered to share what he had learned from redesigning the Catalyst session handling.
Richard Hainsworth has been trying to discover how to use Perl 5 modules in Perl 6. He included some code which worked in Perl 5, and asked how he could use them in Pugs. Trey Harris replied that imports currently don't work, and showed a workaround. Audrey Tang answered that imports were implemented a few weeks ago, but implicit imports aren't supported yet.
Richard also wanted to know where
.can is documented.
Conrad Schneiker noticed that Google had indexed the Perl 6 Wiki but that it hasn't yet reached the top search results.
Zack Hobson found a problem with the port number reported in startup by HTTP::Server::Simple in Pugs if the default port is used, and included a patch, which Carl Mäsak applied.
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.
Yuval Kogman assisted with this summary.
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, email@example.com.
This summary can be found in the following places: