close
The Wayback Machine - https://web.archive.org/web/20070306200607/http://planetsix.perl.org:80/

Planet Perl Six

March 04, 2007

Audrey TangWeekly Perl 6 mailing list summary for 18-24 February, 2007

This week on the Perl 6 mailing lists

"'Course, if someone goes ahead and adds the Y combinator, one must naturally begin to wonder what the YY combinator would be... :-) "

-- Larry Wall

"Obviously it generates a function so anonymous that it can't even refer to itself. I call it the depressed existentialist solipsist operator."

-- chromatic, in 'Y not'

Language

Y not

Larry Wall announced the demise of ¥, which was not much lamented. Thomas Wittek suggested calling it zip and there was some discussion of whether it is better to use terms like minmax and zip, or to use symbols like MM and ZZ. Several jokes were made along the way.

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

A commit by Larry Wall replaced ¥ is replaced by Z. There was also a change with the XX operator, which became X.

Relief for rw/ro

Steve Lukas remarked that Larry Wall had asked for ideas about good names for various states of write access. He offered a proposal which involves indicating that the writeability can be described as variable, constant, or final. Dr. Ruud added a brief comment about the length of the term variable, which he didn't find to be too long.

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

A commit from Larry Wall clarified that a named argument may name either a label or a variable.

Blair Sutton asked if the synopsis repository is publicly available, and if it is part of the Parrot or Pugs repository. The URL of the repository was posted.

Parrot Porters

