This Fortnight in Perl 6, March 22 - April 3, 2005
by Matt FowlesApril 07, 2005
Perl 6 Language
ceil
and floor
ceil and floor would
be in the core. Warnock applies, although Unicode operators would let me
define circumfix \lfloor \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.
s///
object?
Stevan Little wanted to know if s/// could return some sort of
magic object to poke or prod. Larry said "no".
Markup-Like Features
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.
The
Many Moods of does
Thomas Sandlaß wondered if anyone would actually write S14 or if
does ate up tie/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.
Even More Moods of does
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.
Perl 5 -> Perl 6 Converter
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
cat.
p5 Library Compatibility?
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.
Importing Constants and Header Files
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.
String Pain
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.
xx
on Coderefs
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.
Running Pugs
Adam Preble had some strange problems with Pugs' make install
target. Warnock applies.
Manipulating Many Dimensional Hashes
Zhuang Li wanted to know how to manipulate hashes of unknown dimension. Luke Palmer provided the answer.
Semantics of Currying
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.
Multi-paradigmatic Perl 6
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.
NB for Pugs on Low Memory Machines
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?
PLEAC
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.
Annotating Code with Documentation
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.
Optimization Hints
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.
S29 Update
Rod Adams' efforts to update S29 continue to push a very large thread about things including numification of strings and various core operators.
String Positions
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.
modify
and assign Operators
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
p5 -> p6 Guide
Adam Preble wondered if there was a basic p5 -> p6 guide. Unfortunately he posted to Google Groups.
$_.method
vs $self.method
The debate about whether .method should mean
$self.method or $_.method continued.
$self is still winning.
Typo Problems
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.
How Read-Only is Read-Only?
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.
pick
on Non-Junctions
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.
Built-in Multi Methods
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.
Comparing Two References
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.

