Re: release?

2015-12-29 Thread Andy_Bach
On Tue, Dec 29, 2015 at 01:57:57AM -0800, Darren Duncan wrote:
>> On that note, are there going to be Perl 6 versions 6.x.y where {x,y} 
are
> > integers?  Will 6.0.0 be the first such one? -- Darren Duncan

On Tue, Dec 29, 2015 Patrick Michaud wrote:
> "Perl 6" is a language, not an implementation of that language.  Think 
of "Perl 6" as being like "C", "C++", "Javascript", etc., where the 
language is separate from the (many) implementations of that language.

I'm just a very ordinary perl hacker here, but Alex's point I think should 
be addressed.  Most of us (i.e ordinary, un-language implementation geeks) 
are looking to download a Perl6 and if it's rakudo x.y.z, fine, but make 
that seem like something like perl.6.tar.gz. It would seem that gently 
introducing the complete separation w/ a little of Perl's famous (to me) 
"syntatic sugar" (meta-syntatic?) to help us getting started.  Maybe the 
lower case distinction, "perl6.x.y" vs "Perl 6.c", would soothe both sides 
of the discussion.

But agree that there is a missed opportunity; marketing, audience, ease of 
press release noticing, if there's no easy "perl 6" download page.  Or, 
worse, if there is, but it gets them the text (test suite?) for 6.c 

Just a note - currently running the process from:
http://perl6.org/downloads/

and, aside from seeing a number of format argument mismatches [1], seems 
to be going well. 

a

