This Fortnight in Perl 6, March 22 - April 3, 2005
Perl 6 Language
Ingo Blechschmidt wondered if
floor would be in the core. Warnock applies, although Unicode operators would let me define circumfix
\rfloor (although I only know how to make those symbols in TeX.). Hmmm…using TeX to write Perl 6 code is an interesting idea. At least then I could figure out how to make all the special symbols. Maybe someone should make a package for that.
Stevan Little wanted to know if
s/// could return some sort of magic object to poke or prod. Larry said “no”.
Michele Dondi asked if Perl 6 would have markup-like features in it. Luke Palmer asked for a more full explanation of what he meant. Warnock applies.
Thomas Sandlaß wondered if anyone would actually write S14 or if
does ate up
bless, enumerating the many powers of
does. Larry explained that
does will probably have mutated
bless and then explained the contexts under which
does performs each of its powers.
To follow up on his question about
does, Thomas Sandlaß wondered about
is, specifically whether it stubbed or initialized its variable. Larry explained that
is would probably initialize its variable and explained how to use
is Ref to stub but not initialize something.
Adam Kennedy dropped a line to the list about PPI 0.903, which could form a good base for a Perl 5 to Perl 6 converter. Larry explained that he is actually using PPD (the actual Perl parser) to construct such a tool. He also explained how he was going to do it. Actually, it’s a really cool approach for those of you who like elegant design approaches. You should check it out. I’ll give you a hint: it starts by writing a glorified version of
Andrew Savige wondered if p6 would maintain the interface for most p5 libraries. chromatic almost died of fright from the suggestion. Juerd suggested a deprecated namespace for such things. Larry gave him a Ponie instead. Later, Larry thought that perhaps a special namespace for those libraries that could be automatically converted might be appropriate.
Song10 wondered if there was an easy way to import constants from a module and not have to specify their full scope in the includers file. Larry explained that p6 will have “policy” modules which would allow this. He then began to let his mind explore the possibility of allowing these modules to return a string to evaluate in the user’s scope. Then he realized how nasty textual inclusion was in C and C++, and figured that a hygienic policy would be better.
Giving Lists More Operators
Juerd constructed a table of string, integer, and list operators. He noticed that the list section had blank spots where string and integer both had items. He then suggested quite a few more operators to fill these blanks. This morphed into a discussion of code complexity and reading code.
Chip wondered what exactly set
str apart from
Str and the impact this difference had on Unicode support. Larry and Rod Adams explained that
str specifies a raw bytes view of strings and requires explicit casts between different Unicode levels.
Luke Palmer wondered if the
xx operator could include overloading to run a coderef repeatedly and slap the results together. Others liked it, but there was no word from on high.
Adam Preble had some strange problems with Pugs’
make install target. Warnock applies.
Zhuang Li wanted to know how to manipulate hashes of unknown dimension. Luke Palmer provided the answer.
Yuval Kogman has been implementing currying in Pugs. As such, he has found some of the under-specified corner cases. Thus he, Larry, Luke Palmer, and Thomas Sandlaß delved into these mysteries.
Someone named Eddie posted a fairly long message to p6l on the Google Groups interface suggesting that Perl 6 support delegation and other programming paradigms. Sadly, no one told him that it already does both of those things, because nobody saw his email. Google Groups does not send messages back to the list.
Adam Preble posted a helpful warning about installing Pugs on machines with less than 200 MB of memory. Unfortunately he also posted it to Google Groups. People should stop doing that. Is there some way to tell Google to prevent them from doing that?
Tim Bunce suggested that people could add programming examples to PLEAC for Perl 6. Of course they should run in Pugs if they are being released to the world at large.
Chip wants to be able to document his code by attaching documentation directly to it. This would allow for nifty introspective features. Larry pointed out that code will have access to the surrounding POD.
Typo in S03
Aaron Sherman pointed out a typo in S03. Luke Palmer explained that dev.perl.org did not mirror the svn tree just yet. Juerd found one too and received the same answer. This time, though, Robert Spier put in the necessary magic so that dev.perl.org would update from svn.perl.org.
Yuval Kogman noted that Perl 6 has some ability to provide lexically scoped hints and suggested a few more things that might be hintable. Larry opened the door for him to try to design such features.
Rod Adams’ efforts to update S29 continue to push a very large thread about things including numification of strings and various core operators.
Aaron Sherman wanted a more OO way to look at the OS. Larry did not really agree but suggested that someone could create a proxy object which would reference all of those globals. Then a conversation about having units attached to numbers sprang up. That sounds like a good module to me.
Andrew Savige wondered if there was a complete list of operators anywhere, because he could not find
~^= (string xor) documented anywhere. Larry explained that the assign should probably be a meta operator to allow for better extensibility
Adam Preble wondered if there was a basic p5 -> p6 guide. Unfortunately he posted to Google Groups.
The debate about whether
.method should mean
$self is still winning.
It seems that Juerd has typing problems. He wanted to know if he could form a support group. Apparently he can only if he uses vim.
Renaming Flattening and Slurp
Terrence Brannon wants to change the terms “flatten” and “slurp” to something else. Larry told him that this usage was unlikely to change.
Chip wondered how deep read-only-ness or
is copy-itude went on arguments. The answer appears to be: shallow. This led to a very long discussion of how much type checking will actually occur.
Ingo Blechschmidt wondered what
pick would do on an array or a hash. Many folk explained that it would remove and return an item or pair from the container respectively. Larry commented that
pick on a hash could be harder than it looks.
Wolverian wondered if some of the common functions called on strings would actually be methods. Larry answered that they would more likely be multis to allow for easier extension.
Darren Duncan wanted to know if
=:= was the correct operator for testing if two variables refer to the same object. Larry explained that it was. This led to a debate about how easily people can deal with chains of references in Perl 6.
Perl 6 Compiler
Will Coleda worriedly reported 115 failing subtests in Pugs. Stevan Little explained that this was normal for between releases and was really more of a TODO list than a problem.
Greg Buchholz noticed that the darcs repo for Pugs has trouble staying up to date. Tupshin Harper suggested using
darcs whatsnew --look-for-adds --summary to find the offending files.
Autrijus wondered when
BEGIN should run. Markus Laire posted a useful summary of when the various CAPITAL things should run. Larry confirmed Autrijus’ suspicion.
Nathan Gray wondered if he should change his tests log to YAML output. Stevan Little pointed him to Test::Harness::Straps, which can collect test output and transform it.
Andrew Savige found some strange behavior with respect to statement separation in Pugs. He thought that perhaps semicolons had changed their status. They haven’t.
Pugs r2^10 can compile p6 to imc which Parrot can run. I think I speak for everyone when I say “Wow. Nice work, Autrijus.”.
Andrew Savige noticed a couple of odd corner cases for string interpolation in Pugs. This led to a discussion of which special variables (like
$") will continue to exist.
Paul Johnson posted a list of requirements he would like to see satisfied so that he can easily generate Perl 6 coverage reports. Warnock applies.
As is the fashion, Pugs went through two minor releases during this two week period: 6.0.13 and 6.0.14.
Darren Duncan suggested that it might be a good idea for people to begin prepping their favorite text editors to handle Perl 6 syntax correctly. Why stop at syntax? I know I want to be able to type
:perl6do in vim.
Darren Duncan noticed that most things in Pugs use Perl 6, while
Makefile.PL was still Perl 5. He suggested writing the
Makefile.PLs in various modules in Perl 6 also. He then began work on a
Autrijus explained that he was planning on steering Pugs toward becoming a Perl 6 -> Parrot compiler which would interpret code (when Parrot is not available) by mapping imc to Haskell.
Stevan Little suggested rearranging the Pugs repository a bit. The end result is that modules which don’t run in Pugs (yet) should go in
modules/ while those which do should go in
John Macdonald posted his plan for the
YAPC::NA Pugs hack-a-thon. His description of the location makes me want to take time off work to go.
Stevan Little found a bug in Pugs’
split. Autrijus fixed it, but noted that he had not replicated the full, bizarre semantics of Perl 5 (which come from awk). Larry told him not to work too hard on it, as it would probably work in Perl 6 through a separate function.
A bug in Pugs’ parsing led Autrijus to seek information from a higher authority. Larry explained the power of statement modifiers.
Steven Schubiger volunteered to reorganize
pmc/*.t last time. He did it, and Leo applied the patches.
Chip, in a circumloquacious attempt to come up to speed, indirectly asked what design issues needed attention. Leo explained the CPS issues that bogged down Parrot of late.
François Perrad provided a patch improving the documentation for building with MinGW. Leo applied part of it.
Matt Diephouse opened an RT ticket for cleaning up the file system (specifically
Christian Aperghis-Tramoni reported that he has had success using Parrot assembly as a teaching tool.
Falcon posted a series of questions about Parrot in a fairly general sense. Unfortunately, because he posted it to Google Groups, Warnock applies.
Leo posted a first MMD call which uses an MMD PMC and a fair amount of hand-made calling conventions set up.
Steve Peters noticed that
atan2 on OpenBSD is not quite right.
Leo changed various packfile functions to take an
Interp* argument. This does change the embedding API, but it had to be done.
Leo pointed out that
pmc2c2.pl was not functioning correctly on all platforms. He put out a call for interested parties. Matt Diephouse provided a patch to clean up the internals of
pmc2c2.pl a bit. Leo applied it. Peter Sinnott returned a
$ that got lost in the shuffle, and chromatic applied it. Matt went on to add better comments.
Klaas-Jan Stol provided an update to the
README.win32 directions. Warnock applies.
Chip wondered why Parrot had a SET_NON_ZERO_NULL macro and suggested removing it. The answer was, of course, speed. On architectures with a zero null, this can be a no-op allowing the use of
calloc(). Otherwise it has to do something.
Leo added support for
.const things to imc. Unfortunately, the GC eats them so you can’t use it yet.
Cory Spencer’s LISP implementation revealed a bug in the hash creation sequence. Leo fixed it.
Nick Glencross provided an update to the MD5 library. Leo applied it.
Will Coleda has been updating Tcl. He moved the parser into a PMC. Then he tried to add octal and hex escapes only to discover missing transcodings. He also found missing hash functions, but Leo fixed that.
Someone suggested that we start to log IRC. Chip suggested that this might not be cost effective as such logs are 99% dross and 1% value. He suggests instead that people paste the good part into emails for the list. I know that I, for one, would not volunteer to summarize IRC.
chromatic (as his Linux PPC is wont to do) found a bug in the build. He fixed it, and Leo applied the patch.
Leo added a first implementation of a Lazy PMC for Autrijus to play with.
François Perrad provided a patch fixing
MANIFEST.generated for Win32. Warnock applies.
Ron Blaschke spent some time fixing Parrot on Win32, extending it to provide a shared library.
Jeff Horwitz released mod_parrot 0.2. It includes nifty features like the beginning of an interpreter pool.
Peter Sinnott moved a few declarations further up. Leo applied the patch.
MMD on Argument Count
Leo added the ability to MMD on argument count and PMC types.
Offer Kaye fixed a few typos. chromatic applied the patch.
Leo admired the trickiness of Bernhard Schmalhofer in his
François Perrad fixed a test failure on MinGW. Leo applied it.
Peter Sinnott pointed out some failing tests. Leo fixed them.
Bob Rogers provide a patch to switch
PARROT_TEST to 1 by default. Leo applied it.
Nigel Sandever had some questions about how Parrot and threading worked. Melvin Smith provided the answers.
Nicholas Clark noted that the question of why bother with Parrot when one has Pugs has come up recently. The answer went into the Parrot FAQ: speed.
Sven Schubert wondered if people had any suggestions for how to get PAPAgei (his Pacal for Parrot compiler) up and running quickly. Leo told him to stick with the tools he knows rather than going too far afield.
Infix Op Proposal
Leo posted his proposal for how to revamp infix ops. Nicholas Clark and Luke Palmer asked a few questions.
Cory Spencer wondered how to find the depth of the lexical pad stack. Leo told him.
Ron Blaschke noticed that there were tests failing on Win32 because the exit code was not in the high 8 bits, but appeared directly. Leo suggested looking to Perl 5 for prior art on what to do.
Bloves wondered if any other compilers were currently working toward targeting Parrot. I pointed him to Cardinal, a Ruby compiler for Parrot that appears dead.
Adam Preble wondered if there has been any work on Parrot for AMD64. The answer is: some, but nobody told him because he posted to Google Groups.
François Perrad provided a patch that creates a standard binary distribution for Win32. There was some debate over the name of the make target, but François is ready to send an updated version at Leo’s command.
Leopold Toetsch proposed a calling convention abstraction that would allow Parrot to change its ABI a little more freely in the future. Roget Hale asked a few questions which Leo answered.
Ron Blaschke noticed a broken Windows build, because of a 0 sized array. Leo fixed it.
Will Coleda discovered a failing assertion in
utf8.c. Leo fixed it.
Leo changed the call signature for NCI to make
I mean INTVAL and
J mean Parrot Interpreter.
Leo added support for MMD on infix multis.
Chip asked if there was a reason that the
TOUCH variable doesn’t use
utime. Michael G. Schwern suggested ExtUtils::Command. Steve Peters points out that
utime works only on existing files.
Chip opened a TODO for updating
imcc.l to modern flex.
Mac OS X Build Broken
Will Coleda reported a broken build on Mac OS X with undefined symbols. Leo found the cause and reverted it.
After much debate, the decision to switch from CVS to SVN has happened. The move will include the removal of ICU as a dependency. Good progress has occurred on that front.
Nick Glencross has been hard at work trying to fix the MD5 library for 64-bit systems. It would be easier if he had access to one.
Ron Blaschke noticed that ActiveState Python reports its build as 2.4 instead of 2.4.0. He provided a patch to account for this.
The Usual Footer
Posting via the Google Groups interface does not work. To post to any of these mailing lists please subscribe by sending email to
email@example.com. If you find these summaries useful or enjoyable, please consider contributing to the Perl Foundation to help support the development of Perl. You might also like to send feedback to firstname.lastname@example.org.
Something wrong with this article? Help us out by opening an issue or pull request on GitHub