Perl 6 summary, 1-7 October, 2006

kudra on 2006-10-08T13:39:00

This week on the Perl 6 mailing lists

"When I first read 'Warnock applies' on things in p6 summaries a year or so ago, I thought it was some really energetic programmer who went around and applied patches as soon as people posed a question."

-- Carl Mäsak, on Warnock's Dilemma

Language

Nested statement modifiers

Paul Seamons asked why multiple nested statement modifiers (say "foo" if $foo for 1 .. 3) are disallowed. A long discussion on the technical and ergonomical problems was stirred up. The general consensus is that there is still no good reason to allow nested statement modifiers.

Exceptions on hypers

In a subthread of 'Nested statement modifiers', Aaron Sherman asked what the semantics of exceptions within hyper operators are. Larry explained that since hyperoperators imply not caring about the order of the side effects (for multithreaded goodness), which element generates an exception might be implementation dependent.

class interface of roles

Last week, 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.

This week, Sam Vilain thought that it would be the same as requiring that a class implement a method, except for a difference in syntax. This led Brad Bowman to ask how a role can require a target class to implement a method or do another role. Stevan Little answered that he believed this was done by providing a method stub. Jonathan Lang mostly agreed with Stevan and offered more details.

chromatic thought that forbidding methods was potentially like the false-cognate problem. Stevan admitted that he had yet to find a real-world use for it.

There was further discussion on roles.

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

Last week, an earlier discussion on S05 subrules continued. Audrey Tang wondered if there was a hidden cost to making /<foo>+/ always react so that $<foo>.from returns something. Carl Mäsak preferred the proposed semantics and asked if the question had been discussed off-list.

This week, Audrey replied that there had been no further discussion. Carl asked for a short snipped to illustrate it, and supplied an anecdote about Warnock applying.

RFC: multi assertions/prototypes: a step toward programming by contract

Last week there was a great deal of discussion on this subject.

This week, Tsa asked, in response to Larry Wall's comment, if namespaces give a structural type definition.

Also, Aaron Sherman started a new topic entitled 'Abstract roles, classes and objects'. He asked rhetorically what was the use of an interface which doesn't give a guarantee. Trey Harris responded that there are three ways to manage a guarantee: an 'is abstract' marker, some type of inference, or by disallowing abstract classes. Jonathan Lang offered his definition of 'instance management'.

Automatic coercion and context

Joshua Choi asked how coercion interfaces are implemented and implicitly used. Musings on roles and the terror of implicit coercions in C++ were part of the discussion, but surprisingly the as multi method was not mentioned at all.

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

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. He cited an example from the recent discussion on allowing a role to prevent the consumption of another role ('class interface of roles').

There was a suggestion that restrictions could be purely advisory. This led to the question of whether strict is localized. Larry Wall replied that the default is for lexically scoped pragmas, but that S01 states that it must be possible to write policy meta models. More discussion on this topic followed.

Mailing list archive and index

Aaron Sherman posted that he was considering creating an archive of messages from the mailing list which would be easier to search than Google. The problem with the Google archive is that it includes discussion, and he's only interested in decision. He asked for opinions on the examples he posted. Darren Duncan suggested seeding from the existing mailing list archives.

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

In this commit, Audrey Tang removed the 'single argument function becomes a method' rule from S12.

if-else and statement-ending blocks?

