Perl 6 summary, 01-07 Apr, 2007

kudra on 2007-04-21T07:44:32

This week on the Perl 6 mailing lists

"developers shouldn't live in fear of $^O"

-- Jerry Gay, in 'Use of English pragma'

Language

Second Perl 6 Microgrant - Phil Crow on Java to Perl 6 declaration converter

Leon Brocard announced that the second Perl 6 microgrant had been awarded to Phil Crow for his proposal to convert Java declarations to Perl 6. More information about his proposal can be found in the grant application text.

Details about the microgrant application procedure are available for those interested in submitting a proposal.

[S03] typo

Jonathan Lang submitted a patch which corrects a typo in S03.

[S03] Range Semantics

Jonathan Lang suggested a change to S03 which was inspired by the new array indexing syntax from S09. This would make Ranges in an array index a natural outgrowth of the standard Range semantics.

[S03] Negation metaoperator

Jonathan Lang had a proposal to generalize the negated relational operators to apply to any infix operator which returns a boolean. Larry Wall rejected the suggestion because the relationals Jonathan named are typed to return Any, not Bool.

Parrot Porters

[perl #39934] [PATCH] Make disassemble useful.

Kevin Tew created ticket [perl #39934] with a patch and requested feedback...back in July of 2006. Paul Cochrane applied it as r17922 on April 1st.

[perl #41774] [BUG]: Failures in 5 tests during 'make test'; partially patched

James Keenan created ticket [perl #41774] to report errors on 5 different tests. Later he closed the ticket because the failing tests were identified as part of ongoing work and the tests were no longer failing.

[perl #41860] [CAGE] Run Parrot under Coverity Prevent

Paul Cochrane wanted to get Coverity to run Prevent on Parrot. This was ticket [perl #41860].

More recently, Paul reported that he'd received a reply stating that Parrot could certainly be added, but that no date estimate was available at the moment.

Syntax for Constructing new Objects (and classes?)

This thread began with Klaas-Jan Stol asking about the syntax for constructing new objects because he thought that it was going to be changed. Allison Randal replied with examples of the two proposals for the new syntax.

This led Alek Storm to ask if new() would be a vtable method or a PCCMETHOD. Jonathan Worthington confirmed that it is a PCCMETHOD. Allison elaborated that it is a class method.

More recently, Alek replied that he thought that new should be kept an opcode, and new() should be a vtable method which is called from inside the new opcode. Jonathan Worthington was confused by Alek's proposal. He suggested making BaseClass implement all the vtable variants of a method, and Class can inherit from it and provide a sane interface. Alek thought that Jonathan's suggestion was similar to one he had made in [perl #41619] but that Jonathan's explanation was superior. Allison also added her thoughts to this subthread.

In the main thread, Jonathan proposed deprecating the old syntax in the next release and removing support for it in the following release. Allison agreed to marking it as deprecated now. Joshua Isom wanted the dot syntax to still work so that tests wouldn't need to be rewritten. Allison explained that there were several reasons to remove constants for types and the class registry.

compilers/pirc continued...

Klaas-Jan Stol added a vtable to the parser in compilers/pirc. He proposed looking at the bcg project to see if it would fit in with compilers/pirc. Allison Randal thought it was worth exploring.

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

A commit by Allison Randal integrated some questions and comments into the Objects PDD. Jonathan Worthington had a few comments, such as noting that resolve is sugar rather than something new, and that comments about offsets should go away. Allison noted that resolve is the preferred way of dealing with conflict resolution, and removed references to offsets.

[perl #42261] Extensive failures in t/compilers/imcc/imcpasm/*.t and t/pmc/sub.t

James Keenan posted some failures in make test in ticket [perl #42261]. Paul Cochrane reported that he was unable to replicate the failures with r17914 and asked James to check his revision. James looked into it further and concluded that the name of the sandbox was affecting the test results. He wondered if anyone could explain why that was happening.

[svn:parrot-pdd] r17921 - trunk/docs/pdds

A commit by Paul Cochrane noted that Perl code with __END__ or __DATA__ blocks should not get an emacs or vim coda. Shawn M Moore suggested putting the coda at the top of the file, but Paul explained that this had been attempted but proved to be a poor solution for several reasons.

[perl #42267] [CAGE] Work out how to encourage good editor-independent formatting habits

Paul Cochrane created ticket [perl #42267] with the mission "Figure out how to encourage good formatting habits, without assuming that everyone uses emacs or vim, and with minimal clutter in our source code. Also write a coding standards test to codify this."

[perl #39878] [CAGE] generated files with timezoneless times

In ticket [perl #39878], Will Coleda wanted tools which insert messages into generated files to include a timezone (which should always be UTC). Paul Cochrane said that generated files are checked for timestamps in codingstd/gmt_utc.t and that config/init/defaults.pm was updated in r17923 to pass the test.

[perl #40861] [CAGE] - add a Perl::Critic policy to look for FIXME|TODO|XXX

In ticket [perl #40861], Paul Cochrane suggested adding a check for 'FIXME'/'TODO'/etc for the Perl source files, as there is currently only a check for the C files. This was done in r17925.

Chris Dolan suggested using an existing Perl::Critic policy. Will Coleda asked if Andy Lester would accept a patch which would optionally permit 'TODO' comments which included ticket numbers and reject those which don't include ticket numbers? Andy replied that he didn't want to build exceptions, and proposed that people just write 'RT #12345' instead of 'TODO (#12345)'. Paul Cochrane agreed with this suggestion.

Link'n'Load on Windows

Ron Blaschke reported that he was looking into errors in linking and loading on Windows. With linking, there were some symbols which weren't exported. He planned to provide a patch to export them.

To solve the loading issue, he wanted to change several files to include the full path.

Current State of Building Parrot on Cygwin

Ron Blaschke reminded the list that it is necessary to include the absolute path to blib/lib in the PATH environment variable to build on Cygwin. He also explained that some problems could be due to a file having Windows line endings.

Eric Hanchrow wondered if it was possible to make Parrot less fussy about the line endings. Ron wanted to see that happen, but explained that his suggestions were workarounds until the problem was resolved. Steve Peters said he would be looking at how to improve the process.

Ron described his thoughts in more detail in 'Link'n'Load on Windows.' chromatic asked if it was possible to pass flags to the linker to hint at the path, which is how the Linux version works. Ron thought that was handy, but hadn't seen something similar for Windows.

[perl #42270] [PATCH]: Configure.pl: refactor options processing functionality

In ticket [perl #42270], James Keenan posted a patch which removes command-line option processing from Configure.pl and puts it in a library. This was done to make testing easier. The patch was applied as r17983 and 17984.

[perl #42271] [PATCH] Borland C++ cleanups

In ticket [perl #42271], Steve Peters submitted a patch which cleans up Parrot for Borland C++ on Windows. This patch does not completely solve compilation issues because it seems to create new issues on Linux. chromatic applied it as r18134.

Hash iteration question

Jonathan Worthington showed two examples of iterating through a hash, and noted that in his first example you will only get the first key in the hash. He believes that the hash and iterator code are closely tied and isn't thread safe.

Allison Randal replied that the significant differences are down to the iterator's shift_pmc throwing an exception if the key is -1, while shift_string doesn't check. She agreed that the code was excessively mixed and needed review. Leopold Toetsch added a further explanation on the implementation.

PDD15: newclass

Jonathan Worthington had a comment on PDD 15 and how it described the creation of a new class. He wondered about the implementation. Allison Randal replied that the newclass opcode will be a simple opcode. Jonathan implemented what Allison described and created a test for it as well.

[perl #42072] [BUG]: pmc2c.pl: Does anyone (know how to) use the 'no-body' option?

In ticket [perl #42072], James Keenan noted that nobody had spoken up in favor of retaining the no-body option. He said that he would take the ticket and assign the revisions to participants of the Perl Seminar Phalanx Phoneix project in NY.

[perl #42279] [PATCH] Parrot cleanups - part 2

Steve Peters submitted a patch in ticket [perl #42279] which had some cleanups to make Parrot work better with different C compilers. It was applied as r17952.

Paper on Software Patterns in Parrot

Klaas-Jan Stol mentioned that he had recently taken a course on software patterns and co-authored a paper on patterns in Parrot, which he put on the wiki.

[perl #42286] [CAGE]: Parrot::Pmc2c::PCCMETHOD constants should be autogenerated

Jerry Gay noted that lib/Parrot/Pmc2c/PCCMETHOD.pm contains a number of constants, which should be generated during the configure process and included. Ticket [perl #42286] discusses this request.

[perl #42287] [TODO] MMD needs to be in a PDD

Jonathan Worthington wanted multi-method dispatch to be documented in one of the PDDs or get its own PDD. The request was made in ticket [perl #42287].

[perl #42292] [TODO] modify PCCMETHOD syntax to more closely match PDD03

In ticket [perl #42292], Jerry Gay requested that the PCCMETHOD syntax be modified to put it in line with PDD 03. chromatic offered a patch.

[svn ci] NCI methods now name-mangled

Jonathan Worthington explained that he was starting to move class functionality into vtable methods, but ran into the issue that you cannot have a METHOD or PCCMETHOD with the same name as a vtable method. This is, however, required to implement the interface specified in PDD 15. He made some changes to get Parrot working again, which affected the Complex PMC.

François PERRAD reported that this change breaks Lua. Allison Randal observed the same thing, and asked Jonathan to either fix the problem for Lua or revert the change from the trunk. Jonathan apologized for breaking things and said that it was fixed in r17982.

Leopold Toetsch suggested that perhaps language maintainers who are using "features" of Parrot could submit core tests for these features, so that this type of problem won't occur in the future. Joshua Isom thought this could be expanded to anyone using Parrot where a "feature" isn't tested. He proposed an open repository for tests. chromatic wondered if it was that difficult to mail in patches. Joshua offered some arguments in favor of it. chromatic

parrotcode updates.

Will Coleda solicited for suggestions concerning parrotcode.org because the current system requires that he do quite a bit of work every time that directories are moved or files are added. He proposed having a directory on the site which is a checked in version of the docs/html directory after a make html. He also suggested having docs for the latest release as well as for the 'svn head'.

[perl #42293] t/doc/pod.t vs. tools/doc/pod_errors.pl

In ticket [perl #42293], Will Coleda suggested removing the script tools/doc/pod_errors.pl because the functionality is already replicated in t/doc/pod.t. Also, the script finds errors which the test does not, which requires investigation.

Joshua Isom reported that he got a segmentation fault when he tried to run the script. When he persisted with running it, he found that it appeared to have a stricter POD checker. Jerry Gay thought that perhaps the script and the test were checking different files.

Paul Cochrane found that on Gentoo the t/codingstd/c_indent.t test caused Perl to segfault, but with a new Perl compilation it worked. He was curious because he wondered if the error was due to Gentoo Perl. Joshua replied that he was using Darwin.

Paul also remarked that the script reported where the errors were in the file, which the test didn't do. Jerry Gay and Nicholas Clark commented on this.

[Fwd: YAPC::Europe Call for Hackathons]

James E Keenan reposted a call for hackathons which was published for YAPC::Europe 2007. He felt that the Chicago Hackathon had been good for Parrot, and hoped that someone would lead a related Hackathon at Y::E. More information about the offer can be found on the Y::E website.

Re: [perl #42299] AutoReply: $P symbolic register allocation bug

Yehoshua Sapir remarked that the code in [perl #42299] worked on OS X.

[perl #42300] [PATCH] t/pmc/sub.t: test for creation of lex by clone op

Yehoshua Sapir submitted ticket [perl #42300] which contains a patch to test the creation of lex by the clone op.

[perl #42305] [PATCH]: Configure.pl: Move STDOUT messages to Parrot::Configure::Messages

James Keenan created ticket [perl #42305] to submit a patch which makes lib/Parrot/Configure/Messages.pm output messages to STDOUT (previously this was done by Configure.pl). This will make testing easier. It was applied as r18027.

[svn:parrot-pdd] r17987 - in trunk: . docs/pdds docs/pdds/draft

Allison Randal made a commit which moved PDD 15 (objects) out of the draft directory.

Use of English pragma

James E Keenan noted that Configure.pl uses one of the English variables, namely $OUTPUT_AUTOFLUSH. He wondered if there was a policy regarding the use of the named variables instead of their short versions. Jerry Gay felt that it was wrong to use the English variables.

James said he would convert the variable while refactoring. He created ticket [perl #42333] to remind him of this task. Later this was done and applied as r18033.

[svn ci] PMC documentation guidelines draft

Jerry Gay remarked that he had committed a draft of PMC documentation guidelines in r17998. The document is meant to explain the style of documentation which should be used for core PMCs. Klaas-Jan Stol had some additions, borrowed from 'Perl Best Practices'. Joshua Isom questioned Klaas-Jan on some of the points, and Klaas-Jan elaborated.

[perl #42312] src/pmc/os.pmc: bad use of stat(2) and lstat(2)

In ticket [perl #42312], the output of t/pmc/os.t which fails on Solaris 10 was attached.

[perl #42313] improper casting to void * in src/dynext.c

Ticket [perl #42313] contained a small patch to change load_func from a void pointer to NULL. Leopold Toetsch explained that the cast was being used. Nicholas Clark answered that the casting isn't allowed under strict ANSI C, but that he preferred assigning a plain 0 rather than a NULL.

[perl #42320] [BUG] Memory leak with String pmc

Mehmet Yavuz Selim Soyturk reported a memory leak in some example code. This was mentioned in ticket [perl #42320].

vtable cleanup and questions

Jonathan Worthington reported that he is adding the new vtable entries required for PDD 15. He wanted to know if become_parent could be removed, or if it needed a standard deprecation cycle. He also noted that the subclass vtable method needed to be removed, but that it was in use by ParrotClass and ParrotObject.

Jonathan also noticed PMC* new_singleton() and PMC* get_anonymous_subclass(), which don't appear to be used. He wondered if they should be removed. Finally, he wanted to know if get_attr and set_attr should be deprecated.

Nicholas Clark confirmed that become_parent isn't used anywhere. Will Coleda voted for a standard deprecation cycle. Allison Randal confirmed this.

She also agreed that the subclass vtable method won't be needed in the future, and that get_attr and set_attr could be deprecated when the full change to PDD 15 is complete. new_singleton() and get_anonymous_subclass() were described as "a case of being overly prepared for possible future needs."

Minor notes/suggestions on PDD15

Klaas-Jan Stol had some suggestions for PDD 15. He had some suggestions for improving consistency. Additional comments were on opportunities for syntactic sugar and a proposal that operators such as find_method have the option of throwing an exception rather than returning a NULL PMC on failure. Allison Randal remarked that the exception question was under consideration in I/O as well, and that the consistency issue would be considered when she looked at the Opcodes PDD. Joshua Isom had a few suggestions as well.

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