[perl #39757] [BUG] sprintf left-justification doesn't work

2006-07-07 Thread via RT
# New Ticket Created by  Matt Diephouse 
# Please include the string:  [perl #39757]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39757 >


   mini:~/Projects/parrot mdiep$ cat test.pir
   .sub main :main
 $P0 = new .ResizablePMCArray
 $P1 = new .Integer
 $P1 = 10
 $P0[0] = $P1
 $P1 = new .String
 $P1 = "foo"
 $P0[1] = $P1
 $P1 = new .String
 $P1 = "bar"
 $P0[2] = $P1
 $S0 = sprintf "%-*s - %s\n", $P0
 print $S0
 end
   .end

   mini:~/Projects/parrot mdiep$ parrot test.pir
   foo - bar
   mini:~/Projects/parrot mdiep$

That should output "foo- bar" instead.

Tcl may be blocking on this soon, so takers wanted. :-)

--
Matt Diephouse



Re: HLL root globals and empty keys (was Re: test of get_namespace opcode)

2006-07-07 Thread Allison Randal

Chip Salzenberg wrote:


Well, I see a lot to like about this, but (and you knew there was a "but"
("but" that's my job now :-))), in descending order of difficulty:


And you do it so well. Thank you. :)


 * The division into two categories ("global" and "symbol") leaves the third
   category (current namespace) with no clear home.


Agreed.


 * All the things being accessed are globals.  Seems like the word "global"
   should be used consistently, and "symbol" has many meanings in Parrot
   that only partly overlap the specific meaning of "global".


Agreed.


 * We still don't have way to ask for "my HLL" without spelling it.  I can
   say "my HLL's Foo" without spelling my HLL, but when I go up to my HLL's
   root I must suddenly know the spelling of my HLL and say it.  Seems like
   a sign of a design problem.


Agreed.


 * The global root is available as C
   at present -- awkward but fast.  Since global root accesses are supposed
   to be rare, awkwardness doesn't bug me for that case.  But adding opcodes
   for absolute-root ... hey, "absolute", that's a good name.
 
 * Huffmanizing shouldn't be as big a consideration with PIR/pasm as with

   most languages.  Most PIR/pasm is program-generated.


Agreed, with a note of balance that we also want to avoid the pain of 
XS. Sometimes you need to poke into the guts of the system, and when you 
do, you want it to be pleasant to work with, even though it's not fancy.



So here's an illustrative suggestion, which I think is a variant on one of
your also-rans, albeit one that leaves the common HLL case unmarked:

  .HLL 'perl5', perl5_group
  .namespace ['Foo']

  $P0 = get_cur_global 'x'  # ['perl5';'Foo';'x']
  $P0 = get_cur_global ['Bar'], 'x' # ['perl5';'Foo';'Bar';'x']

  $P0 = get_global 'x'  # ['perl5';'x']
  $P0 = get_global ['Corge'], 'x'   # ['perl5';'Corge';'x']

  $P0 = get_abs_global 'x'  # ['x']
  $P0 = get_abs_global ['parrot'], 'x'  # ['parrot';'x']


This is non-evil. :)

I would rename 'get_cur_global' to 'get_global'. The selected namespace 
indicates that most of the code belongs in that namespace, so it's 
likely that most of the variables do too. (There are variations, but 
that's at least the common case.)


Then, what to call the HLL root access opcodes... perhaps 
'get_rel_global' (for relative root)?


Allison


Ruby on Parrot

2006-07-07 Thread Allison Randal
I gave a Parrot talk at a Ruby user group meeting tonight. Someone 
mentioned that they had seen somebody on #parrot who was working on a 
new Ruby implementation based on Punie. Do you exist? And is there 
anything we can do to help you?


Allison


[perl #39754] [EMAIL PROTECTED]: tru64 core dump: t/pmc/resizablebooleanarray_20.pasm

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39754]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39754 >


(dbx) run --gc-debug t/pmc/resizablebooleanarray_20.pasm
thread 0x3 signal Segmentation fault at
warning: "src/pmc/fixedbooleanarray.pmc":188 has no code associated with it

  [Parrot_FixedBooleanArray_get_integer_keyed_int
warning: "src/pmc/fixedbooleanarray.pmc":188 has no code associated with it

:188 +0x201b8b9d,0x1201b8b9c]
(dbx) where
>  0 Parrot_FixedBooleanArray_get_integer_keyed_int(interpreter = 0x1401c4000, 
> pmc = 0x14049f5a0, key = 5000) ["src/pmc/fixedbooleanarray.c":188, 
> 0x1201b8b9c]
   1 Parrot_ResizableBooleanArray_get_integer_keyed_int(interpreter = 
0x1401c4000, pmc = 0x14049f5a0, key = 5000) 
["src/pmc/resizablebooleanarray.c":66, 0x1201be5b4]
   2 Parrot_set_i_p_kic(cur_opcode = 0x1404c7418, interpreter = 0x1401c4000) 
["src/ops/set.ops":417, 0x1200e6fa8]
   3 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404c7418) 
["src/runops_cores.c":180, 0x12014b208]
   4 runops_int( = 0x1404c7280,  = 0x1404c7280, interpreter = 0x1401c4000, 
offset = 0) ["src/interpreter.c":775, 0x1200f9bb8]
   5 runops(interpreter = 0x1401c4000, offs = 0) ["src/inter_run.c":81, 
0x1200f7f60]
   6 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = "vP", ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) ["src/inter_run.c":182, 0x1200f8290]
   7 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = "vP") ["src/inter_run.c":276, 0x1200f8460]
   8 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
["src/embed.c":802, 0x1200a6384]
   9 main(argc = 1, argv = 0x11fffc028) ["compilers/imcc/main.c":681, 
0x120088f60]
(dbx)

Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39753] [EMAIL PROTECTED]: tru64 core dump: t/pmc/io_1.pir

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39753]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39753 >


(dbx) run --gc-debug t/pmc/io_1.pir
Undef ok 1
Undef ok 2
Assertion failed: (unsigned long)l != 0xdeadbeefUL, file src/io/io.c, line 1017
thread 0x13 signal IOT/Abort trap at >*[__nxm_thread_kill, 0x3ff805c5908]  
ret  zero, (ra), 1
(dbx) where
>  0 __nxm_thread_kill(0x6, 0x3ffc01b6000, 0x3ff805c3788, 0x3ffc01b6000, 
> 0x3ffc01b6000) [0x3ff805c5908]
   1 pthread_kill(0x11fffbd07, 0x11fffbd10, 0x11fffbd00, 0x11fffbd0d, 0x5) 
[0x3ff805c37a0]
   2 __tis_raise(0x11fffbd00, 0x11fffbd0d, 0x5, 0x1, 0x3ff801d27bc) 
[0x3ff801405d4]
   3 abort(0x3ff801d2224, 0x0, 0x3ff805c4cc0, 0x0, 0x6) [0x3ff801d27b8]
   4 __assert(0x3ff800c2ad0, 0x3ff800c2ac0, 0x7, 0x1, 0x7) [0x3ff801d2220]
   5 PIO_putps(interpreter = 0x1401c4000, pmc = 0x1401214c0, s = 0x14047bf40) 
["src/io/io.c":1017, 0x1200b7be4]
   6 Parrot_print_p_sc(cur_opcode = 0x1404ea2b8, interpreter = 0x1401c4000) 
["src/ops/io.ops":329, 0x1200d2a88]
   7 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404ea2b8) 
["src/runops_cores.c":180, 0x12014b208]
   8 runops_int( = 0x1404ea000,  = 0x1404ea000, interpreter = 0x1401c4000, 
offset = 0) ["src/interpreter.c":775, 0x1200f9bb8]
   9 runops(interpreter = 0x1401c4000, offs = 0) ["src/inter_run.c":81, 
0x1200f7f60]
  10 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = "vP", ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) ["src/inter_run.c":182, 0x1200f8290]
  11 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = "vP") ["src/inter_run.c":276, 0x1200f8460]
  12 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
["src/embed.c":802, 0x1200a6384]
  13 main(argc = 1, argv = 0x11fffc028) ["compilers/imcc/main.c":681, 
0x120088f60]
(dbx)

Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39750] [EMAIL PROTECTED]: tru64 core dump: t/examples/japh_12.pasm

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39750]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39750 >


(dbx) run --gc-debug t/examples/japh_12.pasm
Parrot VM: PANIC: Out of bound register access!
C file src/ops/set.ops, line 336
Parrot file (not available), line (not available)

We highly suggest you notify the Parrot team if you have not been working on
Parrot.  Use parrotbug (located in parrot's root directory) or send an
e-mail to [EMAIL PROTECTED]
Include the entire text of this error message and the text of the script that
generated the error.  If you've made any modifications to Parrot, please
describe them as well.

Version : 0.4.5-devel
Configured  : Thu Jul  6 23:16:59 2006
Architecture: nojit
JIT Capable : No
Interp Flags: 0x10
Exceptions  : (missing from core)

Dumping Core...
thread 0x3 signal Quit at >*[__nxm_thread_kill, 0x3ff805c5908]  ret zero, 
(ra), 1
(dbx) where
>  0 __nxm_thread_kill(0x3, 0x3ffc01b6000, 0x3ff805c3788, 0x3ffc01b6000, 
> 0x3ffc01b6000) [0x3ff805c5908]
   1 pthread_kill(0x1404de530, 0x1404de500, 0x1401c4000, 0x0, 0x5) 
[0x3ff805c37a0]
   2 __tis_raise(0x1401c4000, 0x0, 0x5, 0x1, 0x1200b5564) [0x3ff801405d4]
   3 do_panic(interpreter = 0x1401c4000, message = 0x140018408 = "Out of bound 
register access", file = 0x140018428 = "src/ops/set.ops", line = 336) 
["src/exceptions.c":125, 0x1200b5560]
   4 Parrot_sets_ind_i_sc(cur_opcode = 0x1404de530, interpreter = 0x1401c4000) 
["src/ops/set.ops":336, 0x1200e61d4]
   5 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404de530) 
["src/runops_cores.c":180, 0x12014b208]
   6 runops_int( = 0x1404de500,  = 0x1404de500, interpreter = 0x1401c4000, 
offset = 0) ["src/interpreter.c":775, 0x1200f9bb8]
   7 runops(interpreter = 0x1401c4000, offs = 0) ["src/inter_run.c":81, 
0x1200f7f60]
   8 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = "vP", ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) ["src/inter_run.c":182, 0x1200f8290]
   9 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = "vP") ["src/inter_run.c":276, 0x1200f8460]
  10 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
["src/embed.c":802, 0x1200a6384]
  11 main(argc = 1, argv = 0x11fffc028) ["compilers/imcc/main.c":681, 
0x120088f60]
(dbx)


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


Re: HLL root globals and empty keys (was Re: test of get_namespace opcode)

2006-07-07 Thread Allison Randal

Matt Diephouse wrote:


So for the runtime (this is the HLL runtime, not the PIR runtime, btw)
we're all set. Arrays fill the need perfectly and let us access the
root HLL namespace. That makes me think that we don't need any new
opcodes.


Chip's latest simplification eliminates the need for creating and 
passing in an empty array, because 'no argument' always means the same 
thing as 'empty array' or 'no key' would mean. That's a really elegant 
piece of consistency.



And I think it's a worthy goal to make
compiler writer's lives good.


I agree.


Adding 0-dimensional keys would also let us get rid of the C<
.namespace > special case and replace it with C< .namespace [] >.


Hmmm... if we're preserving parallels, that could be C< $P0 = 
get_namespace > and C< .namespace >



It's simpler to give the root HLL namespace a name.


I disagree on two counts here. 


And I've moved on to "the root HLL namespace doesn't need a name if you 
 disambiguate by marking the verb (that is, the opcode)."



First, I think C< [] > *is* a name.


Yes, in using C< [] > to mean "access the root HLL namespace" we would 
be treating it as a name. Or more like a method call. It's a magical bit 
of syntax that would be appropriate in a HLL, but seems out-of-place in PIR.



Second, any solution which involves giving the HLL namespace a
different name will have to either (a) add new opcodes, (b) add more
code for all the other cases by making all referencing originate at
the root, or (c) add a special syntax, none of which is simple.


