This Week in Perl 6, November 2 - 8 2004

Welcome to yet another summary, brought to you (once again) with the aid of the musical stylings of Dar Williams and Soul Coughing and a small, stuffed elephant name Aliya. And, without further ado, I give you Perl 6 Language (whose traffic has picked up a little).

Perl 6 Language

What Was that Anonymous Thing?

Juerd wondered what things could be named and what could be anonymous. Larry provided the answer: Subtypes, Enums, Lists (Lazy and Eager), Grammars, and Packages, but then threatened to attack Juerd with hot grits.

Updated Apocalypses and Synopses

Larry proved links to the current versions of the various Apocalypses and Synopses. Unfortunately he forgot to start a new thread with his message….

Suggested Warning for Overriding Operators

Aaron Sherman wanted to receive a warning for defining things like multi sub *infix:+(...) {...}. But Larry reasoned that anyone who’d use the * there does not care for warnings.

Perl 6 Compiler

Last week, I bemoaned my lack of Google (and thus links). But a couple kind souls pointed out that I could get links straight from the horses mouth at nntp.perl.org. All I can say is, ::shrug:: “Who knew that there was an Internet outside of Google?” Fortunately, I do not have to admit to its existence as there were no messages this week.

Parrot Internals

She-bangs for None!!

Last week James deBoer offered a patch to remove all of the shebang lines from config/*.pl (after his initial patch to add them to all of them was turned away). Warnock applies.

Solaris 9 Troubles

Christian Aperghis-Tramoni has some trouble while trying to install on Solaris 9. Warnock applies.

More Vtables

Leo wanted to add a finalize vtable entry (in addition to destroy, which is apparently used for free memory and not active resources). Jeff commented on the difficulties implicit in finalizing stuff, and the thread ran out of gas.

Build Dynclasses by Default

Last week, Leo was stalling to hear about success and failures before adding them to the default build. Brent “Dax” Royal-Gordon and Sam Ruby both chimed in with success. And so they did.

Register Frame Recycling

Leo added in some basic continuation recycling. Dan didn’t like that it required the user to clone return continuations into full ones. Leo agreed, but felt that a returncc function would be needed first. I wondered why we needed this recycling and couldn’t just let the DOD/GC do it for us. The answer: speed.

Upcase Binary Strings

Dan wondered what should happen if you tried to play with the case of a binary encoded string. The consensus seems to be either throw an exception or nothing, depending on settings.

Setref Poorly Named

Sam Ruby was initially confused by the strange behavior of setref. Leo told him that it was intended to set a reference inside a reference type and noted that classes needs a clean up. With the advent of dynclasses, this sounds like a job for some adventurous lurker…

Tracebacks PMC v. Ops

Leo wondered if we should have a PMC that could access the entire call chain and do whatever evil it wanted. Dan conjectured that this sort of thing was evil enough that ops might be well advised. Leo initially put some methods into the continuation to do this, but later thought about putting them into the interpreter instead. I like the interp idea.

Parrot -t Memory Leaks

Last week our fearless leader notice some significant memory leaks with parrot -t. This week our fearless pumpking fixed them.

Performance Graphs

Matt Diephouse (assisted by Joshua Gatcomb) provided a pointer to a page of periodic Parrot performances, provided as pretty pictures. Please provide possible improvement pointers.

Uniline yield() and return()

Stéphane Payrard (whose name Google objects to strenuously) re-sent his patch for uniline yield and return in PIR. Leo applied the patch.

Mod_parrot 0.1

Jeff Horwitz released mod_parrot 0.1. Pretty nifty.

download mod_parrot

IO Auto-Flush Troubles

Christian Aperghis-Tramoni wondered how to make stdout not buffer away his prompt. The answer (provided by Mary Pauley and Luke Palmer) requires using pioctl and strange magic numbers.

BigChanges–; release++?

Since the big indirect register change has gone through, some voices suggested putting out a 0.1.2 release. Leo felt that it was too soon, but seemed to be holding a minority opinion. I vote that we release after the new register allocator (and possibly Dan’s string stuff depending on how long it takes).

Dan’s String Stuff

Dan is about to make some “Irrevocable Changes” so he decided to do his work in a branch named pluggable_encodings, assuming he can use CVS (which is surprisingly hard at times). Because no one screamed foul, I think it is a safe assumption.

Clone mmd

Sam Ruby submitted a patch adding mmd_clone for dynclasses. Leo suggested an alternate approach, and Warnock[’s Dilemma] took over.

True Coroutines

Klaas-Jan Stol wondered if Parrot had “true” coroutine because Roberto Ierusalimschy (of Lua fame) called it into question. Some confusion ensued as to what the platonic ideal of a coroutine actually is, but the answer seems to be: we should and if they aren’t, patches welcome.

Trouble with Closures and Subs

Klaas-Jan Stol was having trouble with closures and subs. Many people provided some very useful pointers. If you are writing a compiler for Parrot you should read this thread carefully. If you are writing a summary for Parrot you should skim it and punt.

Shared Library and Dynclasses

Sam Ruby wondered if dynclasses should link to libparrot.so. Dan provided the answer: yes. Sam Ruby went on to suggest that if most PMCs would eventually become dynclasses, then (to reduce executable size, the Parrot executable should probably also link to libparrot.so rather than including all of it. No one commented on this observation.

Search Paths and Libraries

Dan wants to stop being annoyed by library path issues. He figures that the right way to do this is to allow dynamic library loading. Best of all he wants the code to do that be in the library. Thus he put out a request for the ability to embed bytecode into an executable. Brent “Dax” Royal-Gordon provided a slightly too-evil method of doing this. Other slightly less-evil (or even good) options would definitely be received thankfully.

Benchmarks? Tests? Or Both?

Joshua Gatcomb noticed that some benchmarks fail on occassion. Matt Diephouse suggested making them tests too. Leo felt that would be fine provided they did not take too long to run.

Fibonacci Still Slow

It is odd how the wheel comes full circle. Originally designed as an exercise in addition for students, the Fibonacci Sequence has some really interesting mathematical properties. While completely ignoring its unexpected niftiness (and explicit formula), this miraculous sequence is still used as busy work for poor creatures. This time the creature is Parrot, and despite Leo’s best efforts, it is still slow. There was some talk of how to optimize this before Dan put the smack down all of it:

“No more performance changes. Period. We get Parrot fully functional first.”

Parrot on Windows

Jerry Wiltz wondered how to get Parrot on his poor Win XP box. Fred and Georgy provided many pointers. Christian Lott also had trouble, but Nicholas Clark, Ron Blaschke, Peter Sinnott, and Steve Peters all provided pointers.

Parrot Build Issues

Jack J. Woehr was having trouble building parrot on his Sun. Leo provided the needed help. Then ICU became problematic. Many people provided help and he eventually got it running Forth, which promptly segfaulted. Jack sounded discouraged, but he really should stay with it now that he has overcome the hard part….

Detecting perldoc

James deBoer wondered if we should detect the presence of perldoc and fail to configure if it is missing. The consensus seems to be that we should detect the absence of perldoc, but if it is not there throw up a big fat warning and proceed.

Pow and Other Ops

There was/is a fairly long and ongoing discussion about ops on PMCs, which Sam Ruby unwittingly started when he asked for MMD pow. While there are people on all sides, it appears likely that the ops will stay.

C on Parrot?

Bloves wondered what the current state of C on Parrot was. But I think he posted it through Google Groups (which does not actually reach the list) as I did not find it in my email. The answer is it essentially non-existent, but if you are feeling brave/insane/suicidal patches welcome.

Streams and Filters

Ron Blaschke tracked does the problem with t/library/streams.t #14 on Win32. The guilty party is line endings. One workaround would be to set the file in question to binary in CVS (although that feels like cheating).

AIX PPC JIT

Adam Thomason provided a patch to fix some warnings. Leo applied it.

Register Allocation/Volatility

Despite Dan’s line-in-the-sand strong statements about no more optimization, Jeff Clites and Leo tossed about some radical ideas for how to speed everything up.

GC Invocation

Leo suggested changing the GC from one that interrupts everybody and does its thing, to one that waits its turn and does its thing. I am concerned that this could lead to resource starvation in a multithreaded system, but nobody else posted anything. Of course, he only suggested this today.

Eval Questions

Leo wants some answers to some eval questions before he tries to clean up dynamic code compiling. Answers??

Include Perl 6 Files in Config

Gerd Pokorra wants to be able to run Perl 6 from anywhere. He even provided a means of achieving this end (although not in unified diff format as is the custom).

pioctl -> segfault

Stéphane Payrard received a segfault while playing with the previously mentioned pioctl magic numbers. Leo speculates that this might be due to the lack of an end opcode.

[TODO] Improve parrot-config.imc

Takers wanted.

Missing Arguments

Klaas-Jan Stol wondered how to detect missing arguments. Leo and Dan both pointed to the argument count registers.

Update to embed.pod

Stéphane Payrard provided an update to embed.pod. Leo applied it, but Brent “Dax” Royal-Gordon cried foul over the including of parrot.h. Dan agreed with Brent, and Stéphane provided a patch to remove the offending line.

Calling Conventions, Tracebacks, and Register Allocations

Leo suggested a new way to invoke functions that would clean up calling, tracebacks, and register allocation. While such a change would have great aesthetic value, Dan declared it premature as Parrot is not yet fully specified. Doubtless this will re-arise later, as aesthetics is a powerful motivator.

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.

Tags

Feedback

Something wrong with this article? Help us out by opening an issue or pull request on GitHub