Markus Laire quoted a section of S04 on lines ending with } followed by nothing but whitespace or comments. He wondered if this meant that an else statement like
};
else {
would be the same as the same without the semicolon.

import collisions

Jonathan Lang wanted to know what would happen if he imported two modules which export the same method. He felt that the resolution should be similar to role composition techniques. He suggested some syntax. Aaron Sherman thought that only plain multis would conflict, and suggested a warning would be most appropriate.

Hash composers and code blocks

Aaron Sherman quoted a section from S04 on the hash composer. He was afraid that the current syntax could lead to 'looks fine to the uninitiated' errors. He suggested providing an unambiguous form for all the sigiled types. He elaborated on his proposal.

Parrot Porters

[CAGE] perl coding standards...

Earlier, Will Coleda posted an attempt at creating a perlcritic test. This week, Chris Dolan created a patch to simplify the test code by using Test::Perl::Critic.

requirements gathering on mini transformation language

Last week, 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.

This week, Aaron Sherman expressed confusion over the purpose of this project. He thought TGE performed this task. chromatic replied that the mini language would be "the stuff in curly braces" in the TGE grammar files.

Adriano Ferreira named some desired features in a transformation language, such as a data structure pattern language, and rules which are selected via the patterns.

Allison reported that there were several volunteers.

[svn:parrot-pdd] r14784 - trunk/docs/pdds/clip

Last week, Jonathan Worthington committed a draft PDD on Parrot's bytecode format. 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.

This week, Karl Forner suggested working around the need to specify the absolute path by using the env command.

[perl #40443] Separate vtable functions from methods (using :vtable)

In ticket [perl #40443], Matt Diephouse noted that it was decided at OSCON 2006 that vtables and methods should be separated. This is the request for this modification.

Can I use Parrot's subsystems in an embedded code?

Nikolay Ananiev is working on a C project which will embed Parrot. He'd like it to be as portable as Parrot, and wondered if there was some way he could take advantage of Parrot's portability.

Questions about FixedBooleanArray and ResizeBooleanArray

Karl Forner was unable to find detailed specifications for the FixedBooleanArray and ResizeBooleanArray PMCs and was wondering what should happen if they were resized. Leopold Toetsch replied that the FixedBooleanArray won't resize, and specified what the default values should be.

Some additional questions were asked in '[#39063 and #40066] boolean arrays'.

Heads up: Dynamic environment now captured in continuations

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. He asked to know if any problems with coroutines developed. François Perrad replied that he'd been unable to implement coroutines in Lua. Bob Rogers was not surprised, and discussed some of the problems involved.

Emacs/vim code coda placement

Paul Cochrane reported that the Perl::Critic policy for the coda skips __END__ and __DATA__ sections, but vim requires the coda to be within the first or the last 5 lines of the file. Chris Dolan agreed with Paul that using =cut for POD in the __END__ section would work, but was not sure how to handle __DATA__. Will Coleda approved putting the coda after the __END__.

[perl #40449] [PATCH] improvements to examples/io/httpd.pir

Chris Dolan created ticket [perl #40449] to supply a patch to make improvements to the HTTP server which ships with Parrot. It was applied as r14833.

Wikipedia example

Aaron Sherman sent a patch which was requested on IRC. It contains code which executes the parser on a sample string and dumps the parse tree; it checks the speed of PGE. chromatic reported difficulties in getting the patch to work.

[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.

[#39063 and #40066] boolean arrays

Karl Forner wrote that he has been working on FixedBooleanArray and ResizeableBooleanArray. Ticket [perl #40066] indicated they needed to be rewritten. He also looked at bug [perl #39063] on ResizeableBooleanArray using 64 bytes per bit. He thought that it would be best to rewrite the PMC. He had a few questions on what was desired in an implementation. Bernhard Schmalhofer and Leopold Toetsch tried to answer the questions.

From this, Karl concluded that the best solution might be to use an external lib. He also described two other possible approaches.

A related thread is 'Questions about FixedBooleanArray and ResizeBooleanArray'.

Linux/PPC Segfault in Build

chromatic reported that he cannot get Parrot to build. Bob Rogers attributed the problem to his continuation changes, and thought r14845 would correct the problem. chromatic confirmed that this solved the issue.

[perl #40458] [PATCH] fix for c_code_coda.t multiple occurrences test

In ticket [perl #40458], Paul Cochrane supplied a patch to make the C-file coda test work correctly with multiple instances of the coda.

Bytecode PDD

Last week, Jonathan Worthington committed a draft of the Bytecode PDD and Leopold Toetsch offered comments.

Bernhard Schmalhofer wondered if the 'UUID' field should be named 'checksum'. Leopold agreed, but thought that a UUID was also needed. Jonathan noted that he had simply written down the incorrect definition in the file.

Users

trying to use a role within a role

Richard Hainsworth posted some code where he was trying to use a role within a role and wondered why it didn't work. Audrey Tang replied that the statement-level does form of roles was not yet implemented. Later, she replied that it had been implemented as r13782. She gave Richard some information on writing tests for Pugs.

error when using -> as lambda function

Wim Vanderbauwhede reported a problem with using -> in calculating the factorial of 5. Audrey Tang found the problem with the code, and recommended looking at 'Changes to Perl 5 operators' in S03. She asked if Wim could supply a test to ensure that 1<2 generates a parse failure.

Operator overloading/Inheritance from built-in types?

Wim Vanderbauwhede wanted to create a bitvector object and had problems overloading the + operator. He also wondered if it was possible to overload the assignment operator, and included code from his attempt. David Brunton offered a suggestion.

Compiler

Synopses on the smoke server are a bit out-of-date

Previously, 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 week, Ingo Blechschmidt asked for an example of something which was out of date, because the timestamps indicated a recent refresh.

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.

Yuval Kogman assisted with summaries 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, kudra@domaintje.com.

Distribution

This summary can be found in the following places:

See Also


That Carl M&#228;sak quote?

Aristotle on 2006-10-09T15:03:17

Priceless. :-) (Citation?)

Re:That Carl M&#228;sak quote?

kudra on 2006-10-14T17:02:55

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

Re:That Carl M&#228;sak quote?

Aristotle on 2006-10-14T19:54:39

Cheers!