Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Perl 6 summary for 17-23 September, 2006

Journal written by kudra (4364) and posted by kudra on 2006.09.24 9:14   Printer-friendly
This week on the Perl 6 mailing lists

"my Yellow sub marine { }"

-- Larry Wall, concluding a series of Beatles references in the grep thread.


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

Larry Wall committed a change stating that the filetest operators return a stat buffer object, that can be repeatedly used for more file tests, and also overloads boolean context for the test that created it.

This eliminates the need for the -X _ form in Perl 5, used to eliminate additional calls to stat.

class attr set defs as their names

Darren Duncan asked if two class meta objects eqving one another implies type equality. Nobody seemed to have any view on the subject.

request for addition to administrative field to Synopsis

Mark Stosberg had a comment on the specification for smart linking. He offered a suggestion to make the documentation more useful to users.

Renaming grep

Darren Duncan suggested renaming grep to where in order to phase out UNIX lingo from Perl. Many people also suggested filter, and it was noted by Damian Conway that this is in fact the de facto standard for modern languages (like Haskell and Python). select and reject were also proposed at which point a list parting construct with arbitrary buckets was also proposed.

The end result was the introduction of the classify built-in by Damian. This function generalizes various other list filtering and parting semantics.

There was also a discussion on aliases and homonyms, under the umbrella of keeping grep as a backwards compatibility alias.

Subsequently, Trey Harris' suggestion for using junctions and ~~ was discussed in a different thread.

class interface of roles

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.

Threads and types

Aaron Sherman asked whether or not the type system and the meta model is shared between threads, especially in the light of a shared variable of a certain type.

call, call(), .call, and captures

Trey Harris pointed out that there are three types of 'call' as expressed in S06 and S12. He would like to see the syntax normalized to avoid confusion. Aaron Sherman and Markus Laire added some comments. Larry Wall wanted to avoid using related names for unrelated concepts. He thought that perhaps three different names (call, callargs and callcap) would help clarify the situation. Aaron Sherman liked the idea.

Capture sigil

Larry Wall announced that Captures will now have their own sigil, allowing captures stored in scalars to be "interpolated" into argument lists without using the [,] =$capture form. It was eventually decided that | will perform this role. The resultant syntax is:

my $foo = \(:foo(4), $blah); gorch(|$foo);

which is analogous to:

