This Fortnight on Perl 6, October 2004 Part Two
Last week, I received a request to summarize perl6-language before internals. Frankly, it seems like a reasonable idea. Perl6-internals has always been first as long as I can remember. So perhaps, it is time to switch it up. Before I start off with perl6-language, let me remind all American readers to vote. Non-American readers should also vote, but it seems unlikely that your day of voting is tomorrow (as I write this). So without further ado...
Thomas Sandlass posted a link to an article on Packrat Parsing. It looks like a promising techinque for small programs, although its memory requirements may be a bit heavy for large programs. Mr. Sandlass appears to have been Warnocked, but there are several explanations. First, he posted from Google; there has been trouble in the past about such things getting through. Second, he posted to Perl6 Language instead of Perl6 Compiler.
Rich Morin wanted to know two things. One, can he hook into function calls and just about everything else for his evil purposes? Two, can he get floating point values which automagically track their rounding errors? Austin Hastings pointed out that two would probably best be implemented as an opaque object whose value is a junction. Luke Palmer demonstrated an evil way to embed whatever hooks he wanted by adding an extra layer to the grammar. Somehow, I worry that shooting myself in the foot with this would take most of my body off...
U. Ruirarchzatrea expressed a desire for perfect backwards
compatibility to Perl 5 and a Ponie too. Matthew Walton, Brent "Dax"
Royal-Gordon, and Luke Palmer all told him that he could have a Ponie, but it
would not be perfect.
In the last summary, I mentioned that Perl6 Compiler has not yet found its way to Google groups. Leo seems to have had trouble subscribing to it also. Perhaps this bears investigation? Does anyone know someone who can be poked/prodded/pleaded with about this? End result: no links for you!
Ovid popped in to see if he could find more detailed status info about the progress of P6C. Patrick Michaud provided a slightly unsatisfying answer of "not much longer," and Luke Palmer provided a slightly more detailed answer, which can be summarized as "not much longer."
|
Related Reading
Perl Template Toolkit |
Dan and Steve Fink told Jacques Mony that a port to Unununium would probably require substantial changes to Configure.
Apparently, our current scheme of mem_alloc_executable and
mem_free_executable is not quite enough to make grsecurity happy.
Work is ongoing...
Will Coleda had problems with signal.t failing while his machine was under load. Leo pointed out that this is known behavior. Jeff Clites was a little confused and disappointed that his earlier patches to help solve this problem had not sufficed.
parrot_interpBrent "Dax" Royal-Gordon warned everyone that he was committing a gianormous change that would affect any pending patches. From the lack of chaos on the list, I would say that his warning worked.
Michel Pelletier and Matt Diephouse discussed some of the finer points of Forth implementations and optimizations.
Ron Blaschke gave a quick update on his progress with VC7.1 on Win32. Looks good. Keep on chugging, Ron.
Jerry Wiltz asked if help in downloading Parrot [he was starting from scratch (no Perl or C compiler)] on a WinXP box. Fred the LastNamelessOne provided a plethora of useful links.
Miroslav Silovic posted a summary of a design change that he and Leo were
considering. I asked for more details as to how it was different then something
we had moved away from much earlier. Leo provided quite a nice and thorough
explanation. Thanks. Dan observed that this recurring thread happened nearly
yearly, but that the cycle was not quite 12 months. Dan also observed that the
timing coinciding with his being sick was fortuitous. Leo and Dan went back
and forth for a while discussing the implementation and implications of it. I
believe that the end result is that we will have indirect access to registers;
we will not need to have saveall/restoreall pairs
around function calls; and Dan should eventually get better, but not until this
is fully thrashed out.
As a side effect of indirect access to registers, the JIT needs to be rejiggered to account for this. Leo and Jeff Clites went back and forth working on this with what sounds like good progress being made.
perlnum Test FixRon Blaschke fixed a test failing because of -0.0. Leo applied
the patch.
Brian Wheeler submitted a patch to fix x86-64. Leo couldn't apply it. Brian resubmitted. It got mangled on the way. Brian reresubmitted. Leo applied it. Thanks for perservering, Brian!
Robert Spier suggested several options on how to simplify the problem of Parrot and external dependencies. Sadly, Warnock applies.
Jeff Horwitz is making amazing progress with his cybernetically enhanced parrot. Oh wait, I mean embedding Parrot into Apache. It all looks really cool, and he has been able to use his experience to provide valuable critiques to us all.
Sam Ruby has "been trying to make sense of Python's scoping in the context of Parrot." Leo, Dan, and Allen Short all rushed to his aid.
Resizable*Array
ImplementationBernhard Schmalhofer wondered if the Resizable*Arrays should
use chunked allocation. Dan told him, "No, the motivation behind them is simple
and fast, thus the chunking would be unwanted overhead." He did mention that
they could do something clever (like chunking) if they got big enough.
In a flash of good news for Dan, Bill Coffman has started to put his mighty brain to work on the register spilling code. He, Leo, and Jeff discussed various aspects of it. I eagerly look forward to the results of getting Parrot a really cool spilling algorithm (although probably not a eagerly as Dan and his nasty pathological code ;-)
Bill Coffman wondered if he could find the C89 spec so that he could ensure
his changes were compliant. Dan suggested using K&R second edition. Jeff
Clites pointed out the -std=c89 flag for gcc. Michael G Schwern
suggested using C99 spec (which should also contain the C89 spec) as a
"frightening accessory this Halloween." Michael frightens me.
Leo asked what the state of the functions in src/method_util.c is. He got Warnocked. I would say that means they should get pitched and see what happens.
.include 'absolute path'Matthias Huerlemann created a patch allowing absolute paths in .include
statements. Leo responed that the implementation was not quite right, but the
format of the patch was good.
Joshua Gatcomb had a fairly long conversation with himself fleshing out a problem with ICU on Red Hat. Leo broke into his monologue to say that it seemed Red Hat specific.
Matthias Hoelzl has a fairly hard-to-pin-down segfault. Leo suggested trying
to use parrot -G, --gc-debug, and -t to
track it down. No response yet.
Leo suggested a small Perl task of making something akin to ccache for PMCs. Jeff Clites jumped on it.
Stepan Roh fixed somethings with the Befunge interpreter while simultaneously accusing befunge of being unimportant. Jerome applied some of those fixes and admonished Stepan for saying such things. I remember a time when Befunge fleshed out many troublesome bugs in Parrot, and I forsee a future when Befunge will be included in webservers everywhere through the magic of mod_parrot!
Stéphane Payrard asked about some problems he had encountered
creating the magical all-in-one Siva PMC. Leo provided a helpful prod towards
LVALUE_CAST. The other problems may or may not related to the
Mandrake Cooker. Hopefully, someone will tell us.
Leo reported that, thanks to Jeff, one can now call into Parrot functions from JIT. Yay!
make testexecCurrently, make testexec will create and run a trivial "hello
world" program for the exec core. Leo would like it to run the full test suite
instead. This is a big thing but would probably win you many friends and even
influence people.
Leo provided several warnings that he was going to make some big changes that would break any code that did not follow the calling conventions. He went on to implement and commit a whole lot of stuff. I was impressed, and Dan later wondered if it was all done or not (as he wants to make some big changes soon). Apparently, it is for the most part.
Nicholas Clark, with Leo's help, found a bug in the stalk walking code. Apparrently, our mask for valid pointers was a little overzealous. Nicholas checked in a quick fix. Steve Fink has a few suggestions.
Bill Coffman is continuing his amazing work with register allocation. He has been making strong progress, and his new code is fast approaching production-ready. Unfortunately for Dan, it still has a few rough points and a small memory leak preventing it from being used on Dan's evil code. Leo has been helping him along the entire time, and I predict that all of Bill's work will find its way into Parrot before the next summary.
Robert Spier pointed out the fairly nifty libjit. Unfortunately, according to Leo, the current jit is far enough along that it would be too much work to switch. I tend to believe him.
H. Merijn Brand reminded Leo that he hadn't been contacted yet about some "Diana" menthol alcohol. I was confused, but apparently Leo wasn't...
Stéphane Payrard wanted to know if his analogy between pmcs and filesystems was correct. Leo felt that it was mostly right and attempted to explain the value/variable split. Dan corrected Leo and went a little further. What I have taken away from this is: "do not think of it in terms of high level language operators, instead think of it in terms of C. You get pointers and values (and you can point to a value). Some things do shallow copies (i.e. pointer copies) others do deep."
pmc_typeNicholas Clark wanted to know what a pcm_type of 0 means. The
answer: no such type. This led to Stéphane Payrard asking about pmc_type values
for abstract types. They don't get types because they can't be directly
instantiated. This led Paolo Molaro to wonder about the virtue of having a
system closer to C++ with array lookup for virtual functions. Nicholas, Leo,
and Paolo banged on this for awhile and decided that there was some room for
optimization. Leo scares me when he optimizes...
Parrot_callLeo was bothered by the fact that Parrot_call only supported
void return values. Much to Jeff Horwitz's joy, he fixed it.
Vijay D. though that parrot was failing to install when it "hung" while
compiling the computed goto cores. Nick Glencross, Leo, Dan, Peter Sinnott, and
Joshua Gatcomb all helped out, explaining that cg is really hard on one's system
and can be disabled with the --cgoto=0 flag to
Configure.pl.
Peter Hickman wanted to know if Perl 6 would be able to be distributed in bytecode. The answer is yes, but this won't help you hide your source, as that will frequently be necessary meta-data. It will, however, speed up your compilation and even allow mmap of the bytecode to share between threads.
Sam Ruby has continued his work on Python and is making good progress. He was a little concerned about the speed issues of converting everything to dynclasses. He and Leo talked out some alternatives. Things are looking promising.
Sam Ruby wanted to know about possible threading issues. Leo requested that they let the sleeping giant lie for a while longer.
.include "../relative
path"Matt Diephouse added a todo item for .includeing with relative
paths. Takers welcome.
Bernhard Schmalhofer added a few benchmarks for the various array PMCs. Leo applied the patch.
Leo had some concerns about the prederef run cores. Dan suggested pitching them, but Leo opted to fix them instead. Some discussion of their relative values ensued, and then someone started using assembly to support a point and my head exploded.
Michel Pelletier has finally gotten himself a perl.org account. The idea is that this would allow him to maintain Parakeet in CVS. Unfortunately, Warnock applies.
Matt Diephouse found a way to make Parrot's GC crash. Leo fixed it with alacrity.
Jeff Clites found and fixed a bug in the grow-the-arena threshold for JIT. Leo seemed to feel that Jeff's solution was only a temporary one.
Jeff Clites voiced some concern over the state of JIT on AIX. Adam Thomason told him, "Worry not, it's already broken."
Appropriately, Leo found himself playing with chains around Halloween. He wondered if the call chain should have a PMC wrapper. Dan figured not, as ops which do evil things would be unlikely to be invoked accidentally, whereas a PMC might...
Leo wanted to add some newsub opcodes to save allocations. Dan countered that it would be a better thing to make constant PMCs work properly. Leo did.
Leo suggested a couple of extra features that he wanted in pmc2c2.pm. Sam Ruby supplied them.
Will Coleda provided a patch to build dynclasses by default. Leo is stalling before applying it, hoping to hear from other platforms. Now would be a great time to chime in... ::cricket noises:::
IMCC currently doesn't produce them. Will Coleda supplied a naive attempt at this, but Leo decided it would be better to do it the elegant way and split the PASM and PIR lexers/parsers apart.
Brent "Dax" Royal-Gordon managed to find an AMD64 for himself. Not only am I
jealous, but Parrot passes all expected tests on it when built with
--ccflags=':add{ -fPIC }.
Klaas-Jan discovered that dynopslib was failing. Leo concurred and asked for patches.
$(TOUCH)Jeff Clites noticed that Makefile's $(TOUCH) does not
actually work on many platforms and suggested a solution. Michael G. Schwern
suggested using ExtUtils::Command
instead. Who knows what will finally happen?
Dan wondered about adding some ops for debugging parrot code. The response was favorable and enthusiastic.
parrot -t Massive LeaksDan noticed that parrot -t leaks more memory then most cheap
computers have.
Sam Ruby wondered about adding a hash vtable method for Python's benefit. Dan seemed to think it was a good idea.
Matt Diephouse noticed that the dissambler was broken. Dan pointed out that he was testing it wrong, but Matt soon discovered that it didn't work even if he tested it right.
James deBoer provided a patch adding shebang lines to config/*.pl. Brent "Dax" Royal-Gordon reasoned that these were unnessecary as these scripts should only be run by Configure.pl. James countered by offering a patch removing all of the shebang lines from the other ones. I like his style.
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.
Perl.com Compilation Copyright © 1998-2006 O'Reilly Media, Inc.