[perl #29994] [BUG] "loadlib $P0, varname" not working correctly

Some time ago, in ticket [perl #29994], Jens Rieks reported an error in imcc/parser_util.c. Klaas-Jan Stol updated the ticket and noted that the loadlib op works on windows. However, another error was found: when loading a non-existent library, no exception is raised.

[perl #41235] [PATCH] Add get_name() Method to Namespaces

Earlier, chromatic created a patch for get_name, which Jerry Gay forwarded to RT to create ticket [perl #41235]. Jerry wanted to apply the patch before 0.4.8, but chromatic said that he had been waiting because Allison Randal wanted a deprecation cycle for the rename of name() to get_name(). Allison replied that she had made a note that it was deprecated (r17030) and said that the patch could be applied after the release.

[perl #41237] [TODO] PMC Class name IDs will require a dot in front

Klaas-Jan Stol reminded people that an issue had not been decided.

Earlier, Jerry Gay created ticket [perl #41237] to address an item in DEPRECATED.pod about PMC Class name IDs. He felt that either it should use one syntax or the other, but not both.

Allison Randal preferred eliminating the dot in classname IDs. Matt Diephouse, on the other hand, liked the dot. Klaas-Jan Stol added that the dot indicates that it is PIR not pure PASM.

Allison thought that if Matt used it to disambiguate between types and local variables, it was a matter of sigils. She asked why put sigils on types instead of putting them in variables, and if a dot was the ideal sigil for types.

[perl #41529] [BUG]: t/perl/Parrot_Distribution.t test failure

In ticket [perl #41529], James Keenan reported that there was a new failure in Parrot_Distribution.t. Jerry Gay explained that the test exposes a bug in Parrot::Distribution, which classifies files as Perl even when they are not. He noted that failing tests had been used as a reminder of things which needed to be fixed, and this was still used to some extent, although there was a movement towards RT.

The problem was resolved in r17069.

There was some discussion about the difficulty of identifying the problem. Jerry Gay mentioned that he was working on refactoring Parrot::Distribution.

in PIR, a BigInt is turning into a string against my will -- what am I doing wrong?

Eric Hanchrow reported a problem in r16999. Patrick R. Michaud offered some suggestions for correcting the code in question.

[PATCH] #39615: [TODO] get_outer op not defined in PDDs

Klaas-Jan Stol submitted a patch which adds the description of get_outer() to PDD20.

[PATCH] updates for docs/faq.pod

Klaas-Jan Stol made some updates to faq.pod which related to ticket [perl #41312].

:anon flag bug?

Klaas-Jan Stol had a question relating to a fix for [perl #39196]. An anonymous subroutine was unexpectedly being found, and he wondered if that was a bug.

[PATCH] retry pir/pasm updates for lang/pir

Klaas-Jan Stol submitted a patch to replace his earlier one.

[PATCH] lang/PIR updates

A patch by Klaas-Jan Stol made some corrections to languages/PIR.

[perl #41538] readline kills parrot on files missing a final newline

In ticket [perl #41538], Joshua Isom described a problem which could be replicated by creating a small file without a newline at the end. chromatic applied it in r17103.

Q on: #37542: [TODO] core - document behavior of multiple :load subpragmas in same compilation unit

Klaas-Jan Stol responded to ticket [perl #37542] which he claimed stated that the behavior of multiple subroutines marked with the :load subpragma in the same compilation unit is undefined. However, Klaas-Jan pointed out that it is defined and wondered if the ticket could be closed.

Patrick R. Michaud agreed with closing the ticket. Will Coleda explained how Klaas-Jan could update the ticket directly.

Preening the parrot for show

Nicholas Clark suggested that release versions of Parrot should have debugging flags off so that it will benchmark nicely. This came from a public discussion of the speed of the Ruby implementation.

Tewk noted that the numbers generated by Cardinal are probably incorrect because the current implementation is very minimal.

Joshua Isom wondered if it was best for the default core to be the slow core. Although this makes testing easier, it gives misleading benchmarks.

[perl #40544] [NEW] Test for DOS line endings in Parrot text files

Earlier, in ticket [perl #40544], Paul Cochrane submitted a test which checks for DOS line endings in the Parrot distribution.

Will Coleda recently noted that some of the problems are related to [perl #41485] and that when he sets the properties in his working copy, the tests succeed. Paul provided an update: he will be do a few commits which update the svn eol property. Because a large number of files will be affected, the update will done in a small time slot.

As of r17102, it was fixed.

[perl #41548] [Tcl] - internals tests failings

Will Coleda reported a failing test in [perl #41548].

[perl #41549] [PATCH] fixes :vtable pragma for .pbc files

In ticket [perl #41549], Alek Storm submitted a patch in response to [perl #40626] and [perl #41364]. Jonathan Worthington planned to commit it.

Deprecated ops: emit warning?

Klaas-Jan Stol noted that there are some operations which have been deprecated but which have not been listed in DEPRECATED.pod. He suggested adding a check which will emit a warning if an operator is deprecated.

[PATCH] languages/lua lua.pg Grammar fixes

Klaas-Jan Stol submitted a patch for the Lua grammar file.

Cross-compiling Parrot

Aldo Calpini resurrected comments from Dan Sugalski in 2004 which dealt with cross-compiling. In order to submit patches which do not break the existing code, he asked some questions about how people are using cross-compilation at the moment.

Jerry Gay wanted to see some development in this field, and suggested an approach based upon test-driven development for configuration system changes. Joshua Isom remarked that Perl 5's configure is somewhat limited, and Perl 5 may not always be available. While Aldo agreed that Perl 5's configure is a bad way to go, he didn't see anything wrong with using Perl 5 as the tool to build. Allison Randal also indicated that reliance on Perl 5's configure would be a problem. She proposed that Aldo start with a proposal and patches.

chromatic remarked that it would be nice to be able to put data files somewhere and have configure read those instead of probing the system.

[perl #41557] [BUG] addparent established hierarchies don't work with .Super

Sam Vilain reported problems with inheritance which can result in the exception 'object has no parent'. Tests were added in r17031 to demonstrate the issue. This problem was explained in ticket [perl #41557].

[perl #41558] [PATCH] Add ops summary doc generator

In ticket [perl #41558], Shawn M Moore submitted a patch which adds a new utility script to create a summary of all the operators.

[perl #39196] [TODO] tests - need to test addmethod

In ticket [perl #39196], Klaas-Jan Stol submitted a patch which adds a test for addmethod.

[perl #41569] [BUG] t/distro/file_metadata.t fails on win32

In ticket [perl #41569], Jerry Gay indicated a problem with a test which fails on Win32.

Preliminary notes for 0.4.9 release

In preparation for the 0.4.9 release, Patrick R. Michaud asked some questions of people who have previously worked on release management. Allison Randal, chromatic and Nuno Carvalho replied.

[perl #41576] [BUG] t/pmc/pmethod_test.t fails on x86_64

In ticket [perl #41576], Patrick R . Michaud reported a failure with t/pmc/pmethod_test.t.

[perl #38983] [PDD] review PDD01_overview.pod

Patrick R. Michaud reported in ticket [perl #38983] that he had changed the roadmap to refer to PDD01 instead of the 'PLATFORMS' file which doesn't exist. However, PDD01 is still in draft status, so Patrick asked if it can be approved.

[perl #41577] docs/ROADMAP.pod refers to python bytecode translator, pie-thon test suite

Patrick R . Michaud reported in ticket [perl #41577] that there are some points in the roadmap which may no longer be relevant. Allison Randal fixed them in r17210.

[perl #41579] [BUG] t/pmc/ref.t, t/pmc/threads.t file with -C runcore

In ticket [perl #41579], Patrick R . Michaud reported two failing tests. chromatic confirmed that this was not restricted to x86_64.

[perl #41583] Tail calls from within vtable methods broken

Bram Geron reported that tail calls within v-table methods are broken. Ticket [perl #41583] tracks this bug.

[perl #41584] [TODO] Update RELEASE_INSTRUCTIONS with details for updating the website

In ticket [perl #41584], Patrick R . Michaud noted that the release instructions should include a reminder to update the website.

[PATCH] PDD16 NCI update with simple example

Klaas-Jan Stol submitted a patch which contains a simple example which can be added to PDD16. chromatic applied it in r17164.

[perl #41455] [NEW] and [PATCH]: tools/build/ops2pm.pl refactored

Earlier, James Keenan noted that he had some new patches for tests. They were added in r17061. The patches can be seen in [perl #41455].

[perl #41597] [PATCH] replacing explicit access to $^O in Configure

Aldo Calpini submitted a patch to ticket [perl #41597]. This patch adds an 'osname' key to Parrot's configuration data, which is used in the configure process.

Compiler

Parrot 0.4.9 released!

Patrick R. Michaud announced the release of Parrot 0.4.9, "Socorro".

cvs-parrot

[svn:parrot] r17107 - trunk/src/stm

chromatic objected to a patch which removed access to a null pointer in stm/backend.c. He thought that the best solution would be to have the PMC init() throw an exception.

Allison Randal thought that it made sense to return with no action. reply_extracted already has the same check, and mark_extracted should have the check added. Jerry Gay added it in r17159.

Acknowledgements

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

March 04, 2007 17:37

March 03, 2007

Audrey TangA beautiful calling convention.

The Beauty of Perl 6 Parameter Passing, a new article on perl.com by philcrow++, is an excellent intro into some of the wonders of the Subroutines spec (S06). We absolutely need more articles like this. :-)

March 03, 2007 14:20

March 01, 2007

Audrey TangMO bridge landing!

After 3 months of delay, it was quite amusing that the initial MO bridge took only 3 hours to land:

pugs> vv('hello, world').HOW
^Str
pugs> vv('hello, world').HOW.HOW
^Class

(The vv() above is a makeshift call that casts 6.2.0-land values into 6.28.0-land objects; it will go away once all existing built-in types are wrapped into MO.)

To understand what the ^Class notation means, let's take a brief look at Perl 6's object model, as implemented by Pugs 6.28.0's MO (Meta Object) subsystem.

In a traditional class-based object system such as Ruby's, the String class would be an instance of the Class class:

irb(main)> String.instance_of?(Class)
=> true
irb(main)> String.instance_of?(String)
=> false

Because of this, you can't call .new on a String instance, and you can't call .length on the String class:

irb(main)> String.new.new
NoMethodError: undefined method `new' for "":String
irb(main)> String.new.length
=> 0
irb(main)> String.length
NoMethodError: undefined method `length' for String:Class

Perl 5, on the other hand, takes an unique approach: When we say IO::String->new, the IO::String is not a Class object -- rather, it is a prototypical IO::String object that has no attributes!

IO::String->isa('Class');      
#=> false (perl5 doesn't have a built-in Class)
IO::String->isa('IO::String');
#=> true
IO::String->new->new;         
#=> IO::String=GLOB(0x18ab160)
IO::String->new->getpos;      
#=> 0
IO::String->getpos;            
Error: Can't use string ("IO::String") as a symbol ref...

The advantage of this arrangement is that several object systems -- prototype-based, closure-based, et cetera -- can exist simultaneously in the same program, without having to inherit from an universal Class class.

However, a bare literal "IO::String" is a terrible way to represent a prototypical object: it makes reflection needlessly difficult, and the error message for accessing the non-existing attribute slot ("Can't use string as a symbol ref...") seems to obey the principle of most surprise.

Perl 6's solution to this is simple: The prototypical string object, spelled ::Str or simply Str (if it's in scope), is a genuine Str instance.  However, any attempt to access its attributes raises a sensible exception.  Just as in Perl 5, so-called class methods such as .new are simply those methods that does not access instance attributes, and you can call them on both ::Str and regular Str instances.

Calling an object's WHAT method returns the prototypical object.  This replaces Perl 5's ugly ref($x) || $x idiom:

pugs> 'hello'.WHAT
::Str
pugs> Str.WHAT
::Str

On the other hand, because Perl 6's builtin objects are backed by a normal class-based dispatch system, you can reliably obtain a list of all Str's supported methods, by querying the Class instance that implements ::Str:

pugs> vv('hello').HOW
^Str
pugs> vv('hello').HOW.methods
["HOW","WHICH","bless","reverse"]

So there we have it: the Perl5ish prototypical object Str.WHAT is also spelled ::Str, and the Rubyish class object Str.HOW is also spelled ^Str.

The next step is to expose all MO's meta-objects (Role/Method/Class/Object) into Perl 6 land, and adapt our Perl 5 bridge to use Moose.pm, such that a class Foo {...} declaration in Pugs can generate both Haskell-side and Perl5-side representations, and work seamlessly with libraries on either side.  Stay tuned!

March 01, 2007 16:59

February 25, 2007

Audrey TangWeekly Perl 6 mailing list summary for 11-17 February, 2007

This week on the Perl 6 mailing lists

Remember that the European Perl Hackathon will be held next weekend, from 2-4 March, 2007 in Arnhem, the Netherlands. Registration is open until Thursday, 1 March. For more information, please look at the hackathon website.

Allison Randal and Jonathan Worthington will be coordinating the Parrot/Perl 6 portion of the hackathon.

Language

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

Larry Wall made a commit to S02, S04 and S06. This change renamed leave to give and modified give to always give the final value of the innermost block. $context.give() will always give the final value of the context. Instead of repeating the context selector interface, the object is now used. Loop labels are considered sufficiently OO to allow LABEL.give within the lexical scope of the labeled statement. Additionally, feed operators were clarified; their intent is to allow parallelism with minimal sharing, along the lines of the UNIX pipe model.

Smylers thought that most people would probably want to filter an array without retaining the original array, something that Larry had labeled as 'probably impossible'. Larry replied that people probably would want the form, but that mutable data is coupled to realtime but lazy data is decoupled. He thought it might be able to make the syntax @data <== grep { $_ % 2 } <== eager @data; work, but that care would have to be taken with the identity of the container and its data.

In a later commit ('[svn:perl6-synopsis] r13583 - doc/trunk/design/syn'), Larry decided to change give back to leave, on the grounds that give can be confused with given. Some of Smyler's comments were taken into consideration in '[svn:perl6-synopsis] r13584 - doc/trunk/design/syn'.

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

A commit by Larry Wall removed the quote declarator.

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

Larry Wall's commit changed :to to be the short form for :heredoc.

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

Another commit by Larry Wall made a series of changes to S02, S04, and S12. The statement_modifier category was split in two. List comprehensions can be done with statement modifiers. Multiple dispatch is explained in terms of topological sort, and has been clarified where single semicolons are concerned. Multis with a single semicolon may be reserved in 6.0.0.

my $temperature is ro

Steve Lukas proposed a ro (read-only) declaration for variables which would prevent modification after an initial value was set at runtime. As an example of a use, he gave data fetched from from a database which is used to create reports. He also explained why he felt that the readonly trait and the VAR macro were not suitable.

TSa thought that constant did what Steve wanted. Larry Wall clarified that constant $temperature = getValue() would evaluate getValue() at compile time. Larry noted that the specified my $temperature is readonly = getValue(); would probably suit Steve's need. Smylers agreed with Larry and asked Steve some questions about Steve's proposal for readonly $-temperature. Steve replied that he had overlooked the specification Larry mentioned, and that he was willing to drop his proposal.

Larry Wall remarked that he was getting tired of writing rw context variables and that there might be forthcoming syntactic relief for rw/ro which is orthogonal to everything else. Bob Rogers suggested := or something similar to indicate that the assignment is really a definition.

Parrot Porters

Re: [perl #41478] [PATCH] add Test::More::skip()

Sam Vilain created ticket [perl #41478] to add skip to Test::More.

Allison Randal wondered why Sam had chosen to reverse the order of arguments from Test::Builder.skip Nicholas Clark remarked that Sam had used the same order as Perl 5's Test::Builder. However, he agreed with Allison that it is more legible to have the number of tests to skip first, followed by the reason.

Sam proposed to solve it with a multi-sub, which would take either a string or an int followed by a string. chromatic thought that was an appropriate way to handle the issue. Allison committed the patch, with this change, as r17010.

[perl #41485] [TODO] Add a test for svn:eol-style property

Paul Cochrane created ticket [perl #41485]. chromatic had asked in '[svn:parrot] r16940 - in trunk/languages/lua: Lua t' if there is a subversion property for line endings to keep text files consistent within the repository. The property is svn:eol-style, which should be set to 'LF' to ensure UNIX-style end-of-line characters. Paul created a test for it in t/condingstd/line_endings.t but wanted to check if all text files have the property set before committing the test.

Jerry Gay remarked that the correct setting is 'native', so that files will be saved with the line endings the platform expects. The exceptions are examples using file IO, which require 'LF'. Jerry offered to test the patch on Windows if Paul posted it.

Paul wondered if Windows users have problems editing files because of the UNIX line endings. Jonathan Worthington answered affirmatively. He thought that 'native' was also the best solution.

James E Keenan wondered if new files committed to a branch should have these subversion properties set. Jerry Gay replied that the metadata requirements are poorly documented, and that perhaps this information belonged in the coding standard PDD. This led Paul to create ticket [perl #41505] to track the cleanup of the documents.

Eventually the property patch was added to t/distro/file_metadata.t and committed in r16981.

[PATCH] languages/PIR add command line options for output of pirc.pir (Parse/PAST/PIR)

Klaas-Jan Stol created several patches this week as well, namely:

[svn:parrot-pdd] r16965 - trunk/docs/pdds/draft

Allison Randal updated PDD15 to reflect core conceptual changes to objects.

[perl #40722] [TODO] Tcl - implement [file dirname]

In response to Paul Cochrane's ticket [perl #40722], which requested that the stub routine dirname in languages/tcl/runtime/builtin/file.pir be implemented, Nuno Carvalho remarked that it had been implemented in r16967. Nuno felt that some Windows testing was needed.

[perl #41496] [TODO] config - profiling options should have their own step in config/init/defaults.pm

In ticket [perl #41496], Paul Cochrane noted that the profiling options in config/init/defaults.pm should get their own step in the configuration process.

[perl #41497] [TODO] config - profiling options are specific to gcc in config/init/defaults.pm

Paul Cochrane created ticket [perl #41497] to request that the profiling options in config/init/defaults.pm be marked as being specific to gcc.

[perl #41498] [TODO] create Makefile.PL for CPAN friendliness

In ticket [perl #41498], Jerry Gay noted that CPAN does not like Parrot's Configure.pl because it expects a Makefile.PL. He suggested adding a makefile which will convert arguments to the form expected by Configure.pl and then run Configure.pl. The ticket was resolved in r17032.

[perl #41499] [TODO] config - 32/64 bit architecture setting gcc specific

Paul Cochrane would like the architecture-settings compiler options in config/init/defaults.pm to be made generic rather than gcc-specific. The request was made in ticket [perl #41499].

[perl #41500] [TODO] config - lib directory needs to be set appropriately for 32/64 bit archs

Ticket [perl #41500] contained a request by Paul Cochrane. He wanted the lib install path in config/init/defaults.pm to be set correctly for 32- and 64-bit architectures.

Porting parrot on PDA -- work in progress

Aldo Calpini reported success at building parrot for the PocketPC. Some additional fixes are still needed, but the biggest problem is that Parrot should be used to generate .pbc files but the directory structure isn't available. Aldo asked how to proceed.

Joshua Isom replied that it should be possible to run most PIR files and pbc files, although it would be best to generate them on a platform with the same endian.

Patrick R. Michaud and Jesse Vincent congratulated Aldo on the progress to date.

The thread 'Parrot on PDA - work in progress' was a duplicate and contained one of the responses.

[perl #41502] [PATCH] fix auto::sizes configure step

Aldo Calpini created ticket [perl #41502]. It contains a patch to add a final \n to a few files. The changes are needed to port Parrot to the PocketPC, because the cegcc compiler won't output the last line unless there is a terminating newline.

PAST-pm: only PAST::Block allowed at root of PAST

Klaas-Jan Stol asked what the result was of the previous discussion on the topic of whether PAST-pm will be able to handle PIR's requirements for a top-level construction with an include statement. Patrick R. Michaud replied that he expected either a PAST::CompUnit node type or the blocktype attribute on PAST::Block to get a compunit setting.

[perl #41508] [BUG] Configure losing flags...

Will Coleda created ticket [perl #41508]. He found an error when trying to build with GMP on OSX Intel. Later he was able to supply more information, which showed that the problem was due to his expectations.

[perl #41511] Parrot_call_sub* Incompatible with Multisubs

Ticket [perl #41511] was started by chromatic. He described a problem involving the difference in layout between a Sub PMC and a MultiSub PMC. Matt Diephouse requested a sample of the code so that he could take a look at the problem. chromatic added a todo test in r17034.

Compiler

Get your Google SoC thinking caps on...

Nicholas Clark reminded people that it is time to begin thinking of good Google Summer of Code projects. Applications will be accepted in March. More information is available.

cvs-parrot

[svn:parrot] r17012 - in trunk: runtime/parrot/library/Parrot t/compilers/past-pm

A commit by Allison Randal gave the HLLCompiler the ability to add new compilation stages.

Nicholas Clark asked what would happen if someone were to add a stage with the same name as an existing stage. Allison replied that it would be added twice, as it was possible that someone might wish to repeat stages such as 'optimizetree' or 'displaybenchmarks' after each transformation.

Nicholas realized, after studying the PIR, that there is no ambiguity as to which stage is meant, as "all of them" are added. He thought that there should be a test for it. Allison added tests in r17027.

Acknowledgements

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

February 25, 2007 14:31

Audrey TangWeekly Perl 6 mailing list summary for 4-10 February, 2007

This week on the Perl 6 mailing lists

"> Errrr ... I'm the one who needs the tutorial, not the one to write it.

"That makes you a prime person to capture the questions it needs to answer! You can't evade the Responsibility Ponies that easily."

-- chromatic, responding to James E Keenan in 'What Skills Do We Need to Finish Parrot?'

Language

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

A commit by Larry Wall changed categories to allow multiple dispatch via the longest-token rule.

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

A commit by Larry Wall added Q// as a quoting form and removed qn//.

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

This commit by Larry Wall affected S04, S05, S06 and S12. It unified proto processing to implicitly allow re-declarations within a scope. It works on most declarators, including regex, token, rule and variables.

Multiple my declarations now issue a warning, which may be suppressed with a proto declaration of the variable. The multi keyword is optional in a proto scope, and the unique keyword "undoes" an outer proto.

recent changes

Larry Wall decided to explain what was driving the recent synopsis changes. For some time, he has been working on a Perl 6 grammar written in Perl 6; a snaphot is available. Audrey Tang noted that Pugs can parse it, but it still needs to be made to run, and run fast.

Parrot Porters

[PATCH] Update pirgrammar.pod

Klaas-Jan Stol submitted a patch with an updated version of pirgrammar.pod and pirgrammar.html which contains examples for most constructs. The documents are still being worked on.

Later, in '[PATCH] update pirgrammar.pod (replaces patch 2/4/2007)', he submitted an updated version.

These triggered some discussion in the thread '[PATCH] Updates for languages/PIR/docs/pirgrammar.pod'.

Q on Calling conventions; parameter order

Klaas-Jan Stol remarked that some Parrot calling conventions are unclear. He made a list of the order in which checks are done, as far as he can tell, and asked if it was correct and if cases were missing.

What Skills Do We Need to Finish Parrot?

Last week, James E Keenan asked what code remains to be written in Parrot. Allison Randal replied that IO, Events, Threads, Compiler tools interface, Object support and Exceptions need the most work. James then asked about resources for learning PIR. chromatic offered suggestions.

This week, Allison Randal replied that to date, she hadn't been able to get the relevant sections of "Parrot Essentials" released, and proposed that James create a PIR tutorial. She suggested docs/imcc/syntax.pod as an introduction. Klaas-Jan Stol mentioned that he'd been working on languages/PIR/docs/pirgrammar.pod.

James said that he needed a tutorial, and therefore wasn't suited to write one. chromatic disagreed, stating that inexperience left James in the perfect position to know what questions needed to be answered. Joshua Isom seconded, suggesting that James could start a FAQ by creating at least the questions. Bernhard Schmalhofer suggested adding questions to docs/imcc/imcfaq.pod.

It turned out that Dzema Dmitriy is working on a PIR tutorial to accompany a PIR bundle for Texmate.

[perl #41453] [BUG] Test failure in t/pmc/object-meths.t

In ticket [perl #41453], James Keenan reported a failure with a text in t/pmc/object-meths.t. Allison Randal identified it as stemming from r16783, and thought that o = new 'MyClass', $P0 should call init_pmc rather than init, even if $P0 is null. She asked Leopold Toetsch if the choice between init and init_pmc should be based upon the content of the argument. Leopold replied that that was not his intention; there should be just one init :vtable which is called, according to PDD03 calling conventions.

Allison summarized the situation as a feature request which had been submitted as a failing test. She changed the test to reflect the current situation (r17026) and submitted the feature request in ticket [perl #41528].

Prototype object model for Parrot

Allison Randal worked with Sam Vilain on a prototype object model written in PIR. She checked it in to compilers/smop. The next step is to implement the prototype at the PMC level, and incorporate much of the functionality of src/objects.c.

Kevin Te replied that he had just started to port Class::MOP to PMCs, and would be glad to help with this port as well.

[perl #41454] [PATCH] add 2 new tests for object method dispatch

Sam Vilain noted, in ticket [perl #41454], that inherited method dispatch was only tested with a simple parent/child class. In his attached patch, there are tests for three classes in a straight line, as well as a 4-class diamond inheritance.

[perl #41455] [NEW] and [PATCH]: tools/build/ops2pm.pl refactored

James Keenan submitted ticket [perl #41455]. It contained several patches, for test files and related libraries. They were added to the trunk as r17061 after passing on Darwin and Win32. Later they were confirmed to also work on Linux.

[perl #41456] [PATCH] add a Super PMC test for addparent-established inheritance trees

In ticket [perl #41456], Sam Vilain submitted a test which checks that if an inheritance tree is created with addparent, it performs just like one made with subclass.

[PATCH] Updates for languages/PIR/docs/pirgrammar.pod

Klaas-Jan Stol submitted a patch for pirgrammar.pod and pirgrammar.html in '[PATCH] Update pirgrammar.pod'.

chromatic remarked that he did not like keeping HTML in the repository, and wondered if it could be automatically generated because, unlike other generated files, it does not require flex and bison to produce it.

Klaas-Jan wondered if pod2html was available for all platforms where Perl can run. He thought it could be incorporated in the make procedure if that were the case. chromatic replied that it had been core since at least 5.8.0.

Re: Porting parrot on PDA

Hakim Cassimally replied to [Aldo Calpini's post]{http://thread.gmane.org/gmane.comp.lang.perl.perl6.internals/10966) and expressed an interest in porting to the Nokia N800.

Jerry Gay replied that he'd love to see Parrot ported to the N800 and suggested a way to start on it.

[PATCH] Updates and fixes for docs/imcc/syntax.pod

Klaas-Jan Stol submitted a number of patches for languages/PIR and docs/imcc/syntax.pod:

One patch, '[PATCH] Update pirgrammar.pod', also sparked some discussion.

[perl #40706] [TODO] Tcl - implement [close]

Earlier, Paul Cochrane submitted ticket [perl #40706] where he noted that languages/tcl/src/builtin/close.pir is only a stub.. Nuno Carvalho reported that a first implementation had been committed in r16933. There is still some discussion on how to best implement it for Tcl.

Users

Pugs on Windows

Gabor Szabo reported a 404 error when attempting to download a Win32 binary of Pugs and Parrot. Audrey Tang suggested a different URL. David Vergin noted that the page Audrey offered linked to a build from November 2006 and asked if there was a newer build available.

"delete" and maybe a problem with gather

Gilbert R. Röhrbein wanted to reorder an array so that the elements are randomly ordered. He noted a problem with delete which he wasn't able to describe, except for stating that it was linked to gather. The code was included.

Compiler

dpkg-buildpacke fails due to outdated 10smoke patch

Moritz Lenz reported that the current (r15185) revision of Pugs fails to compile on Debian when dpkg-buildpackage is used because the '10smoke' patch cannot be applied.

Acknowledgements

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

February 25, 2007 09:17

February 24, 2007

Audrey TangWeekly Perl 6 mailing list summary for 29 January - 3 February, 2007

This week on the Perl 6 mailing lists

": This mornings up date proposed

"Now the da rn spam fi1ters are chang.ng my spelling to look like sp*m. Yeah, that's the 4icket... :)"

-- Larry Wall, in 'Enhancing array indices'

Language

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

A commit from Larry Wall reorganized S03. This led Nicholas Clark to comment that the sequencing operator is not defined. He had a few other notes about the commit. John Macdonald responded to Nicholas's question "Is it defined that $a + $b evaluates the arguments in any particular order?" by stating that in C, it is deliberately left undefined to allow the code generator more flexibility. Aaron Crane also spoke up, further explaining how C functions.

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

In this commit, Larry Wall clarified gather and take. Gaal Yahas wanted to know what it means for take to be evaluated in void context. He included some example code and asked what the result would be.

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

Larry Wall applied some clarifications which were suggested by Gaal Yahas. Gaal, however, had some more questions. This concerned gather in S04. These were addressed in Larry's next commit.

Typology of auto*crement

Larry Wall replied to a comment by TSa in another thread, wherein TSa wondered if ++ and -- coerce Nums to Ints. Larry stated that since a Str remains a Str in a similar situation, the Num should also retain its type. One exception that he could see would be that incrementing an Undef would create an Int.

In thread 'Int-to-Num autocoercion', Larry expanded on how coercions are handled in functions. He said that Num to Int autocoercion is an explicit exception which is expected by Perl 5 programmers, and Str to Num (and the inverse) are also done automatically at times. Larry further explained that there had been numerous discussions on the subject, and the general feeling is that exotic types should not autocoerce unless a multi has been declared to handle the situation.

TSa made a reference to the long-running 'Numeric Semantics' to discuss how auto-coercion would work with floor. Darren Duncan replied that a floor would return an Int by definition, so that it would in fact be a way of explicitly converting.

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

Larry Wall made a commit which disabled negative subscript 'dwimmery' for shaped arrays, which can now take + and - operators. He then wondered if a multidimensional Whatever (**) would mean the same thing in "whatever" dimensions.

David Green noted that the subject of ordinals had come up some time ago, and quoted a message from Larry dating back to 2004. He added his thoughts to the subject as well.

Blair Sutton felt that Perl 6 should stick with 0 as the first element of a list to avoid alienating programmers from most other languages. He thought that it could be adjusted by a user-defined Parrot grammar for those who didn't like the traditional starting value, although he had personally never required that feature.

Smylers was of the opinion that a pragma is overkill, and a global variable would be sufficient. Jonathan Scott Duff responded that a pragma would be useful to Pascal or Fortran programmers, and therefore it would be handy to have a pragma. Rafael Garcia-Suarez added that $[ is a pragma in Perl 5.

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

Larry Wall made a commit concerning *+ versus *- in subscripts. TSa replied that the distinction between the cases would be that they dispatch to different functions: * to postcircumfix, *+ to infix:<+> and *- to infix:<->. TSa asked some questions based upon this observation.

Larry responded that he did not want Whatever to package the array. He felt that in TSa's example, it would be necessary to dispatch to Whatever and let the Whatever code extract relevant information relating to *. TSa requested further information.

Enhancing array indices

Jonathan Lang wondered if it would be possible to get a single-character symbol which could be used in an array index to refer to its shape, for example something like @x[*.head]. Larry Wall replied that a recent suggestion was to use a syntax like @x[*+0]. There was further discussion on syntax possibilities, with Jonathan, Darren Duncan and TSa joining the thread. Darren proposed getting rid of negative subscripts and using only terms like @foo[*.head], which he felt had the advantage of being more consistent (for shaped and unshaped arrays), and easier to learn.

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

Although he admitted that the month of Nob is cute, Larry Wall nevertheless changed S01's last modified date to Nov. In a followup commit, Larry changed the date to Jan.

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

Larry Wall made a commit to allow colon pair syntax for a method-like sort of filetest. Smylers liked the changes, but was concerned about filename.TEST because there are only so many permutations of the word available for testing frameworks. Larry listed a host of other possible names, and was leaning toward STATUS.

Parrot Porters

[perl #41364] [PATCH] Fixed object vtable method overrides in PIR

Alek Storm submitted a patch as ticket [perl #41364]. The patch allows object vtable method overrides for a number routines, such as find_method and get_attr. He also wondered if the double-underscore method of overriding could be deprecated now that there is the :vtable flag. Patrick R. Michaud responded that the deprecation cannot take place until ticket [perl #40626] is resolved.

[PATCH] PDD22 spec notes and ParrotIO tests

Jerry Gay mentioned that he had written tests for the ParrotIO object, which he included as a patch. He also had some questions about PDD 22. Allison Randal answered the questions.

Porting parrot on PDA

Aldo Calpini wrote of an interest in porting Parrot to the PocketPC. CeGCC is a Windows port of gcc which produces ARM executable code. The first attempt at porting went well. A report of the procedure was included in the post.

[perl #41371] [TODO] review parrot roles & responsibilies doc before next release

In ticket [perl #41371], Jerry Gay noted that in r16834 he had committed docs/roles_responsibilities.pod. He asked project members to review it before the 0.4.9 release.

[perl #41373] Need test for Clone of HLL info

Will Coleda created ticket [perl #41373] to request a test to replace the ones marked 'todo' which relied on Perl 5 PMCs.

[perl #41374] test MMD with non-perl PMCs

Ticket [perl #41374], initiated by Will Coleda, requested tests for MMD which don't rely on Perl PMCs.

Language Testing

Klaas-Jan Stol remarked that he was trying to set up a test harness for PIR. It appeared that the module PIR.pm was not used, and he was unable to find documents on how to set it up. He offered to patch the compiler FAQ once someone explains it to him.

Will Coleda explained that the problem was with the name of the language, with 'PIR' being reserved for internal testing. Therefore either lib/Parrot/Test.pm would require modification, or the language should be renamed, for instance to 'PIR_PGE'. With Will's advice Klaas-Jan was able to get it working.

[PATCH] Updates for languages/PIR

Klaas-Jan Stol submitted a patch to improve PIR. It includes a test suite, and corrections to several other files. Later, in '[PATCH] languages/PIR tests', and '[PATCH] languages/PIR more testing and fixing', he posted additional tests and corrections. Later there was also '[PATCH] PIR updates', which was applied as r16892.

What Skills Do We Need to Finish Parrot?

James E Keenan asked some questions with the intention of determining what part of Parrot he should focus on and try to encourage others to look at. He asked what code remains to be written before an alpha release can be made, and what skills are needed to produce that code.

Allison Randal replied that the systems needing the most work are: IO, Events, Threads, Compiler tools interface, Object support, and Exceptions. She felt people with C skills are useful, as are people with general experience in dynamic languages.

James then asked what the learning curve is for PIR. chromatic answered that the 'Parrot Essentials' book is still useful, although it is missing some of the more advanced features. He thought that it might be worth asking O'Reilly if the tutorial section could be expanded into public documentation, as there's currently no tutorial on PIR.

[perl #41380] [PATCH]: docs/roles_responsibilities.pod: Minor grammatical corrections

James Keenan submitted a patch to the roles and responsibilities file. It corrected punctuation errors and was applied as r16850. The patch was ticket [perl #41380].

On PASM and PIR registers

Klaas-Jan Stol wondered if PASM registers are still needed, except for backwards compatibility, now that there are PIR registers. Leopold Toetsch replied that PASM registers are physically allocated in the Parrot virtual machine, whereas PIR registers are virtual registers. Both types are needed.

[perl #41386] MANIFEST must die.

Will Coleda created ticket [perl #41386] to express his opinion that MANIFEST should not be part of the repository. He pointed out that the purpose of this file is to make sure that the general release isn't missing any files, something you already know to be true when you are working with a repository. He suggested creating it when the release is generated.

Allison Randal disagreed. She believes that the purpose of a MANIFEST is to tell you which files should be included in a distribution. She thought MANIFEST.skip, on the other hand, could be generated from the svn:ignore keyword before the distribution is created.

[perl #41387] perlcritic.t picking up non-perl files

In ticket [perl #41387], Paul Cochrane reported that the new Parrot::Distribution module was finding some files which weren't actually Perl language files. This was later resolved by chromatic in r17069.

[perl #41388] Parrot::Distribution doesn't exclude all external perl modules

In ticket [perl #41388], Paul Cochrane reported that the new Parrot::Distribution module is not exempting external Perl modules such as Pod::Simple from its coding standards check.

PBC to C Converter

chromatic included a quick Perl program which writes a C program which makes a self-contained executable for a Parrot program. He thought that it was fairly cross-platform compatible, although there could be an issue with big-endian processors.

PMC Tools Test Failure

chromatic reported a failure with the buildtools tests following a make realclean and a Configure. James E Keenan responded that he's experienced it infrequently and thinks that it is a poorly-designed test rather than a real failure. There was a brief discussion on how to improve the test, with James suggesting that perhaps someone who was involved with the original development of pmc2c.pl could explain what is happening in the DO_A_DUMP loop.

Q on PIR vs PASM

Klaas-Jan Stol gave a brief history of how IMCC started, noting that it was eventually merged with Parrot as its parser, and since that time there have been several additions. He wondered if it is still the case that every PIR construct also has a PASM form, and if every PIR construct can be directly translated to PASM. Allison Randal replied that that was the ideal situation, but in practice many tests are written in PIR, so there may not be complete coverage for the PASM syntax versions.

[PATCH] Update copyright for Parrot --version

A patch by Klaas-Jan Stol contains a correction to make parrot --version give a copyright range of '2001-2007' instead of '2001-2006'.

Copyright chang script and test

Klaas-Jan Stol submitted a script which checks all files for the last changed date and updates the copyright notice in the file. The second is a test which finds files which have out-of-date copyright notices. chromatic replied that he had a couple of ideas for the script and would take a look at them soon.

Users

take()'s return value

Gabriele Renzi wanted to know why take inside of a gather structure returns undef instead of a return value. Carl Mäsak had been wondering the same thing. Larry Wall couldn't remember why it hadn't been added to the specification, and put it in S04.

Acknowledgements

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

February 24, 2007 14:38

Luke PalmerDwimmery sanity

Why designing a language and designing a command line are different

February 24, 2007 04:37

Audrey Tangddrescue'ing

As seen on #perl6:

<audreyt> re MO hacking, will do that as soon as disk0s2: 0xe0030005 (UNDEFINED). goes away.
<audreyt> need to spend ~2hr running ddrescue

<putter> re disk, eep

<audreyt> since it's creeped into ~/.svk/ area and hence interfere with hacking
<putter> lol
<putter> (image of audreyt watching disk progressively die, but thinking "no, it hasn't hit /svk yet, so it's not important", and goes back to hacking...;)

I would like to simply remark that putter++'s imagination was... entirely correct. ;-)

February 24, 2007 03:53

February 23, 2007

Audrey TangWeekly Perl 6 mailing list summary for 21-28 January, 2007

This week on the Perl 6 mailing lists

"Take the longest token, lie down and if the unease persists, write some code..."

-- Brad Bowman, in 'DFA/NFA context is non-local'

perl6-language

RAII in Perl6/Parrot

Previously on this thread, Blair Sutton asked if Perl 6 would be able to do RAII. He cited some articles which expressed the view that it was not possible in Python due to the fact that garbage collection does not offer deterministic finalization. This led to the question of whether Perl 6 would suffer from the same problem due to Parrot's style of garbage collection.

Larry Wall replied that deterministic reference counting was only one way to provide transactional security and timely destruction. He assured Blair that Perl 6 has ways to let you not care about some dependencies, while paying attention to others.

Blair appreciated Larry's explanation, and admitted to relying on the deterministic nature of C++, and using RAII to manage locks between threads and tear apart sockets cleanly. He asked for an example of Perl 6 offering the capability to execute code once every reference to an object has been removed. Luke Palmer replied that the LEAVE closure trait was a general method for addressing this.

This week, Blair posted a script in Perl 5 with a multi-threaded RAII idiom. Blair asked if the LEAVE closure trait takes the previous role of P5's DESTROY or if it will always be executed when one falls out of scope.

Numeric Semantics

Last week, the subthread was further expanded, with TSa suggesting that all rounding functions such as floor, round and trunc take an optional second argument which defines the jump size. TSa also proposed a number of division function pairs, such as fdiv and fmod for flooring division and modulus, or tdiv and tmod for truncating division and modulus. Smylers felt that this would introduce far too many functions in to the Perl core, given that few people would use them. Smylers felt that it was more appropriate to have them as modules. Jonathan Lang added that it was unlikely anyone would need multiple definitions of division and modulus at any given time, so modules made sense. The only question he saw was which definition was default, the mathematically elegant one or the industry standard one.

The main thread was revived when TSa replied to Luke Palmer's question of whether 1 is different from 1.0. TSa wanted 1 to be an Int and 1.0 to be a Num. There was some discussion with Jonathan Lang over the relationship between Int and Num, specifically which one does the other.

This week, Larry Wall put his foot down and stated that the default / operator is not going to do integer division and that this is not negotiable. Later in the thread, Larry said that for various practical reasons, he didn't think that Int can be treated as a subset of Num. He agreed that 1.0 == 1 !=== 1.0.

Larry's messages generated praise from Smylers, but TSa was not satisfied. However, he did not receive a noteworthy response this week.

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

This commit message by Larry Wall logged the following: "Tweak | to provide longest-token instead of short-circuit semantics. Now use || for old short-circuit semantics!" In a follow-up message, Larry elaborated:

This checking majorly changes the semantics of | within regex to support required longest-token matching semantics rather than left-to-right matching. It will enable us to write parsers more consistently, and it also opens up normal regexes to better optimization via tries and such. You can now use || for the old | semantics, which is majorly consistent with how | and || work outside of regexen.

Patrick Michaud asked if a similar situation would arise for & versus &&. Larry answered that, for reasons of consistency, that would indeed be the case.

The S13 "is commutative" trait

After reading that binary operators may be declared as commutative, Dave Whipp asked if this is restricted to only binary operators, or if he could tag any function/method with the trait. After a brief discussion, Larry replied that he had decided "is commutative" must die of ill-definedness. See instead the recent S13 change to support multiple signatures on a single body.

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

This commit, by Larry Wall, changes how regular expressions are analyzed. They are seen as pattern/action pairs and grammars as collections of those pairs. In addition 'token' is defined more rigorously.

Remember: Outlaw to declare a lexical twice in the same scope

Steve Lukas reminded people of a proposal from September which involved a change on S04 and linked to an earlier edition of this summary to describe the conclusions which had been reached. He requested that the changes be made. Carl Mäsak added that he also considered this to be an important issue. He wanted to see a warning when a lexical is declared twice in the same scope.

Dave Mitchell and Smylers clarified how it works in Perl 5 (it's possible, but generates a warning).

DFA/NFA context is non-local

Brad Bowman expressed his concern about the context dependence of DFA prefix mode. He felt this might be because he hadn't yet digested the new rules completely.

Smooth or Chunky?

Larry Wall asked for some advice with a missing generalization that he hadn't been able to work out yet. Given that zip and each produce similar results, he wondered what is the use of two functions which do almost the same thing. This led him to believe that zip should return something different and let the context determine whether the result should be flattened. This led to musings on a default smooth and an optional chunky, and a question on whether chunky should be the default when it makes more sense. He suggested various options.

Darren Duncan thought that the Perl 5 approach of default 'smooth' with optional 'chunking' was appropriate. As an example he offered the smooth map { $_, $_ * 10 }, 1..3 versus map {[$_, $_ * 10]}, 1..3. Larry replied that this was one function where the approach was possible, but that Perl 5 has many places where it fails to scale well to a multi-programmer team.

Ruud H.G. van Tol believed that it looked like a 'multiple faces' domain. He sees the dimensionally structured data as a living entity which should give different representations depending upon the requirements. As an example, he cited a meal, a recipe and a shopping list, adding that his preference was for the shopping list to be ordered by where things are found in the store. Brad Bowman suggested that the dimensional information should be retained, but that it might not need to be returned.

Ben Morrow proposed [[]] as a nice visual way to indicate that a list should be built. Blair Sutton listed several possible syntax options. Austin Frank joined in, offering the outverse of [;], namely ];[.

Map on a multislice

Joe Gottman wanted to know if map on a multislice performs deep or shallow iteration. He wanted to know what the default iteration level was and how to override it. Dr. Ruud added that there's also the option of depth first or width first.

perl6-internals

[perl #41185] [BUG]: examples/shootout/regexdna.pir.input: Persistently failing test

Earlier, in ticket [perl #41185], James Keenan reported a problem with a failing test in shootout.t on Mac OSX.

This week he reported that tests had passed for several weeks, but had recently started to fail again. He included the output of make test. As of February 6th, the test was still failing on Darwin.

Re: [perl #41230] [BUG] t/codingstd/perlcritic.t uses too many resources

Earlier, Jerry Gay complained that the perlcritic coding standards test was using resources, and asked in ticket [perl #41230] if someone could look in to this problem. Paul Cochrane reported that he thought there was a memory issue relating to critique() and that the memory was only freed up when the tests for a given policy are complete. Paul elaborated on what what he had attempted to address the issue.

This week Jerry Gay congratulated Jeffrey Thalhammer on version 1.01 of Perl::Critic, which solved the memory issue.

[perl #41267] [TODO] rename 'clip' pdd directory to 'draft'

In ticket [perl #41267], Jerry Gay announced that the clip directory had been renamed to draft.

[perl #41280] [PDD] adding methods to subs as objects

In ticket [perl #41280], Allison Randal quoted Patrick Michaud from IRC. Patrick explained that Larry Wall's most recent change to S05 would require adding the ability to attach methods to subs.

[perl #32667] [PATCH] IMCC - documentation needs updating

Bram Geron included a patch in ticket [perl #32667] which adds new syntax to docs/imcc/syntax.pod and fixes some typos. It also references where flags are explained. It was applied as r16678.

More embedding questions

Isaac Freeman explained that he needs an embedding interface which allows more control over the interpreter and cited some examples of control he required. He asked specifically about the ability to inspect and modify namespaces. chromatic pointed him to PDD 21, which is not completely implemented.

repository open for commits

Jerry Gay announced that the repository was now open for commits again, following the recent Parrot release.

[perl #41287] [PATCH] fix 0.4.8 announcement on parrotcode.org

Allison Randal created a ticket ([perl #41287]) with a patch to fix typos in the release announcement for 0.4.8. Will Coleda applied it.

[perl #41291] [BUG} Can't use null PMC with :multi sub

In ticket [perl #41291], Matt Diephouse included an example piece of code demonstrating the problem. Leopold Toetsch noted that a NULL PMC was never actually specced, but that he did consider it like a NULL pointer in C. He felt it was debatable whether the use Matt demonstrated should be allowed.

[perl #41292] [PATCH] make languages/cola/{lexer,parser}.c comply with coding standards

In ticket [perl #41292], James Bence submitted a patch to make the test t/codingstd/trailing_space.t pass. He felt it would be best to make a utility program which would eliminate trailing spaces.

Paul Cochrane asked which version of Parrot James was using, as the files involved should be marked as exempt because they are automatically generated. In r16702 the tests pass even without the patch.

Tcl, trace, profiling...

Will Coleda announced that he had two issues with the new Tcl implementation: speed and the implementation of trace. After noting that there is a way to set traces for Parrot subroutines, he requested the ability to declare hooks to call pre- and post sub invocations. Ideally these could be declared at compile time. He offered to write more complete specifications if the idea was interesting to others.

Allison Randal offered a few comments and requested the detailed proposal. Jerry Gay advised looking at Perl 5's Hook::LexWrap. Klaas-Jan Stol offered a suggestion which would leave the original subroutine untouched.

[perl #41293] [BUG]: t/compilers/tge/basic.t: Failed during 'make test' but passed with 'prove'

James Keenan reported a failing make test. This was ticket [perl #41293].

How handle the next parameter of invoke method in a PMC ?

François Perrad stated that in Lua, a metamethod __call is required. He included some code demonstrating what he would like to do, and noted that the code and some todo tests had been added.

[perl #41310] [CAGE] autogenerated PMC stubs kill compile

Allison Randal created ticket [perl #41310]. She reported that PMC stubs which are generated with tools/dev/gen_class.pl terminate the compilation the first time miniparrot is run because the new stub overrides the namespace method. She suggested ways in which this might be solved.

[perl #41312] [TODO] - Docs - update FAQ

In ticket [perl #41312], Will Coleda pointed out several outdated facets of the FAQ and requested that they be fixed.

[perl #41317] [PATCH] parrot component/interface stability classification

In ticket [perl #41317], Jerry Gay included a patch of a document classifying Parrot component and interface stability. He requested comments. Allison Randal approved of the document.

[perl #41320] [PATCH] Added rename() method to os.pmc

Ticket [perl #41320] contained Kay-Uwe Huell's patch with a rename function. It was applied as r16771.

[perl #41323] [CAGE] convert C<theINTERP> to C<interp>

Jerry Gay made a ticket ([perl #41323]) where he noted that any instances of theINTERP should be spelled as interp. Nuno Carvalho submitted a patch, which was applied as r16789. Jerry Gay was able to confirm that it worked for Win32 in addition to Linux.

[perl #41324] [PATCH] Eliminate '//'-style comments

Andy Dougherty submitted a patch to remove // comments, which were giving problems with his compiler. See ticket [perl #41324] for more information.

[perl #41325] [PATCH] Fill in missing pointer cast in

Andy Dougherty submitted a patch to allow Parrot to compile on his old Sun C compiler. He put it in ticket [perl #41325].

[perl #41326] [PATCH] Work around an optimization bug in Sun's WorkShop Compilers 4.2

In ticket [perl #41326], Andy Dougherty submitted a patch to work around an obscure bug in Sun's WorkShop Compilers 4.2.

[perl #41328] [BUG] pmc2c generates unnecessary code for void functions

Jerry Gay reported some warnings when compiling src/pmc/pmethod.c in ticket [perl #41328]. James Keenan explained the origin of the code in question, and advised moving the code to a branch until tests prove it suitable for trunk.

[perl #41329] [BUG]: Imposition of coding standards breaks tests in t/tools/pmc2cutils/

James Keenan noted, in ticket [perl #41329], that coding standards tests break some tests in t/tools/pmc2cutils. He believed that it happened in r16751, when code was changed to conform with the standards but wasn't run against the tests and submitted a patch to correct the problem. Paul Cochrane explained that he had run the tests, but that he hadn't done enough, and apologized.

[perl #41331] Imposition of coding standards breaks tests in tcl.

In ticket [perl #41331], Will Coleda referenced an earlier thread ([perl #41329] [BUG]: Imposition of coding standards breaks tests in t/tools/pmc2cutils/ ) which mentioned that some tests failed as a result of coding standards being applied. Several Tcl tests were failing. They were fixed by r16774.

__init vs. __init_pmc

Leopold Toetsch noted that some changes not too long before the release had broken pg.t. He found the problem in the object constructor, and mentioned that he'd made several attempts to unify object construction but that it wasn't very successful.

Matt Diephouse explained that he had made the change with Allison Randal's approval, to eliminate differences between PMCs and objects. Leopold replied that he thought the differences were confusing but that they still were. He linked to his proposal for method calling.

[PATCH] PIR language using PGE (2)

Klaas-Jan Stol submitted a patch for PIR using PGE. Jerry Gay applied it (with minor changes) as of r16831.

[perl #41353] [PATCH] Extended very limited PIO_unix_pipe() function in src/io/io_unix.c

Kay-Uwe Huell created ticket [perl #41353]. Included was a patch to extend the open function.

perl6-compiler

Parrot 0.4.8 Released

Jerry Gay announced the release of Parrot 0.4.8, "Eponymous".

Jarkko Hietaniemi questioned whether there was in fact extended support for Tru64, as he had only reported problems for subsystems like PGE. chromatic offered Jarkko commit access, but Jarkko declined.

Matt Diephouse volunteered to work on Tru64 if someone could give him access to a system. Nicholas Clark replied that HP gave access to a number of test systems, but not Tru64. Jarkko grumbled about HP's restriction. Unfortunately he was not able to provide a developer with Tru64 access. He thought that perhaps development on any 64-bit platform would already improve Parrot.

Acknowledgements

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

February 23, 2007 15:43

February 22, 2007

Audrey TangVarious uses of embedded Perl 5.

For a long time now, Pugs embeds a Perl 5 runtime alongside its GHC runtime, providing seamless support for CPAN modules, including XS ones like DBI:

use perl5:DBI;
my $dbh = DBI.connect('dbi:SQLite:test.db');
$dbh.disconnect;

In addition to explicit use, there are several less well-known places where Pugs implicitly delegates to the Perl 5 runtime.

For example, today jisom++ asked on #perl6 about Pugs's counterpart to Perl 5's -T operator, i.e. testing if a file looks like plain text). Syntactically, filetest operators in Perl 6 are done via smartmatches against pair literals:

say "text file" if 'README'~~:T;
given 'README' { when :T { say "text file" } }

Semantically, because the heuristics for :T is rather hard to duplicate, we simply delegate to the Perl 5 runtime:

-- Pugs.Prim.FileTest:53
evalPerl5 ("sub { -" ++ testOp ++ " $_[0] }")

Another example is named Unicode charaters in double-quoted string literals:

say "\c[BLACK SMILING FACE]"; # ☻

Again, we simply delegate to charnames.pm in the Perl 5 runtime:

-- Pugs.Parser.Charnames:17
evalPerl5 ("use utf8; use charnames ':full'; ord(qq[\\N{"++name++"}])")

This is certainly a win -- the alternative way involves shipping the entire UnicodeData.txt with Pugs, which would be no fun at all.

The same principle applies to the crypt built-in function, which has this one-line implementation that simply calls the Perl 5 function with the same name:

-- Pugs.Prim:1083
op2 "crypt" = \x y -> opPerl5 "crypt" [x, y]

As moritz++ remarked on #perl6, such pass-through measures is a fine example of laziness, a virtue recognized by Perl folks and Haskell folks alike. Yay for laziness!

February 22, 2007 17:27

February 21, 2007

Audrey TangPugscode.org services.

During the past couple months, #perl6 has revamped several pugscode.org services:

Run.pugscode.org
andara++ has updated the popular run-perl6-in-your-browser page to the latest development version, featuring a much more responsive UI via AJAX and mod_perl, and preloaded sessions.

Dev.pugscode.org
A developer-oriented Wiki workspace based on Trac, featuring integrated source tree browser, ticket tracker, as well as devbot6, a new TracBot on #perl6 that announces workspace edits and planet six posts.

Svn.pugscode.org
Pugs's primary repository is now running on Subversion 1.4.2, providing much faster (30%+) turnaround for SVK 2.0 users with its pipelining/ra_replay support. We still have two read-only mirrors at svn.openfoundry.org and svn.perl.org, updated every minute.

Darcs.pugscode.org
Our read-only Darcs mirror is now powered by Tailor, which preserves information on committer and commit messages.  Thanks to proper checkpointing, darcs get --partial http://darcs.pugscode.org/ should be much faster from now on.

Spec.pugscode.org
In addition to the Perl 6 specification (rendered as HTML and annotated by acceptance tests), we now track the rest of pugs/docs/Perl6/ as well.  Also, specbot6 now announces changes to the Perl 6 specifications on #perl6.

Invite.pugscode.org
This is where committers on #perl6 hand out commit bits to new Pugs hackers, powered by CommitBit.  The nickname/password is shared by svn.pugscode.org and dev.pugscode.org.

All services above runs on feather.perl6.nl, the Perl 6 community development server donated and tirelessly maintained by the most excellent Juerd++.  Many kudos!

On a more personal note, I was finally discharged from the hospital today.  There will be a follow-up check in 3 days; if all goes well, that'll be the end of this rather unfortunate episode. Yay!

February 21, 2007 12:44

February 20, 2007

Audrey TangIntermission over.

Initially, I thought it was typical burn-out. Between the intense Brazil hackathon (with fglock++, incrementally-built bootstrapping compilers; with cmarcelo++, metaobjects in Haskell for 6.28.0) and moving to a new residence, a few weeks of rest seemed natural.

As the sudden drowsiness and strange non-motivation worsened, I thought it's some kind of mental block, and focused on Jifty instead.

But when external emergencies demanded my attention, all focus was suddenly lost, replaced by massive panic and self-doubt, leading to e.g., the cancellation of my POPL trip just before boarding.

At last, nine days ago, I was hospitalized at the brink of liver failure. Months of intellectualization and analysis was proved immaterial, as there is one very simple explanation: Acute Hepatitis B. The symptoms quickly ceased, thanks to lamivudine, and I expect to be discharged tomorrow, with 95%+ chance of full (immune, non-carrier) recovery.

With the nearest $job/conference safely booked at one month away, I've put various unpleasantries behind me, started populating the new dev.pugscode.org workspace, and resumed Pugs hacking (aiming for a March release of the much-delayed 6.28.0).

So... Stay tuned for backblogs on the progress happened during my absence. Viva la vie!

February 20, 2007 04:42

(March 06, 2007 20:02 GMT)






This site is powered by planetplanet