[1]
e.g.
src/6model/reprs/NFA.c: In function ?nqp_nfa_run?:
src/6model/reprs/NFA.c:442:17: warning: format ?%lld? expects argument of 
type ?long long int?, but argument 6 has type ?MVMint64? [-Wformat=]
 fprintf(stderr,"%c with %ds target %lx offset 
%lld\n",cp,(int)numcur, (long)target, offset);
 ^
--
Andy Bach
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov
Voice: (608) 261-5738, Cell: (608) 658-1890

" 'But, when you die, on your death bed, 
you will receive total consciousness'... 
So I got that goin' for me... which is nice."
Carl Spackler

Re: Proposed docs for C

2015-09-15 Thread Andy_Bach
[1 1 1 1]
next
[1 1 1 1 1 1]
next
[1 1 1 1 1 1 1 1]

vs

[1 2 3]
next
[1 2 3 3]
next
[1 2 3 3 3]

I think the latter is clearer, though perhaps the problem is the original 
code is a bit overly-contrived (I'm thinking ;-). It shows better the 
variation after each call, maybe. my 2.00e-02 dollars worth.

a
--
Andy Bach
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov
Voice: (608) 261-5738, Cell: (608) 658-1890

“That which can be asserted without evidence, can be dismissed without 
evidence.”
― Christopher Hitchens



Re: threads?

2010-10-13 Thread Andy_Bach
I haven't enough smarts to see if this is at all what you're looking for 
but is used some of the same terms:

http://dpj.cs.uiuc.edu/DPJ/Home.html?cid=nl_ddjupdate_2010-10-12_html

Welcome to the home page for the Deterministic Parallel Java (DPJ) project 
at the University of Illinois at Urbana-Champaign.  
Project Overview
The broad goal of our project is to provide deterministic-by-default 
semantics for an object-oriented, imperative parallel language, using 
primarily compile-time checking.  ?Deterministic? means that the program 
produces the same visible output for a given input, in all executions.  
?By default? means that deterministic behavior is guaranteed unless the 
programmer explicitly requests nondeterminism.  This is in contrast to 
today?s shared-memory programming models (e.g., threads and locks), which 
are inherently nondeterministic and can even have undetected data races.  
Our paper at HotPar 2009 states our research goals in more detail.  The 
other pages of this site provide additional information about the DPJ type 
system and language.
a
--
Andy Bach
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov
Voice: (608) 261-5738; 
Cell: (608) 658-1890

No, no, you're not thinking, you're just being logical.
-Niels Bohr, physicist (1885-1962)

Re: [perl #62478] C-style for loop does not give an error

2009-01-20 Thread Andy_Bach
  prints 2 instead of giving an intelligent error message that one should
use loop
  or better yet for 1..3 - $i {  }

 Presumably say $_ would also yield 2, since I gather the for
is looping over ($i).

$ perl6 -e ' for (my $i = 1; $i = 3; $i++) { say $i; }'
2

$ perl6 -e ' for (my $i = 1; $i = 3; $i++) { say $i; say $_ }'
2
1

So the ++ is applied before the loop body but after the assignment to $_

a
---
Andy Bach
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov
Voice: (608) 261-5738; Cell: (608) 658-1890

History will have to record that the greatest tragedy of this period
of social transition was not the strident clamor of the bad people,
but the appalling silence of the good people.
Martin Luther King, Jr.



Re: [perl #61904] [BUG] r34778 - code takes forever

2009-01-02 Thread Andy_Bach
class Prime {
  has @!primes is rw;
  has Int $!number is rw = 1;

  method next() {
my $not_prime = 1;

while($not_prime  $!number++) {
  $not_prime = @!primes.grep({$!number % $^a == 0});
}

Appears that last assignment changes $not_prime.WHAT from Int into
Array.

a
---
Andy Bach
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov
Voice: (608) 261-5738; Cell: (608) 658-1890

Straw? No, too stupid a fad. I put soot on warts.



Apoclypse 04 - update hint update

2008-12-29 Thread Andy_Bach
In A04 the sub section
RFC 022: Control flow: Builtin switch statement

There's the table:
Table 1: Matching a switch value against a case value

and the remark at the end:
[Update: This is inaccurate in several ways; see the most recent table in
S04.]

as best I can tell, the actual table is in S03, under Smart Matching.

a
---
Andy Bach
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov
Voice: (608) 261-5738; Cell: (608) 658-1890

As long as war is regarded as wicked, it will always have its
fascination.  When it is looked upon as vulgar, it will cease to be
popular.-- Oscar Wilde



Re: how to call Grammars correctly?

2008-12-18 Thread Andy_Bach
 So, I try to use that way:

 grammar G {
 token TOP { ^ foo+ $ };
 token foo { ':' bar? };
 token bar { \w };
 };

 :a:b:c ~~ /G::TOP/;

 say $/;
 say $/foo; #Use of uninitialized value
 say $_bar for $/foo; # Use of uninitialized value

 Try $/TOPfoo

Or even $/G::TOPfoo (haven't tried it, though)

Last one works
   say TOPfoo , $/TOPfoo;
   say G::TOP , $/G::TOP ;
   say G::TOPfoo , $/G::TOPfoo ;
   say G::TOPG::foo , $/G::TOPG::foo ;
   say G::TOPbar , $/G::TOPbar ;

gets:
TOPfoo Use of uninitialized value

G::TOP :a:b:c
G::TOPfoo :a:b:c
G::TOPG::foo Use of uninitialized value

G::TOPbar Use of uninitialized value

that is, the $/TOPfoo is also uninitialized.  However, it appears that
G::TOP has 'a:b:c' in it and foo is empty?  Trying:
say G::TOPfoobar , $/G::TOPfoobar ;

works:
G::TOPfoobar :a

---
Andy Bach
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov
Voice: (608) 261-5738; Cell: (608) 658-1890

I have always wished that my computer would be as easy to use as
my telephone. My wish has come true. I no longer know how to use
my telephone.-- Bjarne Stroustrup



Re: Parrot doesn't build on OS X

2008-11-03 Thread Andy_Bach
Just a data point - fresh svn on a Macbook pro x86 failsr3205:
c++ -o dan_ops_switch.bundle dan_ops_switch.o   -L/usr/local/lib
-L/usr/share/cvs/afbach/parrot/blib/lib
-L/usr/share/cvs/afbach/parrot/blib/lib -undefined dynamic_lookup -bundle
-L/usr/share/cvs/afbach/parrot/blib/lib -lparrot
make -C compilers/pct
../../parrot -o ../../runtime/parrot/library/PCT.pbc --output-pbc PCT.pir
../../parrot -o ../../runtime/parrot/library/PCT/PAST.pbc --output-pbc
src/PAST.pir
../../parrot -o ../../runtime/parrot/library/PCT/Grammar.pbc --output-pbc
src/PCT/Grammar.pir
../../parrot -o ../../runtime/parrot/library/PCT/HLLCompiler.pbc
--output-pbc src/PCT/HLLCompiler.pir
make -C compilers/pge
perl -MExtUtils::Command -e rm_f PGE.pbc
../../runtime/parrot/library/PGE.pbc
perl -e  PGE/builtins_gen.pir
../../parrot -o PGE.pbc --output-pbc PGE.pir
../../parrot ../../runtime/parrot/library/PGE/Perl6Grammar.pir
--output=PGE/builtins_gen.pir PGE/builtins.pg
no bigint lib loaded
current instr.: 'parrot;PGE;Match;text' pc 426
(compilers/pge/PGE/Match.pir:273)
called from Sub 'parrot;PGE;Match;text' pc 343
(compilers/pge/PGE/Match.pir:223)
called from Sub 'parrot;PGE;Match;get_string' pc 592
(compilers/pge/PGE/Match.pir:379)
called from Sub 'parrot;PGE;Perl6Regex;compile_perl6regex' pc 6209
(compilers/pge/PGE/Perl6Regex.pir:100)
called from Sub 'parrot;PGE;Perl6Grammar;Compiler;__onload' pc 45
(../../runtime/parrot/library/PGE/Perl6Grammar.pir:81)
called from Sub 'parrot;PGE;Perl6Grammar;Compiler;main' pc -1 ((unknown
file):-1)
make[1]: *** [PGE.pbc] Error 1
make: *** [compilers.dummy] Error 2

this is perl, v5.8.8 built for darwin-thread-multi-2level
(with 1 registered patch, see perl -V for more detail)

gcc: i686-apple-darwin9-gcc-4.0.1: no input files

init::manifest -  Check
MANIFEST.done.
init::defaults -  Set Configure's default
values.done.
init::install -   Set up installation
paths..done.
init::miniparrot -Tweak settings for
miniparrot...skipped.
init::hints - Load platform and local hints
filesdone.
init::headers -   Find header files distributed with
Parrot..done.
inter::progs -Determine what C compiler and linker to
usedone.
inter::make - Is make
installed...yes.
inter::lex -  Is lex
installedskipped.
inter::yacc - Is yacc
installed...skipped.
auto::gcc -   Is your C compiler actually
gcc.yes.
auto::glibc - Is GNU libc
installedno.
auto::backtrace - Does libc have the backtrace*
functions.yes.
auto::fink -  Determine Fink location on DarwinFink not
installed.
auto::macports -  Determine Macports location on
Darwin...yes.
auto::msvc -  Is your C compiler actually Visual
C++...no.
auto::attributes -Detect compiler
attributes.done.
auto::warnings -  Detect supported compiler warnings..set for
gcc.
init::optimize -  Enable
optimization..no.
inter::shlibs -   Determine flags for building shared
libraries..done.
inter::libparrot -Should parrot link against a shared
library.yes.
inter::charset -  Which charset files should be compiled
in..done.
inter::encoding - Which encoding files should be compiled
in.done.
inter::types -What types should Parrot
use...done.
auto::ops -   Which opcode files should be compiled
in...done.
auto::pmc -   Which pmc files should be compiled
in..done.
auto::alignptrs - Determine your minimum pointer alignment 1
byte.
auto::headers -   Probe for C
headersdone.
auto::sizes - Determine some
sizes...done.
auto::byteorder - Compute native byteorder for
wordsize.little-endian.
auto::va_ptr -Test the type of
va_ptr...stack.
auto::format -What formats should be used for
sprintfdone.
auto::isreg - Does your C library have a working
S_ISREG..yes.
auto::arch -  Determine CPU architecture and
OS..done.
auto::jit -   Determine JIT
capability.no.
auto::cpu -   Generate CPU specific
stuffdone.
auto::funcptr -   Does compiler support function pointer
casts...done.
auto::cgoto - Does your compiler support computed
gotoyes.
auto::inline -Does your compiler support
inline...yes.
auto::gc -Determine allocator to
use.done.
auto::memalign -  Does your C library support 

Re: make: *** [perl6] Segmentation fault

2008-07-17 Thread Andy_Bach
Seeing the same thing
Linux 2.6.18-53.1.21.el5xen #1 SMP
gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
perl, v5.10.0 built for i686-linux

however:
 ./parrot languages/perl6/perl6.pbc -e 'say hello world '
hello world

$ languages/perl6/perl6
 say hello
hello

[EMAIL PROTECTED] parrot]$ languages/perl6/perl6 -e 'say hello'
Segmentation fault

Hmm:
[EMAIL PROTECTED] parrot]$  languages/perl6/perl6  -e ' say hello'
hello
[EMAIL PROTECTED] parrot]$  languages/perl6/perl6  -e 'say hello'
Segmentation fault

a
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

Accordion, n.:A bagpipe with pleats.



Re: [perl #56304] AutoReply: smokej consumes all memory Revision: 28672 on linux

2008-07-07 Thread Andy_Bach
chromatic wrote:
 That should have been:

 # TEST_PROG_ARGS=-j prove -v t/stm/runtime.t

Okay, I can get the box to hang/consume everything this way - adding a -D
flag and various digits (as of Revision: 29128) avoids the hang:
 TEST_PROG_ARGS=-j -D7  prove -v t/stm/runtime.t
t/stm/runtime..
1..5
not ok 1 - choice (one thread)
ok 2 # SKIP Intermittently failing everywhere
ok 3 # SKIP Intermittently failing everywhere

#   Failed test 'choice (one thread)'
#   at t/stm/runtime.t line 82.
#  got: 'ok
# *** Parrot VM: Dumping GC info ***
# Total memory allocated = 262144
# DOD runs = 0
# Lazy DOD runs = 0
# Collect runs = 0
# Collect memory = 0
# Active PMCs = 1943
# Extended PMCs = 0
# Timely DOD PMCs = 0
# Total PMCs = 2119
# Active buffers = 1448
# Total buffers = 2861
# Header allocations since last collect = 23
# Memory allocations since last collect = 0
# '
# expected: 'ok
# '
not ok 4 - queue adapted for the library

#   Failed test 'queue adapted for the library'
#   at t/stm/runtime.t line 506.
#  got: 'real_exception (severity:2 error:24):
ResizableIntegerArray: Can't pop from an empty array!
# current instr.: 'parrot;STM;_set_status' pc 220
(runtime/parrot/library/STM.pir:154)
# called from Sub 'parrot;STM;retry' pc 235
(runtime/parrot/library/STM.pir:164)
# called from Sub 'parrot;STMQueue;_fetchHead' pc 117
(/usr/share/cvs/andy/parrot/t/stm/runtime_4.pir:67)
# called from Sub 'parrot;STM;_transaction' pc 17
(runtime/parrot/library/STM.pir:30)
# called from Sub 'parrot;STM;transaction' pc 550
(runtime/parrot/library/STM.pir:276)
# called from Sub 'parrot;STMQueue;remover' pc 423
(/usr/share/cvs/andy/parrot/t/stm/runtime_4.pir:185)
# Unhandled exception in thread with tid 2 (message=ResizableIntegerArray:
Can't pop from an empty array!, number=24)
# real_exception (severity:2 error:24): ResizableIntegerArray: Can't pop
from an empty array!
# current instr.: 'parrot;STM;_set_status' pc 220
(runtime/parrot/library/STM.pir:154)
# called from Sub 'parrot;STM;retry' pc 235
(runtime/parrot/library/STM.pir:164)
# called from Sub 'parrot;STMQueue;_addTail' pc 280
(/usr/share/cvs/andy/parrot/t/stm/runtime_4.pir:123)
# called from Sub 'parrot;STM;_transaction' pc 17
(runtime/parrot/library/STM.pir:30)
# called from Sub 'parrot;STM;transaction' pc 550
(runtime/parrot/library/STM.pir:276)
# called from Sub 'parrot;STMQueue;addTail' pc 253
(/usr/share/cvs/andy/parrot/t/stm/runtime_4.pir:113)
# called from Sub 'parrot;STMQueue;adder' pc 398
(/usr/share/cvs/andy/parrot/t/stm/runtime_4.pir:174)
# Unhandled exception in thread with tid 1 (message=ResizableIntegerArray:
Can't pop from an empty array!, number=24)
# interpreter 0x8412968 had pending transaction on exit
# interpreter 0x826ba80 had pending transaction on exit
# *** Parrot VM: Dumping GC info ***
# Total memory allocated = 262144
# DOD runs = 1
# Lazy DOD runs = 0
# Collect runs = 1
# Collect memory = 44456
# Active PMCs = 11587
# Extended PMCs = 1911
# Timely DOD PMCs = 0
# Total PMCs = 11727
# Active buffers = 8969
# Total buffers = 10387
# Header allocations since last collect = 49
# Memory allocations since last collect = 0
# '
# expected: 'ok
# '
not ok 5 - queue (non-blocking; nested)

#   Failed test 'queue (non-blocking; nested)'
#   at t/stm/runtime.t line 574.
#  got: 'ok
# *** Parrot VM: Dumping GC info ***
# Total memory allocated = 262144
# DOD runs = 0
# Lazy DOD runs = 0
# Collect runs = 0
# Collect memory = 0
# Active PMCs = 2050
# Extended PMCs = 0
# Timely DOD PMCs = 0
# Total PMCs = 2119
# Active buffers = 1526
# Total buffers = 2861
# Header allocations since last collect = 24
# Memory allocations since last collect = 0
# '
# expected: 'ok
# '
# Looks like you failed 3 tests of 5.
 Dubious, test returned 3 (wstat 768, 0x300)
 Failed 3/5 subtests
(less 2 skipped subtests: 0 okay)

Test Summary Report
---
t/stm/runtime.t (Wstat: 768 Tests: 5 Failed: 3)
  Failed test number(s):  1, 4-5
  Non-zero exit status: 3
Files=1, Tests=5,  0 wallclock secs ( 0.01 usr  0.01 sys +  0.20 cusr  0.09
csys =  0.31 CPU)
Result: FAIL

a

---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

The name grep is from the common ed (pre-visual vi) command:
 g/re/p i.e. g(lobal-search)/r(egular) e(xpression)/p(rint)



Re: [perl #56304] AutoReply: smokej consumes all memory Revision: 28672 on linux

2008-07-05 Thread Andy_Bach
Better, in a sense:

$ TEST_PROG_ARGS=-j prove -v t/stm/runtime.t
t/stm/runtime..
1..5
ok 1 - choice (one thread)
ok 2 # SKIP Intermittently failing everywhere
ok 3 # SKIP Intermittently failing everywhere
not ok 4 - queue adapted for the library

#   Failed test 'queue adapted for the library'
#   at t/stm/runtime.t line 506.
# Exited with error code: [SIGNAL 10]
# Received:
#
# Expected:
# ok
#
ok 5 - queue (non-blocking; nested)
# Looks like you failed 1 test of 5.
 Dubious, test returned 1 (wstat 256, 0x100)
 Failed 1/5 subtests
(less 2 skipped subtests: 2 okay)

Test Summary Report
---
t/stm/runtime.t (Wstat: 256 Tests: 5 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=1, Tests=5,  3 wallclock secs ( 0.01 usr  0.00 sys +  0.15 cusr  0.07
csys =  0.23 CPU)
Result: FAIL
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

The name grep is from the common ed (pre-visual vi) command:
 g/re/p i.e. g(lobal-search)/r(egular) e(xpression)/p(rint)




Re: [perl #56304] AutoReply: smokej consumes all memory Revision: 28672 on linux

2008-07-04 Thread Andy_Bach
Chromatic suggested
 I don't know how to get the -j flag into prove though.

 # ENV_TEST_PROG_ARGS=-j prove -v t/stm/runtime.t

Not sure it's getting the -j in there on OSX leopard (not able to get to
the box where them mem issue is) - on  ver 28985
$ ENV_TEST_PROG_ARGS=-j prove -v t/stm/runtime.t
t/stm/runtime..
1..5
ok 1 - choice (one thread)
ok 2 # SKIP Intermittently failing everywhere
ok 3 # SKIP Intermittently failing everywhere
ok 4 - queue adapted for the library
ok 5 - queue (non-blocking; nested)
ok
All tests successful.
Files=1, Tests=5,  1 wallclock secs ( 0.01 usr  0.00 sys +  0.66 cusr  0.13
csys =  0.80 CPU)
Result: PASS

while make smokej output has:

- t/stm/runtime.t
#   Failed test 'queue adapted for the library'
#   at t/stm/runtime.t line 506.
#  got: 'Unhandled exception in thread with tid 2
(message=ResizableIntegerArray: Can't pop from an empty array!, number=24)
# interpreter 0x14e150 had pending transaction on exit
# Unhandled exception in thread with tid 1 (message=ResizableIntegerArray:
Can't pop from an empty array!, number=24)
# interpreter 0x1380b0 had pending transaction on exit
# '
# expected: 'ok
# '
# Looks like you failed 1 test of 5.
- t/compilers/json/from_parrot.t
- t/compilers/json/to_parrot.t
- t/examples/japh.t

#   Failed test 'examples/japh/japh5.pasm'
#   at t/examples/japh.t line 54.
# Exited with error code: [SIGNAL 11]
# Received:
#
# Expected:
# Just another Parrot Hacker
#
# Looks like you failed 1 test of 5.
- t/examples/library.t
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

The name grep is from the common ed (pre-visual vi) command:
 g/re/p i.e. g(lobal-search)/r(egular) e(xpression)/p(rint)



   
 chromatic 
 [EMAIL PROTECTED] 
 g To 
   [EMAIL PROTECTED] 
 06/25/08 11:36 AM  cc 
   Andy Bach [EMAIL PROTECTED], 
   [EMAIL PROTECTED]   
   Subject 
   Re: [perl #56304] AutoReply: smokej 
   consumes all memory Revision: 28672 
   on linux
   
   
   
   
   
   




On Tuesday 24 June 2008 09:34:22 Andy Bach wrote:

 It does run w/ the non JIT (I believe) prove:
 prove -v t/stm/runtime.t
 t/stm/runtime..
 1..5
 ok 1 - choice (one thread)
 ok 2 # SKIP Intermittently failing everywhere
 ok 3 # SKIP Intermittently failing everywhere
 ok 4 - queue adapted for the library
 ok 5 - queue (non-blocking; nested)
 ok
 All tests successful.
 Files=1, Tests=5,  1 wallclock secs ( 0.01 usr  0.01 sys +  1.37 cusr
 0.11 csys =  1.50 CPU)
 Result: PASS

 I don't know how to get the -j flag into prove though.

 # ENV_TEST_PROG_ARGS=-j prove -v t/stm/runtime.t

(at least with bash)

-- c




Re: [perl #56266] rand gets invoke() not implemented in class 'Float' - Revision: 28671

2008-06-25 Thread Andy_Bach
Hi

Thanks for the replies:

: =item rand
:
:  our Num method rand ( Num $x: )
:  our Num term:rand
:
: Pseudo random number in range C 0 ..^ $x .  That is, C0 is
: theoretically possible, while C$x is not.  The Crand function
: is 0-ary and always produces a number from C0..^1.

Hmm, I'd've thought that meant that 'rand' takes no params and returns
0..^1 but rand( Num $x: ) returns 0 .. ^$x  but

:  In any case, for picking a random integer you probably want to use
something like
: C(1..6).pick instead.

There's some missing methods s not yet, I guess:

./perl6 -e 'say (1 .. 6).pick'
Method 'pick' not found for invocant of class 'Range'
current instr.: '_block11' pc 49 (EVAL_13:20)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir:481)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir:708)
called from Sub 'parrot;Perl6::Compiler;main' pc 12318 (perl6.pir:174)

No 'pick'  for Junction or any yet
 ./perl6 -e 'my $i = one(1 .. 6).any + 0; say $i'
Method 'any' not found for invocant of class 'Junction'

I tried a number whacks using prefix:
./perl6 -e 'my $i = any(1 .. 6) ; say $i'
./perl6 -e 'my $i = any(1 .. 6) + 0; say $i'
./perl6 -e 'my @arr = (1 .. 6); my $i = any(1..6); say @arr[$i]'

but no get_string or get_integer for Junction makes them a little hard to
use. Not complaining, just a note.

Thanks.

a

---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

The name grep is from the common ed (pre-visual vi) command:
 g/re/p i.e. g(lobal-search)/r(egular) e(xpression)/p(rint)



Re: All classes imply the existence of a role of the same name.

2008-05-02 Thread Andy_Bach
 What's the point of omnipotence if you can't swoop down from the rafters 
once 
in a while and save your hero from almost certain peril?

To quote *Larry from  Time Bandits - er, something to do with free 
will.

a
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

When angry, count to four; when very angry, swear.
Mark Twain



Re: rand in Rakudo

2008-05-01 Thread Andy_Bach
Following up on this, I found it odd that '~~' didn't work in the rps.pl 
script (or sleep() ;-)
 if $you ~~ $my { say 'Draw.' } # don`t work (

as in:
./perl6 languages/perl6/t/02-test-pm/3-output.t
Statement not terminated properly at line 26, near :P5/output
current instr.: 'parrot;PGE::Util;die' pc 120 
(runtime/parrot/library/PGE/Util.pir:82)
called from Sub 'parrot;Perl6::Grammar;statementlist' pc 16752 
(src/gen_grammar.pir:2398)
called from Sub 'parrot;Perl6::Grammar;statement_block' pc 13923 
(src/gen_grammar.pir:1384)
called from Sub 'parrot;Perl6::Grammar;TOP' pc 10765 
(src/gen_grammar.pir:204)
called from Sub 'parrot;PCT::HLLCompiler;parse' pc 564 
(src/PCT/HLLCompiler.pir:348)
called from Sub 'parrot;PCT::HLLCompiler;compile' pc 440 
(src/PCT/HLLCompiler.pir:291)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 755 
(src/PCT/HLLCompiler.pir:450)
called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 
(src/PCT/HLLCompiler.pir:587)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1246 
(src/PCT/HLLCompiler.pir:676)
called from Sub 'parrot;Perl6::Compiler;main' pc 9205 (perl6.pir:183)
*** glibc detected *** double free or corruption (!prev): 0x084f85b8 ***
*** glibc detected *** double free or corruption (out): 0x08599ee0 ***

which is what I was seeing w/ rps.pl   Line 26 of the test file is:
my $file = $?FILE;
$file ~~ s:P5/output.t/script.pl/;

So, should we be worrying about this not working or is it too early? Hmm, 
it fails this way too
languages/perl6  ../../parrot perl6.pbc t/02-test-pm/3-output.t
Statement not terminated properly at line 26, near :P5/output

  I'd guess it's a parsing issue on ~~  Hmm, make spectest
...
Files=82, Tests=670, 247 wallclock secs ( 0.50 usr  0.23 sys + 242.52 cusr 
 3.92 csys = 247.17 CPU)

So I guess it's not odd ;-

a
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

When angry, count to four; when very angry, swear.
Mark Twain



Re: [perl #53356] Misc. build warnings

2008-04-28 Thread Andy_Bach
On 26 April 2008 chromatic wrote:
 src/key.c:306: warning: switch missing default case

Fixed in 27195.


Just a query, wouldn't:
Index: src/key.c
===
--- src/key.c   (revision 27216)
+++ src/key.c   (working copy)
@@ -329,12 +329,14 @@
 }
 case KEY_start_slice_FLAG:
 case KEY_inf_slice_FLAG:
+{
+return VTABLE_get_integer(interp, key);
+}
 default:
-break;
+return VTABLE_get_integer(interp, key);
 }
 }

-return VTABLE_get_integer(interp, key);
 }


be a little better?  When I was trying to figure this out before (perl 
#52710 - which can be closed now), I was hung up on why there were KEY_* 
values being passed in that didn't have KEY_flags values. I was trying to 
match the usage of default in:
key_number(PARROT_INTERP, ARGIN(PMC *key))
{
switch (PObj_get_FLAGS(key)  KEY_type_FLAGS) {

   default:
real_exception(interp, NULL, INVALID_OPERATION, Key not a 
number!\n);
}


At least by leaving it a separate section, not combined w/ 
start_slice|inf_slice, if it turns out that there's a 'missing' flag or 
something. It'll be more obvious??? In any case, the final
  return VTABLE_get_integer(interp, key);

shouldn't be needed, right?

a
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

When angry, count to four; when very angry, swear.
Mark Twain



Re: [perl #53356] Misc. build warnings

2008-04-28 Thread Andy_Bach
chromatic wrote
 What if the PMC passed in isn't a Key PMC, but has an integer value?

Ah (sound of scales falling from my eyes) - the reason for the 
test/switch:
  if (VTABLE_isa(interp, key, CONST_STRING(interp, Key))) {
switch (PObj_get_FLAGS(key)  KEY_type_FLAGS) {
...

is to handle cases where the key needs special handling. But 
non-KEY_flag values (non-KEY pmcs?) passed to key_integer are *not* a 
problem.

never mind

a
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

When angry, count to four; when very angry, swear.
Mark Twain



Re: [perl #43305] [TODO] config/auto/perldoc.pm: Write unit tests

2008-04-15 Thread Andy_Bach
Sorry, I know this is closed but it seemed to be related to what I'm 
seeing.  Due to my (perhaps unorthodox) permission settings, I'm getting 
No Perldoc found due to:
config/auto/perldoc.pm

trying:
sub runstep {
 my ( $self, $conf ) = @_;

 my $cmd = $conf-data-get_p5('scriptdirexp') . q{/perldoc};
 my $tmpfile = q{c99da7c4.tmp};
 my $content = capture_output($cmd -ud $tmpfile perldoc) || undef;

What is attempted is:
/usr/bin/perldoc -ud c99da7c4.tmp perldoc

w/ the result:
Can't write-open c99da7c4.tmp: Permission denied at 
/usr/lib/perl5/5.8.3/Pod/Perldoc.pm line 1422

Appears perldoc runs an suid and so it can't write that file name in the 
current dir.  Making it
 my $tmpfile = q{/tmp/c99da7c4.tmp};
 my $content = capture_output($cmd -ud $tmpfile perldoc) || undef;

then makes it work. But isn't there a mktemp file that's a better route?

a

---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

When angry, count to four; when very angry, swear.
Mark Twain



Re: [perl #52894] AutoReply: config detection perldoc failing due to write permissions

2008-04-15 Thread Andy_Bach
Okay a patch using File::Temp

Index: config/auto/perldoc.pm
===
--- config/auto/perldoc.pm (revision 26971)
+++ config/auto/perldoc.pm (working copy)
@@ -20,6 +20,7 @@
 use strict;
 use warnings;

+use File::Temp;
 use base qw(Parrot::Configure::Step);

 use Parrot::Configure::Utils ':auto';
@@ -37,7 +38,9 @@
 my ( $self, $conf ) = @_;

 my $cmd = $conf-data-get_p5('scriptdirexp') . q{/perldoc};
-my $tmpfile = q{c99da7c4.tmp};
+my $tmpfile = File::Temp-new( UNLINK = 1, SUFFIX = '.tmp' );
+my $mode = 0666;
+chmod $mode, $tmpfile;
 my $content = capture_output($cmd -ud $tmpfile perldoc) || undef;

 return 1 unless defined( $self-_initial_content_check($conf, 
$content) );

a
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

When angry, count to four; when very angry, swear.
Mark Twain



key.c and missing default in key_integer switch

2008-04-10 Thread Andy_Bach
Hey,

I *thought* I'd try and clean up an easy one, so I took
src/key.c
src/key.c: In function `key_integer':
src/key.c:368: warning: switch missing default case

After a little poking I tracked the rest of the Key__FLAG s down to 
include/parrot/key.h (and pobj.h) [1] and so I rearrainged the case stmt 
to cover them all (noting the TODO on slices, I separated those), putting 
in the current default behavior for everything that wasn't already covered 
and then adding a default branch w/ an exception (taken from the next sub 
... ). This broke iterator.t tests and it appears to be due to a missing 
(?) flag value of '8' for switch test
switch (PObj_get_FLAGS(key)  KEY_type_FLAGS) {

So ... either there's a missing KEY__FLAG or something. One hint is in 
src/packdump.c [3] which would say the '8' is an 'is_string' flag?  I've 
not yet been able to track backwards (my debugging is painfully slow w/ 
printf's and re-makes) to see who's calling w/ the funny flag value but  I 
thought I'd ask here to see if anybody had an answer.

Thanks.

a

p.s. Thanks again to jkeen for being so helpful and patient w/ my 
rambling.  I *almost* asked this on #parrot last night, but I chickened 
out ;-


[1]
key.h
typedef enum {
   KEY_integer_FLAG= PObj_private0_FLAG,
   KEY_number_FLAG = PObj_private1_FLAG,
   KEY_hash_iterator_FLAGS = PObj_private0_FLAG | PObj_private1_FLAG,
   KEY_string_FLAG = PObj_private2_FLAG,
   KEY_pmc_FLAG= PObj_private3_FLAG,
   KEY_register_FLAG   = PObj_private4_FLAG,

   KEY_start_slice_FLAG= PObj_private5_FLAG,
   KEY_end_slice_FLAG  = PObj_private6_FLAG,
   KEY_inf_slice_FLAG  = PObj_private7_FLAG,
...
pobj.h

   #define POBJ_FLAG(n) ((UINTVAL)1  (n))
   /* PObj flags */
   typedef enum PObj_enum {
   /* This first 8 flags may be used privately by a Parrot Object.
* You should alias these within an individual class's header file.
*
* Note:  If the meanings of these flags are changed, then the 
symbolic
* names kept in flag_bit_names (see src/packdump.c) must also be 
updated.
*/
   PObj_private0_FLAG  = POBJ_FLAG(0),
   PObj_private1_FLAG  = POBJ_FLAG(1),
   PObj_private2_FLAG  = POBJ_FLAG(2),
   PObj_private3_FLAG  = POBJ_FLAG(3),
   PObj_private4_FLAG  = POBJ_FLAG(4),
   PObj_private5_FLAG  = POBJ_FLAG(5),
   PObj_private6_FLAG  = POBJ_FLAG(6),
   PObj_private7_FLAG  = POBJ_FLAG(7),

[2]
PARROT_API
PARROT_WARN_UNUSED_RESULT
INTVAL
key_integer(PARROT_INTERP, ARGIN(PMC *key))
{

   if (VTABLE_isa(interp, key, CONST_STRING(interp, Key))) {
   switch (PObj_get_FLAGS(key)  KEY_type_FLAGS) {
   case KEY_hash_iterator_FLAGS:
   case KEY_integer_FLAG:
   {
   return PMC_int_val(key);
   }
   case KEY_integer_FLAG | KEY_register_FLAG:
   {
  return REG_INT(interp, PMC_int_val(key));
   }
   case KEY_pmc_FLAG | KEY_register_FLAG:
   {
   PMC * const reg = REG_PMC(interp, PMC_int_val(key));
return VTABLE_get_integer(interp, reg);
   }
   case KEY_string_FLAG:
   {
 return string_to_int(interp, 
PMC_str_val(key));
   }
   case KEY_string_FLAG | KEY_register_FLAG:
   {
   STRING * const s_reg = REG_STR(interp, PMC_int_val(key));
return string_to_int(interp, s_reg);
   }
   /* TODO check for slice_FLAGs */
   case KEY_start_slice_FLAG:
   case KEY_end_slice_FLAG:
   case KEY_inf_slice_FLAG:
   {
   return VTABLE_get_integer(interp, key);
}

   case KEY_number_FLAG:
   {
  return VTABLE_get_integer(interp, key);
}

  default:

   real_exception(interp, NULL, INVALID_OPERATION, 
Key_integer %d %d %d not a valid flag!\n, VTABLE_get_int   eger(interp, 
key), PObj_get_FLAGS(key), PObj_get_FLAGS(key)   KEY_type_FLAGS);
  }// switch

   } // if  VTABLE_isa

   return VTABLE_get_integer(interp, key);
   }  //  sub key_integer


[3]
/* [this desperately needs better abstraction, so we're not duplicating 
the enum
* PObj_enum definition in the include/parrot/pobj.h file.  -- rgr, 
1-Mar-08.]
*/
   static const char *flag_bit_names[] =
   {
   private0,
   private1,
   private2,
   private3,
   private4,
   private5,
   private6,
   private7,
   is_string,
   is_PMC,
   is_PMC_EXT,

---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

The bureaucracy is 

Re: [perl #52710] key.c and missing default in key_integer switch

2008-04-10 Thread Andy_Bach
Yeah, it wasn't really a patch as it doesn't work.  It was more of a 
question 'does anybody know if it's a missing Key__FLAG or something 
else' that's bringing in the unexpected (I guess) switch case value.

The code was for illustrative purposes, just tracking what I've found so 
far.

Thanks for the diff though.


a

---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

The bureaucracy is expanding to meet the needs of an expanding
bureaucracy.



Re: [perl #52130] [BUG] postconfigure tests hanging on feather.

2008-03-26 Thread Andy_Bach
   I'll try to look into this.  What's puzzling is that we get tested on
  *many* Linux boxes but the overwhelming majority report no problem 
here.

 something to do with svk being on the box but never having been run by
that user?
 istr something like this before. iirc hitting enter will make the
problem go away, never to return, because svk is waiting for input.

Yeah, but svk is waiting for a 'y' or  'n', to set up the default cache 
dir. Seems to be as much an svk issue, as 
svk info

shouldn't have to create that user's svk environment by default. Or, at 
least, a switch to allow
svk --dont_init info

a
---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

It's true that I've driven through a number of red lights. But on the 
other
 hand, I've stopped at a lot of green ones I've never gotten credit for
Glen Gould



Re: Parrot r26458 Darwin 10.5 (x86) results

2008-03-18 Thread Andy_Bach
As of r26458  - configure has the readline issue:
Determining if your platform supports readline...dyld: lazy symbol binding
failed: Symbol not found: _rl_get_keymap
  Referenced from: /usr/share/cvs/parrot/./test
  Expected in: dynamic lookup

dyld: Symbol not found: _rl_get_keymap
  Referenced from: /usr/share/cvs/parrot/./test
  Expected in: dynamic lookup

As to Alberto issues:
# # prove -v t/src/io.t
Cannot determine source for t/src/io.t at /System/Library/Perl/5.8.8
/App/Prove.pm line 440

Seems to be gone but:
# prove -v t/examples/library.t
t/examples/library..
1..4
ok 1 - examples/library/getopt_demo.pir
ok 2 - examples/library/md5sum.pir
ok 3 # SKIP no pcre-config
not ok 4 - ncurses_life.pir # TODO ncurses_life.pir not testable yet
#   Failed (TODO) test 'ncurses_life.pir'
#   at t/examples/library.t line 77.
ok
All tests successful.

Guess I need pcre?

Otherwise 100.01% passed!

a

---
Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

It's true that I've driven through a number of red lights. But on the
other
 hand, I've stopped at a lot of green ones I've never gotten credit for
Glen Gould



Re: Let's use snprintf()

2008-02-06 Thread Andy_Bach
Perl (5.10) seems to handle this this way, util.c:
for apidoc my_snprintf

   The C library Csnprintf functionality, if available and
   standards-compliant (uses Cvsnprintf, actually).  However, if the
   Cvsnprintf is not available, will unfortunately use the unsafe
   Cvsprintf which can overrun the buffer (there is an overrun check,
   but that may be too late).  Consider using Csv_vcatpvf instead, or
   getting Cvsnprintf.

int
   Perl_my_snprintf(char *buffer, const Size_t len, const char *format, 
...)
   {
   dTHX;
   int retval;
   va_list ap;
   va_start(ap, format);
   #ifdef HAS_VSNPRINTF
   retval = vsnprintf(buffer, len, format, ap);
   #else
   retval = vsprintf(buffer, format, ap);
   #endif
   va_end(ap);

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

Windows defenstrated - sent from my MacBook Pro!!!


Re: Let's use snprintf()

2008-02-05 Thread Andy_Bach
Just a note: snprintf is problematic on older Solaris systems (x86 anyway),
for one.   At least through 2.7 (2.8?) it's no included in any lib. So
other apps needed to test and bring in their own version.

a


Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

Windows defenstrated - sent from my MacBook Pro!!!



Re: t/postconfigure/03-revision test 1 taking forever?

2008-02-02 Thread Andy_Bach

  svk is asking (unnecessarily, one might conclude)
  if you
  want to create the local Replica before it answers the question 'svk
  info'
  on a newly created test dir.

 But shouldn't the test be non-interactive? :)

 The test could check for the existence of $HOME/.svk or $SVKROOT before
 running any svk commands to avoid this problem.

I think that runs into the wish to not get into the internals of
svn/svk/git in doing these tests. Not sure I agree, but that was a comment
I saw somewhere.  It does seem svk could have a are you setup? query or
not start setup up on a bare 'info' ... but there seems something wrong w/
the Parrot::Revision doing 3 consecutive svn/git/svk trys at info and just
living w/ the dieing/missing exes as a brute-force sort of test.  I mean,
if we know enough to ask 'svn -xml info' [1], then using $HOME/.svk or
$SVKROOT (though I think svk looks in at least 3 places, which may just be
their point ;-) doesn't seem to be peaking too far under the covers.

Could Configure do a more thorough job of finding svn/git/svk and/or
finding out which (if any) was used to get the build? Suppose that only
helps Parrot::Revision in the building situation.

a

[1]
The reason I got into this mess was adding -xml to the svn info test
broke on my box w/ an old version of svn.  It made smoke reports fail w/ an
'invalid format' and it took a while to trace that back to a bad rev number
(zero) and that to svn -xml info failing into /dev/null but being treated
as saying yep, ver zero here!

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

Windows defenstrated - sent from my MacBook Pro (using Notes)!!!



Re: t/postconfigure/03-revision test 1 taking forever?

2008-02-02 Thread Andy_Bach
 ok 3 - Able to make Parrot dir
 ok 4 - Able to copy Parrot::Revision

 After a C^c

 ok 5 - Got numeric value for reversion number


Let me guess - you've got svk installed, but never used it.  Try 'n'
instead of Ctrl-C. svk is asking (unnecessarily, one might conclude) if you
want to create the local Replica before it answers the question 'svk info'
on a newly created test dir.

An note for 'ok 5' - not really. The test checks for there being a digit in
the resulting rev but not if it's the correct digit. I believe it's not,
the failed tests return a zero and the tests seem as though they should
expect some other number.

a


Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

Windows defenstrated - sent from my MacBook Pro!!!



Re: [perl #49794] Configure.pl syntax errors - revision 24880

2008-01-15 Thread Andy_Bach
Okay, fine w/ me. I'd not changed anything since ... since well 11/30/06 
when I ran into the updated svn issue.  Perhaps this is the first 
Configure change since then ...

Anyway, just wanted to get it in there in case it was something 
worthwhile.

Close the bug, please.

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

And the users exclaimed with a snarl and a taunt, 
It's just what we asked for, but not what we want! 


Re: [perl #47998] r23293: Make smoke invalid format failure

2007-12-03 Thread Andy_Bach
Hey,

I believe I've found it.  There was an update to lib/Parrot/Revision.pm 
(#23179) to add --xml to the snv info request used to get the current 
Parrot checkedout revision.  However, on svn v1.2 (1.2.1) that fails and 
you get a revision of zero which nobody likes.  So, while upgrading svn 
here fixes the issue, I notice a google brings up a couple other folks 
who've run into this issue too.

Thanks.

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

Remember, the first rule of optimisation is: don't do it yet. :-) Brian 
Raven



Re: [perl #47998] r23293: Make smoke invalid format failure

2007-12-03 Thread Andy_Bach
Yes, up upgrading svn does it.  I had noticed that the configure listing 
*wasn't* showing the revision number (D'oh!) and now it does 
Determining whether (exuberant) ctags is 
installed.yes.
Running CPU specific 
stuffdone.
Determining Parrot's 
revision...r23410.
Determining whether ICU is 
installedno.
Generating C 
headers..done.

and make smoke works.   Unless somebody wants to add a patch to check for 
svn versions, you can close this one as of my account.


Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

Remember, the first rule of optimisation is: don't do it yet. :-) Brian 
Raven



Re: [perl #47882] r22900 on Darwin/leopard 10.5.1 (intel) make failure Parrot_DynOp_core_cgp_0_5_0' undeclared

2007-11-28 Thread Andy_Bach
Appears to be fixed as of r23207 - made smoke w/ 99.99% ok (failed 1 of 4 
for stm/basic_mt.t (line 168))

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

Remember, the first rule of optimisation is: don't do it yet. :-) 



r22900 on Darwin/leopard 10.5.1 (intel) make failure Parrot_DynOp_core_cgp_0_5_0' undeclared

2007-11-27 Thread Andy_Bach
Hi.

Hope this is the right place - just checked out r22900, did a make 
realclean (which worked) and then config/make smoke. Died w/
src/interpreter.c
src/interpreter.c: In function 'get_op_lib_init':src/interpreter.c: In 
function 'get_op_lib_init':
src/interpreter.c:373: error: 'Parrot_DynOp_core_cgp_0_5_0' undeclared 
(first use in this function) 
src/interpreter.c:373: error: (Each undeclared identifier is reported only 
once
src/interpreter.c:373: error: for each function it appears in.)
src/interpreter.c:376: error: 'Parrot_DynOp_core_cg_0_5_0' undeclared 
(first use in this function) 

src/interpreter.c:373: error: 'Parrot_DynOp_core_cgp_0_5_0' undeclared 
(first use in this function)
src/interpreter.c:373: error: (Each undeclared identifier is reported only 
once
src/interpreter.c:373: error: for each function it appears in.) 
src/interpreter.c:376: error: 'Parrot_DynOp_core_cg_0_5_0' undeclared 
(first use in this function)
src/interpreter.c: In function 'dynop_register':
src/interpreter.c:1057: error: 'Parrot_DynOp_core_cgp_0_5_0' undeclared 
(first use in this function) 
src/interpreter.c:1059: error: 'Parrot_DynOp_core_cg_0_5_0' undeclared 
(first use in this function)
src/interpreter.c: In function 'dynop_register':
src/interpreter.c:1057: error: 'Parrot_DynOp_core_cgp_0_5_0' undeclared 
(first use in this function) 
src/interpreter.c:1059: error: 'Parrot_DynOp_core_cg_0_5_0' undeclared 
(first use in this function)
lipo: can't open input file: /var/tmp//ccgIwmU1.out (No such file or 
directory)

I've been able to build parrot for a while, though I did get my XCode 
stuff fully updated (fink related issues).  I can find the 
Parrot_DynOp_core define in the generator config.h.in as:
/* Oplib and dynamic ops related. */
#define PARROT_CORE_OPLIB_NAME core
#define PARROT_CORE_OPLIB_INIT [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@ 
#define PARROT_CORE_PREDEREF_OPLIB_INIT 
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@
#define PARROT_CORE_SWITCH_OPLIB_INIT 
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@
#define PARROT_CORE_CG_OPLIB_INIT 
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@
#define PARROT_CORE_CGP_OPLIB_INIT 
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@

and in config.h as:
#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_0_5_0

but further I dare not go ...

a


Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932


()  ASCII ribbon campaign  ()Hopeless ribbon campaign
/\against HTML mail/\  against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]



Re: [perl #47349] [BUG] 'make' failure on Darwin

2007-11-11 Thread Andy_Bach
--- trunk/include/parrot/atomic/gcc_pcc.h2007/06/12 
14:08:35 18945
+++ trunk/include/parrot/atomic/gcc_pcc.h2007/10/10 
06:31:20 22000
@@ -28,7 +28,7 @@
 {
 void *tmp;
 /* see http://www-128.ibm.com/developerworks/linux/library/pa-atom/ 
*/
-__asm__ __volatile__(   /*%0 = tmp, %1 = ptr, %2 = old, %3 = new 
*/
+__asm__ __volatile__(/*%0 = tmp, %1 = ptr, %2 = old, %3 = new */
 1:  lwarx %0, 0, %1\n /* tmp = *ptr, 
with reservation */
 cmpw %2, %0\n /* tmp == old ? */
 bne 2f\n  /* no, goto flush 
reservation, end */
@@ -50,7 +50,7 @@
 inline static long parrot_ppc_add(volatile long *val, long what)
 {
 long tmp;
-__asm__ __volatile__(   /*%0 = tmp, %1 = val, %2 = what */
+__asm__ __volatile__(/*%0 = tmp, %1 = val, %2 = what */
 1:  lwarx %0, 0, %1\n /* tmp = *val, 
with reservation */
 add %0, %0, %2\n  /* tmp += what */
 /* sync\n -- XXX needed on PPC 405, see

could it be Darwin doesn't like comments so close to the paren?

Just a guess.

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

In matters of style, swim with the current; 
in matters of principal, stand like a rock.
Thomas Jefferson


Re: [perl #45783] gcc warnings flag problem on linux - init-self, invalid_pch, old-style-definition, strict-alias

2007-09-27 Thread Andy_Bach
Paul wrote:
 This should be corrected as of revision 21619.  Could you confirm that
this works for you?

Yep, make smoke worked last night.  Thanks.

 Have you been using the parrotbug script?  If so, it is known that it
doesn't work properly.

Yeah, I tried that twice and then went to the email. Hmm, maybe it can be 
fixed? 

 BTW: the configuration output you sent was great!  It gave me a lot of
help in finding out where to fix the problem quickly and easily: thank
you :-)

My pleasure - glad it helped.

a


Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

Nothing in life is certain except death, taxes and the second law of 
thermodynamics. All three are processes 
in which useful or accessible forms of some quantity, such as energy or 
money, are transformed into useless,
 inaccessible forms of the same quantity. That is not to say that these 
three processes don't have fringe benefits: 
taxes pay for roads and schools; the second law of thermodynamics drives 
cars, computers and metabolism; 
and death, at the very least, opens up tenured faculty positions.
Seth Lloyd


Re: [perl #45783] gcc warnings flag problem on linux - init-self, invalid_pch, old-style-definition, strict-alias

2007-09-27 Thread Andy_Bach
Just a following followup - I looked ath changes in rev 21619 and noticed 
that the troublesome warning flags are still in the cage  settings for 
the default. Should they be moved to a v3.4 section also for the cage 
cleaners?

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

Nothing in life is certain except death, taxes and the second law of 
thermodynamics. All three are processes 
in which useful or accessible forms of some quantity, such as energy or 
money, are transformed into useless,
 inaccessible forms of the same quantity. That is not to say that these 
three processes don't have fringe benefits: 
taxes pay for roads and schools; the second law of thermodynamics drives 
cars, computers and metabolism; 
and death, at the very least, opens up tenured faculty positions.
Seth Lloyd


Re: Parrot 0.4.14 Now, with Seat Belts! Released

2007-07-17 Thread Andy_Bach
Hi Jerry,

I never know exactly how to handle this - making the latest release:

- t/configure/106-init_headers.t
- t/configure/base.t
- t/configure/config_steps.t
Use of bare  to mean  is deprecated at config/init/hints/linux.pm 
line 57.
Use of bare  to mean  is deprecated at config/init/hints/linux.pm 
line 69.
Use of bare  to mean  is deprecated at config/init/hints/linux.pm 
line 98.
Use of bare  to mean  is deprecated at config/init/hints/linux.pm 
line 103.
Number found where operator expected at config/init/hints/linux.pm line 
110, near mine
1
   (Missing semicolon on previous line?)


Appears there's some cruft in there:
ls -l config/init/hints/linux.pm*
-rw-r--r--  1 root root 3381 Jul 17 20:07 config/init/hints/linux.pm
-rw-r--r--  1 root root 3034 Jun  6 10:14 config/init/hints/linux.pm.mine
-rw-r--r--  1 root root 3029 Jun  6 10:14 
config/init/hints/linux.pm.r18722
-rw-r--r--  1 root root 2872 Jun  6 10:14 
config/init/hints/linux.pm.r18840
-rw-r--r--  1 root root 3375 Jul 13 09:43 config/init/hints/linux.pm~

and the current linux.pm has some '' of a diff in it.

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

Disclaimer: Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental.  Any resemblance between the above and my own views is
non-deterministic.  The question of the existence of views in the
absence of anyone to hold them is left as an exercise for the reader.
The question of the existence of the reader is left as an exercise for
the second god coefficient.  (A discussion of non-orthogonal,
non-integral polytheism is beyond the scope of this disclaimer.)


Re: Newb: path/LD_LIBRARY_PATH/other

2007-05-31 Thread Andy_Bach
Hi Andrew,

I just svn-ed the latest and I got the same error. I'm no parrot expert 
but it appears it's looking for the include file
  .include 'src/abc_gen.pir'

and there's no such file.  It appears the generated (?) abc_gen.pir file 
isn't there. Other langs have that (lua/src/lua.pir) so my guess is its 
generated. So, at the top level I ran:
/parrot # find . -name pgc.pir 

and saw:
./languages/abc/config/makefiles/root.in:   $(PARROT) 
$(PGE_DIR)/pgc.pir --output=src/abc_gen.pir src/abc.pg

so I ran:
parrot/ #./parrot compilers/pge/pgc.pir 
--output=languages/abc/src/abc_gen.pir languages/abc/src/abc.pg

and now I 've got the abc_gen.pir file. S looking in that 
makefiles/root.in file, there's also a line for PASTGrammar_gen.pir, 
another needed, generated file so:
parrot/ # ./parrot compilers/tge/tgc.pir 
--output=languages/abc/src/PASTGrammar_gen.pir 
languages/abc/src/PASTGrammar.tg

and then create the abc.pbc (a test?):
parrot/ #cd languages/abc
parrot/languages/abc # ../../parrot -o abc.pbc abc.pir 

and it works!
parrot/languages/abc # ../../parrot abc.pir
 1 + 2
3
 ^D

a

Note, I had to modify
config/init/hints/linux.pm

to comment out the -fvisibility=hidden cflag
   else {
 # hide non-exported symbols
#$cflags .= ' -fvisibility=hidden';

as my perl Makefile.pl got a test.cco
c1: error: unrecognized option `-fvisibility=hidden'

for a test.c of:
*
* testparrotfuncptr.c - figure out if the compiler will let us do
*   non-ansi function pointer casts.
*/

It fails at:
Determining whether lex is 
installed...skipped.
Determining whether yacc is 
installed..skipped.
Determining if your C compiler is actually gcc...
step auto::gcc died during execution: C compiler failed (see test.cco) at 
lib/Parrot/Configure/Step.pm line 505
Parrot::Configure::Step::cc_build() called at config/auto/gcc.pm 
line 37
 
auto::gcc::runstep('auto::gcc=HASH(0x838de04)','Parrot::Configure=HASH(0x823b470)')
 
called at lib/Parrot/Configure.pm line 266
eval {...} called at lib/Parrot/Configure.pm line 260
 
Parrot::Configure::_runstep('Parrot::Configure=HASH(0x823b470)','Parrot::Configure::Task=HASH(0x827c104)','undef','undef','undef',11)
 
called at lib/Parrot/Configure.pm line 192
Parrot::Configure::runsteps('Parrot::Configure=HASH(0x823b470)') 
called at Configure.pl line 350

 at Configure.pl line 350

and goes south from there.

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

The competent programmer is fully aware of the strictly limited size of
his own skull; therefore he approaches the programming task in full
humility, and among other things he avoids clever tricks like the
plague. -- Edsger Dijkstra


Re: Is Parrot 1.0 too late?

2007-04-25 Thread Andy_Bach
Parrot has @larry?

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

So it goes 
Kurt Vonnegut, Jr. (November 11, 1922 ? April 11, 2007) 


Re: $1,000 prize for Perl 6 Wiki written in Perl 6

2006-06-01 Thread Andy_Bach
How about something a little less  mercenary - a 1000$ donation to the 
Perl Foundation/Perl 6 development in the winner's name from Athena Labs? 
Might take out some of the difficulty and, who knows, get you a better 
wiki (you know, the less immediately reward driven programmer or something 
;-).  That way the money stuff stays out of the the foundation's hair, so 
to speak.

I imagine a donation of 1000$ could get you an autographed Camel or Aoudad 
or something ...

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

Strange women lying in ponds distributing swords is no basis for a system
 of government. Supreme executive power derives from a mandate from the
 masses, not from some farcical aquatic ceremony.
 -- Dennis - Monty Python and the Holy Grail


Hyperop question

2006-05-19 Thread Andy_Bach
$Larry has just updated the pod:
   doc/trunk/design/syn/S03.pod

=head1 Changes to existing operators
-If one argument is insufficiently dimensioned, Perl upgrades it:
+If either argument is insufficiently dimensioned, Perl upgrades it:
 
  (3,8,2,9,3,8) - 1;  # (2,7,1,8,2,7)
 
@@ -354,11 +354,26 @@
 [[1, 2], 3] »+« [4, [5, 6]]  #[[1,2] »+« 4, 3 »+« [5, 6]]
  # == [[5, 6], [8, 9]]

+More generally, hyper operators work recursively for any object
+matching the CEach role even if the object itself doesn't support
+the operator in question:
+
+Bag(3,8,[2,Seq(9,3]],8) - 1; # Bag(2,7,[1,Seq(8,2)],7)
+Bag(3,8,[2,Seq(9,3)],8) - (1,1,1,1); # Bag(2,7,[1,Seq(8,2)],7)
+Bag(3,8,[2,Seq(9,3)],8) - (1,1,2,1); # Bag(2,7,[2,Seq(9,3)],7)

That last one puzzles me - by this info:
-If one argument is insufficiently dimensioned, Perl upgrades it:
+If either argument is insufficiently dimensioned, Perl upgrades it:
 
  (3,8,2,9,3,8) - 1;  # (2,7,1,8,2,7)

shouldn't it be (not knowing what to do w/ Bag or Seq):
   Bag(3,8,[2,Seq(9,3)],8) - (1,1,2,1); # Bag(2,7,[0,Seq(8,3)],7)

or:
   Bag(3,8,[2,Seq(9,3)],8) - (1,1,2,1); # Bag(2,7,[0,Seq(7,2)],7)

(the '2' being 'upgraded to [2,2] or [2,2,2] or [2, Seq(2,2)])


+
+In particular, tree node types with CEach semantics enable visitation:
+
+$tree.».foo;# short for $tree.each: { 
.foo }
+
+You are not allowed to define your own hyper operators, because they
+are supposed to have consistent semantics derivable entirely from
+the modified scalar operator.  If you're looking for a mathematical
+vector product, this isn't where you'll find it.  A hyperoperator
+is one of the ways that you can promise to the optimizer that your
+code is parallelizable.  (The tree visitation above is allowed to
+have side effects, but it is erroneous for the meaning of those side
+effects to depend on the order of visitation.)

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

Truth is eternal, knowledge is changeable.
 It is disastrous to confuse them.
 -- Madeleine L'Engle


Re: Hyperop question

2006-05-19 Thread Andy_Bach
Never mind:
New Revision: 9303

Modified:
   doc/trunk/design/syn/S03.pod

Log:
Typo from aufrank++.
Feeble attempt to make .foo optional on nodes that only contain children.


Modified: doc/trunk/design/syn/S03.pod
==
--- doc/trunk/design/syn/S03.pod (original)
+++ doc/trunk/design/syn/S03.pod Fri May 19 11:45:34 2006
@@ -360,11 +360,11 @@
 
 Bag(3,8,[2,Seq(9,3]],8) - 1; # Bag(2,7,[1,Seq(8,2)],7)
 Bag(3,8,[2,Seq(9,3)],8) - (1,1,1,1); # Bag(2,7,[1,Seq(8,2)],7)
-Bag(3,8,[2,Seq(9,3)],8) - (1,1,2,1); # Bag(2,7,[2,Seq(9,3)],7)
+Bag(3,8,[2,Seq(9,3)],8) - (1,1,2,1); # Bag(2,7,[0,Seq(7,1)],7)
 
well, at least I guessed right ;-

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

Truth is eternal, knowledge is changeable.
 It is disastrous to confuse them.
 -- Madeleine L'Engle


Re: Nested captures

2005-05-11 Thread Andy_Bach
 That's a very interesting generalization. There are plenty of *other* 
cases 
where one wants an ordinal, or some other kind of $n-1 value. If Cth 
(and 
Cst, Cnd, Crd) was a subtract one operator, you could write:

 my $n = prompt How many elems? ;

 print @array[1st..($n)th];

instead of the out-by-one-prone:

 print @array[0..$n-1]


Not to be insolent here, but could it be that the Cth ops be 'smart' 
enough to recognize the various zero based (vs one based?) situations and 
behave accordingly?  Something like checking the (deprecated) $[ to see if 
they are supposed to be n or n -1?

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

Outside of a dog, a book is man's best friend. Inside of a dog, its too 
dark to read.
Groucho Marx


Question about Parrot and Omniscient Debugging

2005-05-10 Thread Andy_Bach
Hi,

Please excuse the possible 'out of left field' (as we say) aspect of this 
question but I recently heard about Omniscient Debugging (ODB):
http://www.lambdacs.com/debugger/debugger.html

There is an article in the latest Dr Dobbs (6/05) by the above fellow (Bil 
Lewis - former Sun scientist and author of the GNU Emacs Lisp manual)- 
he's got a java implementation of ODB.  Basically every change to every 
obj/var is tracked, so you can work back through the whole run in one try, 
w/o the 'set breakpoint/rerun' sort of iterativeness that goes on, 
normally.  His story is that the JVM is esp. suited to doing this, making 
the ODB quite easy, so I asked him about how to go about this for 
perl/p6/parrot:

I took a peek at Parrot... It didn't say the right things about how
a VM should work, which worries me.

In any case, all you have to do is to have your code make the appropriate
calls into my recording functions everytime the appropriate event occurs.
I do this in Java with byte code insertion. Looks like this will be much
harder in the Parrot VM, but still possible.

It could be easier to do in the compiler, if you're good with compilers.

[ I asked what were the 'right things' ]

The JVM, CLR, and ELisp are all stack machines and they work *really*
well. And being a stack machine makes a lot of stuff *really* easy to do.
As opposed to previous experience with VMs done as flat register machines.
Which have proven harder to work with.

Parrot tosses that out and fails to give a convincing argument why.
They talk about Perl being interpreted as important. It isn't. You
shouldn't even know what it's doing at that level.

I don't mean to quote him out of context or to start a stack vs register 
debate, I was just hoping to get some idea from him what is needed to get 
ODB to work, but didn't know if there was any hope for it in p6.  The 
lambdaCS site has the java jar/source and a nice enough demo of his 
implementation, there are a couple of commercial apps:
http://www.omnicore.com/registercodeguide.jsp
http://www.visicomp.com/

both of which seem to be java only.  It would seem to be a very useful 
addition to the world of perl debugging, if it could be shoehorned in w/o 
a horrible amount of work. However, I'm not the person to do the 
shoehorning.

Thanks.


Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

Outside of a dog, a book is man's best friend. Inside of a dog, its too 
dark to read.
Groucho Marx


Re: parrot on x86 solaris 2.5.1 (and 2.7)

2005-01-03 Thread Andy_Bach
Please let me know if I'm being too dense or too, er, flippant here, I've 
just gotten sucked, er, just joined the parrot world (dang O'Reilly books 
;-) and I'm not sure how formal this list is or how much detail you'll 
want off the bat. If these issues are too picayune at this point, I'll 
desist. I can give the full perl/OS details too but don't know if that's 
(pthreads oops aside) necessary yet.  Most of the msgs I've seen so far 
are a little higher level than this, though the archives do have some 
similar sort of nigglings so ... I can help w/ the Sol x86 test beds, as 
I've got 2.5.1 2.7 and 2.8 available.  Too much junk below but I've got 
the msg written. Sorry.

 I managed to finagle past the asctime_r errors by sticking:
   print OUT 'END';
 #define _POSIX_PTHREAD_SEMANTICS
 END
 in:
 parrot/config/gen/config_h/feature_h.in

 Does it harm, if we unconditionally include this define or should it be
 defined just for this solaris version?

I've since tried the compile on Sol x86 2.7 and that ifdef  was unneeded - 
thinking harder, the 2.5.1 box in question has pthreads installed (PTHREAD 
- D'oh!) which seems to say Configure is recognizing that but not setting 
this obscure ifdef? 

 if ( $libs !~ /-lrt\b/ ) {
 $libs .= ' -lrt';
}

 ... obviously have to follow the scheme used in perl/hints/solaris_2.sh,
 i.e.:
 add -lrt for solaris = 2.7 and remove it for lower versions.

I did have to comment that out for 2.7 also. 

My understanding is that  Sol 2.7 you don't get a snprintf.  That's where 
the next attempt failed on the 2.5.1 box along w/:
: blib/lib/libparrot.a
gcc -o parrot -L/usr/local/lib -L/usr2/local/lib   -g  imcc/main.o 
blib/lib/libparrot.a -lsocket -lnsl -ldl -lm -lposix4 -lpthread -lcrypt 
-lsec
Undefined   first referenced
 symbol in file
inet_pton   blib/lib/libparrot.a(io_unix.o)
ld: fatal: Symbol referencing errors. No output written to parrot

io_unix.c has:
STRING *
PIO_sockaddr_in(theINTERP, unsigned short port, STRING * addr)
{
struct sockaddr_in sa;
/* Hard coded to IPv4 for now */
int family = AF_INET;

char * s = string_to_cstring(interpreter, addr);
#ifdef PARROT_DEF_INET_ATON
if(inet_aton(s, sa.sin_addr) != 0) {
#else
if(inet_pton(family, s, sa.sin_addr) != 0) {
#endif

As it happens, 2.5.1 has neither inet_aton or inet_pton
comment in the above:
XXX: We can probably just write our own routines (Chtons(),
Cinet_aton(), etc.) and take this out of platform specific compilation


parrot/config/auto/snprintf/test.in

 The 2.7 doesn't have Sun's cc/CC (too expensive) and so 
(config/init/hints/solaris.pl):
my $link = Configure::Data-get('link');
# Going to assume Sun's compiler
# In which case we need to link with the C++ compiler (CC) rather than the
# C compiler (cc)
$link =~ s/\bcc\b/CC/;
Configure::Data-set('link', $link);
...
choked early on:
Determining what C compiler and linker to 
use.done.
Determining if your C compiler is actually gcc..Linker failed (see 
test.ldo)

test.ldo
Can't exec CC: No such file or directory at lib/Parrot/Configure/Step.pm 
line 279.

which seems to say its not doing whatever that link stuff is doing, its 
not working for the CC/g++ switch. Changing that subst:
# C compiler (cc)
#$link =~ s/\bcc\b/CC/;
# YAassumption - g++
$link =~ s/\bcc\b/g++/;
Configure::Data-set('link', $link);

whch gets us as far as:
: blib/lib/libparrot.a
g++ -o parrot -L/usr/local/lib   -g  imcc/main.o blib/lib/libparrot.a 
blib/lib/libicuuc.a blib/lib/libicudata.a -lsocket -lnsl -ldl -lm 
-lpthread -lsched
Undefined   first referenced
 symbol in file
sched_yield blib/lib/libparrot.a(thread.o)
ld: fatal: Symbol referencing errors. No output written to parrot

2.7 (Sol. native threads?) does have sched_yield (in sched.h) but I dunno 
how to best tell it which to use (posix or sun) or which is better.

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

Call out Gouranga be happy!!!
Gouranga Gouranga Gouranga 
That which brings the highest happiness!!