[perl #38229] [TODO] Make all pod documents(such as README's) end in .pod
# New Ticket Created by Joshua Isom # Please include the string: [perl #38229] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38229 > There are a fair number of documentation files in parrot that are pod files. Most of the README files aren't pod files, but the pge README and the tcl README are. There are several other files where the same occurs. If there aren't any objections, I can take care of this later on. Running(under tcsh): find -E . -not \( -name .svn -prune \) -type f -not -perm +111 -not -regex '.*\.([a-z0-9_]+|C)' -not -name Makefile -not -name harness -exec podchecker '{}' \; |& grep -v 'does not contain any pod commands' seems to find them all(except README.win32) as best I can tell. It's just a little annoying to me to expect a text file and get a pod file.
[perl #38234] [TODO] Replace Getopt/Long.pir with Getopt/Obj.pir
# New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #38234] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38234 > Joshua Isom did a neat Getopt/Obj.pir library for command line options parsing. So Getopt/Long.pir can be removed. AFAIK only Tcl still uses Getopt/Long.pir. If Coke does not mind switching to Obj.pir, and nobody else objects I will remove Getopt/Long.pir soon. CU, Bernhard
[perl #38235] [TODO] Rename src/classes to src/pmc
# New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #38235] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38235 > Hi, I propose to rename 'src/classes' to 'src/pmc' as IMHO it makes more sene. 't/pmc' is already named 'pmc'. Any comments? CU, Bernhard
Re: [perl #38229] [TODO] Make all pod documents(such as README's) end in .pod
On Fri, Jan 13, 2006 at 02:59:44PM -0800, Joshua Isom wrote: > > There are a fair number of documentation files in parrot that are pod > files. Most of the README files aren't pod files, but the pge README > and the tcl README are. There are several other files where the same > occurs. If there aren't any objections, I can take care of this later > on. Running(under tcsh): I renamed all of the '.dev' docs to '.pod' a few days ago. > find -E . -not \( -name .svn -prune \) -type f -not -perm +111 -not > -regex '.*\.([a-z0-9_]+|C)' -not -name Makefile -not -name harness > -exec podchecker '{}' \; |& grep -v 'does not contain any pod commands' This should get everything: perl -mPod::Find -mFile::Find::Rule -le 'print join "\n", grep !/\.(?:pm|pl|pod|t|pir|pasm|pmc|ops|pbc|dump|c|h)$/, File::Find::Rule->file->exec(sub {Pod::Find::contains_pod($_[0]) && not -x $_[0]} )->not_name(qw( harness .svn CVS))->in(".")' Note: Pod::Parser prior to 1.34 (or maybe 1.33 - I can't remember when I submitted the patch) will miss some valid pod files > seems to find them all(except README.win32) as best I can tell. It's > just a little annoying to me to expect a text file and get a pod file. I agree. The obvious candidates are: README.win32 compilers/pge/README compilers/pge/P6Rule.grammar (-> P6Rule_grammar.pod?) docs/BROKEN docs/ROADMAP tools/util/smokeserv-README src/dynclasses/README languages/LANGUAGES.STATUS languages/tcl/README I'm happy to make these changes if there are no objections. Cheers, -J -- pgpmh8PboMJOC.pgp Description: PGP signature
Re: [perl #38235] [TODO] Rename src/classes to src/pmc
Bernhard++ -J -- On Sat, Jan 14, 2006 at 05:01:23AM -0800, Bernhard Schmalhofer wrote: > # New Ticket Created by Bernhard Schmalhofer > # Please include the string: [perl #38235] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/rt3/Ticket/Display.html?id=38235 > > > > Hi, > > I propose to rename 'src/classes' to 'src/pmc' as IMHO it makes > more sene. 't/pmc' is already named 'pmc'. > > Any comments? > > CU, Bernhard pgp7DXAUOksIv.pgp Description: PGP signature
Re: Pattern matching on arrays and "for" loops
On 14/01/06 00:59, Larry Wall wrote: That doesn't seem sufficiently general. I'd rather see some context that can apply a signature to the head of a list and treat the "unslurped" part as unmatched. Maybe a "for" loop could be taught to supply such a context, or a "when". Or maybe it's just the result of embedding a sig inside a rule, or of matching a sig using ~~. Could the sharp end of a pipe be taught to do this? I suggested something like this before but Luke pointed out that it was adding unnecessary DWIMiness. Perhaps this use case could revive the idea: http://groups.google.com/group/perl.perl6.language/browse_thread/thread/3d403aa8ff6e493e/ac666ce340cf819b Brad -- There are two things that will blemish a retainer, these are riches and honor. But if one remains in strained circumstances he will not be marred. -- Hagakure http://bereft.net/hagakure/
Re: [perl #38234] [TODO] Replace Getopt/Long.pir with Getopt/Obj.pir
I'm sure the switchover will be fine. Feel free to patch tcl or break it temporarily. On Jan 14, 2006, at 7:43 AM, Bernhard Schmalhofer (via RT) wrote: # New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #38234] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38234 > Joshua Isom did a neat Getopt/Obj.pir library for command line options parsing. So Getopt/Long.pir can be removed. AFAIK only Tcl still uses Getopt/Long.pir. If Coke does not mind switching to Obj.pir, and nobody else objects I will remove Getopt/Long.pir soon. CU, Bernhard
Re: [perl #38221] Build fails on FreeBSD 5.4
I took another stab at getting it to compile... Tcc compiled src/ops/core_ops_cgp.c but there were linking problems(guess it's not good to use two c compilers for one build). But I disabled linking in the hints file for me and it's working again. Has anyone with FreeBSD 6.0 had any similar problems? It might be specific to the gcc version. If it works with FreeBSD 6.0, it shouldn't be too complicated to disable shared objects for 5.4. On Jan 12, 2006, at 4:17 PM, Joshua Isom (via RT) wrote: # New Ticket Created by Joshua Isom # Please include the string: [perl #38221] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38221 > On FreeBSD 5.4, building parrot fails for the experimental.ops part of core_ops_cgp.c. The gcc version is 3.4.2. Here's the output from the compile. The last time I got a successful compile for FreeBSD was on the 8th, but there was the shared library problem then. src/ops/core_ops_cgp.c src/ops/experimental.ops: In function `cgp_core': src/ops/experimental.ops:226: error: unable to find a register to spill in class `DIREG' src/ops/experimental.ops:226: error: this is the insn: (insn 27898 30731 27899 2388 src/ops/string.ops:397 (parallel [ (set (reg:SI 2 cx [8556]) (unspec:SI [ (mem:BLK (reg/f:SI 8558 [ tmp ]) [0 A8]) (reg:QI 1 dx [8560]) (const_int 1 [0x1]) (reg:SI 2 cx [8559]) ] 20)) (use (reg:SI 19 dirflag)) (clobber (reg/f:SI 8558 [ tmp ])) (clobber (reg:CC 17 flags)) ]) 453 {*strlenqi_1} (insn_list 27894 (insn_list 27895 (insn_list 27896 (insn_list 27897 (nil) (expr_list:REG_DEAD (reg:SI 19 dirflag) (expr_list:REG_DEAD (reg:SI 2 cx [8559]) (expr_list:REG_DEAD (reg:QI 1 dx [8560]) (expr_list:REG_DEAD (reg/f:SI 8558 [ tmp ]) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_UNUSED (reg/f:SI 8558 [ tmp ]) (nil src/ops/experimental.ops:226: confused by earlier errors, bailing out gmake: *** [src/ops/core_ops_cgp.o] Error 1
Re: [perl #38234] [TODO] Replace Getopt/Long.pir with Getopt/Obj.pir
Due to the SArray issues, and an imperfect workaround(ok, failing...), the change isn't as seamless as I'd hope. But, it is a minor change. And for tcl, one of the options would be beneficial for tcl(and other language compilers that pass on arguments to another program). But I haven't heard too much talk about making the change in embed.c so that the workaround is unnecessary. On Jan 14, 2006, at 8:43 AM, Will Coleda wrote: I'm sure the switchover will be fine. Feel free to patch tcl or break it temporarily.
Re: [PATCH] Restrict clear_eh to handlers in the current context
On 1/13/06, Bob Rogers <[EMAIL PROTECTED]> wrote: > still in progress). Unless somebody would like to see a patch with just > the test cases, both marked 'TODO'? > what's a 0.4.1 release without some TODO tests? the more the better. ~jerry
Re: [ANNOUNCE] Devel::TypeCheck 1.2
> On Thu, 12 Jan 2006 22:55:26 -0500, Gary Jackson <[EMAIL PROTECTED]> said: > The latest release of Devel::TypeCheck adds typing of functions (without polymorphism) as well as numerous bug fixes: > The uploaded file >Devel-TypeCheck-1.2.tar.gz > has entered CPAN as > file: $CPAN/authors/id/B/BA/BARGLE/Devel-TypeCheck-1.2.tar.gz > size: 37304 bytes > md5: 04369069c2a307c85bbe54ee5a267c9b Hey you need to upgrade your Test::Pod before running make dist:-) t/pod.NOK 3 # Failed test 'blib/lib/Devel/TypeCheck/Glob2type.pm' # in /usr/local/[EMAIL PROTECTED]/lib/site_perl/5.9.3/Test/Pod.pm at line 172. # blib/lib/Devel/TypeCheck/Glob2type.pm (57): '=item' outside of any '=over' # blib/lib/Devel/TypeCheck/Glob2type.pm (68): You forgot a '=back' before '=head1' # Looks like you failed 1 test of 26. [...] Failed Test Stat Wstat Total Fail Failed List of Failed --- t/pod.t1 256261 3.85% 3 This is with Module id = Test::Pod DESCRIPTION Tests POD files for correctness CPAN_USERID PETDANCE (Andy Lester <[EMAIL PROTECTED]>) CPAN_VERSION 1.22 CPAN_FILEP/PE/PETDANCE/Test-Pod-1.22.tar.gz UPLOAD_DATE 2005-10-24 DSLI_STATUS RdpO (released,developer,perl,object-oriented) MANPAGE Test::Pod - check for POD errors in files INST_FILE /home/src/perl/repoperls/installed-perls/maint-5.8/pkfUy6M/[EMAIL PROTECTED]/lib/site_perl/5.8.7/Test/Pod.pm INST_VERSION 1.22 -- andreas
Re: [perl #38235] [TODO] Rename src/classes to src/pmc
"Bernhard Schmalhofer (via RT)" <[EMAIL PROTECTED]> wrote: I propose to rename 'src/classes' to 'src/pmc' as IMHO it makes more sene. 't/pmc' is already named 'pmc'. Yes, and for consistency please also rename dynclasses to dynpmc and the t/dynclass to t/dynpmc. Jonathan
[PATCH] Restrict clear_eh to handlers in the current context
From: jerry gay <[EMAIL PROTECTED]> Date: Sat, 14 Jan 2006 08:45:50 -0800 On 1/13/06, Bob Rogers <[EMAIL PROTECTED]> wrote: > still in progress). Unless somebody would like to see a patch with just > the test cases, both marked 'TODO'? what's a 0.4.1 release without some TODO tests? the more the better. ~jerry Foolish question, I suppose. On the other hand, who knows when someone might say, "Hey, that's not a bug; I need that!" . . . -- Bob Index: t/pmc/exception.t === --- t/pmc/exception.t (revision 11168) +++ t/pmc/exception.t (working copy) @@ -6,7 +6,7 @@ use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 26; +use Parrot::Test tests => 28; =head1 NAME @@ -591,3 +591,50 @@ Error: something happened Outer value OUTPUT + +{ +# clear_eh should insist on a sub from the current context at TOS. +local $TODO = 'bug'; + +pir_output_like(<<'CODE', <<'OUTPUT', 'clear_eh out of context (1)'); +.sub main :main + pushmark 1 + clear_eh + print "no exceptions.\n" +.end +CODE +/No exception to pop./ +OUTPUT + +pir_output_is(<<'CODE', <<'OUTPUT', 'clear_eh out of context (2)'); +.sub main :main + .local pmc outer, cont + push_eh handler + test1() + print "skipped.\n" + goto done +handler: + .local pmc exception + .get_results (exception) + print "Error: " + print exception + print "\n" +done: + print "done.\n" +.end +.sub test1 + .local pmc exit + print "[in test1]\n" + ## clear_eh is illegal here, and signals an exception. + clear_eh + print "[cleared]\n" +.end +CODE +[in test1] +Error: No exception to pop. +done. +OUTPUT + +$TODO = '';# suppress warning. + +} # end $TODO
[perl #38236] [PATCH] Restrict clear_eh to handlers in the current context
Phooey; I should read what I write. This version changes the word "sub" to "handler" in a comment, thereby causing it to make sense. -- Bob Index: t/pmc/exception.t === --- t/pmc/exception.t (revision 11168) +++ t/pmc/exception.t (working copy) @@ -6,7 +6,7 @@ use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 26; +use Parrot::Test tests => 28; =head1 NAME @@ -591,3 +591,50 @@ Error: something happened Outer value OUTPUT + +{ +# clear_eh should insist on a handler from the current context at TOS. +local $TODO = 'bug'; + +pir_output_like(<<'CODE', <<'OUTPUT', 'clear_eh out of context (1)'); +.sub main :main + pushmark 1 + clear_eh + print "no exceptions.\n" +.end +CODE +/No exception to pop./ +OUTPUT + +pir_output_is(<<'CODE', <<'OUTPUT', 'clear_eh out of context (2)'); +.sub main :main + .local pmc outer, cont + push_eh handler + test1() + print "skipped.\n" + goto done +handler: + .local pmc exception + .get_results (exception) + print "Error: " + print exception + print "\n" +done: + print "done.\n" +.end +.sub test1 + .local pmc exit + print "[in test1]\n" + ## clear_eh is illegal here, and signals an exception. + clear_eh + print "[cleared]\n" +.end +CODE +[in test1] +Error: No exception to pop. +done. +OUTPUT + +$TODO = '';# suppress warning. + +} # end $TODO
[PATCH] struct Parrot_Context doesn't need a 'prev' field.
I had thought this field was being used, but it turns out to be irrelevant. I offer this patch so that no one else is fooled (and because I had to test it anyway to prove that this is the case). -- Bob Rogers http://rgrjr.dyndns.org/ Index: include/parrot/interpreter.h === --- include/parrot/interpreter.h(revision 11187) +++ include/parrot/interpreter.h(working copy) @@ -169,7 +169,7 @@ typedef struct Parrot_Context { /* common header with Interp_Context */ -struct Parrot_Context *prev; +struct Parrot_Context *unused1;/* placeholder */ Regs_nibp; /* pointers to FLOATVAL & INTVAL */ Regs_psbp_ps; /* pointers to PMC & STR */ /* end common header */ Index: src/register.c === --- src/register.c (revision 11187) +++ src/register.c (working copy) @@ -416,7 +416,6 @@ } CONTEXT(interpreter->ctx) = ctx = ptr; ctx->regs_mem_size = reg_alloc; -ctx->prev = old; ctx->n_regs_used = old->n_regs_used; diff = (long*)ctx - (long*)old; interpreter->ctx.bp.regs_i += diff; @@ -471,7 +470,6 @@ fprintf(stderr, "alloc %p\n", ptr); #endif CONTEXT(interpreter->ctx) = ctx = ptr; -ctx->prev = old; ctx->regs_mem_size = reg_alloc; ctx->n_regs_used = n_regs_used; /* regs start past the context */ Index: src/debug.c === --- src/debug.c (revision 11187) +++ src/debug.c (working copy) @@ -2823,7 +2823,7 @@ /* get the next Continuation */ ctx = PMC_cont(sub)->to_ctx; old = sub; -if (!ctx || !ctx->prev) +if (!ctx) break; } if (rec_level != 0) {
[perl #38236] [PATCH] Restrict clear_eh to handlers in the current context
# New Ticket Created by Bob Rogers # Please include the string: [perl #38236] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38236 > From: jerry gay <[EMAIL PROTECTED]> Date: Sat, 14 Jan 2006 08:45:50 -0800 On 1/13/06, Bob Rogers <[EMAIL PROTECTED]> wrote: > still in progress). Unless somebody would like to see a patch with just > the test cases, both marked 'TODO'? what's a 0.4.1 release without some TODO tests? the more the better. ~jerry Foolish question, I suppose. On the other hand, who knows when someone might say, "Hey, that's not a bug; I need that!" . . . -- Bob Index: t/pmc/exception.t === --- t/pmc/exception.t (revision 11168) +++ t/pmc/exception.t (working copy) @@ -6,7 +6,7 @@ use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 26; +use Parrot::Test tests => 28; =head1 NAME @@ -591,3 +591,50 @@ Error: something happened Outer value OUTPUT + +{ +# clear_eh should insist on a sub from the current context at TOS. +local $TODO = 'bug'; + +pir_output_like(<<'CODE', <<'OUTPUT', 'clear_eh out of context (1)'); +.sub main :main + pushmark 1 + clear_eh + print "no exceptions.\n" +.end +CODE +/No exception to pop./ +OUTPUT + +pir_output_is(<<'CODE', <<'OUTPUT', 'clear_eh out of context (2)'); +.sub main :main + .local pmc outer, cont + push_eh handler + test1() + print "skipped.\n" + goto done +handler: + .local pmc exception + .get_results (exception) + print "Error: " + print exception + print "\n" +done: + print "done.\n" +.end +.sub test1 + .local pmc exit + print "[in test1]\n" + ## clear_eh is illegal here, and signals an exception. + clear_eh + print "[cleared]\n" +.end +CODE +[in test1] +Error: No exception to pop. +done. +OUTPUT + +$TODO = '';# suppress warning. + +} # end $TODO
Re: Array Holes
Larry Wall wrote: >Whatever the answer, it probably has to apply to > >my @a; >@a[0] = '1'; >@a[2] = '3'; >print exists $a[1]; > >as well as the explicit delete case. Are we going to pitch an exception for >writing beyond the end of an array? That seems a bit anti-Perlish. > > What's the semantic difference between "exists but is undefined" and "does not exist"? IOW: my @a = (1,2,3); @a[1] = undef; print exists @a[1]; print @a[1]; versus: my @a = (1,2,3); delete @a[1]; print exists @a[1]; print @a[1]; If I try to store @a[1], it auto(re)vivifies, right? If I fetch @a[1], do I get an exception or just an undef? To force undef, do I use "err" or "//"? my $a1 = @a[1] err undef; my $a1 = @a[1] // undef; Does @a.k return different results? (0..2) vs (0,2) >: * how do you store nonexistence for native packed arrays > > > We've beaten this horse, or one that looks vanishingly like it, a bunch of times. 1. Implementation issue. Throw it to p6i. 2. For infrequent exceptions, create an exception-list. 3. For frequent exceptions, create a bitmap. 4. For exceptions in unbalanced data, create an escape value. >: Anyway, I want this behavior to die. Maybe we should get rid of >: .delete() on arrays, or maybe we should equate it with >: .splice($idx,1). > >Or maybe we support sparse arrays as one container type. > > Sure, but what's the default behavior? If I consume the endpoints of an array, using shift or pop, how is that different from consuming the middle? my @a = (1,2,3); shift @a; shift @a; print @a.indexof(3); # 0 or 2? Based on that, I'll argue that the default array mode is "contains a list," which means that array contents should act like lists. Delete something in the middle, and you have a shorter list, not a list with a hole in it. Harrays and Arrashes can be different types, or maybe can just be properties of the basic sigillated types. my @a = (1,2,3) is arrash; # sparse my %h = (1 => 'a', 2 => 'b') is harray; >I actually used a crowbar last week. It wasn't pretty, but it got >the job done. Well, okay, it got the job started...I still have a >hole in my living room wall, but my chief interest at the time was >to make sure my house wasn't going to burn down. That's about as >much abstraction as you could wish for in real life. > > Dude, you're scaring me. Should there be a license required for home ownership? =Austin
[perl #38238] [PATCH] struct Parrot_Context doesn't need a 'prev' field.
# New Ticket Created by Bob Rogers # Please include the string: [perl #38238] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38238 > I had thought this field was being used, but it turns out to be irrelevant. I offer this patch so that no one else is fooled (and because I had to test it anyway to prove that this is the case). -- Bob Rogers http://rgrjr.dyndns.org/ Index: include/parrot/interpreter.h === --- include/parrot/interpreter.h(revision 11187) +++ include/parrot/interpreter.h(working copy) @@ -169,7 +169,7 @@ typedef struct Parrot_Context { /* common header with Interp_Context */ -struct Parrot_Context *prev; +struct Parrot_Context *unused1;/* placeholder */ Regs_nibp; /* pointers to FLOATVAL & INTVAL */ Regs_psbp_ps; /* pointers to PMC & STR */ /* end common header */ Index: src/register.c === --- src/register.c (revision 11187) +++ src/register.c (working copy) @@ -416,7 +416,6 @@ } CONTEXT(interpreter->ctx) = ctx = ptr; ctx->regs_mem_size = reg_alloc; -ctx->prev = old; ctx->n_regs_used = old->n_regs_used; diff = (long*)ctx - (long*)old; interpreter->ctx.bp.regs_i += diff; @@ -471,7 +470,6 @@ fprintf(stderr, "alloc %p\n", ptr); #endif CONTEXT(interpreter->ctx) = ctx = ptr; -ctx->prev = old; ctx->regs_mem_size = reg_alloc; ctx->n_regs_used = n_regs_used; /* regs start past the context */ Index: src/debug.c === --- src/debug.c (revision 11187) +++ src/debug.c (working copy) @@ -2823,7 +2823,7 @@ /* get the next Continuation */ ctx = PMC_cont(sub)->to_ctx; old = sub; -if (!ctx || !ctx->prev) +if (!ctx) break; } if (rec_level != 0) {