To add a new feature, we have to add some extra syntax somewhere. I'm 
most comfortable with (a) here, because it targets the change at the 
problem in a straightforward fashion.


Allison


[perl #39742] [BUG] installed parrot conflicts with dev parrot.

2006-07-07 Thread via RT
# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #39742]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39742 >


The development version of parrot should not be detecting or  
interacting with the installed (/usr/local, e.g.) versions at all.

The fact that there is interference here currently means you *can't*  
have an installed parrot if you are also working out of the source.

Regards.

--
Will Coleda
[EMAIL PROTECTED]
1.650.581.2414





[perl #39746] [NEW] t/codingstd/fixme.t - search for FIXME comments in source

2006-07-07 Thread John J. Trammell
# New Ticket Created by  "John J. Trammell" 
# Please include the string:  [perl #39746]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39746 >


New "technical debt" test to look for FIXME, TODO, and XXX markers in
C code and headers.

-- 
He's dead, Jim.  You get his tricorder, I'll get his wallet.
--- MANIFEST2006-07-06 15:37:58.0 -0500
+++ MANIFEST.new2006-07-06 15:33:23.0 -0500
@@ -980,6 +980,7 @@
 t/examples/subs.t []
 t/examples/namespace.t[]
 t/codingstd/cppcomments.t []
+t/codingstd/fixme.t   []
 config/inter/shlibs.pm[]
 config/inter/types.pm []
 config/inter/encoding.pm  []
#! perl
# Copyright (C) 2001-2006, The Perl Foundation.
# $Id$

use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Distribution;


=head1 NAME

t/codingstd/fixme.t - checks for "FIXME" and similar notes in C source and 
headers

=head1 SYNOPSIS

% prove t/codingstd/fixme.t

=head1 DESCRIPTION

Checks that no C source or header file in the distribution contains the
following strings:

FIXME
TODO
XXX

=cut


my @files = @ARGV ? @ARGV : source_files();

plan tests => scalar @files;

foreach my $file (@files) {
open FILE, "<$file" or die "Unable to open '$file' for reading: $!";

my @matches;
while () {
next unless /(FIXME|XXX|TODO)/;
push @matches, "file '$file', line $.: $1\n";
}
close FILE;

is(scalar(@matches), 0, "file '$file' has no FIXME strings")
  or diag(@matches);
}

sub source_files {
my $dist = Parrot::Distribution->new;
return map { $_->path } (
map($_->files_of_type('C code'),   $dist->c_source_file_directories),
map($_->files_of_type('C header'), $dist->c_header_file_directories),
);
}



[perl #39552] Segfault on FreeBSD during make

2006-07-07 Thread Chip Salzenberg via RT
Is this bug still reproducible this even after removing everything
Parrot-related from /usr/local?  (Also /usr/bin and /usr/lib if you
happen to have installed e.g. Debian's parrot packages.)


[perl #39756] [EMAIL PROTECTED]: tru64 core dump: t/examples/japh_10.pasm

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39756]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39756 >


(dbx) run --gc-debug t/examples/japh_10.pasm
run --gc-debug t/examples/japh_10.pasm
thread 0x3 signal Segmentation fault at   [clone_interpreter:63 +0xc,0x120122738
]   d->run_core = s->run_core;
(dbx) p d
(nil)
(dbx) where
>  0 clone_interpreter(dest = 0x14049f618, self = 0x1404a22c8) 
> ["src/pmc/parrotinterpreter.pmc":63, 0x120122738]
   1 pt_thread_run(interp = 0x1401c4000, dest_interp = 0x14049f618, sub = 
0x14049f500) ["src/thread.c":147, 0x1200b8e58]
   2 pt_thread_run_3(interp = 0x1401c4000, dest_interp = 0x14049f618, sub = 
0x14049f500) ["src/thread.c":221, 0x1200b8ff4]
   3 pcf_v_JOP( = 0x1200bea5c,  = 0x1200bea5c,  = 0x1200bea5c, interpreter = 
0x1401c4000, self = 0x14022d608) ["src/nci.c":3266, 0x1201d0520]
   4 Parrot_NCI_invoke( = 0x1200c48c4,  = 0x1200c48c4, interpreter = 
0x1401c4000, pmc = 0x14022d608, next = 0x1404deb10) ["src/pmc/nci.c":146, 
0x120178668]
   5 Parrot_invokecc_p(cur_opcode = 0x1404deb00, interpreter = 0x1401c4000) 
["src/ops/core.ops":414, 0x1200c48c0]
   6 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404deb00) 
["src/runops_cores.c":180, 0x12014b208]
   7 runops_int( = 0x1404dea00,  = 0x1404dea00, interpreter = 0x1401c4000, 
offset = 0) ["src/interpreter.c":775, 0x1200f9bb8]
   8 runops(interpreter = 0x1401c4000, offs = 0) ["src/inter_run.c":81, 
0x1200f7f60]
   9 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = "vP", ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) ["src/inter_run.c":182, 0x1200f8290]
  10 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = "vP") ["src/inter_run.c":276, 0x1200f8460]
  11 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
["src/embed.c":802, 0x1200a6384]
  12 main(argc = 1, argv = 0x11fffc028) ["compilers/imcc/main.c":681, 
0x120088f60]
(dbx)

Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39740] [PATCH] fix debug messages in io_unix bind, listen

2006-07-07 Thread via RT
# New Ticket Created by  Chris Dolan 
# Please include the string:  [perl #39740]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39740 >


This trivial patch corrects a pair confusing stderr diagnostics from  
the bind() and listen() methods in src/io/io_unix.c

% diffstat socket_diag.patch
CREDITS  |4 
src/io/io_unix.c |4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)




socket_diag.patch
Description: Binary data