my $foo = «bar gorch»; my @array = ( "foo", @$foo

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

Larry Wall committed a change to S02 concerning the | sigil and operator. Aaron Sherman requested an update to S03's 'Junctive operators' to resolve the ambiguity of a|$b, a | $b, and a |$b. Larry attempted to clarify. Mark J. Reed noted that this implies that subroutines without arguments will be rare, but methods without them will be commonplace, introducing the same ambiguity with $o.a%$b and other similar-looking expressions. Larry replied that a method does not take arguments without : or ().

Aaron commented on Larry's statement that bare constants are being discouraged in favor of sigiled constants by asking if pi and e should become $pi (or ) and $e.

Dumb list-flattening question.

Mark J. Reed wanted to know how to create a two element list out of two arrays, which in Perl 5 would be (\@a, \@b). If the syntax is the same, he wanted to know what the \ mechanism is called, since references are automagical. Juerd replied that they are captures. Aaron Sherman elaborated Juerd's answer by referencing S03. Mark J. Reed suggested mentioning captures to prevent list flattening in S09. Mark Stosberg felt that the specification for \ was unclear.

Capture Literals

Jonathan Lang asked how he could construct a capture literal which has both an invocant and at least one positional argument, and how it would be distinguished from a capture literal which has no invocant and at least two positional arguments. He offered some example code, which, according to Larry Wall, was correct aside from a syntax error.

Motivation for /<alpha>+/ set Array not Match?

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.

Parrot Porters

HOWTO give options to parrot in tests

Last week, Karl Forner posted that he is working on [perl #40064]. He was wondering how he could run the script with options, and wanted to know if TEST_PROG_ARGS would be an appropriate choice. Leopold Toetsch suggested subclassing Parrot::Test.

Karl noted that if he subclasses Parrot::Test he won't be able to reuse the code. Leopold replied that there are already test classes in lib/Parrot/Test/*.pm.

gmp_version undeclared

David Romano reported that his Parrot build failed due to the gmp_version being undeclared. He included a patch for people who don't have GMP installed. Alberto Simões noted it was fixed in r14636.

pcre tests

David Romano reported that two tests which depend on PCRE failed when PCRE is not installed. The code which checks for PCRE does not work. David included a patch to fix this.

RFC: Consolidate stack-unwinding code

Bob Rogers refactored Parrot's stack unwinding code, consolidating it's various incarnations into the continuation invocation. Leopold Toetsch answered some of Bob's questions. Larry Wall clarified Perl 6's requirements of Parrot's continuation handling.

Matt Diephouse commented that this change broke Tcl's uplevel, and helped Bob to test a quick fix that preceded a real fix.

[perl #40349] [PATCH] #40278: [CAGE] perl coding standards coda.

Paul Cochrane sent a patch to try to close ticket [perl #40349], which was related to [perl #40278] and concerned coding style.

[perl #40360] [PATCH] implement loadlib(NULL)

Dmitry Karasik sent a patch in [perl #40360], which was applied as revision r14670.

Re: [perl #40361] [PATCH] #40278 [CAGE] perl coding standards coda. (cont.)

Paul Cochrane supplied a patch for bringing various files in the Parrot repository up to the coding standards. Jerry Gay noted some problems with the change, which Paul corrected. This was eventually added to RT as [perl #40364].

#parrotsketch logs: 19SEP06

Jerry Gay posted the URL of latest #ParrotSketch log.

[perl #40367] [TODO] SDL tests

In ticket [perl #40367], Leopold Toetsch requested tests for configuration, all SDL classes and interfaces, tests of full-fledged examples, and eventually tests for the GUI.

[perl #40370] [PATCH] code_coda.t update

Paul Cochrane submitted a number of patches to add the required emacs and vim coda as requested in [perl #40279].

[perl #40379] [TODO] investigate use of tools/dev/

In ticket [perl #40379], Jerry Gay requested an investigation in to tool/dev/ because makefile it calls is not platform-independent. Leopold Toetsch explained the purpose behind the file.

[perl #40380] [PATCH] errors on 'make install' - src/pdb.c

In ticket [perl #40380], Herbert Poul reported a failure with make install. He included a patch.

[DONE] shootout example testing

Karl Forner included a patch to test the shootout PIR programs in examples/shootout.pir, which was applied as r14684.

[perl #40392] [CAGE] convert C<internal_exception> to C<real_exception>

In ticket [perl #40392], Jerry Gay requested that instances of internal_exception be replaced with real_exception. Bob Rogers pointed out that in many instances, internal_exception might be needed because real_exception requires a working control stack.

[perl #40394] [PATCH] Added a test for multiple codas to t/codingstd/code_coda.t

Paul Cochrane sent a patch as ticket [perl #40394]. The patch includes tests for multiply-defined codas. Jerry Gay modified it slightly and applied it as r14686.

[perl #40402] Remove src/ops/dotgnu.ops

Bernhard Schmalhofer wondered in ticket [perl #40402] if he could remove dotgnu.ops which was a conversion file for C# which now appears obsolete. Jonathan Worthington suggested removing it, and Leopold Toetsch pointed to his generic answer on the subject.


the in Perl 6

Last week, a number of posts were devoted to discussing the merits of refactoring and renaming for Perl 6. Removing HTML generation methods from the core module, renaming CGI, and the relationship between and session management received the most type. This week, the thread continued.

Once again, several people expressed the opinion that HTML generation could be included in a separate module which worked well with the parameter gathering, but the view that these are integrated tasks was also expressed. Mark Stosberg suggested that people who have concrete ideas about the API should create a wiki page. This would allow the design to be developed by many people and understood by those with less API design experience.

Mark also pointed out that the suggestion of use perl5:CGI might not work well in practice, as currently it is not clearly defined how to pass information to Perl 5. This led to a side discussion on how Perl 5 embedding should work. Mark created a wiki page to summarize expectations about Perl 5 embedding.

Meanwhile, Juerd suggested that the param method should be replaced with two hashes, get and post. A. Pagaltzis thought that the beauty of the param method is that it lets you treat input as single- or multi-valued at your own discretion. The topic continued, with a detour to cover the correct syntax for my @bar = $q.param<bar>[];.

Another topic was concerned with the default encoding. An argument was made for it being UTF-8, and another person preferred it to be undeclared. The HTTP specification says that the default is Latin 1.

In thread CGI Session management (was Re: the in Perl 6), the discussion of session management continued. Last week, Michael Snoyman suggested including it in, and Yuval Kogman begged for a plugin solution. This week, the thread was consumed by the API design and module naming discussions from the initial thread.

In the splinter on module names, Juerd was completely against anything which contained the word 'CGI'. Ian Langworth proposed 'HTTP', but several people thought that the module typically involves fetching parameters, not dealing with the protocol.

As for the API design discussion, it repeated the main thread's arguments for the most part. Jacinta Richardson introduced a new request: subroutines should have a uniform naming scheme, rather than mixing terms (scrolling_list but popup_menu) and underscores (textfield versus password_field).

For more CGI discussion, also see Web development I: Web::Toolkit.

Trying to use Perl5 modules

Earlier, Richard Hainsworth was 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.

This week, Mark Stosberg thanked Audrey for the status update and corrected the wiki to contain this information. He invited others to include tips about Perl 5 embedding.

Index of terms

Richard Hainsworth asked for an index of terms to be compiled for the Synopses. The silent masses apparently use grep -r, or Perl6::Bible.

more on perl5 modules

Richard Hainsworth asked for help using Perl 5's Gtk2 module in a Perl 6. Aristotle Pagaltzis corrected his code, but that version didn't work on Richard's version of pugs, which Juerd explained was ancient.

Trying to make a new operator

Richard Hainsworth was trying to define a custom operator, but it didn't work out. Daniel Hulme noted that the operator has to be declared up right to be used, and Yuval Kogman subsequently nitpicked that only the grammar needs to know about it's existence, and a stub definition will do. With his new found knowledge, Richard went on to implement the birth of Jesus, which Markus Laire refactored. No religious wars ensued.

Web development I: Web::Toolkit

After much discussion in 'the in Perl 6', Juerd decided to create a new thread to clarify and summarize his feelings on how Perl 6 should address web development. The conversation moved on to XHTML versus HTML and whether code which generates HTML should confirm to the XHTML specifications by default.

Juerd continued the discussion of web development in 'Web development II: Code' with code examples.

perl6 and a multi-interpreted-language example

William Herrera cited a blog post, akin to a language shootout, implementing the game of reverse in several languages. Juerd and Larry Wall provided their take on a Perl 6 version of the code, while Aristotle Pagaltzis provided a version in Perl 5 which he felt represented it better.

perl6 and a multi-interpreted-language example

William Herrera asked how one would go about implementing the game of Reverse in Perl 6. Larry promptly supplied a Perl 6 version, while Aristotle Pagaltzis provided an implementation in Perl 5 that seemed to do it more justice.

Perl6 "style-guide"

Fagyal Csongor asked if someone was willing to write a Perl 6 style guide. Aristotle Pagaltzis debated the merits of such a site, and mentioned that a cheat sheet for Perl 5 hackers would be nice. Carl Mäsak mentioned the pugs porting howto in response. Darren Duncan suspected that Damian Conway's Perl Best Practices book was written to be forward compatible with Perl 6, a suspicion that Larry Wall confirmed. Lastly, Jerry Gay urged Fagyal to start a wiki page for a style guide, an idea expanded on by Michael Snoyman.

Web development II: Code

Juerd posted several pseudocode stub classes for the basis of a web framework, proposing that they be put on some wiki space. Steffen Schwigon then offered the list in general subversion space for such endeavors.

This message followed from 'Web development I: Web::Toolkit'.


PCR replaces PGE in Pugs

Agent Zhang announced that PCR (the implementation of Perl 6 rules in perl 5) will replace PGE as the default rule engine in Pugs. This is supposed to solve the many issue people have with binding pugs to parrot.

Check smoke results while reading Synopses

Agent Zhang announced that the smoke server and the synopses are now integrated using the smart link platform.

Updates to "Perl 6 and Parrot Essentials"

ajr asked if an errata/updates file for Perl 6 and Parrot Essentials (2nd edition) exists. Agent Zhang said that the book is now very much out of date, and that the synopses are a better place to look. Michael Snoyman and Sam Vilain both said that in their opinion the book was still a nice way to jump into Perl 6.


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 covered a number of threads 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,


This summary can be found in the following places:

See Also

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.