This Fortnight in Perl 6, December 7-20 2004
All~
The observant among you might notice that I missed last week’s summary. With the hubbub and confusion of the holidays, I blame ninjas, in particular Ryu Hyabusa. Given that Christmas is next weekend and New Years is the weekend after that, what you are like to see in the future are a pair of ten-day summaries or some other equally irregular pattern. If you are thinking of using the dates of my summaries to seed a random number generator, I would advise against it as I can be really easily bought ;-). Without more ado, I give you this fortnight’s summary starting with:
Perl 6 Language
Lexical Scope of Parametric Declaration Blocks
Ashley Winters wanted to know the differences between type parameter lists and sub parameter lists. Luke Palmer could not think of any.
Object Representation
Abhijit Mahabal noticed that S12 allowed one to supply an object layout to bless()
and wondered if one could really have two instances of the same class with different layouts. Larry admitted that he had probably not intended for that to be the case.
Capturing into a Hash, Hypothetically
Patrick R. Michaud wondered about capturing things into a hash in S05, as <ident>
now captures. Larry admitted that it was probably supposed to be (<<ident>>)
but also noticed that this exposed a blind spot in the design. He ruminated about this blind spot and ways to solve it. After much churning, he decided that it would be possible to perform multiple different (but identically named) rule captures by adding information after a dash a la <ws-1> <ws-2> <ws-3>
.
Custom Subscripting
When talking about key Type for a hash, Larry offhandedly commented about attaching a block to a hash or array to provided custom subscripting. Many people drooled over the awesome syntactic sugar this could provide them.
Undeclared Attributes
Dave Whipp hoped that he need not predeclare his attributes; as they necessarily start with $.
The fact that a new variable is an attribute is easy to determine. Abhijit Mahabal thought that it would not be a good idea but then asked if classes could be declared as not strict. We’re still waiting for more official word…
Classes Which Autovivify Attributes
Abhijit Mahabal wondered about creating a class that populates its attributes on demand, as some of them might be rarely used. Larry suggested that it would be something that one should not undertake lightly, and a simple hash attribute would provide most of what he wanted. This also morphed into the eternal debate about strictures and oneliners. There has to be a joke in there somewhere. A stricture, a oneliner, and Larry Wall walk into a bar….
Auto my
Rod Adams wondered if having my
occur automatically for new variables might be worthwhile. Several people commented that some languages already do this, and it is simply an aesthetic choice. The consensus seems to be that Perl has already made this choice and will stick with its answer.
Perl 6 Compiler
At long last, Google has picked up P6C. I guess I have slightly mixed emotions about this, as it takes a running gag from me. Alas, I will have to find another.
PGE Tests
Markus Laire began working on a formerly small script to convert Perl 5’s regex tests to PGE. He produced a modest 700 tests, a few of which pass. Nice work. Patrick suggested only running the script once and thereafter maintaining the tests external to Perl 5.
On your marks, get set, HACK!
Luke Palmer opened the door to hacking and has requested rules for parts of the Perl 6 Grammar. Patrick posted a link to its SVN repository.
Parrot
“\0namespace”
Leo committed a fix to support namespace mangling.
Store Global => Invalidate Method Cache
Leo committed a fix to invalidate the method cache when storing a global.
pow
, hash
, Batman Sound Effects!
Leo added pow
and hash
as vtables and opcodes. He also renamed new_extended
to instantiate
.
Base Scalar Semantics
Leo asked for comments about base PMC semantics and received none.
split
Now Independent of Perl
James deBoer provided a patch removing the dependency on PerlArray
in split
. Will applied it.
SVN
Periodically, every project has a thread about switching some basic tool to another basic tool. This time, the thread is in P6I, and the tools in questions are CVS and SVN. Many voiced support, but no one decided anything with any permanence.
Continuations
At long last, the long-running continuation thread has died down. Unless I am mistaken, the status quo remains, and return continuations should restore register contents even when promoted and repeatedly invoked.
Correctly Dispatching Opcodes and Functions
Sam Ruby had some concern about dynamically overloading __add__
in Python. Leo and Sam had quite a bit of back and forth about the proper way to handle it. I am not sure what resolution they reached other than that it should work.
Dynamic libs and Tcl Issues
Klaas-Jan Stol had some problems with Tcl and dynamic libs. Sam Ruby provided the necessary fix for him.
Class Refactoring
Leo began refactoring base PMCs such as Integer. He also started a TODO of what remains. This somehow morphed into discussion of logical xor
…
Register Coloring Issues
Dan posted a failing test case for the register coloring. Leo fixed it.
split
on String vs Regex
James deBoer wondered about the split
opcode’s current insistence on a string. Some advocated making it a method on a class, while others wanted to change the opcode to take a PMC instead of a string.
self
vs P2
Sam Ruby discovered that usages of P2 had broken, as it was no longer the object of a method. Fortunately, Leo provided the helpful self
.
Linux PPC
Long ago, there were troubles with Linux on PPC. Recently, chromatic submitted a patch. More recently, Warnock applied.
Whether vs Weather
This morning it was cold and snowy. Sadly, instead of fixing my dreary weather, chromatic fixed a mistyped “whether.”
Benchmarks as Test
Justin DeVuyst supplied a patch to use the benchmarks as tests. Leo applied it.
make [install|docs|monkeys]
Adrian Lambeck suggested a few improvements to the current make set up, including a cool sounding make doc-install
. Warnock applied.
Dan Still Alive
Dan sent an apology about the egregious amount of work he had and assured everyone that he was actively trying to get caught up. In the mean time, Cc him on things that need his personal attention, like your Christmas lists.
IMCC Parser No Longer Chokes on Empty Sub
Will noted that gremlins had fixed a problem in IMCC with empty subs. Yay, gremlins!
Current Object Invocation
Dan discovered that Parrot put the current object into its place after calling invoke
. This was, of course, bad, so Leo fixed it.
Configure Help
Somebody had trouble with Configure.pl. Leo pointed out the usefulness of --verbose=2
.
./parrot nonexistant.pbc
=> core dump
Dan noticed that Parrot would core dump when given a nonexistance bytecode file. Matthew Zimmerman and chromatic fought to get a patch in first. One succeeded.
Python Dynclasses Build Issues
Will noticed a multiple definition problem in the py* dynclasses. Sam fixed it.
MMD Dispatch Problem
Jens Rieks reported a problem with mmd_dispatch_v_pnp
. Leo could not reproduce it.
mod_parrot with Mandelbrot
Jeff Horwitz posted a link to a webpage using mod_parrot to generate ASCII Mandelbrot sets. Really cool, but I prefer Julia sets.
Documentation Shortcomings
Dave Brondsema pointed out that the main FAQ should include info on the IRC channels/hosts that Parroters use. He also noted that some PDDs were not available on the website. Warnock applies.
Scope Cleanup Issues
Leo and Dan hashed out some of the issues with scope clean up and stale registers keeping things alive.
WinXP Duild Issues
Nicu Ionita reported a problem with the build on WinXP. Leo fixed it.
runops_fromc
Sam Ruby provided a patch allowing runops_fromc
access to registers. Leo applied it.
Parameter Fillin Problem
Dan posted about a problem he was having. Unforunately, he cannot make a simple test case against CVS head, and Leo can’t reproduce it.
Class Autoload
Leo added support for autoloading dynamic classes for Python and Tcl. Sam Ruby suggested ways to extend it further.
P5 Is the New P2
Sam and Leo came to the conclusion that the current object should be passed in P5 as well as P2. Currently, they are waiting for Dan… nudge, nudge…
get_anonymous_subclass
Leo wondered what get_anonymous_subclass
was for. Dan explained.
Context, Wrappers, Rules, NCI
Sam and Leo had a discussion about what exactly VTABLE functions, MMD functions, and ops should do. I think they spent much of the time talking past each other and all of it talking past me.
Namespaces As Objects
Sam Ruby wants to use namespaces as objects. Leo is not so sure that this is right. This turned into a dialog about find_method
.
POD Cleanup
chromatic provided and threatened to apply a patch fixing up some of the POD nits.
Plain Ole Hash
Bernhard Schmalhofer provided a patch cleaning up Hash
. Sam wondered if the NCI calls in Hash::fromkeys
could go away along with a few others. Leo said that iterators in general needed another round of thought.
Opcode/Sub Conflict
Dave Brondsema notice that there was a problem with subs whose names conflict with opcodes. Luke Palmer provided a workaround.
Duplicate Subclass Naming Errors
Simon Glover noticed some problems with duplicate subclass names, notably that one could not create two nameless classes.
MMD and VTABLE_find
Leo suggested a mechanism for MMD and VTABLE_find
. Sam Ruby provided some input.
Auxiliary Variables
Tomas Necas wondered about the necessity of auxiliary variables in Perl 6. Luke Palmer and Dan provided some answers.
N Register Stomping
Dan noticed that something stomped his N registers occasionally.
The Usual Footer
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 ubermatt@gmail.com
Tags
Feedback
Something wrong with this article? Help us out by opening an issue or pull request on GitHub