This week on the Perl 6 mailing lists
"My school's punch card machines were in the same room as the TRS-80 Model I ("THE COMPUTER ROOM"). These kids today with their hula hoops and fax machines and intarwebs..."
-- Chip Salzenberg, arguing in favor of lines in excess of 80-characters.
perl6-language
multi-line comments, C macros, & Pod abuse
Last week's summary covered this thread, which discussed easily commenting out a large chunk of code.
This week the discussion continued slightly in to the realm of meta-programming and programming environments, but not much meat was added.
clarify: does "Dog is Mammal" load Mammal for you?
Mark Stosberg asked for clarification on S12 on whether class Dog is
Mammal
requires Mammal to be loaded in advance. The current version
of Pugs needs an explicit use Mammal
.
Darren Duncan believed an implicit use Mammal
should only occur
conditionally, if a Mammal had been declared, but was concerned about
potential bugs. Jonathan Scott Duff had the impression that preloading
would not be required, and wondered if class Dog is Mammal-4.5
would
be valid. Trey Harris referenced S11 to claim that Jonathan's questionable
syntax is valid. Andrew Suffield also tackled the question of versioned
libraries.
Yiyi Hu wanted to know the correct syntax for heredocs, as S02 and Pugs seem to be at odds. Larry Wall clarified that both are allowed.
Luke Palmer expressed concern about the false duality of :to
and :from
. Larry noted that is why :from
doesn't actually exist.
Pair of lists => list of pairs?
Mark J. Reed asked how one would idiomatically write
my %h; @h{@keys} = @h{@values}
in Perl 6. Gaal Yahas suggested using ¥, the
zip
operator: my %h = @keys ¥ @values
. Larry Wall suggested using a hyper
pair: my %h = @keys »=>« @values
.
Mark Stosberg wanted Perl 6 to retain the Perl 5 responses to ref
or justify
the change in the documentation. Larry Wall explained that ref
will not
exist in Perl 6; instead, it will be something like .what
, which will return
the type itself, rather than a string.
The thread then moved on to subclassing, after Luke Palmer suggested that
Array
would be a subtype of Array::Const
, after Larry had stated the
reverse. This led to a lengthy discussion on the subject.
My first functional perl6 program
Mark J. Reed posted a simple program he wrote in Perl 6 for educational purposes, asking for critique.
This lead to a discussion on the semantics of hyperoperators in relation to finite/infinite sequences.
perl6-internals
[perl #40162] [PATCH] parrot/trunk/docs/art/pp001-intro.pod - spelling
Last week, in ticket [perl #40162], Amir E . Aharoni sent a patch to correct some spelling errors.
It was applied as r14297.
[REPATCH] Parrot::Embed Take Two
Previously, chromatic submitted a patch for the build file to try to resolve pkg_config issues with various platforms. He had some questions about installing from outside the Parrot tree on Windows. Leopold Toetsch offered a suggestion.
This week, François Perrard explained how to solve the Windows issue.
[perl #40204] line numbers of runtime errors are one too low
Chip Salzenberg created ticket [perl #40204] because runtime errors are off by one line. Leopold Toetsch thought this was the same error reported in [perl #38594], but Will Coleda disagreed. There was some discussion on when new tickets should be created.
chromatic made two commits to unskip some valid tests. He was concerned about the large number of tests which are being skipped in Parrot. He suggested unskipping all tests which might pass, and use TODO or deletion depending upon the relevance of the test. This was added as a Cage Cleaner's task.
[perl #40207] [PATCH] tools/dev/install_files.pl - replace tabs with spaces
Amir E . Aharoni created the ticket, [perl #40207], in which he supplied a
patch that corrects the indentation of tools/dev/install_files.pl
.
[perl #40209] [TODO] convert t/compilers/pge/p6regex/01-regex.t to PIR
Will Coleda wanted the tests in PIR instead of Perl to make make test
faster and to give a template for other test conversions. See
ticket [perl #40209].
[perl #40210] [TODO] Provide a way for PGE's dump to go to string
In ticket [perl #40210],
Will Coleda noted that it would be useful to get a string when dumping,
for testing. Patrick R. Michaud created the dump_str
method in r14306.
End the Hollerith Tyranny? (linelength.t)
Chip Salzenberg asked if anyone has any reservations from making the parrot's source code repository follow a wrapping convention of over 80 columns. Some people said they were old enough to have used terminals that couldn't physically support that, at which point Chip showed them he was actually older.
It seems that the general consensus is to try to aim for 80 columns, but that a hard limit of 100 will be set for when that doesn't work well.
Joshua Hoblitt replied to a commit with a reminder that there is a utility for formatting Parrot's Pod.
Will Coleda posted the URL of the 22 August #ParrotSketch log.
[perl #40217] Parrot_autoload_class() knows about Python and Tcl
Chip Salzenberg wanted hardcoded language names in Parrot removed. This came up in ticket [perl #40217].
John Siracusa wondered if anyone had looked at LLVM recently and wondered if Parrot might be able to target LLVM bytecode and let it do further optimization for OS X. Peter Baylies responded that he'd looked at it, and was currently waiting for an x86-64 build. Peter was not sure there were benefits in targeting LLVM. Aaron Sherman added that the extra layers would probably not make up for any optimization gains.
[perl #40218] [BUG] - get_*_global opcodes throw exceptions
In ticket [perl #40218], Matt Diephouse noted that the documentation of get*hll says "If the global doesn't exist, $1 is set to null" but currently it throws an exception.
[perl #40219] [TODO] - Steal Perl5's sprintf tests
Matt Diephouse created ticket [perl #40219]. He suggested using Perl 5's sprintf tests instead of writing new ones.
[perl #40225] Making Makefiles...
Will Coleda created ticket [perl #40225] to address the new
features he'd like in genfile()
when generating makefiles.
Leopold Toetsch thought that instead of inventing custom make extensions,
there should be a few needed gmake extensions. Will agreed with stealing
gmake syntax. Joshua Hoblitt disagreed with the proposal. Will responded.
Announcing the Perl 6 and Parrot wiki workspaces
Andy Lester announced the Perl 6 and Parrot wikis.
[perl #40231] [PATCH] t/compilers/pge/06-grammar.t written in PIR
Nuno Carvalho rewrote t/compilers/pge/06-grammar.t
in PIR and put
it in ticket [perl #40231].
Mark J. Reed was running in to problems with linking when building Parrot on OS X. Will Coleda listed some arguments that can be used in configuration to support linking.
Find out in program code, if a PMC-property is set?
Gerd Pokorra had issues extracting a PMC property when that property
has not been explicitly set, and wondered how one could go about
introspecting the PMC to determine whether or not a property is set.
Bob Rogers advised checking PMC_IS_NULL
.
Chip Salzenberg posted in response to Leopold Toetsch's addition of
to_int()
to String. Chip suggested making it a common subroutine in
the C source. Will Coleda disagreed on the grounds that it is a method,
not an opcode, and that not everything needs to be a PMC. Jerry Gay
agreed with Chip. Chip also replied.
[perl #40210] [TODO] Provide a way for PGE's dump to go to string
Will Coleda created a ticket asking for PGE's dump
to be able to go to a
string, and not just output, for testing purposes. Patrick R. Michaud added a
dump_str
method in r14306, and then closed the ticket.
perl6-users
Amir E. Aharoni wanted to know what the status of 'autothreading' was, after seeing some tantalizing references to it. Conrad Schneiker didn't know, but suggested that looking at the #perl IRC log search as another document resource.
Richard Nabil Hainsworth wanted to know how he could write an application in Perl 6 which works with GUI toolkits such as WxWidgets. Conrad Schneiker had a similar interest, although he focused on XPCOM, XUL and other Mozilla GUI technologies. Steffen Schwigon suggested some experimentation with using Perl 5 libraries, and requested that Richard document his experiences.
Latest $1,000 Wiki for Perl 6 proposal/offer.
Conrad Schneiker brought up the long-running subject of the Perl 6 wiki bounty (refer to summaries for July and June for more information on the history of this topic). He hoped that TPF could determine the conditions of the contest. Andy Lester replied that he was in the process of setting up a wiki for Perl documentation. Conrad asked a few questions about Andy's plans.
Meanwhile, Paul Fenwick asked how PerlNet could improve to meet the needs of the Perl community. Conrad and Amir E. Aharoni responded.
Michael Snoyman wanted to know what would happen if there was a parameter list which included variables of a different type but the same name. He included the results he got when trying it. Juerd said he felt it should cause a compile time failure or a warning.
Michael reposted the message to the language mailing list: Same-named arguments.
Michael Snoyman wanted to know what the Pugs version of IO::Socket is.
perl6-compiler
Integrating the Pugs test suite into the Synopses
Agent Zhang announced that the test snippets in the Pugs test suite have now been included in the Synopses, thanks to smartlinks.
Ponie has been put out to pasture
Jesse Vincent announced the end of the Ponie project. Making Perl 5 code run seamlessly alongside Perl 6 in Parrot is still a goal, but it is being addressed in other ways.
Mark J. Reed wanted to know if rw parameters for blocks had been
implemented. Larry Wall agreed that it was not currently working.
Audrey Tang made clarification in r12675. Tests (37 and 38)
were added to for.t
for the situation Mark described, as r12968.
Mark J. Reed wondered if Pugs bugs were stored somewhere, so that he could avoid mentioning known bugs. He included some questions. Larry Wall replied that in Pugs, a bug is represented by a failing test. He also answered questions.
Acknowlegements
Yuval Kogman once again contributed summaries for some of the threads.
This summary was prepared using Mail::Summary::Tools, now 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