Re: What's needed for a new languages/t/*?
[Argh! Posted to google groups again!] Bernhard Schmalhofer wrote: Amir Karger schrieb: I have a test script that runs 85 tests (and will run many more once I write more opcodes. So if all I want to do is, essentially, perl -e 'chdir languages/Z and system(parrot z3.imc t/test.z3)' and let the script print out a bunch of (not )?ok's for Test::Harness to read, what should I do in my t directory? AFAIK there are no strict testing requirements for language implementations. I think that the most important thing is to try to be nice. Or, as a wise comedian once said, Be Excellent to each other. There are three things that I want to suggest: i. Z/t/z3.t should be a Perl5 script that prints output in Test Anything Protcol. So put your 'system(parrot z3.imc t/test.z3)' into Z/t/z3.t Done (ish). ii. Z/t/harness should behave like most other 't/harness'. It executes the t/*.t files and prints a harness report of the output. I think I can copy someone else's pretty much verbatim iii. 'Z/t/harness --files' returns the list of test files. Looks like I can perl -pe 's/urm/Zcode/' urm/t/harness Zcode/t/harness You could also try to put 'Z' into @unified_testable_languages of 'languages/testall' and add support for Z in 'config/gen/makefiles/languageĀs.in'. Calling 'make languages-test' could then test 'Z' along the other languages. I think I'll try that once I can get make test to work. (Also, how do I make sure it'll find parrot before make install has been done?) I would expect that an install parrot is only found when the executable 'parrot' is in $PATH. Before installation I usually use $FindBin::Bin for building up the relevant paths. OK. I see others say PARROT=../../parrot Thanks, -Amir
Re: [pirate] OSCON slides
Michal Wallace wrote: On Fri, 5 Aug 2005, Leopold Toetsch wrote: There are still issues e.g. with namespaces. I've put out numberless mails on p6i where I invited HLL folks to discuss it and make some proposals. Guess how many answers these mails got. Zero? I don't think p6i is the right place for that. We should have a low-traffic compiler list. Yep and I've cc'ed p6c. Michal J Wallace leo
Re: [perl #36823] [BUG] fresh checkout of r8844 fails to build
Jonathan Worthington wrote: I tracked down that the problem was introduced in revision 8841, Yep. Sorry I've accidentally deleted too much. It's fixed again. leo
Calling SUPER methods
Hi, I was wondering if it is possible to call specific methods from a parent PMC from another method in your (child) PMC, for some other object than SELF. My situation may be a bit complex, so I'll explain: I have a LuaTable PMC, extending the Hash PMC. I override the add method, because users may override the add method for Tables (which normally does not exist). These user-overriden methods are stored in yet another LuaTable. This other LuaTable, the metatable of methods (like 'add', 'subtract', etc.) is stored as a property (setprop). So, when trying to add 2 tables together, this is what happens: 1. add in LuaTable is called (because of Px + Py) 2. while in add, check if this LuaTable (you could say SELF) has a property metatable. 3. if it has such a metatable, check if it has a field add (this would contain the user-defined add function for adding tables). 4. if is has not, give an error saying you can't add tables. However, in step 3, the get_pmc_keyed method is called of this 'metatable' PMC (which was stored as the metatable property). Users may *also* override _these_ methods (so, set/get_pmc_keyed). That would mean, that while handling this add method, another user-overriden method is called. This should not happen. So, what I'd like to do, is to call the get_pmc_keyed in the Hash PMC, for this 'metatable' PMC. So, instead of doing this: VTABLE_get_pmc_keyed(INTERP, metatable, key); which calls the get_pmc_keyed method of the LuaTable PMC, I'd like to call this get_pmc__keyed method of the Hash PMC for this metatable object. So, something along the lines of SUPER.VTABLE_get_pmc_keyed(INTERP, metatable, key); // call get_pmc_keyed in the Hash PMC for the object 'metatable' I hope my question is clear. Is there any way to do this? [[ A somewhat related question to this is: would it be handy to add syntax to call an arbitrary method from a parent class? So, in pmc2c.pl, it says it's possible to call a method in a parent class by means of: SUPER(...) but that only allows for calling the _same_ method (so, when in the method add for example, you can only call SUPER's add, not SUPER's subtract or something). It might be handy to be able to do something like: SUPER.method(...) Or is there any other way to do this? ]] Thanks, klaas-jan
Re: [perl #36812] Compiling Pugs against Parrot
On Aug 6, 2005, at 15:21, Adrian Lambeck wrote: 2. I made patches agains r8818 for the files that changed to apply to parrot-0.2.3 but these did not work out the way I though - maybe I am missing something. I patched parrot-config and config/gen/makefiles/root.in r8841 (regarding root.in) was bogus - I dropped too much. Fixed in r8853. leo
[perl #29836] [PATCH] No need to skip some tests on Cygwin
Hi, I have applied a couple of old patches from Limbic~Region. These patches are enabling some tests for cygwin. Unfortunately I have no cygwin installed, so I can't tell whether the enabled tests are passing. But I think that right after a release is a good time for breaking things. Could one of the Cygwin users tell whether everything is OK? extend 12 previously hung on Cygwin: If configured with --intval=long and --opcode=long this is not the case This might still be problematic. threads were all being skipped on Cygwin: They all pass except the 2 that are being universally skipped The threads tests were already enabled for cygwin. timer were all being skipped on Cygwin: They all pass Timer tests are now enabled -- /* [EMAIL PROTECTED] */
Re: [perl #29836] [PATCH] No need to skip some tests on Cygwin
Bernhard Schmalhofer via RT wrote: Hi, I have applied a couple of old patches from Limbic~Region. These patches are enabling some tests for cygwin. Unfortunately I have no cygwin installed, so I can't tell whether the enabled tests are passing. But I think that right after a release is a good time for breaking things. Could one of the Cygwin users tell whether everything is OK? My pleasure. All extend and thread tests have passed for me on trunk with normal build. timer seems to pass outside the harness, but isn't happy inside it. Signal seems to have a 'Signal 1' message in the output which breaks the test. I'm just going to repeat this to double check things. I'll add any updates if there are any. [Also trans has the problem with one of the trig tests (which has been mentioned a few times!), and dynclasses don't build yet] Regards, Nick
[DOCS] Updated intro.pod
Hi, I noticed that intro.pod is someone behind where Parrot currently is, in a big way. It doesn't make a single mention of PIR for one, and all the examples are in PASM, which is for silicon based lifeforms. I think most of the readers of intro.pod will be carbon based ones. ;-) So, I re-wrote it. It now talks about PIR, and has examples in PIR. It mentions how PIR differs from PASM. Subroutines now get a look in to the introduction, and it mentions in passing that Parrot is capable of doing OO stuff, threads and GC. I've attached it for review and, if nobody yelps in horror, I'll commit it in a couple of days. Suggestions for improvements are welcome, though as it's an intro it probably doesn't want to get too much longer. Thanks, Jonathan intro.pod Description: Binary data
Re: Container model - pictures and questions
On Sun, Aug 07, 2005 at 10:58:01PM +0100, Tim Bunce wrote: The Container either has-a mutable cell, or has-a constant cell. my $mut = 3; my $con := 3; Use := to change the cell inside a container: How about: Use := to change the container to have a different cell. That is correct. Or replace the cell. Each cell has a Id. Use =:= to check whether two containers have cells of the same Id: $x =:= $y; # false $x =:= $z; # true It's hard to imagine two containers both containing the same cell. The cell isn't really in two places at the same time. What's missing from the description is that there's some form of 'pointer' from a container to the cell it currently contains. (I'm trying to avoid using the term reference.) Yes. The mutable has-a relationships are maintained with pointers. I think the legend needs to be updated to reflect this fact. The description of the container model might benefit from making that pointer more explicit. It would help to clarify the action of the := operator. (And =:= ?) Right. =:= is first retrieving the cells by chasing the pointer, read the cell's id, and then comparing them. Please correct me if I'm laboring under too much perl5 baggage or confused in other ways. No, your understanding is entirely sound. The Container model is basically a renormalized glob concept to apply also to lexical pads, but with only one way to dereference the glob (i.e. the container), instead of seven ways. Hence, it looks like that it is indeed possible to rebind a variable declared is constant to something mutable, just as this Perl 5 snippet does: our ($a, $b); *a = \3; $b = 4; *a = *b; print $a; # 4 Compare with Perl 6: my $a := 3; my $b = 4; $a := $b; print $a; # 4 Thanks, /Autrijus/ pgpHBFihaCzfs.pgp Description: PGP signature