"But having it match what perl6 will do is even more important than having it make perfect sense, IMO.", Yitzchak Scott-Thoennes, thinking about forwards compatibility.
Following on from the threads 1.33 conversation last week that was given short shrift in last week's summary (sorry Jerry),
Hedden put forward a proposal to nail down the semantics of what happens when a thread calls
exit (and more to the point,
what to do about everything that might want to clean up after itself).
Throw in a
__DIE__ handler or two,
and you're starting to talk about some serious fun.
Jan Dubois and Rafael Garcia-Suarez commented on a number of points that Jerry raised, and while Rafael didn't agree with a few things, he was quick to point out that he didn't have any definite opinions one way or another, only that he wanted the best possible solution to come out the discussion.
Dave Mitchell wondered whether it wouldn't be possible to add an
exit method to the threads class,
which would apply only to the thread,
leaving the core
exit to behave as usual.
In through the out door http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg00996.html
Jerry the checked with the porters to see whether everyone agreed to what he thought threads should do. Jan and Liz Mattijsen gave their assent.
Just to be really certain, Jerry then posted a consensuality matrix, to get people who had made suggestions to sign off, or explain what they disagreed about. The moral of the story is that calling
exit() as a thread method ends the thread, but calling
exit() ends everything, modulo some differences in opinion over how much to warn about and when.
fluid neon origami trick http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01049.html
Jerry went about modifying the threads module to do all this and ran into problems with too many
ENTERs and not enough
LEAVEs and the like. Jan said that he had no time to look closely, but eyeballed Jerry's code, sketched out a brief idea of what needed to be done. Jerry picked it up and ran with it, and straightened out all the problems.
Balancing act http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01087.html
By the end of the week, Jerry had the new implementation up and running to his satisfaction, except for a nagging problem of
die messages not being captured by the test harness, thus polluting the output.
Weaving in and out http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01134.html
Dave Mitchell listed the available possibilities:
New month, new thread http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-07/msg00019.html
After having looked over the stellar achievements of Dave Mitchell in removing
eval leaks (caused when the
eval'ed code fails), Nicholas Clark listed the remaining known leaks and asked for help in trying to identify the code paths taken (which would help in figuring out how to plug them).
Dr. Ruud suggested taking a look at a tool called
MemProf. Dominic Dunlop answered the question with a question, and offered another leak to add to the list.
Lost property http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01001.html
chromatic posted a short, sharp snippet of C, showing how easy it is to insert your own XS code into an existing op code, which opens up all sorts of interesting possibilities.
Continuing in the I-didn't-know-Perl-could-do-that vein, Chip Salzenberg discovered that this meant that
C is inside package
::B:: which in turn is inside
A, and thought it was all rather evil.
Sadahiro Tomoyuki traced the change down to somewhere between 5.004_04 and 5.004_05, when
scan_words in toke.c was modified to permit this, some time back in 2003. No-one appeared to remember the reason.
Steve Peters was going over the new smart match (
~~) operator from Perl 6, that Robin Houston added to
blead last year, and making sure it was well tested. He wrote a couple of tests, was puzzled by the results, and wondered whether the problem lay with the implementation, or with the documentation.
Yitzchak Scott-Thoennes analysed Steve's reasoning, but no firm conclusions were made.
Steve Hay announced that he had set things up to make
Win32API::File a first-class dual-lifed module, in
blead and on CPAN. He called on Jan Dubois to see whether Jan needed or wanted to do anything about
libwin32. There was discussion of moving files from
ext/Win32, which would ease the building of perl on Cygwin.
It just got bigger http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01129.html
Some discussion followed as to whether or not it would make it in time for 5.8.9.
John E. Malmberg offered a short patch to correct a function that failed to append a null character to strings, which gave the underlying C library indigestion since it was expecting one. Rafael applied.
Overshooting yourself in the foot http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg00974.html
Similarly, Jarkko Hietaniemi taught
cflags.SH to scan the gcc warning flags only once:
Andy Lester set about adding
lint-like tool) support for the porters. First off he created some embed.pl enhancements:
And then followed with some Makefile
splint support. It doesn't quite do everything that it should, and Andy called upon other people (hi Jarkko!) for help.
Elsewhere in the code base, Andy tweaked DProf.xs to only compile a small static function if in fact it was actually required in the current configuration.
He then turned his attention to ye cruftey olde mathoms.c. Just because they're obsolete doesn't mean they can't be squeaky clean.
And for dessert, Andy tidied up mg.c, by localising a variable here and there, and encapsulating
Perl_* calls in macros.
Vadim Konovalov wanted to clean up win32/buildext.pl by removing an explicit
close, since just nearby is a similar
open that also omits the
Yves Orton that a better idea was to rewrite the code, because it's a complete mess. (Amd it isn't particularly big, either).
Innovations in brace placement http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-07/msg00007.html
Jarkko noted some failures had been cropping up in recent smokes, but didn't feel they were specific to the platform (Tru64) he was running.
Nicholas Clark explained what the issues were. One was a simple test design issue that anybody with a reasonable grasp of designing tests should be able to figure out. Alas, no-one had volunteered to have a look. Jarkko asked for more background.
Background check http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg00090.html
The other issue was one of
eval leaks, and Jarkko courageously deferred to Dave Mitchell as the likely fixer of that.
Snot funny http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01000.html
Anno Siegel looked at one of Steve Hay's smokes, and wondered how one was supposed to interpret the results. H. Merijn Brand explained the general case, and Steve explained what was going wrong in this particular case.
Inconsistent test results (between TEST and harness) http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01127.html
H.Merijn looked at one of Abe Timmerman's failing Solaris smokes and traced it down to a change he'd made to
Configure following on from a suggestion from Andy Dougherty. Andy thanked H.Merijn for the catch and noted that the entire hack was no longer needed anyway, since the original problem (one of 64-bit tests) has since been fixed.
Jan Dubois wrote to say that it is possible to install
DBD::Oracle for ActiveState, at the price of also downloading many megabytes of Oracle libraries.
But alas, only for 5.6 http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01081.html
The code was corrected to handle this problem, and Yves folded the original bug report into the test suite. Yves then went on to rewrite the regexp display code, since, up until now, control characters have always been invisible, which makes it much harder to understand bug reports when control characters are present.
She's lost control http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-07/msg00012.html
Jaymax was having problems upgrading 5.8.2 to 5.8.8.
miniperl was dying with a
Undefined symbol "nl_langinfo" error. No takers as yet.
Nik thought that he would have saved a lot of time if perl complained about trying to use keys in
%SIG that don't refer to valid signal handlers. Rafael thought that the problem might be because that the code in question was not, in fact, running with warnings enabled.
Ask no questions, tell no lies http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg00976.html
Sebastian Schmidt kicked off a long thread about whether or not
@ISA should be referenced in
perlvar or not. The main dissent was due to the fact that
@ISA isn't particularly special as far as perl is concerned, it merely has lots of cultural conventions associated with it.
Nevertheless, it was agreed that
perlvar should in fact list all extraordinary variables, with
L<> references to the appropriate pages if a better definition already existed elsewhere.
John Gardiner Myers was having some trouble compiling
Encode::Detect with the GNU C++ compiler. Andy Dougherty realised that
blead had already solved this problem and proposed a couple of patches to get things going. John, however, had another patch that he thought was better. After looking at it, Andy did too. He tidied it up slightly, and suggested that it was fit for inclusion to both
Marc Esser was having trouble configuring perl on Solaris 10. After a getting Marc to try a few things, Andy Dougherty believed that he had isolated the problem in some incorrect hints for Solaris.
Paul Marquess reported that he had had some problems with not being able to apply
\*STDIN and get a sensible result back on Windows.
Par for the course http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01016.html
Alexander Gernler mentioned that he thought the snippet explaining
waitpid was wrong, and that it should use a
do/while loop and not a
do/until loop. Rafael agreed, and Salvador Fandiño and Dr. Ruud made a few suggestion about making the snippet truly cross platform (well, and least Unix and Windows).
Zombie-free zone http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01043.html
Jon V. had a weird compilation error. Rafael suspected that some errant header was defining a symbol standing in for a function or something, as a number.
Daniel Pfeiffer as having trouble with a Solaris 2.10 box coming to grief with environment variables eating all available memory. Rafael had trouble reproducing it. So did Daniel for that matter. Unfortunately, there's not much to go on.
Darin McBride had some code worked if
used, but dumped core if it was
required. Rafael saw that the problem lay in the module building an iterator as a closure to traverse an array, but couldn't see off-hand why it should fail.
Another back-tracking stack-blowing pattern.
Peter J.Holzer discovered that taking a simple byte string and upgrading it to UTF-8 makes the match go three times slower when the target remains byte-encoded. Or, to put it another way, if the polarity of the target and regexp are reversed, performance is awful.
Even Yves admitted to being scared at the amount of effort required to make the engine do the right thing. It's doable, and he's thought about it on occasion. Sadahiro Tomoyuki gave Peter a tip that helped in improve the performance in his particular case.
Fruit at the top of the tree http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01076.html
Yves went onto to explain far more than you ever wanted to know about UTF-8, and just how much effort it takes to move to the next character in a string. Juerd suggested a number of optimisations that, if implemented, may improve performance. Yves went down the list and pointed out that nearly all of Juerd's ideas are already implemented in the engine in some way or another.
In other sub-thread, Sadahiro caught a naughty macro that lacked a parenthesised argument, which Rafael fixed in blead.
It ain't easy http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01089.html
+ 13 - 7 = 1499 http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg00977.html Ooh, nice RT upgrade http://rt.perl.org/rt3/NoAuth/perl5/Overview.html
- ExtUtils::Install version 1.41 released by Yves Orton. No change in functionality, merely a tweak to the versions to get
Do the bump http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-07/msg00015.html
Rafael announced that he was removing references to
5005threads in the
The end of the line http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg00989.html
Steve Hay showed the best settings to get the most out of
malloc on the Win32 platform.
Andy Lester noted that the Coverity defect scan of the codebase had risen from 35 to 40 in two weeks.
Misfeature creep http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01002.html
Alan Burlison pointed to Data Race Detection Tool (or DRDT) from Sun, which is a tool designed to help track down data race issues with threads.
Might be handy http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01054.html
Sébastien Aperghis-Tramoni posted a small precision about
\Q \E inside
m//x, after having spent too much time trying to figure out why his code wasn't doing what he expected.
DWIM or RTFM http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-06/msg01111.html
Brendan O'Dea put forward a modest proposal remove
x2p/*, that is, the awk-to-perl and sed-to-perl scripts, arguing that no-one uses them anymore. Neither Rafael nor H.Merijn were in favour of such a move.
Craig A. Berry tidied up some POD typos.
This summary was written by David Landgren.
Last week's unfinished opus attracted a comment from Nicholas Clark asking how other open-source languages deal with the day to day housekeeping, and he even received an answer!
If you want a bookmarklet approach to viewing bugs and change reports, there are a couple of bookmarklets that you might find useful on my page of Perl stuff:
Weekly summaries are published on http://use.perl.org/ and posted on a mailing list, (subscription: email@example.com). The archive is at http://dev.perl.org/perl5/list-summaries/. Corrections and comments are welcome.
If you found this summary useful, please consider contributing to the Perl Foundation to help support the development of Perl.