Re: Release 0.1.2 ?
William Coleda [EMAIL PROTECTED] wrote: After some distractions I got back to this today. After doing the merge and resolving all the conflicts (of which there really weren't that many), I get it to build, and then get a: Great. So 0.1.2 will be delayed until its in? I'll keep poking at it. Looks like a bootstrapping problem on string initialization. Are the encoding_init() / chartype_init() lines enabled in string.c:string_init()? leo
Re: Parrot_get_runtime_prefix
William Coleda [EMAIL PROTECTED] wrote: in src/library.c (main branch), I find: const char* Parrot_get_runtime_prefix(Interp *interpreter, STRING **prefix_str) { static STRING *s; static int init_done; ^^ init_done is never initialized here. What's up? It ought to be zero initially. leo
Re: #perl6, pugscode.org, and more
On Sun, 2005-02-20 at 02:07 +0800, Autrijus Tang wrote: Also, I've registered http://pugscode.org/ and populated it with some basic information. From the README: Pugs needs the Glasgow Haskell Compiler (GHC) 6.2 or above. To install GHC, download a binary build from http://haskell.org/ghc/. Although source code for GHC is available, it will take a very long time to build by yourself. Since obviously this compiler is being used for real work, has anyone considered petitioning the major Linux distribution vendors to include it in their upcoming releases? For example, I'm sure Fedora would pick it up, given that it's being used in the development of the next major version of an important core tool / language (Perl). Obviously, we can all manage to download and install a compiler, but I for one have been trying to make sure that anything truly useful is not managed this way on my machines. I would petition the projects that I know about, but I don't know anything about Haskell, and it would be presumptuous of me.
Re: #perl6, pugscode.org, and more
On Wed, 2005-02-23 at 07:43 -0500, Aaron Sherman wrote: has anyone considered petitioning the major Linux distribution vendors to include it in their upcoming releases? [...] I don't know anything about Haskell, and it would be presumptuous of me. Face... so... red... Ignore me, this is already under way (and being quite well managed, it seems at http://www.haskell.org/fedora/ for the Fedora platform). They're pushing to get included in Fedora's extras.
Z machine
I've here some small parts of a Z machine code translator. It runs not much more then a hello-worldish program. * written in PIR, using objects * translates Z code files to PIR * ~ 10 opcodes done * objects, props, attributes, abbrevs are all missing I've no time to play with it further, so I'd be glad if someone likes to continue hacking on it. leo
Re: #perl6, pugscode.org, and more
Aaron Sherman wrote in perl.perl6.compiler : On Wed, 2005-02-23 at 07:43 -0500, Aaron Sherman wrote: has anyone considered petitioning the major Linux distribution vendors to include it in their upcoming releases? [...] I don't know anything about Haskell, and it would be presumptuous of me. Face... so... red... Ignore me, this is already under way (and being quite well managed, it seems at http://www.haskell.org/fedora/ for the Fedora platform). They're pushing to get included in Fedora's extras. I've included it in Mandrakelinux's contribs. It's a huge RPM, but we may try to find place for it on the editions that come with the largest number of CDs :)
VTABLE methods and interfaces
There was already some discussion about splitting the VTABLE structure into distinct pieces. I'd like to start that task after 0.1.2 is out. Here are some thoughts: 1) Vtable and interfaces The VTABLE structure provides common slots that every PMC must provide and optional parts that roughly correspond to an interface. E.g. a scalar doesn't need the array slots push, pop, shift, unshift ... But an array should fill these, but not the scalar entries like get_number. Each of the optional interface parts in the VTABLE is just a pointer to a structure holding the entries (or to a default implementation that catches errors for unhandled interfaces) This adds one indirection to most of the vtable calls but it reduces the size of the vtable vastly. 2) Vtable entries should be real methods All non-defaulted, non-inherited entries of a vtable interface should be available as methods, like now with the METHOD keyword. This allows eventually code like this: Px = Py.__pop_pmc() or Px = Py.__string()# $x = ~$y string kontext This easily allows overloading of all the vtable methods. The PIC code gets even rid of the additional indirection as the function is called directly from opcodes. The vtable slots are just for calling these methods from within C source. 3) MMD functions They work basically like other methods except that there is no VTABLE slot and the method lookup is more complicated. The more detailed (and very preliminary) proposal below has some additional MMD functions that we'll need (IMHO): __i_add(Px, Py)# $x += $y Px = __n_add(Py, Pz) # x = y + z ; x is newly created The distinct slots for the inplace operations are at least necessary for Python, as these are separate methods in Python. It also simplifies the implementation as a check for self == dest isn't necessary in the plain operations. The variants with an n_ prefix create and return a new PMC. Comments welcome. leo =head1 TITLE Vtable and Interfaces =head1 ABSTRACT Every PMC and Parrot Class has a distinct vtable. Additionally a shared or read-only variant of a PMC or class needs a different vtable. But by far not all vtable slots are used by all classes. To improve memory usage and flexibility this proposal describes a split of vtable functionality. =head1 DESCRIPTION A vtable gets split into different parts: common funtionality that each PMC must provide and optional interface parts. =head2 Common vtable entries =item instantiate, mark, destroy, finalize, freze, thaw ... =item type, mro, name, find_method, isa, does, can =item cmp, hash =head2 Scalar PMC entries =item add, subtract, multiply, ... MMDs ! Use an existing destination. =item nadd, nsubtract, nmultiply, ... MMDs ! Create a new destination. =item inc, dec =item iadd, isubtract, ... MMDs ! Inplace operations C a += b . =head2 Native scalar entries =item get_integer, get_number, ..., add_int, multiply_int ... =head2 PMC array entries =item get_pmc_keyed, push, pop, shift, unshift, splice =head2 Native array entries =item get_integer_keyed ... =head2 PMC hash entries =item get_pmc_keyed, exists_keyed, delete_keyed =head2 Native hash entries =item get_integer_keyed ... =head2 Object entries =item get_attribute, set_attribute, ... =head2 Iteration slots =item get_iter, iter_next
Re: Release 0.1.2 ?
Leopold Toetsch writes: William Coleda [EMAIL PROTECTED] wrote: After some distractions I got back to this today. After doing the merge and resolving all the conflicts (of which there really weren't that many), I get it to build, and then get a: Great. So 0.1.2 will be delayed until its in? You're the the pumpking - that's your call, not mine. I'll keep poking at it. Looks like a bootstrapping problem on string initialization. Are the encoding_init() / chartype_init() lines enabled in string.c:string_init()? leo No, they weren't. Of course, if I enable them, I get undefined symbols during the link phase... a grep through the source doesn't seem to have them defined anywhere. (in the main branch or the integration I'm trying). Not that it should matter. the backtrace from gdb shows the error occuring earlier in string_init than the encoding_init line. The problem is in the prefix=Parrot_get_runtime_prefix line... which eventually tries to call CHARSET_GET_CODEPOINT on a string with what seems to be a null encoding. Regards.
Re: #perl6, pugscode.org, and more
On Wed, Feb 23, 2005 at 03:11:29PM -, Rafael Garcia-Suarez wrote: Aaron Sherman wrote in perl.perl6.compiler : On Wed, 2005-02-23 at 07:43 -0500, Aaron Sherman wrote: has anyone considered petitioning the major Linux distribution vendors to include it in their upcoming releases? [...] I don't know anything about Haskell, and it would be presumptuous of me. Face... so... red... Ignore me, this is already under way (and being quite well managed, it seems at http://www.haskell.org/fedora/ for the Fedora platform). They're pushing to get included in Fedora's extras. I've included it in Mandrakelinux's contribs. It's a huge RPM, but we may try to find place for it on the editions that come with the largest number of CDs :) Also, its available through portage on Gentoo, but I suggest going and doing something else while compiling ;) Steve Peters [EMAIL PROTECTED]
How are types related to classes and roles?
HaloO, I'm very puzzled about what is meant by type and class in Perl6. In the sort ruling http://groups-beta.google.com/group/perl.perl6.language/msg/1eb1ed4608f5604d we saw a system of types that allow to nicely dispatch into different version of sort. OTOH every class or role name can serve the same purpose. Built-in value types like Str and Int seem to be auto-coercive instead of MMD, in particular when playing together with dedicated operators like binary '+' versus '~'. And how does all this combine with the notion of context? I guess that basically influences method selection. Take the following example: # part 1 class Cyclic[uint $base] is Int { multi *postfix:++ ( Cyclic[uint $base] $i ) returns Cyclic[uint $base] { return (($i as uint) + 1) % $base; } multi *infix:+ ( Cyclic[uint $base] $x, Int $y ) returns Cyclic[uint $base] is symmetric { return abs( ($x as uint) + $y ) % $base; } ... } # part 2 sub foo( Int $begin, Int $end ) { while $begin $end { ... $begin++; # assumes Int axiom: $i + 1 $i } } #part 3 my Cyclic[8] $cyclic = 3; foo( $cyclic, 10 ); # never returns? Does the design intent to catch such surprises? E.g. by giving an error at the line 'class Cyclic[uint $base] is Int'? But how should the violation of an abstract property of Int be checked by the compiler? Can this just be remedied by source code review and human reasoning? Is there a chance for designers of classes like Int to prevent method overriding which violates some constraints? If yes, how are these constraints specified? my Cyclic[7] enum DayOfWeek Mon Tue Wed Thu Fri Sat Sun; Another thing: does the above definition work together with enums? my Cyclic[7] enum DayOfWeek Mon Tue Wed Thu Fri Sat Sun; my DayOfWeek $day = Fri; say Fri = {$day}, Sat = {$day + 1}, Sun = {$day + 2}, Mon = {$day + 3}; Does that say Fri = Fri, Sat = Sat, Sun = Sun, Mon = Mon? Regards, -- TSa (Thomas Sandlaß)
Re: VTABLE methods and interfaces
Leopold Toetsch wrote: 2) Vtable entries should be real methods All non-defaulted, non-inherited entries of a vtable interface should be available as methods, like now with the METHOD keyword. This allows eventually code like this: Px = Py.__pop_pmc() or Px = Py.__string()# $x = ~$y string kontext This easily allows overloading of all the vtable methods. The PIC code gets even rid of the additional indirection as the function is called directly from opcodes. The vtable slots are just for calling these methods from within C source. As long as find_method itself can be overridden, this above is merely a description of the default behavior, not a hard requirement. 3) MMD functions They work basically like other methods except that there is no VTABLE slot and the method lookup is more complicated. The more detailed (and very preliminary) proposal below has some additional MMD functions that we'll need (IMHO): __i_add(Px, Py)# $x += $y Px = __n_add(Py, Pz) # x = y + z ; x is newly created The distinct slots for the inplace operations are at least necessary for Python, as these are separate methods in Python. It also simplifies the implementation as a check for self == dest isn't necessary in the plain operations. The variants with an n_ prefix create and return a new PMC. I continue to believe that it is not a good idea for Parrot to decide apriori exactly which methods are to be mmd universally for all languages and all objects. - Sam Ruby
PUGS: show correct version automagically
See attached diff. Index: src/Help.hs === --- src/Help.hs (revision 216) +++ src/Help.hs (working copy) @@ -2,6 +2,7 @@ #define VERSION 6 #define DATE #include config.h +#include Version.h {- Online help and banner text. @@ -30,10 +31,10 @@ name = Perl6 User's Golfing System versnum= VERSION +revision = 'r': show(SVN_REVISION) date = DATE -version= name ++ , version ++ versnum ++ , ++ date +version= name ++ , version ++ versnum ++ , ++ date ++ , SVN r ++ revision copyright = Copyright 2005 by Autrijus Tang -revision = ('r':) . init . init . drop 6 $ $Rev$ disclaimer = This software is distributed under the terms of the ++ GNU Public Licence.\n ++ @@ -44,7 +45,7 @@ where fill = replicate (n - vlen) ' ' vlen = length vstr -vstr = Version: ++ versnum -- ++ ( ++ revision ++ ) +vstr = Version: ++ versnum ++ ( ++ revision ++ ) banner :: IO () banner = putStrLn $ unlines Index: Makefile.PL === --- Makefile.PL (revision 216) +++ Makefile.PL (working copy) @@ -82,13 +82,20 @@ close FH; postamble( .); -$pugs: @{[glob(src/*.hs)]} +$pugs: @{[glob(src/*.hs)]} src/Version.h ghc --make -o pugs src/Main.hs -isrc tags :: hasktags -c src + . + +postamble( '.'); +src/Version.h : .svn/entries + perl -ne '/^ *committed-rev=(\d+)/ and print #define SVN_REVISION $$1\n and last' .svn/entries src/Version.h +. + WriteAll( sign = 1 ); # FIXUP
Re: Z machine
On Wed, Feb 23, 2005 at 03:02:32PM +0100, Leopold Toetsch wrote: I've here some small parts of a Z machine code translator. It runs not much more then a hello-worldish program. * written in PIR, using objects * translates Z code files to PIR * ~ 10 opcodes done * objects, props, attributes, abbrevs are all missing I've no time to play with it further, so I'd be glad if someone likes to continue hacking on it. leo I'll take a look at that. I haven't played Leather Goddesses of Phobos in a while ;). Steve Peters [EMAIL PROTECTED]
Test.pm runs!
First, let me thank stevan, steve and benjamin for the wonderful patches. The reason why I didn't reply with thanks, applied is because they are now committers, and has committed those tests (and more!) to the Pugs repository. Welcome aboard! We have 10 committers now. :) Next, I'm glad to announce that the first Perl 6 module, Test.pm, has been implemented, and a number of unit test has been converted to use it. The Test.pm code is currently very copy-pasty, so refactoring is welcome: http://svn.openfoundry.org/pugs/lib/Perl6/lib/Test.pm See t/03operator.t for an example of how to use it. For now, Pugs is piggybacking on Perl5's @INC path; it respects PERLLIB and PERL5LIB environment variables, and appends Perl6/lib to each element. PERL6LIB is hounoured as well without the Perl6/lib suffix. The upshot is that on CPAN, Perl6 modules inside Pugs will now live in the Perl6/lib/* namespace; that is, Test.pm becomes Perl6/lib/Test.pm. While this is merely a stopgap measure before 6pan comes into place, I think it is unlikely to clash with normal p5 modules. Finally, I'd like to encourage all unit test writers to add the require Test; line to the unit tests, and convert existing unit tests to use it. Happy QA'ing! Thanks, /Autrijus/ pgpmAIvWFejOO.pgp Description: PGP signature
Re: How are types related to classes and roles?
On Wed, Feb 23, 2005 at 06:21:02PM +0100, Thomas Sandlaß wrote: : HaloO, : : I'm very puzzled about what is meant by type and class in Perl6. : In the sort ruling : http://groups-beta.google.com/group/perl.perl6.language/msg/1eb1ed4608f5604d : we saw a system of types that allow to nicely dispatch into different : version : of sort. OTOH every class or role name can serve the same purpose. : Built-in value types like Str and Int seem to be auto-coercive instead of : MMD, in particular when playing together with dedicated operators like : binary '+' versus '~'. One can view the auto-coercion as a form of MMD if you allow the autogeneration of any necessary coercion methods. However, it's not exactly a coercion to Str or Int--it's more like promotion to a Scalar that is able to pretend it is either Str or Int. Or you can view it as a kind of cached conversion. The ~ operator doesn't demand the Str type--it only demands something which can fulfill the string role. : And how does all this combine with the notion of context? Lazily, for the most part. In some cases we can determine context at compile time, but often not. Certainly a subroutine cannot determine what context it was called in until it's actually called, unless we venture into return-value MMD, which has problems resolving against parameter MMD. : I guess that basically influences method selection. Up to a point. At some point we effectively have to mix in methods if we want to have allomorphic types like Perl 5 scalars. : Take the following example: : : # part 1 : class Cyclic[uint $base] is Int : { :multi *postfix:++ ( Cyclic[uint $base] $i ) : returns Cyclic[uint $base] :{ : return (($i as uint) + 1) % $base; :} :multi *infix:+ ( Cyclic[uint $base] $x, Int $y ) : returns Cyclic[uint $base] : is symmetric :{ : return abs( ($x as uint) + $y ) % $base; :} :... : } : : # part 2 : sub foo( Int $begin, Int $end ) : { :while $begin $end :{ : ... : $begin++; # assumes Int axiom: $i + 1 $i :} : } : : #part 3 : my Cyclic[8] $cyclic = 3; : : foo( $cyclic, 10 ); # never returns? : : : Does the design intent to catch such surprises? : E.g. by giving an error at the line 'class Cyclic[uint $base] is Int'? I don't see how. I suspect there are gazillions of ways to violate Liskov substitutability that are in the realm of the halting problem. : But how should the violation of an abstract property of Int be checked : by the compiler? I don't think that's going to be Perl's job. Where Perl 6 is going with this it to give the programmer enough tools that they don't feel like they have to use inheritance to do subtyping. The whole point of a subtype is to violate Liskov, so that's why it's a separate concept. : Can this just be remedied by source code review and human reasoning? Yes and no are both correct answers to such a question. : Is there a chance for designers of classes like Int to prevent method : overriding which violates some constraints? : If yes, how are these constraints specified? Sure, just use DBC to supply complete regression tests as PRE and POST blocks. Your program is not gonna run very fast though... Oh, wait, maybe you want compile-time constraints. Sorry, I'm no good at those. One could, I suppose, set up some kind of expert system that will reason about code, and at least tell you when it can and can't decide. But usually we just call that sort of thing compile-time strong-typing, and most current Perl programmers don't like it very much. They tend to be more into late-binding solutions. It's possible to bridge that gap somewhat with type inferencing, but I'm no expert in that either. I think the best thing we can do here is to encourage a culture in which people recognize the fundamental difference between extending a base class and constraining a subtype, and learn to use composition and delegation where appropriate instead of inheritance. That's why we've given different keywords to all those concepts. It's a matter of giving people the mental tools to think straighter. It's another one of those natty little psychological problems that partially prove and partially disprove the Sapir-Whorf hypothesis, which is generally true when you want it to be false, and false when you want it to be true. : my Cyclic[7] enum DayOfWeek Mon Tue Wed Thu Fri Sat Sun; : : Another thing: does the above definition work together with enums? Seems like a natural fit insofar as both are subtype constraints. : my Cyclic[7] enum DayOfWeek Mon Tue Wed Thu Fri Sat Sun; : my DayOfWeek $day = Fri; : say Fri = {$day}, Sat = {$day + 1}, Sun = {$day + 2}, Mon = {$day + 3}; : : Does that say Fri = Fri, Sat = Sat, Sun = Sun, Mon = Mon? I suspect that could be made to work as long as you don't also expect DayOfWeek to have Int semantics, or the semantics of some further subtype of DayOfWeek. This is not valid inheritance here. The basic
[PUGS][PATCH] t/base/cond.t
I've patched t/base/cond.t to use the Test lib. Index: t/base/cond.t === --- t/base/cond.t (revision 226) +++ t/base/cond.t (working copy) @@ -1,4 +1,5 @@ use v6; +require Test; =pod @@ -6,10 +7,10 @@ =cut -say 1..2; +plan 2; my $x = '0'; -if ($x eq $x) {say ok 1; } else { say not ok 1; } -if($x == $x) {say ok 2; } else { say not ok 2; } +ok $x eq $x, check that eq works; +ok $x == $x, check that == works; signature.asc Description: This is a digitally signed message part
[PUGS] [PATCH] Testify t/op/{shift,push,magic,unshift,repeat,eval,split,pair,eq}.t
Here's a patch to make various tests use Test.pm -Scott -- Jonathan Scott Duff [EMAIL PROTECTED] Index: t/op/shift.t === --- t/op/shift.t(revision 234) +++ t/op/shift.t(working copy) @@ -1,14 +1,13 @@ use v6; +require Test; -say 1..6; +plan(6); my @s = (1, 2, 3, 4, 5); -if (eval 'shift(@s)' == 1) { say ok 1 # TODO shift } else { say not ok 1 # TODO shift } -if (eval 'shift(@s)' == 2) { say ok 2 # TODO split } else { say not ok 2 # TODO shift } -if (eval 'shift(@s)' == 3) { say ok 3 # TODO split } else { say not ok 3 # TODO shift } -if (eval 'shift(@s)' == 4) { say ok 4 # TODO split } else { say not ok 4 # TODO shift } -if (eval '@s.shift' == 5) { say ok 5 # TODO split } else { say not ok 5 # TODO shift } -if (eval 'defined(shift(@s))') { say not ok 6 # TODO shift } else { -say ok 6 # TODO split -} +todo_ok (eval 'shift(@s)' == 1, shift); +todo_ok (eval 'shift(@s)' == 2, shift); +todo_ok (eval 'shift(@s)' == 3, shift); +todo_ok (eval 'shift(@s)' == 4, shift); +todo_ok (eval '@s.shift' == 5, shift method); +todo_ok (!eval 'defined(shift(@s))', shift); Index: t/op/push.t === --- t/op/push.t (revision 234) +++ t/op/push.t (working copy) @@ -1,14 +1,17 @@ use v6; +require Test; -say 1..6; +plan(6); my @push; eval 'push @foo, 42'; -if (@push[0] == 42) { say ok 1 # TODO push } else { say not ok 1 # TODO push } +todo_ok(@push[0] == 42, push); + eval '@foo.push(24)'; -if (@push[0] == 42) { say ok 2 # TODO split } else { say not ok 2 # TODO push } -if (@push[1] == 24) { say ok 3 # TODO split } else { say not ok 3 # TODO push } +todo_ok(@push[0] == 42, push); +todo_ok(@push[1] == 42, push); + eval 'push @foo, 1, 2, 3'; -if (@push[2] == 1) { say ok 4 # TODO split } else { say not ok 4 # TODO push } -if (@push[3] == 2) { say ok 5 # TODO split } else { say not ok 5 # TODO push } -if (@push[4] == 3) { say ok 6 # TODO split } else { say not ok 6 # TODO push } +todo_ok(@push[2] == 1, push); +todo_ok(@push[3] == 2, push); +todo_ok(@push[4] == 3, push); Index: t/op/magic.t === --- t/op/magic.t(revision 234) +++ t/op/magic.t(working copy) @@ -1,13 +1,14 @@ # Tests for magic variables use v6; +require Test; -say 1..2; +plan(2); # Tests for %*ENV # it must not be empty at startup -if (0 + %*ENV.keys 0) { say ok 1; } else { say not ok 1; } +ok(0 + %*ENV.keys 0); # PATH is usually defined. But this test is not portable -if %*ENV{PATH} ne { say ok 2; } else { say not ok 2; } +ok(%*ENV{PATH} ne ); Index: t/op/unshift.t === --- t/op/unshift.t (revision 234) +++ t/op/unshift.t (working copy) @@ -1,14 +1,15 @@ use v6; +require Test; -say 1..6; +plan(6); my @unshift; eval 'unshift @foo, 42'; -if (@unshift[0] == 42) { say ok 1 # TODO unshift } else { say not ok 1 # TODO unshift } +todo_ok (@unshift[0] == 42,unshift); eval '@foo.unshift(24)'; -if (@unshift[1] == 42) { say ok 2 # TODO unshift } else { say not ok 2 # TODO unshift } -if (@unshift[0] == 24) { say ok 3 # TODO unshift } else { say not ok 3 # TODO unshift } +todo_ok (@unshift[1] == 42,unshift); +todo_ok (@unshift[0] == 24,unshift); eval 'unshift @foo, 1, 2, 3'; -if (@unshift[0] == 1) { say ok 4 # TODO unshift } else { say not ok 4 # TODO unshift } -if (@unshift[1] == 2) { say ok 5 # TODO unshift } else { say not ok 5 # TODO unshift } -if (@unshift[2] == 3) { say ok 6 # TODO unshift } else { say not ok 6 # TODO unshift } +todo_ok (@unshift[0] == 1,unshift); +todo_ok (@unshift[1] == 2,unshift); +todo_ok (@unshift[2] == 3,unshift); Index: t/op/repeat.t === --- t/op/repeat.t (revision 234) +++ t/op/repeat.t (working copy) @@ -1,13 +1,14 @@ use v6; +require Test; -say 1..7; +plan(7); -if ('a' x 3 eq 'aaa') { say ok 1 } else { say not ok 1 } -if ('ab' x 4 eq 'abababab') { say ok 2 } else { say not ok 2 } -if (1 x 5 eq '1') { say ok 3 } else { say not ok 3 } -if ('' x 6 eq '') { say ok 4 } else { say not ok 4 } +ok ('a' x 3 eq 'aaa'); +ok ('ab' x 4 eq 'abababab'); +ok (1 x 5 eq '1'); +ok ('' x 6 eq ''); my @foo = 'x' xx 10; -if (@foo[0] eq 'x') { say ok 5 } else { say not ok 5 } -if (@foo[9] eq 'x') { say ok 6 } else { say not ok 6 } -if ([EMAIL PROTECTED] == 10){ say ok 7 } else { say not ok 7 } +ok (@foo[0] eq 'x'); +ok (@foo[9] eq 'x'); +ok ([EMAIL PROTECTED] == 10); Index: t/op/eval.t === --- t/op/eval.t (revision 234) +++ t/op/eval.t (working copy) @@ -1,14 +1,15 @@ use v6; +require Test; -say 1..4; +plan(4); # eval should evaluate the code in the lexical scope of eval's caller sub make_eval_closure { my $a = 5; sub ($s) { eval $s
Re: [PUGS] [PATCH] Testify t/op/{shift,push,magic,unshift,repeat,eval,split,pair,eq}.t
I applied this patch for all except split.t which had already been patched earlier. It's Revision 237 - Steve On Feb 23, 2005, at 8:10 PM, Jonathan Scott Duff wrote: Here's a patch to make various tests use Test.pm -Scott -- Jonathan Scott Duff [EMAIL PROTECTED] t.patch
[PUGS] Keeping track of un-implemented features
Autrijus, As I am writing more and more tests for PUGS, I have run into a number of un-implemented features (of course this is based on my interpretation of the various perl 6 docs out there, I may have it all wrong). For some of these features I have created TODO tests, and still others are just commented out. However, this does not seem to be the ideal way of keeping track of these things. So my question is what would be your preferred way to do this? Is there something in the OpenFoundry OSSF app we can use? Or would you prefer some other means? - Stevan
[PUGS] Documentation?
Autrijus, All, Should we start some kind of documentation portion of the PUGS project? Or do you think maybe it is too early for that? - Stevan
TAP and STDERR
Hi there, The TAP documentation in 2.47_01 says: A harness must only read TAP output from standard output and not from standard error. The way Test::Builder works, diagnostics always go to STDERR. Is there a reason for this beyond It's tricky to correlate diagnostics to the appropriate test numbers? (I agree with that, but I'm willing to take my chances on certain occasions.) -- c
Re: [PUGS] Documentation?
On Wed, Feb 23, 2005 at 09:22:11PM -0500, Stevan Little wrote: Autrijus, All, Should we start some kind of documentation portion of the PUGS project? Or do you think maybe it is too early for that? It's never too early to start documentation. Pm
Re: TAP and STDERR
A harness must only read TAP output from standard output and not from standard error. I wasn't considering the diagnostics to necessarily be TAP output. They're allowed, but not necessary to the running of the test. xoa -- Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance
Re: [PUGS] Documentation?
On Wed, Feb 23, 2005 at 09:22:11PM -0500, Stevan Little wrote: Autrijus, All, Should we start some kind of documentation portion of the PUGS project? Or do you think maybe it is too early for that? Isn't that what the Apocrypha are ... er, will be? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]
Build on Win32 with MinGW
See my step by step quide and results: http://wiki.kn.vutbr.cz/mj/index.cgi?Build%20Parrot%20with%20MinGW Refactoring is welcome. I am C, Parror and English beginner :-). Michal Jurosz
Re: [PUGS] Documentation?
On Wed, Feb 23, 2005 at 09:22:11PM -0500, Stevan Little wrote: Autrijus, All, Should we start some kind of documentation portion of the PUGS project? Or do you think maybe it is too early for that? - Stevan That's partially what http://pugs.kwiki.org is for :)
Re: TAP and STDERR
On Feb 23, 2005, at 6:42 PM, chromatic wrote: The way Test::Builder works, diagnostics always go to STDERR. Is there a reason for this beyond It's tricky to correlate diagnostics to the appropriate test numbers? (I agree with that, but I'm willing to take my chances on certain occasions.) Personally, I would love it if they went to STDOUT, if for no other reason than that they would be properly output relative to the surrounding context. I get diagnostics appearing far away from the output of tests that they're right next to in the code all the time. I though I'd fixed that by turning off buffering on STDERR (Andy committed that patch, I think), but it still happens. :-( Regards, David