NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Small Example. (Score:1)
use v6; # ------------------------------------------------------------------------ # r5666 | putter | 2005-07-18 09:49:34 -0600 (Mon, 18 Jul 2005) | 1 line # sprintf now handles X D U O E G F specifRe:Small Example. (Score:2)
<ecode>instead of<code>tags for verbatim code blocks... Here is your post, reformatted.Most commits this time around were related to javascript ouput but burried in the commit log was a little addition to
.as()For those who haven't noticed perl 6 now lets you format strings with the.asmethod that takes the same arguments as sprintf. A recent commit extends this to include a few more options.PIL2JS runs mandel.p6! (Score:1)
http://m19s28.vlinux.de/iblech/stuff/not_perm/pil2js-demo/mandel.p6.html [vlinux.de]
(I've only tested it with Firefox 1.0.5, though. And beware, the script might take 100% CPU, crash your browser, etc, but it does work!
Re:PIL2JS runs mandel.p6! (Score:1)
C3 method resolution order (Score:1)
This should exactly match my implementation on the Parrot side. There is just one test showing init order (which is reverse MRO). Please grep for "constructor - diamond parents" in t/pmc/object-meths.t
Re:C3 method resolution order (Score:1)
Our orderings do not match. However, most of my tests are for destruction order (normal MRO), and are all examples taken directly from the papers on C3 (so I expect they would be correct). I think it would be good to compare our implementations and possibly add some destruction order tests to parrot to see if those match up or not.
- StevanRe:C3 method resolution order (Score:1)
I have been looking over your MRO test, and I have to say, I think your algoritm might be wrong, or at least not the C3 algorithm we are talking about. I cannot tell for sure until I have seen it tested in destruction order. But my reasoning for this conclusion is as follows.
Take your reverse MRO (E A D B C F) for this class structure (both extracted from the test you mention):
A B A E
\
C D
\ /
\
Re:C3 method resolution order (Score:1)
If now implemented C3 MRO (r8650 in trunk). It's of course true that the VM shouldn't dictate a particular MRO, but we have to provide one, so why not that of our major users. If more flexibility is needed, we can always use the current HLL setting and select something different.
There is one additional test in t/pmc/object-meths.t, showing how to print the MRO of a class.
Re:C3 method resolution order (Score:1)
Excellent, we now match! Your test example is now in the metamodel test suite. If I find time, I will try to port my other C3 tests to Parrot for you.
- Stevan