[perl #39745] [PATCH] Fixed TODO on t/codingstd/cppcomments.t

2006-07-07 Thread John J. Trammell
# New Ticket Created by  "John J. Trammell" 
# Please include the string:  [perl #39745]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39745 >


Test now uses Parrot::Distribution module instead of mass globbing.

output of diffstat:
 cppcomments.t |   58 +++---
 1 files changed, 19 insertions(+), 39 deletions(-)

-- 
alias kill 'kill -9 \!* ; kill -9 \!* ; kill -9 \!*'
Index: t/codingstd/cppcomments.t
===
--- t/codingstd/cppcomments.t   (revision 13166)
+++ t/codingstd/cppcomments.t   (working copy)
@@ -7,6 +7,7 @@
 
 use lib qw( . lib ../lib ../../lib );
 use Test::More tests => 1;
+use Parrot::Distribution;
 
 
 =head1 NAME
@@ -21,51 +22,30 @@
 
 Checks that no source file in the distribution uses C++ style comments.
 
-=head1 TODO
-
-Use Parrot::Distribution for looking for C-source files.
-
 =cut
 
 
-my @globs = qw(
-compilers/ast/*.c
-compilers/ast/*.h
-compilers/imcc/*.c
-compilers/imcc/*.h
-include/parrot/*.h
-include/parrot/oplib/*.h
-src/*.c
-src/charset/*.c
-src/charset/*.h
-src/dynoplibs/*.ops
-src/dynpmc/*.pmc
-src/encodings/*.c
-src/encodings/*.h
-src/io/*.c
-src/io/*.h
-src/jit/*/*.h
-src/ops/*.ops
-src/pmc/*.pmc
-src/packfile/*.c
-);
+sub source_files {
+my $dist = Parrot::Distribution->new;
+return (
+map($_->files_of_type('C code'),   $dist->c_source_file_directories),
+map($_->files_of_type('C header'), $dist->c_header_file_directories),
+);
+}
 
 my @comments;
 
-foreach my $glob ( @globs ) {
-foreach my $file ( glob $glob ) {
-
-open FILE, "<$file" or die "Can not open '$file' for reading!\n";
-foreach my $line (  ) {
-next unless $line =~ m{//};
-next if $line =~ m{://}; # skip ftp:// http:// etc
-next if $line =~ m{"//}; # skip printf("//= ")
-
-push @comments, "$file: $line"
-}
-close FILE;
+foreach my $file ( source_files ) {
+my $path = $file->path;
+open(my $fh, q(<), $path) or die "Can not open '$path' for reading!\n";
+foreach my $line (<$fh>) {
+next unless $line =~ m{//};
+next if $line =~ m{://};# skip ftp:// http:// etc
+next if $line =~ m{"//};# skip printf("//= ")
+push @comments, "$path: $line";
 }
 }
 
-ok( ! scalar(@comments), 'C++ style comments')
-or diag( "C++ style comments found:[EMAIL PROTECTED]" );
+ok(!scalar(@comments), 'C++ style comments')
+  or diag("C++ style comments found:[EMAIL PROTECTED]");
+


[perl #39744] accessing exception object should not throw an exception

2006-07-07 Thread via RT
# New Ticket Created by  Chip Salzenberg 
# Please include the string:  [perl #39744]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39744 >


Keyed access to exception objects should be very forgiving of mistakes,
returning the equivalent of 'null' for invalid keys.

This issue *may* be revisited when exception objects get their new pdd23
interface.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>


[perl #39755] [EMAIL PROTECTED]: tru64 6 failures: getting NaNQs: t/pmc/complex.t

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39755]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39755 >


t/pmc/complexok 32/53
# Failed test (t/pmc/complex.t at line 1024)
#  got: '
# ln(0+0i)
#   got -INF+NaNQi
#   not -inf+0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 34/53
# Failed test (t/pmc/complex.t at line 1110)
#  got: '
# sqrt(0+0i)
#   got NaNQ+NaNQi
#   not 0.00+0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 41/53
# Failed test (t/pmc/complex.t at line 1409)
#  got: '
# asin(-1+0i)
#   got NaNQ+NaNQi
#   not -1.570796-0.00i
#
# asin(1+0i)
#   got NaNQ+NaNQi
#   not 1.570796-0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexNOK 42
# Failed test (t/pmc/complex.t at line 1452)
#  got: '
# acos(-1+0i)
#   got NaNQ+NaNQi
#   got NaNQ+NaNQi
#
# acos(1+0i)
#   got NaNQ+NaNQi
#   not 0.00-0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 45/53
# Failed test (t/pmc/complex.t at line 1576)
t/pmc/complexNOK 46#  got: '
# asec(-1+0i)
#   got NaNQ+NaNQi
#   not 3.141593-0.00i
#
# asec(1+0i)
#   got NaNQ+NaNQi
#   not 0.00-0.00i
# done
# '
# expected: 'done
# '

# Failed test (t/pmc/complex.t at line 1618)
#  got: '
# acsc(-1+0i)
#   got NaNQ+NaNQi
#   not -1.570796-0.00i
#
# acsc(1+0i)
#   got NaNQ+NaNQi
#   not 1.570796-0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 53/53# Looks like you failed 6 tests of
53.


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39751] [EMAIL PROTECTED]: tru64 core dump: t/dynoplibs/myops_4.pir

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39751]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39751 >


(dbx) run --gc-debug t/dynoplibs/myops_4.pir
neither here
thread 0x3 signal Segmentation fault at   [Parrot_hcf:55 ,0x3001754]
Source not available
(dbx) where
>  0 Parrot_hcf(cur_opcode = 0x1404de578, interpreter = 0x1401c4000) 
> ["myops.ops":55, 0x3001754]
   1 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404de578) 
["src/runops_cores.c":180, 0x12014b208]
   2 runops_int( = 0x1404de550,  = 0x1404de550, interpreter = 0x1401c4000, 
offset = 0) ["src/interpreter.c":775, 0x1200f9bb8]
   3 runops(interpreter = 0x1401c4000, offs = 0) ["src/inter_run.c":81, 
0x1200f7f60]
   4 runops_args(interpreter = 0x1401c4000, sub = 0x14049f5a0, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = "vP", ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) ["src/inter_run.c":182, 0x1200f8290]
   5 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f5a0, sig
= 0x140061298 = "vP") ["src/inter_run.c":276, 0x1200f8460]
   6 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
["src/embed.c":802, 0x1200a6384]
   7 main(argc = 1, argv = 0x11fffc028) ["compilers/imcc/main.c":681, 
0x120088f60]
(dbx)


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39743] [PATCH] change perl6-internals to parrot-porters in docs

2006-07-07 Thread via RT
# New Ticket Created by  Chris Dolan 
# Please include the string:  [perl #39743]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39743 >


This patch changes the main Parrot mailing list address from perl6- 
internals to parrot-porters in various documentation files and code  
strings.  I was careful not to alter the NNTP and HTTP URLs because  
those still only work under the old name.

% diffstat parrot-porters.patch
README  |4 ++--
README.win32.pod|2 +-
RELEASE_INSTRUCTIONS|8 
compilers/imcc/README   |2 +-
docs/debug.pod  |2 +-
docs/dev/dod.pod|6 +++---
docs/faq.pod|6 +++---
docs/gettingstarted.pod |   15 ---
docs/glossary.pod   |2 +-
docs/intro.pod  |8 
docs/parrot.pod |2 +-
docs/pdds/pdd00_pdd.pod |4 ++--
docs/submissions.pod|4 ++--
editor/pir-mode.el  |4 ++--
languages/regex/README  |4 ++--
src/exceptions.c|2 +-
16 files changed, 38 insertions(+), 37 deletions(-)



parrot-porters.patch
Description: Binary data


Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]

2006-07-07 Thread Ovid
- Original Message 
From: Shlomi Fish <[EMAIL PROTECTED]>

> Not exactly. I suggested that if anyone is interested in working on 
> Test::Run, 
> he can file a proposal for a grant saying he'd like to work on it with me as  
> a mentor. I still don't have anyone who can work on it. This is similar to 
> Adam Kennedy's "Strawberry Perl" developer wanted:
>
> http://use.perl.org/~Alias/journal/29174

I oversee the grant committee but I don't speak for it so it's quite possible 
that what I say is wrong, but I'm willing to bet money that if someone requests 
a grant for Test::Run under its current license, it has ZERO chance of being 
approved.  The grant committee members aren't lawyers and they're not going to 
sit around and wonder if the license is compatible, nor are they simply going 
to take your word for it.

Of course, even with that little issue taken care of, I still can't say that 
Test::Run would be approved.  We'd probably need evidence that the core Perl-QA 
people supported the project.  We get enough grant requests in that we 
generally have to trust that those in the Perl community with the most 
experience in a given area know what they're talking about.  Maybe that's not 
the best approach, but sooner or later we have to trust *someone's* judgment.

Cheers,
Ovid

-- If this message is a response to a question on a mailing list, please send 
follow up questions to the list.
 
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/








[perl #39752] [EMAIL PROTECTED]: tru64 core dump: t/op/lexicals_27.pir

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39752]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39752 >


(dbx) run --gc-debug t/pmc/lexicals_27.pir

# Failed test (t/op/lexicals.t at line 501)
#  got: 'Parrot VM: PANIC: Out of mem!
# C file src/memory.c, line 48
# Parrot file (not available), line (not available)
#
# We highly suggest you notify the Parrot team if you have not been working on
# Parrot.  Use parrotbug (located in parrot's root directory) or send an
# e-mail to [EMAIL PROTECTED]
# Include the entire text of this error message and the text of the script that
# generated the error.  If you've made any modifications to Parrot, please
# describe them as well.
#
# Version : 0.4.5-devel
# Configured  : Thu Jul  6 23:16:59 2006
# Architecture: nojit
# JIT Capable : No
# Interp Flags: (no interpreter)
# Exceptions  : (missing from core)
#
# Dumping Core...
# sh: 438387 Quit - core dumped
# '
# expected: '3 * 5 == 15!
# '
# './parrot  --gc-debug 
"/cluster/members/member0/tmp/jhi/parrot-13183/t/op/lexicals_27.pir"' failed 
with exit code 131

...

(dbx) where
>  0 __nxm_thread_kill(0x3, 0x3ffc01b6000, 0x3ff805c3788, 0x3ffc01b6000, 
> 0x3ffc01b6000) [0x3ff805c5908]
   1 pthread_kill(0x14049ef38, 0x1404f, 0x1401c4000, 0x0, 0x5) 
[0x3ff805c37a0]
   2 __tis_raise(0x1401c4000, 0x0, 0x5, 0x1, 0x1200b5564) [0x3ff801405d4]
   3 do_panic(interpreter = (nil), message = 0x140001890 = "Out of mem", file =
0x1400018a0 = "src/memory.c", line = 48) ["src/exceptions.c":125, 0x1200b5560]
   4 mem_sys_allocate(size = 0) ["src/memory.c":48, 0x120089804]
   5 Parrot_FixedPMCArray_clone(interpreter = 0x1401c4000, pmc = 0x14049ef38) 
["src/pmc/fixedpmcarray.c":181, 0x120119df0]
   6 Parrot_ResizablePMCArray_clone(interpreter = 0x1401c4000, pmc = 
0x14049ef38) ["src/pmc/resizablepmcarray.c":560, 0x1201c1634]
   7 Parrot_clone_p_p(cur_opcode = 0x1404f0410, interpreter = 0x1401c4000) 
["src/ops/set.ops":524, 0x1200e8400]
   8 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404f0410) 
["src/runops_cores.c":180, 0x12014b208]
   9 runops_int( = 0x1404f,  = 0x1404f, interpreter = 0x1401c4000, 
offset = 0) ["src/interpreter.c":775, 0x1200f9bb8]
  10 runops(interpreter = 0x1401c4000, offs = 0) ["src/inter_run.c":81, 
0x1200f7f60]
  11 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = "vP", ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) ["src/inter_run.c":182, 0x1200f8290]
  12 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = "vP") ["src/inter_run.c":276, 0x1200f8460]
  13 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
["src/embed.c":802, 0x1200a6384]
  14 main(argc = 1, argv = 0x11fffc028) ["compilers/imcc/main.c":681, 
0x120088f60]
(dbx) 



Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


Re: More on the TAP::Grammar

2006-07-07 Thread Ovid
- Original Message 
From: Michael G Schwern <[EMAIL PROTECTED]>


On 7/4/06, Ovid <[EMAIL PROTECTED]> wrote:
> > Because we're discarding anything which does not look like a plan or a test 
> > line
>
> Don't discard them, just pass them through unaltered.  Don't want to
> lose any information.  The /^#/ lines should be marked as comments.
> Anything else is marked as junk but still passed through.

I'll make that change.

> > 1.  The lexer croaks() if the planned tests and the actual tests don't 
> > match.
> >  I assume this behavior should be handled elsewhere?
>
> Doesn't sound like a lexer's job.  Sounds more like the parser's.
...
> But again, parser's job.
...
> Also sounds like the parser's job.
...
> Also, parser's job.
|
Originally I had the behavior the lexer and parser quite separate, but due to 
some precedence issues in the lexing, I scrapped my original design and took 
something which is conceptually similar to the Parse::RecDescent approach in 
that I "blurred" the difference between the lexing and parsing steps.  I see in 
http://perl-qa.yi.org/index.php/TAP::Harness that there is a clearer separation 
of the lexing and parsing, but I deliberately abandoned that as not being 
needed in this case because it was overkill.  Once I took that approach, things 
were much simpler to write.
 
 This long-winded (as usual) explanation brings me around to my actual 
question:  is there really any need to have the lexing and parsing stages 
clearly delineated?  I can't see why, but from you mentioning several times 
that "that's a parser's job, not a lexer's", I assume you have some reason 
behind this.  Am I missing something?  Is there some desire that one might take 
the lexed tokens and direct them to another parser, for example?

Also, since I had not seen the TAP::Harness work before, I didn't know that a 
separate parser was already being planned.  My only motivation for writing 
TAP::Parser was my assumption that it was needed and was not going to otherwise 
be written.  If you already are planning your own, mine would just be more 
wasted space on the CPAN :)

Cheers,
Ovid






Re: More on the TAP::Grammar

2006-07-07 Thread Ovid
- Original Message 
From: Ovid <[EMAIL PROTECTED]>

> Also, since I had not seen the TAP::Harness work before, I didn't
> know that a separate parser was already being planned.  My only
> motivation for writing TAP::Parser was my assumption that it was
> needed and was not going to otherwise be written.  If you already
> are planning your own, mine would just be more wasted space on
> the CPAN :)

Never mind.  I just read the QA wiki a bit more closely and see that you're 
encouraging other versions.

Cheers,
Ovid










Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]

2006-07-07 Thread Andy Lester


On Jul 7, 2006, at 4:30 AM, Ovid wrote:

I oversee the grant committee but I don't speak for it so it's  
quite possible that what I say is wrong, but I'm willing to bet money


If you do not include a bet amount, the bet will not be approved.

Typical bets are generally in the $500 to $3000 range, but we have  
gone under and over those amounts, depending on the bet. As a general  
rule the less expensive it is, the more likely it is that we can  
afford to wager.


xoxo,
The Bet Committee

--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance






Re: [perl #39746] [NEW] t/codingstd/fixme.t - search for FIXME comments in source

2006-07-07 Thread Will Coleda

Thanks, applied as r13195

On Jul 6, 2006, at 5:17 PM, John J. Trammell (via RT) wrote:


"John J. Trammell"


--
Will "Coke" Coleda
[EMAIL PROTECTED]




Re: contrib tool: search for opcodes

2006-07-07 Thread Bernhard Schmalhofer

João Cruz Morais schrieb:

(moderator please reject my other message - wrong email)

The subject says it all :)
Given a valid regex (pcre) as an argument, the script will search
inside every *.ops file for an opcode name that matches, and dumps
both its arguments and its description. If no argument is passed every
opcode found is dumped.

Hi,

I have added the script as tools/docs/search-ops.py .
Could you provi


Re: contrib tool: search for opcodes

2006-07-07 Thread Bernhard Schmalhofer

João Cruz Morais schrieb:

(moderator please reject my other message - wrong email)

The subject says it all :)
Given a valid regex (pcre) as an argument, the script will search
inside every *.ops file for an opcode name that matches, and dumps
both its arguments and its description. If no argument is passed every
opcode found is dumped.

Hi João,

I have added the script as tools/docs/search-ops.py.
In order to decrease confusion, could you provide a patch that puts some
documentation into the script? The information and the example from your 
mail would suffice.


The recommended way to provide patches and new files is to create 
tickets in the
RequestTracker. Information on how to do that is provided in 
docs/submissions.pod.


Thanks,
 Bernhard

PS: For future Python scripts a port of the Parrot::Config Perl5 module 
would be nice to have.




Re: [perl #39751] [EMAIL PROTECTED]: tru64 core dump: t/dynoplibs/myops_4.pir

2006-07-07 Thread Will Coleda

hcf is actually supposed to explode if possible. Not sure if we should:

1) skip the test usually;
2) close the ticket as "not a bug"
3) eliminate this particular (silly) dynamic opcode.

Regards.

On Jul 7, 2006, at 2:04 AM, Jarkko Hietaniemi (via RT) wrote:


# New Ticket Created by  Jarkko Hietaniemi
# Please include the string:  [perl #39751]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=39751 >


(dbx) run --gc-debug t/dynoplibs/myops_4.pir
neither here
thread 0x3 signal Segmentation fault at   [Parrot_hcf:55 , 
0x3001754]

Source not available
(dbx) where
 0 Parrot_hcf(cur_opcode = 0x1404de578, interpreter = 0x1401c4000)  
["myops.ops":55, 0x3001754]
   1 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404de578)  
["src/runops_cores.c":180, 0x12014b208]
   2 runops_int( = 0x1404de550,  = 0x1404de550, interpreter =  
0x1401c4000, offset = 0) ["src/interpreter.c":775, 0x1200f9bb8]
   3 runops(interpreter = 0x1401c4000, offs = 0) ["src/inter_run.c": 
81, 0x1200f7f60]
   4 runops_args(interpreter = 0x1401c4000, sub = 0x14049f5a0, obj  
= 0x1401214c0, meth = (nil), sig = 0x140061298 = "vP", ap = struct {

_a0 = 0x11fffbf40
_offset = 24
}) ["src/inter_run.c":182, 0x1200f8290]
   5 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub =  
0x14049f5a0, sig

= 0x140061298 = "vP") ["src/inter_run.c":276, 0x1200f8460]
   6 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv =  
0x11fffc028) ["src/embed.c":802, 0x1200a6384]
   7 main(argc = 1, argv = 0x11fffc028) ["compilers/imcc/main.c": 
681, 0x120088f60]

(dbx)


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include  
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',

  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved "*"  
-O4 -msym -std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved "*" - 
O4 -msym -std -L/p/lib'

  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678,
nv=double, numvalsize=8, doublesize=8



--
Will "Coke" Coleda
[EMAIL PROTECTED]




[Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Shlomi Fish
Hi Ovid!

On Friday 07 July 2006 12:30, Ovid wrote:
> - Original Message 
> From: Shlomi Fish <[EMAIL PROTECTED]>
>
> > Not exactly. I suggested that if anyone is interested in working on
> > Test::Run, he can file a proposal for a grant saying he'd like to work on
> > it with me as a mentor. I still don't have anyone who can work on it.
> > This is similar to Adam Kennedy's "Strawberry Perl" developer wanted:
> >
> > http://use.perl.org/~Alias/journal/29174
>
> I oversee the grant committee but I don't speak for it so it's quite
> possible that what I say is wrong, but I'm willing to bet money that if
> someone requests a grant for Test::Run under its current license, it has
> ZERO chance of being approved.  The grant committee members aren't lawyers
> and they're not going to sit around and wonder if the license is
> compatible, nor are they simply going to take your word for it.

This kind of attitude was also said by another responder to this mailing list. 
It's sort of a "small headed" (see 
http://www.joelonsoftware.com/items/2004/12/06.html ) "I just want to write 
code and am not interested in any legal details" attitude. Well, I'm not a 
lawyer, either, but I still have a good amount of working knowledge about 
software licences and how they relate to each other. It's essential for a 
developer to have such a knowledge and not be completely oblivious of such 
issues, because for better or for worse - legal, ethical and moral issues 
affect the way we build, distribute, use and modify software.

To battle such ignorance and give people (especially those with some 
non-negligible authority) a quick-and-dirty intro to such issues, I've set up 
the following wiki page:

http://perl.net.au/wiki/Legal_Resources_for_Hackers

I believe anyone can add things there, even without being logged in. There are 
other legal issues I'd like to add links there, but it will have to wait for 
later on.

Regards,

Shlomi Fish
>
> Of course, even with that little issue taken care of, I still can't say
> that Test::Run would be approved.  We'd probably need evidence that the
> core Perl-QA people supported the project.  We get enough grant requests in
> that we generally have to trust that those in the Perl community with the
> most experience in a given area know what they're talking about.  Maybe
> that's not the best approach, but sooner or later we have to trust
> *someone's* judgment.
>
> Cheers,
> Ovid
>
> -- If this message is a response to a question on a mailing list, please
> send follow up questions to the list.
>
> Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

-- 

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.


Re: On "Gaming" CPANTS, and a Kwalitee Suggestion

2006-07-07 Thread Tels
Moin,

On Thursday 06 July 2006 11:40, David Cantrell wrote:
> Tels wrote:
> > And, "improve compatibility" - with broken systems? OMG. :)
>
> Yeah, you know, like when you comment this out before release :-)
>
> # die("Sorry, you must have a computer to run this software\n")
> #   if($^O =~ /win32/i);
>
> >> Given that Mod::Sig checks are just that the signature is valid, not
> >> that the signature matches a known/registered developer, the
> >> security aspect is already minimal.
> >
> > This is a security bug and should then be fixed ASAP.
>
> Given that you have to be logged in to the PAUSE and have permission to
> upload stuff for that module, then I don't think that signatures matter
> in the slightest.  It doesn't give you any kind of trust metric (like,
> say, that the author is a nice guy and his Makefile.PL won't delete
> your home directory) that you don't already have from the fact that my
> module had to have been uploaded by me.

The signature makes sure that:

* the mirror from where you download the file distrubutes you still the 
same file that was uploaded to CPAN.
* it was signed by someone who knows/has the private key and nobody else

These are two very important points, and none should be thrown away just 
because somebody doesn't understand how that works or some end-users 
aren't able to configure their systems.

Best wishes,

Tels

-- 
 Signed on Fri Jul  7 15:44:26 2006 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Five exclamation marks, the sure sign of an insane mind." -- Terry
 Pratchett



pgpswmJNvnJ1u.pgp
Description: PGP signature


TAP extension proposal: test attributes

2006-07-07 Thread Scott Bolte
A few years ago I created a system where a test would disclose all of
the files on which it depended. This allowed for continuous monitoring
of those files and immediate re-execution of the test when it or its
dependencies changed. When combined with real-time generation of an
HTML dashboard, it resulted in real-time feedback every time I updated
a file in a module's lib hierarchy.

That ad hoc system would easier to create with today's
Test::TAP::Module and Test::TAP::HTMLMatrix modules, if there was a
flexible TAP enhancement. 

I propose using of subset of the Config::Std syntax to allow tests to
declare attributes that are captured in Test::TAP::Model as a hash.
That would allow the test to declare configuration information, such
as its dependencies, which would be available to downstream processors
of the test results.

I've put a more complete example on the new wiki
(http://perl-qa.yi.org/index.php/Test_Attributes), but this should
give you an idea of what I have in mind:

# TAP ATTR test version = $Revision: 1.3 $
# TAP ATTR depends on = blib/Test/Koala/Tea.pm
# TAP ATTR depends on = blib/Test/Koala/Eucalyptus/Tea.pm
# TAP ATTR depends on = blib/Test/Koala/Tree.pm

Or using a << block

# TAP ATTR << Kangaroo_on_a_pogo_stick
#
#   test version = $Revision: 1.3 $
#
#   depends on = blib/Test/Koala/Tea.pm
#   depends on = blib/Test/Koala/Eucalyptus/Tea.pm
#   depends on = blib/Test/Koala/Tree.pm
#
# Kangaroo_on_a_pogo_stick

That would create in the TAP model object, a hash of attributes such as

{test version} = "$Revision: 1.3 $";
{depends on} = [ "blib/Test/Koala/Tea.pm",
 "blib/Test/Koala/Eucalyptus/Tea.pm",
 "blib/Test/Koala/Tree.pm"];

Go wild on the wiki with your replies.

Scott



Re: Proposal Suggestion - Test::Run

2006-07-07 Thread Nicholas Clark
On Wed, Jul 05, 2006 at 11:57:42PM -0700, chromatic wrote:
> On Wednesday 05 July 2006 23:02, Shlomi Fish n wrote:
> 
> > I don't see using the X11 licence for my software as anti-social. Like I
> > said, anyone can easily fork it as a software of a different licence.
> 
> Supposing you actually find a mentee and TPF actually does fund this project 
> and this code is substantially better than Test::Harness such that it is an 
> obvious candidate for inclusion in the Perl core.
> 
> It must be under the Perl license.

For the core, what he says. Period.

Nicholas Clark


Re: [Slightly OT] Understanding Software Licences

2006-07-07 Thread Ovid
- Original Message 
> From: Shlomi Fish <[EMAIL PROTECTED]>
>
> To battle such ignorance and give people (especially those with some 
> non-negligible authority) a quick-and-dirty intro to such issues, I've set up 
> the following wiki page:
>
> http://perl.net.au/wiki/Legal_Resources_for_Hackers

Shlomi,

I swear, if after this email you still disagree, I am going to wonder what they 
spike your Kool-Aid with over in Israel.  Learn to pick your battles.

Regardless of what you and Joel Spolsky state, the fact remains that Perl has 
survived quite nicely for many years with what most Perl programmers feel is a 
perfectly acceptable licensing scheme.  The grant committee is highly unlikely 
to decide to drop everything, start researching various licenses, consider the 
possible implications of a new license and agree to consider using a non-Perl 
license in the Perl core.

Even if this group of volunteers found the free time to do this, that still 
doesn't mean that P5P is going to accept it (Nick's made it pretty clear they 
won't).

But let's be really generous and imagine that P5P changed their mind: that 
still doesn't mean that the Perl community is going to accept it.

But to go even further and suppose that the Perl community decided to change 
their minds, now you have IT staffs the world over having to consider the 
implications of switching some of their core Perl code to a new license.

And when you think how much time and effort was put into researching and 
preparing the Artistic 2 license and it got a fair amount of pushback on it, 
why on earth would anyone decide to switch to a different license just because 
you want them to?

It ain't gonna happen.

Cheers,
Ovid

-- If this message is a response to a question on a mailing list, please send 
follow up questions to the list.
 
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/







Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Chris Dolan

On Jul 7, 2006, at 8:13 AM, Shlomi Fish wrote:

This kind of attitude was also said by another responder to this  
mailing list.

It's sort of a "small headed" (see
http://www.joelonsoftware.com/items/2004/12/06.html ) "I just want  
to write

code and am not interested in any legal details" attitude.


May I suggest a compromise?  As the author of the MIT-licensed code  
in Test::Run, Shlomi has the option of releasing the code under any  
license he prefers.  Shlomi can releases *two* versions of Test::Run  
with every update -- a mixed license version and an Artistic/GPL  
version.  With that solution, Shlomi himself shoulders the burden of  
resolving license compatibility and tracking which line of code is  
under which license.


I do believe that the quest for license simplicity in the Perl core  
is not "small headed" or rooted in ignorance, but is instead  
inspired.  While many developers or TPF itself could easily delve  
deep enough to decide whether MIT/BSD licensed code in the core is a  
threat, I think that would be a wasted effort.  The increased  
complexity of licensing (whether real or perceived) could easily turn  
off third parties with less dedication to Perl, thereby decreasing  
the attractiveness of the language.


After all, software engineering is largely about reducing the exposed  
complexity of a project.


Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software  
(http://www.media-landscape.com/) and partners in the revolutionary  
Croquet project (http://www.opencroquet.org/)





Re: [Slightly OT] Understanding Software Licences

2006-07-07 Thread Pete Krawczyk
Subject: [Slightly OT] Understanding Software Licences [was Re: Proposal 
Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl 
Foundation Grants]]
From: Shlomi Fish <[EMAIL PROTECTED]>
Date: Fri, 7 Jul 2006 16:13:58 +0300

}Well, I'm not a lawyer, either, but I still have a good amount of working
}knowledge about software licences and how they relate to each other.

The former necessarily excludes the latter.  Are you familiar with 
contract law in America?  Finland?  Australia?  Do you know what other 
people with far more expertise than you have said about this issue?

http://www.gnu.org/philosophy/license-list.html says:
>License of Perl
>
>This license is the disjunction of the Artistic License and the GNU
>GPL--in other words, you can choose either of those two licenses. It
>qualifies as a free software license, but it may not be a real copyleft.  
>It is compatible with the GNU GPL because the GNU GPL is one of the
>alternatives.
>
>We recommend you use this license for any Perl 4 or Perl 5 package you 
>write, to promote coherence and uniformity in Perl programming. Outside 
>of Perl, we urge you not to use this license; it is better to use just 
>the GNU GPL.

Gee, even the FSF and RMS himself say, "Use the Artistic for Perl code!"

}It's essential for a developer to have such a knowledge and not be
}completely oblivious of such issues, because for better or for worse -
}legal, ethical and moral issues affect the way we build, distribute, use
}and modify software.

And as a developer, I defer my less-knowledgeable position to what those 
before me have found and discussed.  I make all my contributions available 
under the license of Perl, and other licenses as appropriate (my 2005 YAPC 
talk is also licensed CC at the request of the conference organizers, for 
example).  I have also signed the form that gives explicit licensing for 
any contribution I make to Perl to the TPF under their preferred terms - 
have you done the same?

http://www.perlfoundation.org/legal/licenses/cla.html

}To battle such ignorance and give people (especially those with some 
}non-negligible authority) a quick-and-dirty intro to such issues, I've set up 
}the following wiki page:

...that anyone can edit.  Anyone.  Not lawyers, not people knowledgeable 
about contracts.  Anyone.

I also see on that list that you wrote an article.  Just looking at the 
"where I stand" portion, you spend more time talking about names and terms 
than you do about actual licenses.  So you prefer public domain, do you?  
Look at http://zooko.com/license_quick_ref.html and in specific, the 
section on "What about Public Domain?"  


I don't know how contracts work in Israel, and everything I've just said 
may be bunk - because I'm not a lawyer and have no training in contract 
law.  But that's precisely why I don't worry about it - because smarter 
people than I in contract law have worked it out before me, and I'm 
intelligent enough to trust their judgements.

-Pete K
-- 
Pete Krawczyk
  perl at bsod dot net




Re: Module Signatures [was Re: On "Gaming" CPANTS...]

2006-07-07 Thread Tels
Moin,

On Thursday 06 July 2006 03:22, Jonathan Rockway wrote:
> > It adds a dependency on a binary application (gpg) that users have to
> > install by hand, doesn't check for the presence of it properly, and
> > if you don't have it, installs an enormous chain of dependencies,
> > with said deps having some major issues of their own.
> >
> > It's become bad enough that Module::Signature is being pulled from
> > Bundle::CPAN and being disabled by default in CPAN.pm, until
> > Module::Signature gets a maintainer capable that can make it somewhat
> > saner.

Er, you realize that you _dont_ have to check the signature if you system 
is so broken as not allowing it?

I really don't understand that argument anyhow:

Replace Module::Signature with "RPM" and read it again:

> > It adds a dependency on a binary application (gpg) that users have to
> > install by hand, doesn't check for the presence of it properly, and
> > if you don't have it, installs an enormous chain of dependencies,
> > with said deps having some major issues of their own.

I don't think anybody would suggest SuSE do no longer sign their RPM 
packages with their gpg key anymore... instead they make sure you have 
gpg installed and configured properly before doing the signature check.

If you insist on running a system w/o gpg, and you want to check the 
signature on a Perl package, you gotta go, configure your system and 
install some software for the purpose.

Next someone tells me I can't use XS because it makes the distribution 
depend on a compiler? :-)

Leaving of the signature of software distributions just because someone 
isn't able to configure their system is so... so I fail the words for it.

Best wishes,

tels

-- 
 Signed on Fri Jul  7 15:47:00 2006 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "The difference between pornography and erotica is lighting" -- Gloria
 Leonard



pgp0mr56H5no3.pgp
Description: PGP signature


List operations for S29

2006-07-07 Thread Aaron Sherman
I've worked over the basic list operations in S29 (see below, as I can't
commit). The big shocker is going to be this: splice can't be as
full-featured as we wanted. According to audreyt on #perl6, Perl 6.0.0
cannot expect to have MMD on both the inbound and outbound signature.
Given that, we'll have to replace:

splice(@foo,1,5) = 1..^$end;

with:

splice(@foo,1,5) <== 1..^$end;

I'm also doing away with sub wherever I can, since all core functions
probably need to be "multi sub" there's no reason to be explicitly
redundant. S06 tells us that "sub" is the default when multi or proto
are provided.

Here's the full text for the changed section:

=item pop


 our Scalar multi Array::pop ( @array is rw )
 our Scalar multi method Array::pop ( @array: )

Remove the last element of C<@array> and return it.

=item push

 our Int multi Array::push ( @array is rw, [EMAIL PROTECTED] )
 our Int multi mehtod Array::push ( @array: [EMAIL PROTECTED] )

Add to the end of C<@array>, all of the subsequent arguments.

=item shift

 our Scalar multi Array::shift ( @array is rw  )
 our Scalar multi method Array::shift ( @array:  )

Remove the first element from C<@array> and return it.

=item splice

 our List multi Array::splice( @array is rw, Int $offset = 0, Int $size?, 
[EMAIL PROTECTED] )

C fills many niches in array-management, but its fundamental behavior
is to remove zero or more elements from an array and replace them with a
new (and potentially empty) list. This operation can shorten or lengthen
the target array.

C<$offset> is the index of the array element to start with. It defaults
to C<0>.

C<$size> is the number of elements to remove from C<@array>. It defaults
to removing the rest of the array from C<$offset> on.

The slurpy list of values (if any) is then inserted at C<$offset>.

Calling splice with a traditional parameter list, you must define C<$offset>
and C<$size> if you wish to pass a replacement list of values. To avoid
having to pass these otherwise optional parameters, use the piping operator(s):

 splice(@array,10) <== 1..*;

which replaces C<@array[10]> and all subsequent elements with an infinite
series starting at C<1>.

This behaves similarly to Perl 5's C.

If C<@array> is multidimensional, C operates only on the first
dimension, and works with Array References.


=item unshift

 our Int multi Array::unshift ( @array is rw, [EMAIL PROTECTED] )
 our Int multi method Array::unshift ( @array: [EMAIL PROTECTED] )

C adds the values onto the start of the C<@array>.


-- 
Aaron Sherman <[EMAIL PROTECTED]>
Senior Systems Engineer and Toolsmith
"We had some good machines, but they don't work no more." -Shriekback




Re: [perl #39745] [PATCH] Fixed TODO on t/codingstd/cppcomments.t

2006-07-07 Thread jerry gay

On 7/6/06, via RT John J. Trammell <[EMAIL PROTECTED]> wrote:

Test now uses Parrot::Distribution module instead of mass globbing.


thanks, applied as r13196, with some slight modifications, and additions.
~jerry


Re: contrib tool: search for opcodes

2006-07-07 Thread João Cruz Morais

Hi,

I've just submitted the patch.


PS: For future Python scripts a port of the Parrot::Config Perl5 module
would be nice to have.


Are you talking about the module that has the code to run the steps
from Configure.pl?


Regards,
João C Morais


Re: contrib tool: search for opcodes

2006-07-07 Thread jerry gay

On 7/7/06, João Cruz Morais <[EMAIL PROTECTED]> wrote:

Are you talking about the module that has the code to run the steps
from Configure.pl?


Parrot::Config is a module *generated* by Configure.pl, containing
parrot's configuration information in a format (perl module) that's
easy for perl scripts to read. bernhard is suggesting you create a
config file that's easy for python scripts to read.
~jerry


Re: [Slightly OT] Understanding Software Licences

2006-07-07 Thread Shlomi Fish
On Friday 07 July 2006 17:07, Pete Krawczyk wrote:
> Subject: [Slightly OT] Understanding Software Licences [was Re: Proposal
> Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl
> Foundation Grants]] From: Shlomi Fish <[EMAIL PROTECTED]>
> Date: Fri, 7 Jul 2006 16:13:58 +0300
>
> }Well, I'm not a lawyer, either, but I still have a good amount of working
> }knowledge about software licences and how they relate to each other.
>
> The former necessarily excludes the latter.  

Wrong. You can still be knowledgable about licences while not being a lawyer. 
And some lawyers are completely ignorant of the fact.

For example, someone I know who now studies law in Israel had a friend who 
wanted to take a GPLed CMS, set it up on his site, and possibly customise it 
with some minor customisations. My friend told me he had to release his 
customisations to the public because that's what the GPL says upon any 
modification.

However, the GPL (and any other free software licence) explicitly allows 
making a use or modification for in-house or internal use without being 
obliged to release them to the public. (see Freedom 1 in 
http://www.gnu.org/philosophy/free-sw.html ). So he misled his friend, while 
I was more knowledgable about it.

And obviously lawyers who didn't specialise in Copyrights or Software law may 
not be completely aware of its finer points. (Possibly less so than many 
clueful programmers who are not lawyers).

For the record, it is possible to be interested and knowledgable about law, 
without having a Law Diploma. This is similar to the fact that you can 
program without having a B.Sc. in Computer Science or whatever.

> Are you familiar with 
> contract law in America?  Finland?  Australia?  Do you know what other
> people with far more expertise than you have said about this issue?

"Contract Law"? From what I know FOSS licences are licences, not contracts. 
See:

http://lwn.net/Articles/61292/

I'm not sure even EULAs are contracts.

>
> http://www.gnu.org/philosophy/license-list.html says:
> >License of Perl
> >
> >This license is the disjunction of the Artistic License and the GNU
> >GPL--in other words, you can choose either of those two licenses. It
> >qualifies as a free software license, but it may not be a real copyleft.
> >It is compatible with the GNU GPL because the GNU GPL is one of the
> >alternatives.
> >
> >We recommend you use this license for any Perl 4 or Perl 5 package you
> >write, to promote coherence and uniformity in Perl programming. Outside
> >of Perl, we urge you not to use this license; it is better to use just
> >the GNU GPL.
>
> Gee, even the FSF and RMS himself say, "Use the Artistic for Perl code!"
>

RMS also says it is usually preferable to use the GPL for everything you 
write. I, however, like to use BSD-style licenses for all the software that I 
originated:

http://www.shlomifish.org/open-source/projects/

I can tell you from my experience that one of my projects would not have 
become half-as-successful as it has been, if it had been released under the 
GPL instead of the Public Domain. 

Note that if I did not originate a certain piece of code, I contribute my code 
under the same terms, and also disclaim any implicit or explicit ownership of 
my contributions (to facilitate a future re-licensing). Thus I have GPLed 
modifications in the GIMP, GPL+Artistic modifications for perl*.pod and for 
CGI.pm, and Apache licence modifications in Subersion. (Along with some 
smaller patches to many other modules).

I'm not saying this because I'm anti-GPL or pro-BSD-licence or whatever. But I 
prefer to license Perl software under a BSD-style-licence for the same reason 
I'm licensing my C programs under them. 

> }It's essential for a developer to have such a knowledge and not be
> }completely oblivious of such issues, because for better or for worse -
> }legal, ethical and moral issues affect the way we build, distribute, use
> }and modify software.
>
> And as a developer, I defer my less-knowledgeable position to what those
> before me have found and discussed.  I make all my contributions available
> under the license of Perl, and other licenses as appropriate (my 2005 YAPC
> talk is also licensed CC at the request of the conference organizers, for
> example).  I have also signed the form that gives explicit licensing for
> any contribution I make to Perl to the TPF under their preferred terms -
> have you done the same?
>
> http://www.perlfoundation.org/legal/licenses/cla.html
>

All code I originated and which I've decided to distribute as open source is 
either under the Public Domain or MIT X11. These licences allow anyone to 
relicense them under any other licence. (While the original will still remain 
OK.)

All of my public creations (articles/essays, humourous stories and bits, 
photographs, artworks, etc. see http://www.shlomifish.org/ ) are publicly 
re-distributable. Most of my articles and essays are CC-by, most of my larger 
s

Re: [Slightly OT] Understanding Software Licences

2006-07-07 Thread A. Pagaltzis
* Shlomi Fish <[EMAIL PROTECTED]> [2006-07-07 15:25]:
> It's sort of a "small headed" (see
> http://www.joelonsoftware.com/items/2004/12/06.html ) "I just
> want to write code and am not interested in any legal details"
> attitude.

Oh, please. Are you really that audacious to suggest that all of
P5P and the TPF combined are ignorant small-minded coders who
don’t care to think about licensing issues? And that you are the
only enlightened one around?

Just because someone disagrees with your position about the
compatibility of licences and insists that you license your code
as GPL/Artistic doesn’t mean they refuse to think about the
matters. It might even mean they know more than you. How about
that? Just imagine for a moment.

Why are you being so obstinate about the licence? Which do you
care more about, to fight a petty political issue about licences
(which you don’t seem particularly well-equipped to fight anyway,
if I may suggest so) or to actually contribute your work to the
community? Where are your priorities?

For the record, I prefer to license my code as liberally as
possible, as well, and most of it is under MIT X11. (There is
some I deliberately released under GPL.) But all of my publically
available Perl code is under GPL/Artistic, and no, it’s not
because I’m dumb or don’t care. Quite the opposite is the case;
all of my licensing choices are rather purposeful.

Now how about you stop wasting your energy and ours on something
that *doesn’t* *actually* *matter*? You have good work to offer.
It’s such a pity that you’d sabotage yourself over such a stupid
issue.

Regards,
-- 
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;


Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Shlomi Fish
Hi Chris!

On Friday 07 July 2006 17:04, Chris Dolan wrote:
> On Jul 7, 2006, at 8:13 AM, Shlomi Fish wrote:
> > This kind of attitude was also said by another responder to this
> > mailing list.
> > It's sort of a "small headed" (see
> > http://www.joelonsoftware.com/items/2004/12/06.html ) "I just want
> > to write
> > code and am not interested in any legal details" attitude.
>
> May I suggest a compromise?  As the author of the MIT-licensed code
> in Test::Run, Shlomi has the option of releasing the code under any
> license he prefers.  Shlomi can releases *two* versions of Test::Run
> with every update -- a mixed license version and an Artistic/GPL
> version.  With that solution, Shlomi himself shoulders the burden of
> resolving license compatibility and tracking which line of code is
> under which license.

Right. Finally a reasonable approach. Thanks.

>
> I do believe that the quest for license simplicity in the Perl core
> is not "small headed" or rooted in ignorance, but is instead
> inspired.  

I didn't say it was. What I wanted to say is that people should have the 
minimal knowledge to understand that MIT X11 licence is compatible with 
GPL+Artistic (where Artistic is 1.0 or 2.0) code and can be re-licensed to it 
at will, even without requesting permission from its originators.

In regards to putting it in the core - there's still a long way to go before 
Test::Run and its auxiliary modules are suitable for being placed in the 
core. When and if this is going to happen we'll see what I have to do about 
it. But we should cross the bridge when we get to it.

Until then I believe that licensing my newly written code under the MIT X11 
licence is a long-term benefit *because* it can be re-licensed to a different 
licence without asking anyone for permission.

> While many developers or TPF itself could easily delve 
> deep enough to decide whether MIT/BSD licensed code in the core is a
> threat, I think that would be a wasted effort.  The increased
> complexity of licensing (whether real or perceived) could easily turn
> off third parties with less dedication to Perl, thereby decreasing
> the attractiveness of the language.

Right. I don't mind my BSD-licensed code to be re-licensed as GPL+Artistic 
before entering the core (when and if it is going to enter the core). But I'd 
like to keep it as BSD-license until then, and hopefully be able to maintain 
it as BSD on CPAN separately afterwards.

>
> After all, software engineering is largely about reducing the exposed
> complexity of a project.
>

Right.

I should note that it's not as if one .pm file is BSD and its neighbour is 
GPL+Artistic in the Test::Run svn repository. I have several directories each 
for every CPAN distribution. The Test::Run distribution was derived from 
Test::Harness and is such Perl-licensed. The Test::Run::CmdLine distribution 
which was re-implemented from scratch and serves as its command line backend 
is X11-licensed. The plugins are also BSD-licensed as they were 
re-implemented from scratch. And finally Test-Run-TAP-Model, which is a port 
of Test-TAP-Model for Test-Run is also GPL+Artistic, because it is derived 
work.

I daresay this thread did not quite meet my expectations, possibly because of 
bad phrasing of the original proposal on my part. What I wanted to say is:

1. Test::Run could use some work.

2. If anyone wishes to work on it and get paid, he can try getting a grant 
from TPF.

3. I'm not interested in such a grant as I already have a full time job. 
However, I can act as a mentor.

4. a) Code that originated from existing Test::Harness code or is somehow 
associated with it, should be kept as GPL+Artistic. 

b) New plugins, wrappers, etc. should preferably be MIT X11. In any case, the 
author can specify any common and GPL-compatible licence in the Copyright 
section of the POD in the directory in which the module resides in.

--

This is what I wanted to say on one leg. Maybe my over-wordy description was 
not clear enough.

Regards,

Shlomi Fish

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.


Re: [perl #39755] [EMAIL PROTECTED]: tru64 6 failures: getting NaNQs: t/pmc/complex.t

2006-07-07 Thread Jarkko Hietaniemi
Jerry Gay via RT wrote:
> i've related this ticket to #38887: (Nobody) Result of INFINITY or NAN
> stringification is platform dependent [new]
> 
> there are many platforms failing NaN/Inf related tests due to this issue.

That is very true, and very worthy of a separate ticket, but isn't
the failure I'm seeing something a bit different -- expecting non-NaNs
(mostly zeros) but getting NaNQs?

> thanks for your report.
> ~jerry

-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this 
special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen


Re: Ruby on Parrot

2006-07-07 Thread Kevin Tew

Allison Randal wrote:
I gave a Parrot talk at a Ruby user group meeting tonight. Someone 
mentioned that they had seen somebody on #parrot who was working on a 
new Ruby implementation based on Punie. Do you exist? And is there 
anything we can do to help you?


Allison

That would be me!

PRuby is the project.
Suggestions of a better project name are welcome.

Current Source is at http://tewk.com/pruby.tgz
It is currently hosted in a private svn repo.

Chip said I can have a commit bit. So Thats a great start.
I will put a signed copy of the CLA in the mail today.

I based the initial PGE grammar for PRuby off of  
svn://rubyforge.org/var/svn/rubygrammar/grammars/antlr-v3/trunk/ruby.g 
which is in complete.
I'm looking for a BNF style description of the Ruby grammar.  Otherwise 
I will have to dig into :pserver:[EMAIL PROTECTED]:/src/parse.y.


I used to use
$P0 = find_global "", "_dumper"
$P0( $P1, "$P1")
inside TGE transformational rules to dump tree nodes, but that doesn't 
work now.


I tried replacing find_global with the alternatives proposed by chip and 
mdiep to no avail.

Basically

interpinfo $P99, .INTERPINFO_NAMESPACE_ROOT
$P99 = $P99['_dumper']

$P0 = new .ResizablePMCArray
$P0 = get_namespace $P0
$P0['_dumper']

null $S0
$P0 = get_namespace $S0
$P0['_dumper']

Haven't had time to get back to it today.

A short example of how to include/load_bytecode library/dumper.pir and 
lookup the _dumper symbol inside a TGE rule would be helpful.


Kevin Tew



Java Script in Parrot

2006-07-07 Thread Vishal Soni

Hi,

Is any one working on Java Script(ECMA-262) implementation in Parrot?

--
Thanks,
Vishal


Re: [Slightly OT] Understanding Software Licences

2006-07-07 Thread A. Pagaltzis
* Shlomi Fish <[EMAIL PROTECTED]> [2006-07-07 17:45]:
> For the record, it is possible to be interested and
> knowledgable about law, without having a Law Diploma. This is
> similar to the fact that you can program without having a B.Sc.
> in Computer Science or whatever.

No, it’s more similar to the fact that you can be knowledgable
about medicine and yet ill-equipped to practise it without a
degree in the field.

Law is a profession, programming is merely an occupation (or more
probably a trade).

Regards,
-- 
Aristotle Pagaltzis // 


Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Andy Lester


Those who disagree with Shlomi on licenses are small-headed and  
ignorant.  Got it.


Keep digging that hole, Mr. Fish!

--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance






Any Clue about Devel::Cover Error Message "Corrupted storable file (binary v2.7) at ../../lib/Storable.pm"

2006-07-07 Thread Scott Wang
Hi Paul,

Even, currently, there is no any zero size data file
in structure folder in my regression code coverage run
(lots of suites), I still got lots of messages like
below:
---
Corrupted storable file (binary v2.7) at
../../lib/Storable.pm (autosplit into
../../lib/auto/Storable/_retrieve.al) line 331, at
//Devel/Cover/DB/Structure.pm line 269
END failed--call queue aborted.
-
Seems some data files got corrupted somehow.

The process killing (kill parent process before
killing child process and make chid process be
terminated abnormally) is one possibility, I also
noticed that useing system or other folk method to
execute command could also cause this problem.

Any clue about above issue "Corrupted storable file
(binary v2.7) at ..." and does anybody also experience
this issue and know how to deal with it?

Also, does anybody have similar experience on killing
process and folking process cause "Magic number ..."
 issue and "orrupted storable file ..." issue?

Thanks in advance,

Scott

--- Paul Johnson <[EMAIL PROTECTED]> wrote:

> On Sat, Jun 10, 2006 at 08:14:09PM -0700, Scott Wang
> wrote:
> 
> > Hi Paul,
> > 
> > You are right, I found a 0 size file under the
> > "cover_db/structure" folder. After I removed that
> 0
> > size file, my "cover" worked fine to merge all the
> > data and generated HTML file.
> > 
> > The 0 size file, I think, is because some test was
> > killed for timeout because of the slow-down of the
> > test process since we instrumented all test and
> > product scripts with Devel::Cover. When the test
> > process was killed and terminated abnormal, I
> think,
> > Devel::Cover was still trying to grab the test
> process
> > to generate data, so there was no any data
> actually
> > got generated because the test processes had been
> > killed. Is this a reasonable explaination to the 0
> > size data file?
> 
> It sounds plausible, but there could be any number
> of reasons.  Perhaps
> the file system filled up, or you have some rogue
> process running around
> truncating Devel::Cover databases.
> 
> But the test process being killed probably has
> something to do with it.
> 
> The files in the structure directory contain
> information about the
> structure of files.  That is, the statements,
> branches and conditions in
> the file, and other similar data.
> 
> -- 
> Paul Johnson - [EMAIL PROTECTED]
> http://www.pjcj.net
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Shlomi Fish
On Friday 07 July 2006 18:39, Andy Lester wrote:
> Those who disagree with Shlomi on licenses are small-headed and
> ignorant.  Got it.
>
> Keep digging that hole, Mr. Fish!
>

That's not what I said or meant. What I meant was that someone here said and I 
quote:

http://www.mail-archive.com/perl-qa%40perl.org/msg06038.html

<<<
Personally, I'm happy enough to sign my modules as "licenced under the same 
terms as Perl itself", thereby letting other people deal with a matter for 
which I have next to no interest in. 


My own take on this is that even if your code was better, I wouldn't use it, 
since I couldn't be sure that my use of it may in some way violate its terms. 
At least I know where I stand with the GPL and AL. 


Life is short, and the less I have to think about licensing issues, the 
better.
>

From my interpretation, what he said was "I don't care to understand licenses 
enough so I don't want to be bothere with it." Now I think this is a rather 
small-minded approach to this issue, which I think is very bad. Perhaps, the 
response to Ovid about it instead of this message was not appropriate, or I 
may have misunderstood what Ovid said.

You said: 

<<<
Those who disagree with Shlomi on licenses are small-headed and ignorant.  Got 
it.
>>>

That's not true. Like I said - I release all my original software under 
BSD-style licences. Some people would believe that the GPL or the LGPL would 
be more appropriate for it. So they and I disagree. But I do not claim they 
are small-headed and ignorant.

What I did claim that people who refuse to understand the various common open 
source licences and when it is appropriate to use one of them, are acting 
small-mindedly (or "small-headedly") in this context. 

Please do not try to give your own labeling interpretation to what I said 
before you made sure you understand what I'm saying. (I'm reachable on IM 
during most of my waking hours, if you want to ask me to clarify things.).

I think I've spent enough precious time and energy on this thread, which is 
pretty much useless. And my head hurts from trying to understand what we're 
fighting about.

Regards,

Shlomi Fish

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.


Re: [Slightly OT] Understanding Software Licences

2006-07-07 Thread A. Pagaltzis
Oh, and as a last point, before I leave well enough alone:

* Shlomi Fish <[EMAIL PROTECTED]> [2006-07-07 17:45]:
> I can tell you from my experience that one of my projects would
> not have become half-as-successful as it has been, if it had
> been released under the GPL instead of the Public Domain. 

And in this case, if you insist on MIT X11, it won’t be half as
successful as it might become.

Be aware that interactions between licences are extremely
complex, even when the particular case looks innocuous to the
layman. Some of the issues are still under hot contention among
lawyers who specialise this field of law.

To add another dimension to the rathole, every new jurisdiction
thrown into the mix has an entirely new set of isues.

Perl has been licensed GPL/Artistic basically *forever*, and I
doubt you could declare it unsuccessful. There is no obvious
reason to meddle with the licensing situation of Perl after some
two decades of a proven working setup, and plenty of reason not
to.

The GPL/Artistic setup we currently have *works*. It might not be
completely optimal for some goals, but it does the job, and any
attempt to improve on it is fraught with enormous problems.
Frankly, I don’t care about the legalese beyond knowing that it
achieves its stated goals and has no clear problem. It’s just not
interesting.

I’m a programmer, not a lawyer. It is imperative in my chosen
trade to have some understanding of the law that governs my
activity, so I have educated myself about it; also, the related
discussions and forums are always on the fringes of my attention.

Beyond that, though?

Let’s focus on writing code and solving actually existent problems.

Regards,
-- 
Aristotle Pagaltzis // 


Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread chromatic
On Friday 07 July 2006 08:56, Shlomi Fish wrote:

Shlomi, you are NOT reading or comprehending what people say here.

Please stop and think about what I write until you understand it before you 
respond.

> What I wanted to say is that people should have the
> minimal knowledge to understand that MIT X11 licence is compatible with
> GPL+Artistic (where Artistic is 1.0 or 2.0) code and can be re-licensed to
> it at will, even without requesting permission from its originators.

I DO NOT WANT TO RELICENSE YOUR CODE.

It is a huge maintenance burden.

It creates confusion for developers, who need to decide which version to 
patch.

It creates confusion for users, who need to decide which version to use.

You can't reuse patches to the relicensed version without special dispensation 
from the patchers.

It creates the possibility for huge divergence between the versions.

I know that legally and ethically and morally I CAN relicense your code, but 
the drawbacks make that a completely stupid decision.

Exactly which part of this is difficult for you to understand?  I would be an 
idiot for taking on such a maintenance burden and I would give the same 
advice to anyone interested in such a thing: stay away.

I understand software licenses.  That is why I say this.

> Until then I believe that licensing my newly written code under the MIT X11
> licence is a long-term benefit *because* it can be re-licensed to a
> different licence without asking anyone for permission.

You are superficially right, in that relicensing is possible.  However, it's a 
stupid, monumentally foolish decision to do so -- unless the forked version 
completely kills off your version.

> Right. I don't mind my BSD-licensed code to be re-licensed as GPL+Artistic
> before entering the core (when and if it is going to enter the core). But
> I'd like to keep it as BSD-license until then, and hopefully be able to
> maintain it as BSD on CPAN separately afterwards.

Look, there's that maintenance problem again!

Which part of this is difficult for you to understand?  Your choice of licence 
and your generous willingness to allow people to fork your code multiplies 
entities unnecessarily.  How is dividing the development work of a project 
positive?  How is that a long-term benefit?

Do not paint this as generosity on your part.  You're making OTHER people do 
MORE work this way.  I consider that selfish and anti-social.

> I daresay this thread did not quite meet my expectations, possibly because
> of bad phrasing of the original proposal on my part.

No, it's because it's a flawed idea.

You are a smart man.  Use those smarts to think about what I have written 
here.  At least admit there's a possiblity that the vehement disagreement to 
your proposal so far might mean that there is a flaw you have overlooked.

-- c


Licenses, alligators

2006-07-07 Thread Ian Langworth

When the last giant thread happened, I felt guilty for not
contributing. To absolve myself of any future guilt due to the lack of
a contribution to recent conversations, here's some useful information
about alligators, courtesy of Wikipedia:

"There are only two countries on earth that have alligators: the
United States and China. The Chinese alligator is endangered and lives
only in the Yangtze River valley. The American Alligator is found in
the United States from the Carolinas to Florida and along the Gulf
Coast. The majority of American Alligators inhabit Florida and
Louisiana. In Florida alone there are an estimated more than 1 million
alligators. The United States is the only nation on earth to have both
alligators and crocodiles. American Alligators live in freshwater
environments, such as ponds, marshes, wetlands, rivers, and swamps. In
China, they live only along the fresh water of the Yangtze River."

"Alligators are opportunistic feeders, eating almost anything they can
catch. When they are young they eat fish, insects, snails, and
crustaceans. As they grow they take progressively larger prey items,
including: larger fish such as gar, turtles, various mammals, birds,
and other reptiles, including smaller alligators. They will even
consume carrion if they are sufficiently hungry. As humans encroach
onto to their habitat, attacks on humans are not unknown, but are few
and far between."

http://en.wikipedia.org/wiki/Alligator

--
Ian Langworth


Re: Licenses, alligators

2006-07-07 Thread Jonathan T. Rockway

Great, now the mailing list archives have to be licenced under the GFDL :-)

Ian Langworth wrote:


When the last giant thread happened, I felt guilty for not
contributing. To absolve myself of any future guilt due to the lack of
a contribution to recent conversations, here's some useful information
about alligators, courtesy of Wikipedia:

"There are only two countries on earth that have alligators: the
United States and China. The Chinese alligator is endangered and lives
only in the Yangtze River valley. The American Alligator is found in
the United States from the Carolinas to Florida and along the Gulf
Coast. The majority of American Alligators inhabit Florida and
Louisiana. In Florida alone there are an estimated more than 1 million
alligators. The United States is the only nation on earth to have both
alligators and crocodiles. American Alligators live in freshwater
environments, such as ponds, marshes, wetlands, rivers, and swamps. In
China, they live only along the fresh water of the Yangtze River."

"Alligators are opportunistic feeders, eating almost anything they can
catch. When they are young they eat fish, insects, snails, and
crustaceans. As they grow they take progressively larger prey items,
including: larger fish such as gar, turtles, various mammals, birds,
and other reptiles, including smaller alligators. They will even
consume carrion if they are sufficiently hungry. As humans encroach
onto to their habitat, attacks on humans are not unknown, but are few
and far between."

http://en.wikipedia.org/wiki/Alligator





I'm pre-hackathoning at OSCON, not post-hackathoning

2006-07-07 Thread Chip Salzenberg
I'm unable to hang around Portland after Friday afternoon, I'm sorry to
report, so Saturday hackathoning will miss me.  However, I will be arriving
a day _early_ so I'll be in Portland all day Sunday.  I understood Patrick
to be in a similar situation, so he might be there Sunday too.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>


Re: Any Clue about Devel::Cover Error Message "Corrupted storable file (binary v2.7) at ../../lib/Storable.pm"

2006-07-07 Thread Paul Johnson
On Fri, Jul 07, 2006 at 10:26:13AM -0700, Scott Wang wrote:

> Hi Paul,
> 
> Even, currently, there is no any zero size data file
> in structure folder in my regression code coverage run
> (lots of suites), I still got lots of messages like
> below:
> ---
> Corrupted storable file (binary v2.7) at
> ../../lib/Storable.pm (autosplit into
> ../../lib/auto/Storable/_retrieve.al) line 331, at
> //Devel/Cover/DB/Structure.pm line 269
> END failed--call queue aborted.
> -
> Seems some data files got corrupted somehow.
> 
> The process killing (kill parent process before
> killing child process and make chid process be
> terminated abnormally) is one possibility, I also
> noticed that useing system or other folk method to
> execute command could also cause this problem.
> 
> Any clue about above issue "Corrupted storable file
> (binary v2.7) at ..." and does anybody also experience
> this issue and know how to deal with it?
> 
> Also, does anybody have similar experience on killing
> process and folking process cause "Magic number ..."
>  issue and "orrupted storable file ..." issue?

In lieu of discussing either licences or alligators, let me try to
answer this.

Killing the process sounds like the most likely cause of this problem.
If you manage to kill the process while it is writing out a storable file
the file will very probably be corrupted.

How are you killing the process?  Are you sending it SIGKILL (9) for
example?  Maybe you could send it something a little nicer which might
allow to process to clean up.

Devel::Cover does its work in the very last END block.  You really need
to let it run to completion.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


Re: Using Rules Today

2006-07-07 Thread Flavio S. Glock

2006/7/5, Joshua Gatcomb <[EMAIL PROTECTED]>:


I have not had a chance to look at Flavio's links yet.  Since no one who
actually knows rules seemed to be inspired to write an example for me - I
will *eventually* figure it out on my own and post back to the list as an
FYI.


Here is a simple one that handles '+' and '*' - it could be simplified
a bit, but this one works for me:
---
use Data::Dumper;
use strict;
use Pugs::Compiler::Token;
use Pugs::Runtime::Match::Ratchet;
use base 'Pugs::Grammar::Base';

Pugs::Compiler::Token->install( 'mul','
   (+)
   [   \\*   { return ( $/[0]()*$/{mul}() ) }
   |   <\'\'>
   ]
' );
Pugs::Compiler::Token->install( 'sum','
   
   [   \\+   { return $/{mul}()+$/{sum}() }
   |   <\'\'> { return $/{mul}() }
   ]
' );

my $s = shift;
my $match = main->sum( $s );
print $match->();
---

- Flavio S. Glock


TAP Namespace Nonproliferation Treaty

2006-07-07 Thread Michael G Schwern

I propose that we all avoid grabbing the juicy names in the top level
TAP namespace, such as TAP::Grammar, TAP::Parser and so on.  This
avoids one module getting the special status of being "the"
TAP::Parser.  AKA "The CGI.pm problem".  Sort of declare a namespace
Antarctic Treaty.

For example, I'd originally had TAP::Harness with its own TAP::Parser
and TAP::Source and TAP::Lexer and so on.  Now they're going to all be
inside the TAP::Harness namespace.  TAP::Harness::Parser,
TAP::Harness::Source, etc.  All it will have in the top level is
TAP::Harness.

TAP.pm is the exception.  Andy has reserved it for a documentation
module describing TAP itself.

I've written this up on the Wiki.  Please give it a look and sign if
you have designs on the TAP namespace.  I think Ovid, Andy and myself
are the only ones with clear designs on in the TAP:: namespace with
Yuuval, Michael Peters and Shlomi edging towards it.
http://perl-qa.yi.org/index.php/TAP_Namespace_Nonproliferation_Treaty


Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Michael G Schwern

On 7/7/06, chromatic <[EMAIL PROTECTED]> wrote:

I DO NOT WANT TO RELICENSE YOUR CODE.

It is a huge maintenance burden.

It creates confusion for developers, who need to decide which version to
patch.

It creates confusion for users, who need to decide which version to use.

You can't reuse patches to the relicensed version without special dispensation
from the patchers.

It creates the possibility for huge divergence between the versions.


As an author who had up to four modules in the Perl 5 core at the same
time, I can say emphatically that coordinating new releases from CPAN
into the core and integrating patches from the core was at times
overwhelming enough for both me and the pumpking without having to
worry about licensing issues.

I agree with chromatic.  There are enough problems with coring a CPAN
module.  Do not volunteer to add another problem with licenses.


Re: Old and broken versions of Module::Install

2006-07-07 Thread James E Keenan

Steffen Mueller wrote:
 You
can find a complete (and somewhat current) list of problematic modules 
at http://steffen-mueller.net/mi_old.html




Thank you very much for this public service!

jimk


Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Michael G Schwern

Folks should read the fascinating document which is the LEGAL file
which comes with the Ruby source code.
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/LEGAL?rev=1.12.2.2;content-type=text%2Fplain

The Ruby source contains not one, not two, but SIXTEEN different
licences including the "Beer-Ware" license.  Do YOU want to be the
person who has to figure out if their company can modify and/or ship
Ruby?  Or if the seventeenth license is compatible with the previous
sixteenth?

Welcome to licensing hell.  This is the end of the road down which
accepting multiple licenses into your project gets you.  This is a
road Perl 5 has strived to get itself off and Perl 6 has avoided
taking altogether.


Re: More on the TAP::Grammar

2006-07-07 Thread Michael G Schwern

On 7/7/06, Ovid <[EMAIL PROTECTED]> wrote:

 This long-winded (as usual) explanation brings me around to my actual question:  is 
there really any need to have the lexing and parsing stages clearly delineated?  I can't 
see why, but from you mentioning several times that "that's a parser's job, not a 
lexer's", I assume you have some reason behind this.  Am I missing something?  Is 
there some desire that one might take the lexed tokens and direct them to another parser, 
for example?


I started writing a single parser/lexer and found it to be a bit too
convoluted.  Separting the parsing and lexing is turning out simpler.
Sounds like you're having the opposite experience.  Possibly because
you're using a real grammar and I'm using ad hoc code.  Maybe I'm just
gunshy after working with Test::Harness for so long.  That's ok, the
strength of different implementations is they take different
approaches.

Interface-wise, I'm looking at TAP::Harness' bits in terms of what
behaviors a user might want to override.  I'm trying to draw clear
lines of responsibility so a user can play with the bits they care
about without having to touch stuff they don't.  Its very unlikely
they'll want to override the lexer, unless they're writing a TAP
extension, so I'm walling that off.


[perl #39760] make warnings (r13197 - x86-msvc-7.1)

2006-07-07 Thread via RT
# New Ticket Created by  Jerry Gay 
# Please include the string:  [perl #39760]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39760 >


compilers\imcc\imcparser.c
imcparser.c
compilers\imcc\imcparser.c(878) : warning C4273: 'malloc' :
inconsistent dll linkage
compilers\imcc\imcparser.c(885) : warning C4273: 'free' : inconsistent
dll linkage

compilers\ast\astparser.c
astparser.c
compilers\ast\astparser.c(1298) : warning C4102: 'yyerrlab1' :
unreferenced label

compilers\imcc\main.c
main.c
compilers\imcc\main.c(480) : warning C4273: 'imcc_init' : inconsistent
dll linkage

~jerry


Re: Ruby on Parrot

2006-07-07 Thread jerry gay

On 7/7/06, Kevin Tew <[EMAIL PROTECTED]> wrote:

Allison Randal wrote:
> I gave a Parrot talk at a Ruby user group meeting tonight. Someone
> mentioned that they had seen somebody on #parrot who was working on a
> new Ruby implementation based on Punie. Do you exist? And is there
> anything we can do to help you?
>
> Allison
That would be me!

PRuby is the project.
Suggestions of a better project name are welcome.


since i think 'cardinal' is catchy, and it's not yet taken, perhaps
you should consider it.


Current Source is at http://tewk.com/pruby.tgz
It is currently hosted in a private svn repo.


i've taken a look at this and promised to help kevin get it fit for checkin.


Chip said I can have a commit bit. So Thats a great start.
I will put a signed copy of the CLA in the mail today.


sure is! i can't wait to welcome another HLL implementor to the growing team.

i'm almost done working with Chris Dolan to get his TAP parser checked
in, and then i'll be able to devote more time to getting ruby running
on parrot. yeehah!
~jerry


[perl #39759] [NEW] Util tool - search for opcodes

2006-07-07 Thread João Cruz Morais
# New Ticket Created by  "João Cruz Morais" 
# Please include the string:  [perl #39759]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39759 >


Given a valid regex (pcre style) as an argument, the script will search inside
any *.ops file located in 'path' for an opcode name that matches, dumping both
its arguments and its description.
If no argument is passed, every opcode found is dumped.

Example:
> ./search-ops.py load

--
File: core.ops - Parrot Core Ops (2 matches)
--

load_bytecode(in STR)
Load Parrot bytecode from file $1, and (TODO) search the library path,
to locate the file.

loadlib(out PMC, in STR)
Load a dynamic link library named $2 and store it in $1.

--
File: debug.ops (1 matches)
--

debug_load(inconst STR)
Load a Parrot source file for the current program.


manifest.patch
Description: Binary data
#!/usr/bin/python

"""
Given a valid regex (pcre style) as an argument, the script will search inside 
any *.ops file located in 'path' for an opcode name that matches, dumping both
its arguments and its description. 
If no argument is passed, every opcode found is dumped.

Example:
> ./search-ops.py load

--
File: core.ops - Parrot Core Ops (2 matches)
--

load_bytecode(in STR)
Load Parrot bytecode from file $1, and (TODO) search the library path,
to locate the file.

loadlib(out PMC, in STR)
Load a dynamic link library named $2 and store it in $1.

--
File: debug.ops (1 matches)
--

debug_load(inconst STR)
Load a Parrot source file for the current program.
"""

path = "../../src/ops/" # path to the ops source folder
wrap_width = 70 # max chars per line

import os, re
from sys import argv, exit

def wrap(text, width):
return reduce(lambda line, word, width=width: '%s%s%s' %
  (line,
   ' \n'[(len(line)-line.rfind('\n')-1
 + len(word.split('\n',1)[0]
  ) >= width)],
   word),
  text.split(' ')
 )

query = ""
if len(argv) > 1:
query = argv[1]

try:
query = re.compile(query)
except:
print "Invalid opcode regex"
exit()

path = path.replace("\\", "/")
if len(path) > 0 and path[-1] != "/":
path = path + "/"

try:
opFiles = os.listdir(path)
except:
print "Path not found"
exit()

opFiles = filter(lambda file: re.compile("\.ops$").search(file) is not None, 
opFiles)

matches = []

for file in opFiles:
results = []
opsc = open(path+file, "r").read()

p = re.compile("^=item\sB<(\w+)>\(([^)]+)\)\n\n(?=(.*?)\n\n)", 
re.MULTILINE|re.DOTALL)
for m in p.findall(opsc):
if query.search(m[0]) is None:
continue
if re.compile("=item").match(m[2]) is not None:
m = list(m)
m[2] = None
results.append(m)

if len(results) > 0:
title = re.compile("^=head1\sNAME\n\n(.*)", 
re.MULTILINE).search(opsc).group(1)
matches.append({"f": title, "rs": results})

if len(matches) == 0:
print "No matches were found"
else:
delim = "\n" + "-" * wrap_width + "\n"
for v in matches:
print "%sFile: %s (%d matches)%s" % (delim, v["f"], len(v["rs"]), delim)
for m in v["rs"]:
print "%s(%s)" % tuple(m[:2])
if m[2] is not None:
print wrap(m[2].replace("\n", " "), wrap_width)+"\n"

[perl #39761] [NEW] t/codingstd/tabs.t - checks for tabbed indents

2006-07-07 Thread John J. Trammell
# New Ticket Created by  "John J. Trammell" 
# Please include the string:  [perl #39761]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39761 >


Found in docs/pdds/pdd07_codingstd.pod:

All indentation must consist of spaces, no tabs (for ease of
patching).

This test looks for tabbed indents in source code and header files.

#! perl
# Copyright (C) 2001-2006, The Perl Foundation.

use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Distribution;


=head1 NAME

t/codingstd/tabs.t - checks for tab indents in C source and headers

=head1 SYNOPSIS

% prove t/codingstd/tabs.t [file ...]

=head1 DESCRIPTION

Checks that the indicated file(s) do not use tabs to indent.

If no file(s) are specified, checks the Parrot C source and header files for
tab indents.

=head1 SEE ALSO

L

=cut


my @files = @ARGV ? @ARGV : source_files();

plan tests => scalar @files;

foreach my $file (@files) {
open FILE, "<$file" or die "Unable to open '$file' for reading: $!";

my @tabs;
LINE:
while () {
next unless /^ *\t/;
push @tabs, "tab in leading whitespace, file '$file', line $.\n";
if (@tabs >= 5) {
push @tabs, "skipping remaining lines (you get the idea)\n";
last LINE;
}
}
close FILE;

is(scalar(@tabs), 0, "file '$file' does not use tabs")
  or diag(@tabs);
}

sub source_files {
my $dist = Parrot::Distribution->new;
return map { $_->path } (
map($_->files_of_type('C code'),   $dist->c_source_file_directories),
map($_->files_of_type('C header'), $dist->c_header_file_directories),
);
}

## vim: expandtab sw=4
Index: MANIFEST
===
--- MANIFEST(revision 13197)
+++ MANIFEST(working copy)
@@ -981,6 +981,7 @@
 t/examples/namespace.t[]
 t/codingstd/cppcomments.t []
 t/codingstd/fixme.t   []
+t/codingstd/tabs.t[]
 config/inter/shlibs.pm[]
 config/inter/types.pm []
 config/inter/encoding.pm  []


Re: Ruby on Parrot

2006-07-07 Thread Allison Randal

Kevin Tew wrote:


That would be me!

PRuby is the project.
Suggestions of a better project name are welcome.


Possibly Cardinal? (A ruby-red bird.) The original Cardinal project was 
started in 2002, but talking last night we decided it needed a complete 
re-write in PGE/TGE (which is when you were mentioned). I suspect Phil 
would be happy to donate the name to the new version, and even help out. 
I'll connect you two.


Any chance you might make it out to Portland the last week of July? 
There will be some hacking sessions at OSCON and it'd be great to get 
together with you, Patrick, and the PDX.rb group.



Current Source is at http://tewk.com/pruby.tgz
It is currently hosted in a private svn repo.

Chip said I can have a commit bit. So Thats a great start.
I will put a signed copy of the CLA in the mail today.


Awesome!

I based the initial PGE grammar for PRuby off of  
svn://rubyforge.org/var/svn/rubygrammar/grammars/antlr-v3/trunk/ruby.g 
which is in complete.
I'm looking for a BNF style description of the Ruby grammar.  Otherwise 
I will have to dig into :pserver:[EMAIL PROTECTED]:/src/parse.y.


No one last night knew of a BNF grammar for Ruby, but I've found that 
translating from yacc to PGE isn't difficult (it's what I've done with 
Punie).



I used to use
$P0 = find_global "", "_dumper"
$P0( $P1, "$P1")
inside TGE transformational rules to dump tree nodes, but that doesn't 
work now.


PGE uses the Parrot version of Data::Dumper (which is what this code 
does), but the TGE nodes don't (yet). Just call the 'dump' method on the 
tree node.


  node.'dump'()

Allison


[perl #39704] [TODO] Tcl - Convert TODO/XXX comments to RT tickets

2006-07-07 Thread Will Coleda via RT
Suggestion for these and other areas in the source with TODOs...

# XXX bad.

# XXX (RT#39704) good.

Then it's still obvious if you're in the code that a ticket was opened, and 
it's possible to 
automate your search for "bad" XXX's (or TODOs).

On Mon Jul 03 23:58:41 2006, mdiep wrote:
>mini:~/Projects/parrot/languages/tcl mdiep$ grep -r XXX . | grep - 
> v .svn | wc -l
> 120
>mini:~/Projects/parrot/languages/tcl mdiep$
> 
> We need to work on technical debt -- convert these to RT tickets.
> 
> --
> Matt Diephouse
> 





Re: TAP extension proposal: test attributes

2006-07-07 Thread Yuval Kogman
On Fri, Jul 07, 2006 at 08:36:33 -0500, Scott Bolte wrote:

> I propose using of subset of the Config::Std syntax to allow tests to
> declare attributes that are captured in Test::TAP::Model as a hash.
> That would allow the test to declare configuration information, such
> as its dependencies, which would be available to downstream processors
> of the test results.


I would like this on a per-test-case level too.

Pugs' test suite uses a weird syntax in the descriptions to spill
out the todo category (not reason, but whether it's a bug, a force
todo, unspecced, etc), the position of the test so that we can use
backlinks, and color the test file in HTML, and potentially other
info.

It would be nice if this would be standardized.

-- 
  Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org  0xEBD27418



pgpU3j8aoOoow.pgp
Description: PGP signature


Re: [Slightly OT] Understanding Software Licences [was Re: Proposal Suggestion - Test::Run [was Re: [Israel.pm] Fwd: Call for proposals -- Perl Foundation Grants]]

2006-07-07 Thread Adam Kennedy
From my interpretation, what he said was "I don't care to understand licenses 
enough so I don't want to be bothere with it." Now I think this is a rather 
small-minded approach to this issue, which I think is very bad. Perhaps, the 
response to Ovid about it instead of this message was not appropriate, or I 
may have misunderstood what Ovid said.




...

What I did claim that people who refuse to understand the various common open 
source licences and when it is appropriate to use one of them, are acting 
small-mindedly (or "small-headedly") in this context. 


For the record, I refuse to understand the various common open source 
licenses, and when it is appropriate to use one of them.


So instead, for the win32.perl.org logo and the Strawberry Perl license 
bundling issues, even though I don't see a problem, on the advice of 
Randal and Allison I've asked to pass on the details of both issues to 
the TPF Intellectual Property lawyers for revue, and I've been lucky 
enough that I've been allowed to burn a few hours of their time on this 
issue.


I may be ignorant, but I'm not naive, and I know it matters. But I 
shouldn't have to put in the effort to learn this stuff.


And most of the people here are the same. They remain ignorant, not 
because they don't care, but because they prefer to defer to others who 
DO understand more than we ever could.


This does not make them small-minded at all, just pragmatic.

Adam K


Re: Old and broken versions of Module::Install

2006-07-07 Thread Adam Kennedy

James E Keenan wrote:

Steffen Mueller wrote:
 You
can find a complete (and somewhat current) list of problematic modules 
at http://steffen-mueller.net/mi_old.html




Thank you very much for this public service!


Indeed.

Adam K