Compiler Toolkit

2009-11-24 Thread Ovid
Figured I'd brush up on the compiler toolkit described at 
http://www.parrotblog.org/2008/03/targeting-parrot-vm.html

It appears to be out of date..  For example, you cannot run 'make test'.  
Reading the README which is generated with 'perl tools/dev/mk_language_shell.pl 
SomeLang' doesn't help because it refers me to non-existent files.  Anyone know 
about about this area and can fix up a few things so people can dive back into 
writing compilers?

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly..com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6




Re: Compiler Toolkit

2009-11-24 Thread Ovid
- Original Message 

 From: François Perrad francois.per...@gadz.org

 the mantra is :
 $ parrot setup.pir
 $ parrot setup..pir test

After successfully building and installing Parrot on my Mac, the parrot 
setup.pir still fails badly.

parrot $ parrot --version
This is Parrot version 1.8.0-devel built for i386-darwin.
Copyright (C) 2001-2009, Parrot Foundation.

This code is distributed under the terms of the Artistic License 2.0.
For more details, see the full text of the license in the LICENSE file
included in the Parrot source tree.

parrot  $ perl tools/dev/mk_language_shell.pl checkit
creating checkit/
creating checkit/README
creating checkit/Configure.pir
creating checkit/setup.pir
creating checkit/PARROT_REVISION
no ops: skipping checkit/src/ops/Makefile.in
no pmc: skipping checkit/src/pmc/Makefile.in
creating checkit/Makefile.in
no doc: skipping checkit/doc/checkit.pod
no doc: skipping checkit/doc/running.pod
no dynext: skipping checkit/dynext/.ignore
creating checkit/checkit/
creating checkit/checkit/.ignore
creating checkit/checkit.pir
creating checkit/src/
creating checkit/src/checkit.pir
creating checkit/src/parser/
creating checkit/src/parser/grammar.pg
creating checkit/src/parser/grammar-oper.pg
creating checkit/src/parser/actions.pm
no pmc: skipping checkit/src/pmc/checkit.pmc
no ops: skipping checkit/src/ops/checkit.ops
creating checkit/src/builtins.pir
creating checkit/src/builtins/
creating checkit/src/builtins/say.pir
creating checkit/t/
creating checkit/t/00-sanity.t
parrot  $ cd checkit/
checkit  $ ls
Configure.pir   PARROT_REVISION checkit setup.pir   t
Makefile.in README  checkit.pir src
checkit  $ parrot setup.pir 
/usr/local/bin/parrot
/usr/local/lib/parrot/1.8.0-devel/library/PGE/Perl6Grammar.pbc
--output=src/gen_grammar.pir  src/parser/grammar.pg
src/parser/grammar-oper.pg
/usr/local/bin/parrot
/usr/local/lib/parrot/1.8.0-devel/languages/nqp/nqp.pbc --target=pir
--output=src/gen_actions.pir  src/parser/actions.pm
/usr/local/bin/parrot -o xyz/xyz..pbc src/xyz.pir
Error reading source file src/xyz.pir.
/usr/local/bin/parrot -o xyz.pbc xyz.pir
Error reading source file xyz.pir.
/usr/local/bin/pbc_to_exe xyz.pbc --install
Unable to open filehandle from path 'xyz.pbc'
current instr.: 'generate_code_gcc' pc 496 (tools/dev/pbc_to_exe.pir:298)
called from Sub 'main' pc -1 ((unknown file):-1)
strip installable_xyz
strip: can't open file: installable_xyz (No such file or directory)

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly..com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message 

 From: Ovid publiustemp-perl6interna...@yahoo.com

  This patch implements the .trim() method for strings.
 
 Now that I'm reading S29, I see there is no .trim() method there.  I got that 
 because it was referenced in pugs in the cookbook (not in tests, though) and 
 I 
 was trying to get the examples to run.  Bummer :(

Sorry for constant spamming, but now that I've put disparate pieces together, I 
see what's going on here.  I'll stop soon, but I am *sick* of rewriting the 
trim() function over and over :)

There are no tests because it's not in the spec.  If there's a spec, I know 
where to write the tests and will happily commit tests for them to Pugs and 
I'll submit a new patch against any-str.pir and t/spectest.data to get them to 
pass.
 

http://tinyurl.com/4xjnh, a mailing list thread where Larry wrote:

: (Replying to p6l instead of p6c as requested.) 
: 
: On Mon, Apr 04, 2005 at 10:39:16AM -0700, Larry Wall wrote: 
:  (Now that builtins are just functions out in * space, we can probably 
:  afford to throw a few more convenience functions out there for common 
:  operations like word splitting and whitespace trimming.  (Specific 
:  proposals to p6l please.)) 

So even though it's not in the spec, it seems like something Larry is not 
entirely opposed to (or wasn't back in 2005).  So here's my proposal (copied to 
p6l):

  =item trim

  our Str multi Str::trim ( Str $string )

  Removes leading and trailing whitespace from a string.

  =cut

I could optionally make the following work:

  $string.trim(:leading0);
  $string.trim(:trailing0);

Setting leading or trailing to false (they default to true) would result in 
either leading or trailing whitespace not being trimmed.  Setting both to false 
would be a no-op.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message 

 From: jesse je...@fsck.com
 
 On Mon, Jan 12, 2009 at 07:01:25AM -0800, Ovid wrote:
 I could optionally make the following work:

  $string.trim(:leading0);
  $string.trim(:trailing0);
  
  Alternatively, those could be ltrim() and rtrim().  
 
 'left' and 'right' are probably not the right names for functions which
 trim leading and/or trailing space, since their meanings get somewhat
 ambiguous if a language renders right-to-left instead of left-to-right
 or vice-versa

Um, er.  Damn.  Now I'm wondering how my leading and trailing trimming 
works with Hebrew.  How are the strings implemented internally?

And then there are languages such as Manchu and Uygher which can be written 
vertically.  http://www.omniglot.com/writing/direction.htm

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message 

 From: Larry Wall la...@wall.org

 On Mon, Jan 12, 2009 at 05:04:50AM -0800, Ovid wrote:
 : ...the trivial $string.trim and trim($string) case.
 
 Hmm, I'd think .trim should work like .chomp, and return the trimmed
 string without changing the original.  You'd use $str.=trim to do it
 in place.

In the pir, doesn't the s = self line copy self, thus ensuring that I'm 
changing s and not self?  Or do I need s = clone self (or however it's 
written).

 Can't say I really like the negated options though.  They smell funny.

Agreed, but ltrim and rtrim will disappoint Israelis and dyslexics alike.  
Suggestions welcome as I can't think of anything better.

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message 


   =item trim
 
   our Str multi Str::trim ( Str $string )
 
   Removes leading and trailing whitespace from a string.
 
   =cut
 
  I could optionally make the following work:
 
   $string.trim(:leading0);
   $string.trim(:trailing0);
 
  Setting leading or trailing to false (they default to true) would result in 
 either leading or trailing whitespace not being trimmed.  Setting both to 
 false 
 would be a no-op.
 
 Unless someone protests loudly, I can add this to S29, and I (or
 someone else with tuits) can implement it in Rakudo.

I've already submitted a patch for Rakudo which implements this for the trivial 
$string.trim and trim($string) case.  The optional :leading and :trailing 
parameters aren't there.

I'm happy to finish the work according to whatever spec is agreed upon. I want 
this badly enough that it's important to me :)

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message 


   I could optionally make the following work:
  
$string.trim(:leading0);
$string.trim(:trailing0);

Alternatively, those could be ltrim() and rtrim().  If you need to dynamically 
determine what you're going to trim, you'd couldn't just set variables to do 
it, though. You'd have to figure out which methods to call.  Or all could be 
allowed and $string.trim(:leading0) could all $string.rtrim internally.

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


[PATCH] Revised .trim patch

2009-01-12 Thread Ovid
Seems Larry's agreed to the .trim method.  There are bits that are not agreed 
upon, so this patch only implements what we've agreed upon.  It relies on the 
new S29-str/trim.t test in pugs.  I committed that earlier and updated 
t/spectest.data.

 
In other words, the patch is a tad clearer and now has tests.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


trim.patch
Description: Binary data


Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message 


  Agreed, but ltrim and rtrim will disappoint Israelis and dyslexics alike.
   Suggestions welcome as I can't think of anything better.
 
  The .Net framework calls 'em TrimStart and TrimEnd (and has a Trim that does
  both). So maybe trim_start and trim_end if we wanted to take that lead...
 
 How about .trim(:start) and .trim(:end)?

So if:

1.  No params, trim all
2.  :start or :end, only trim that bit (not a negated option :)
3.  If both, goto 1

 
Sound good?

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message 

 From: Geoffrey Broadwell ge...@broadwell.org

 When I saw your proposed syntax above, instead of reading don't trim
 leading/trailing whitespace, I read change the definition of
 'whitespace' to 'codepoint 0' for leading/trailing.
 
 That of course raises the question of how one *would* properly override
 trim's concept of whitespace 

Change your locale to one with a different concept of whitespace (are there 
any?)


Otherwise, would this be trying to stuff too much into one function?

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


[PATCH] Add .trim method

2009-01-11 Thread Ovid
This is an update to my last patch (which you may not see because I sent it 
from the wrong email address).  Here are my updated notes:

This patch implements the .trim() method for strings.

Problem:   I don't like the magic number '32

  not_whitespace = is_cclass 32, s, start

But I couldn't figure this out:

  $I0 = is_cclass .CCLASS_WHITESPACE, target, pos

I
was getting an 'unknown parrot op' or something like that (too tired to
recompile and find out the exact error message).  I can't figure out
how to get parrot to recognize that.

Many thanks to moritz++ for handholding on IRC.

Oh, there are no tests because I couldn't find any pugs tests for this :( 
What's the appropriate procedure for this?  However, all tests pass and a small 
test program passed (including calling trim() as a function).

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


trim.patch
Description: Binary data


[PATCH]: implement .trim method

2009-01-11 Thread Ovid
This patch implements the .trim() method for strings.

Two problems:

1.  I don't like the double-negative, but I was unsure how to get rid of it.

  unless not_whitespace goto done

2.  I don't like the magic number '32

  not_whitespace = is_cclass 32, s, start

 
$I0 = is_cclass .CCLASS_WHITESPACE, target, pos

I was getting an 'unknown parrot op' or something like that (too tired to 
recompile and find out the exact error message).  I can't figure out how to get 
parrot to recognize that.

Many thanks to moritz++ for handholding on IRC.

Oh, there are no tests because I couldn't find any pugs tests for this :( 
What's the appropriate procedure for this?

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


trim.patch
Description: Binary data


Re: [PATCH] Add .trim method

2009-01-11 Thread Ovid
- Original Message 


 This patch implements the .trim() method for strings.

Now that I'm reading S29, I see there is no .trim() method there.  I got that 
because it was referenced in pugs in the cookbook (not in tests, though) and I 
was trying to get the examples to run.  Bummer :(


Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Re: [perl #61052] [BUG]: r33482 Can't run 'make realclean' in languages/perl6 directory

2008-12-05 Thread Ovid
- Original Message 

 From: Moritz Lenz [EMAIL PROTECTED]

 (Just out of curiosity, do you need 'make realclean' in
 languages/perl6/? Most of the time a simple 'make' works for me, or a
 'make clean'. I never needed realclean in Rakudo, only in parrot so far).

No, I don't need to do that. It comes from my 'rebuild' script and that's just 
finger memory on my part.

 
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Parrot doesn't build on OS X

2008-11-01 Thread Ovid
For the past few days, Parrot has failed to build on my MacBook.  Today I moved 
my parrot directory and did a fresh svn checkout.  perl Configure.pl ran fine 
without problem. make does fine until about here:

$ make
Compiling with:
xx.c
/usr/bin/gcc-4.0 loads of output skipped...
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
make[1]: *** [PGE.pbc] Bus error
make[1]: *** Deleting file `PGE.pbc'
make: *** [compilers.dummy] Error 2
 
$ uname -a
Darwin curtis-poes-computer-2.local 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep  
3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Known Bug in Rakudo?

2008-10-30 Thread Ovid
This code:

  class Point {
  has $.x is rw;
  has $.y is rw;

  method get_string () {
  return $.x, $.y;
  }
  }

  my Point $point .= new( :x1.2, :y-3.7 );
  say $point.x;
  say $point;

Generates this output:

  1.2
  get_string() not implemented in class 'Point'
  current instr.: 'print' pc 14726 (src/gen_builtins.pir:9076)
  called from Sub 'say' pc 14748 (src/gen_builtins.pir:9086)
  called from Sub '_block11' pc 152 (EVAL_12:53)
  called from Sub 'parrot;PCT;HLLCompiler;eval' pc 864 
(src/PCT/HLLCompiler.pir:498)
  called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1138 
(src/PCT/HLLCompiler.pir:627)
  called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1317 
(src/PCT/HLLCompiler.pir:716)
  called from Sub 'parrot;Perl6;Compiler;main' pc 17077 (perl6.pir:179)
  *** glibc detected *** double free or corruption (!prev): 0x084eaaf0 ***

This is Parrot 0.8.0.

  $ uname -a
  Linux critix 2.6.8-2-686-smp #1 SMP Tue Aug 16 12:08:30 UTC 2005 i686 
GNU/Linux

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: Parrot on mobile platforms?

2008-10-23 Thread Ovid
--- On Thu, 23/10/08, Gabor Szabo [EMAIL PROTECTED] wrote:

 Don't you think it would be important to start working
 in this direction?
 Maybe to try to get someone work on this or to get
 sponsorship
 in that direction?

I can't speak for Android, but I know one of the constraints on the iPhone is 
memory.  This, as I recall, is part of the reason why they don't have garbage 
collection available and force people to manage memory directly (this, I might 
add, is a pain).  Since I generally don't worry about memory, I've no idea if 
Parrot is a memory hog.

That being said, I can't imagine Apple would be terribly keen to endorse 
anything which requires jail breaking the phone.  Don't we have contacts in 
Apple?  Getting official approval for trying this out might be a nice thing.  
In fact, I already know an iPhone developer who would be a great fit for a 
challenge like this (if he's interested).

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6




Re: [perl #60016] [PATCH] Make basic Perl 6 tests pass

2008-10-21 Thread Ovid
--- On Tue, 21/10/08, James Keenan via RT [EMAIL PROTECTED] 

 \ This basic test suite will fail.  That's
 because of this test program:
  
t/00-parrot/06-op-inplace.t
  
 
 I've reported this a couple of times in
 http://rt.perl.org/rt3/Ticket/Display.html?id=59634 -- but
 no one paid
 attention.
 
 Since you're proposing a patch, I'll merge 59634
 into this one.

Thanks.  Hopefully this time there will be some traction because there does 
appear to be a bug in Perl 6, as evidenced by this one-liner:

  perl6 $ ../../parrot perl6.pbc -e 'my $x = 3; $x **= 2; say $x'
  3

Unless, of course, this isn't supposed to be implemented yet, but that seems 
strange since it's in the basic tests.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6



Fw: Running Perl 6 Tests

2008-10-20 Thread Ovid
It would help if I sent this to the correct mailing list.  Oops.

Cheers,
Ovid

--- On Mon, 20/10/08, Ovid [EMAIL PROTECTED] wrote:

 I've been doing some work integrating Perl 6 into vim
 and now I'm trying to figure out how to run individual
 Perl 6 tests.  It appears that the incantation is along the
 lines of:
 
   perl t/harness --verbosity 1 t/01-sanity/02-counter.t
 
 However, in digging further, I found this:
 
   perl t/harness --verbosity 1 t/02-test-pm/1-basic.t
 
 That starts off with Statement not terminated
 properly at line 87, near (\Hello
 Wo and goes downhill from there.
 
 In fact, in reading through the Makefile, I don't see
 that this gets run unless you do 'make testtest'
 (added by particle back in Dec 2007).  This doesn't
 appear to be documented.  Is it supposed to be run?  Should
 those Perl 6 tests be valid?
 
 Also, the way that t/00-parrot/06-op-inplace.t is written
 forces the test numbers to be out of sequence.  This causes
 make test to fail, even though it's merely a
 parse error.  The Test.pm module appears to work (I've
 only checked it superficially), so why not use that to make
 some of these tests a bit easier to write?  Are we trying to
 avoid loading modules while testing core features?
 
 Cheers,
 Ovid
 --
 Buy the book -
 http://www.oreilly.com/catalog/perlhks/
 Tech blog- http://use.perl.org/~Ovid/journal/
 Twitter  - http://twitter.com/OvidPerl
 Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: Fw: Running Perl 6 Tests

2008-10-20 Thread Ovid
--- On Mon, 20/10/08, jerry gay [EMAIL PROTECTED] wrote:

 yes, 00-parrot tests are prerequisites to running Test.pm.
 they can't use the module to perform their tests.
 it does indeed look like the test numbers are out of order.
 ...time passes...
 it seems infix:**= is broken. the fix isn't
 obvious to me.
 perplexing... doubly so as t/spec/S03-operators/assign.t
 passes these.

Well, darn.  I just submitted a patch that uses Test.pm.  Not only does that 
make my patch wrong, but I didn't understand the semantics of all of the 
strange assignments (+^=?), so I assumed their values were correct.  Bummer.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: [perl #60016] AutoReply: [PATCH] Make basic Perl 6 tests pass

2008-10-20 Thread Ovid
OK, I've updated the patch.  I've made the following assumptions:

1.  I cannot load modules.
2.  I cannot use subroutines.
3.  I cannot use inline ops for the test counter (since that's what
is being tested)

The problem is that I've made the tests pass by assuming that the value of $a 
at each point is the correct value.  I'm assuming from what Jerry has pointed 
out that these number should be sequential.  It's a trivial fix to remedy this 
in the tests, but I didn't want to try and second-guess what was going on.

I think this patch (or something similar) is important as those who want to 
play with Rakudo will see a test failure if they run 'make test' as the README 
instructs.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

perl6tests.patch
Description: Binary data


Re: [perl #60016] AutoReply: [PATCH] Make basic Perl 6 tests pass

2008-10-20 Thread Ovid
Sorry for the patch spam.  I'm embarrassed that I didn't have this correct the 
first time (hey, YOU stay home and write tests for a strange platform while 
sick)

The test will now fail, but they'll fail for the correct reason:  **= is being 
misparsed, as pointed out earlier.

You might not notice the tests failing, but that's because make test seems to 
run the harness 3 times and the failing test is in the first run.  If you don't 
notice this, you won't notice these tests failing.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

perl6tests.patch
Description: Binary data


Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
--- James Keenan via RT [EMAIL PROTECTED] wrote:

 On Mon Jun 23 19:20:57 2008, [EMAIL PROTECTED] wrote:
  Failed to 'make perl6' at r 27371:  May 07.
 
 I tried again, and 'make perl6' succeeded at r27371.
 
 The plot thickens!

w00t!  I'll try this when I get home tonight.  This is great news.

Cheers,
Ovid

--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
--- Ovid [EMAIL PROTECTED] wrote:

  I tried again, and 'make perl6' succeeded at r27371.
  
  The plot thickens!
 
 w00t!  I'll try this when I get home tonight.  This is great news.

Nope.  'make test' and 'make perl6' both return the following:

  ../../parrot  -o perl6.pbc perl6.pir
  src/interpreter.c:1030: failed assertion
  'interp-op_count == core-op_count'
  make: *** [perl6.pbc] Abort trap

Exact same thing as before.  I was so frustrated that I moved my parrot
directory and grabbed a fresh check out and tried again.  Still fails.

I'm going nuts over this :(

Cheers,
Ovid

--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
Forget everything I wrote.  I missed a couple of files in my cleaning. 
I got rid of them, did a 'make clean  make perl6' and now everything
is just dandy.

Thanks for the help.

Cheers,
Ovid

--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
--- chromatic [EMAIL PROTECTED] wrote:

  Nope.  'make test' and 'make perl6' both return the following:
 
../../parrot  -o perl6.pbc perl6.pir
src/interpreter.c:1030: failed assertion
'interp-op_count == core-op_count'
make: *** [perl6.pbc] Abort trap
snip
 Guess: you have a libparrot.so (or .dylib, or whatever Mac OS X
 thinks looks 
 good with a black turtleneck) somewhere getting loaded before 
 blib/lib/libparrot.so.
snip
 I really did think I fixed that bug though... but if you can trace
 the dynamic 
 library loading of your process, you can confirm or deny this.

Bingo!  Don't know how to trace that, but a quick locate confirmed an
earlier install.  I manually deleted the offending files.  Now it
compiles, but it still doesn't appear to work :)  As far as I can tell,
I'm following the instructions from the README correctly.

  perl6 $ cat hello.pl 
  say Hello, world!;
  perl6 $ ./perl6 hello.pl 
  Null PMC access in get_string()
  current instr.: 'parrot;P6metaclass;add_parent' pc 119
(runtime/parrot/library/P6object.pir:137)
  called from Sub 'parrot;P6metaclass;add_parent' pc 241
(runtime/parrot/library/P6object.pir:215)
  called from Sub 'parrot;P6metaclass;register' pc 411
(runtime/parrot/library/P6object.pir:295)
  called from Sub 'parrot;Str;onload' pc 859 (src/gen_builtins.pir:584)
  called from Sub 'parrot;Perl6::Compiler;main' pc -1 ((unknown
file):-1)

I get the same error even if I do ../../parrot perl6.pbc hello.pl.

Cheers,
Ovid

--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Bugs or Unimplemented Features?

2008-06-24 Thread Ovid
I'm trying to figure out the best way of knowing which features are
implemented.  Looking through the tests in languages/perl6/t/ is a bit
disappointing as some things I know have been implemented aren't there
(e.g., types on sub signatures).  Should I be looking elsewhere?

So for right now, I'm looking at this:

  sub foo(Int $x) { 
say $x 
  }
  foo(4);

That works just fine, so I know we have types on signatures.  But now
this fails:

  # remove the 'Int' and this works
  sub fact (Int $n) {
if 0 == $n {
  return 1;
}
else {
  return $n * fact($n - 1);
}
  }

  say fact(5);

The failure is at runtime, not compile time (full output below), but
I'm not sure how to proceed since I don't know if this is supposed to
work yet.  Do I consult tests?  Follow the Rakudo blog?  Religiously
read this list?  (the latter's not much of an option because I love to
take breaks from email from time to time).

Cheers,
Ovid  

Null PMC access in type()
current instr.: 'fact' pc 334 (EVAL_15:127)
called from Sub '_block11' pc 34 (EVAL_15:17)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir:481)
called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1088
(src/PCT/HLLCompiler.pir:610)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1267
(src/PCT/HLLCompiler.pir:699)
called from Sub 'parrot;Perl6::Compiler;main' pc 12318 (perl6.pir:174)
perl6(27829) malloc: ***  Deallocation of a pointer not malloced:
0x31c1750; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug
perl6(27829) malloc: ***  Deallocation of a pointer not malloced:
0x6bb04b; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug

--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6


Re: [perl #56020] [OK]: Report on Parrot Build Fest at YAPC

2008-06-19 Thread Ovid
--- Packy Anderson [EMAIL PROTECTED] wrote:

 On Jun 18, 2008, at 11:51 AM, Parrot via RT wrote:
  Successful parrot build on ancient Debian/i386 system, most of the
  way through make test (it's taking _forever_, mostly because this
  is a PII 266 system)
 
  $ uname -a
  Linux daffy 2.2.19pre17 #1 Tue Mar 13 22:37:59 EST 2001 i686
 unknown
 
 ... and make test finished:
 
 All tests successful (1 subtest UNEXPECTEDLY SUCCEEDED), 30 tests and
  
 595 subtests skipped.
 Files=585, Tests=11192, 2674 wallclock secs (2176.58 cusr + 203.55  
 csys = 2380.13 CPU)

This looks like you're using an older version of Test::Harness.  If you
upgrade, it will break things down further, including telling you which
test in which test program unexpectedly succeeded.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


Re: [perl #56108] AutoReply: [BUG] make fails in languages/perl6

2008-06-19 Thread Ovid
 http://rt.perl.org/rt3/Ticket/Display.html?id=56108 

D'oh!  I would help if I provided the parrot version:

$ svn info
Path: .
URL: https://svn.perl.org/parrot/trunk
Repository Root: https://svn.perl.org/parrot
Repository UUID: d31e2699-5ff4-0310-a27c-f18f2fbe73fe
Revision: 28555
Node Kind: directory
Schedule: normal
Last Changed Author: jonathan
Last Changed Rev: 28555
Last Changed Date: 2008-06-19 19:43:36 +0100 (Thu, 19 Jun 2008)

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


Re: [perl #56108] AutoReply: [BUG] make fails in languages/perl6

2008-06-19 Thread Ovid
--- Jonathan Worthington [EMAIL PROTECTED] wrote:

 Hi,
 
 Ovid wrote:
  http://rt.perl.org/rt3/Ticket/Display.html?id=56108 
  
 This is related to Rakudo starting to use dynops (dynamic op
 libraries) 
 today. I managed to mess up the makefile by forgetting to stick in
 the 
 cleaning stuff, meaning that it could sometimes also fail with a
 realclean.
 
 So:
 * svn up to the latest version
 * make realclean
 * Remove everything in langauges/perl6/src/ops apart from perl6.ops
 * Build as usual
 
 That should do it - if not, please just reply and say so.

Nope. Same error :(

../../parrot  -o perl6.pbc perl6.pir
src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
make: *** [perl6.pbc] Abort trap

At revision 28566

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


Re: [perl #56108] AutoReply: [BUG] make fails in languages/perl6

2008-06-19 Thread Ovid
--- Jonathan Worthington [EMAIL PROTECTED] wrote:

 OK, that's in the dynops loading code. I'm be interesting to see
 what:
 
 prove t/dynoplibs
 
 Gives you. (This is in Parrot root, not Rakudo.) And also, your
 platform 
 etc. (in fact, the contents of the myconfig file, generated by 
 Configure.pl, will likely cover it.) I'm currently suspecting this
 may 
 be a Parrot level issue with dynamic ops on your platform, rather
 than 
 something specific to Rakudo's usage of them (which is still an 
 important problem to solve, but it's good to know exactly where the 
 problem lies).

No problem.

$ prove -v t/dynoplibs/
t/dynoplibs/dan
1..6
not ok 1 - mul_i_ic_nc

#   Failed test 'mul_i_ic_nc'
#   at t/dynoplibs/dan.t line 26.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 25
# 
not ok 2 - mul_i_i_nc

#   Failed test 'mul_i_i_nc'
#   at t/dynoplibs/dan.t line 37.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 42
# 
not ok 3 - mul_i_ic_n

#   Failed test 'mul_i_ic_n'
#   at t/dynoplibs/dan.t line 49.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 42
# 
not ok 4 - mul_i_i_n

#   Failed test 'mul_i_i_n'
#   at t/dynoplibs/dan.t line 61.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 42
# 
not ok 5 - mul pir syntax

#   Failed test 'mul pir syntax'
#   at t/dynoplibs/dan.t line 74.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 42
# 
not ok 6 - mul pasm syntax

#   Failed test 'mul pasm syntax'
#   at t/dynoplibs/dan.t line 87.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 11
# 
# Looks like you failed 6 tests of 6.
 Dubious, test returned 6 (wstat 1536, 0x600)
 Failed 6/6 subtests 
t/dynoplibs/myops..
1..10
not ok 1 - fortytwo

#   Failed test 'fortytwo'
#   at t/dynoplibs/myops.t line 31.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 42
# 
not ok 2 - what_do_you_get_if_you_multiply_six_by_nine

#   Failed test 'what_do_you_get_if_you_multiply_six_by_nine'
#   at t/dynoplibs/myops.t line 42.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# fortytwo
# 
not ok 3 - hcf

#   Failed test 'hcf'
#   at t/dynoplibs/myops.t line 53.
#   'src/interpreter.c:1030: failed assertion
'interp-op_count == core-op_count'
# '
# doesn't match '/neither here
# (?!nor there)/
# '
# './parrot   /Users/ovid/code/parrot/t/dynoplibs/myops_3.pir' failed
with exit code [SIGNAL 6]
not ok 4 - a short cheating quine

#   Failed test 'a short cheating quine'
#   at t/dynoplibs/myops.t line 76.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# .loadlib myops_ops
# q
# 
not ok 5 - one alarm

#   Failed test 'one alarm'
#   at t/dynoplibs/myops.t line 84.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 1
# alarm
# 2
# 3
# done.
# 
not ok 6 - three alarm

#   Failed test 'three alarm'
#   at t/dynoplibs/myops.t line 122.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# /7/
# 
not ok 7 - repeating alarm

#   Failed test 'repeating alarm'
#   at t/dynoplibs/myops.t line 174.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# /alarm
# alarm
# alarm/
# 
not ok 8 - bxand - A AND B, but not BOTH

#   Failed test 'bxand - A AND B, but not BOTH'
#   at t/dynoplibs/myops.t line 200.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# F
# F
# F
# F
# 
not ok 9 - conv_u2_i

#   Failed test 'conv_u2_i'
#   at t/dynoplibs/myops.t line 228.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 32767
# 32768
# 65535
# 0
# 65535
# 
not ok 10 - conv_i2_i

#   Failed test 'conv_i2_i'
#   at t/dynoplibs/myops.t line 261.
# Exited with error code: [SIGNAL 6]
# Received:
# src/interpreter.c:1030: failed assertion 'interp-op_count ==
core-op_count'
# 
# Expected:
# 32767
# -32768
# -1
# 0
# -1
# 
# Looks like you failed 10

[PATCH] Perl::Critic Version Wrong

2008-06-18 Thread Ovid
This patch fixes a test suite failure in t/codingstd/perlcritic.t

The minimum required version for Perl::Critic was 1.03, but the
default_forbidden_words method was not introduced until 1.082.  I've
bumped up the version number in the test to ensure it skips properly.

Also, the Perl::Critic docs state that default_forbidden words is a
method, not a function.  It was called as a function, but I changed it
to a class method call to ensure that if it really is required to be a
method in the future, things don't break.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/

parrot_perl_critic_version.patch
Description: 253545805-parrot_perl_critic_version.patch


Tutorial Question: catch blocks

2008-03-27 Thread Ovid
Hi all,

Trying to work through the tutorial
(http://www.parrotblog.org/search/label/tutorial) and am trying to
finish Episode 4 with catch blocks.  The grammar in Episode 3 has this:

  try-statement ::= 'try' block 'catch' identifier
block
'end'

I've translated it to this:

  rule try_statement {
'try'   block
'catch' identifier $catch_block=block
'end'
{*}
 }

In searching through code, I've come up with this method for that:

  method try_statement($/) {
  my $try:= $( $block );
  my $identifier := $( $identifier );
  my $catch  := $( $catch_block );
  
  my $past := PAST::Op.new(
  :pasttype('try'),
  :node($/)
  );
  $past.push($try);
  
  # Create the catch 
  my $catchpir := .get_results (%r, $S0)\nstore_lex ' ~
$identifier.name() ~ ', %r;
  $catch.unshift( PAST::Op.new( :inline( $catchpir ) ) );
  
  $past.push($catch);
  make $past;
  }

However, when I try it with this: try x=4 catch e y=2 end, my pir
doesn't appear to have any logic to catch an exception (or I just know
pir very well).  Also, how do I know that the exception object is in
$S0?  My pir is below.  Is this actually correct and all will become
clear later?

Cheers,
Ovid

.namespace 
.sub _block10 
push_eh catch_11
get_global $P15, _block12
newclosure $P15, $P15
$P14 = $P15()
pop_eh 
goto catch_11_end
  catch_11:
get_global $P19, _block16
newclosure $P19, $P19
$P19()
  catch_11_end:
.return ($P14)
.end


.namespace 
.sub _block16  :outer(_block10)
.get_results ($P17, $S0)
store_lex 'e', $P17
new $P18, Integer
assign $P18, 2 
set_global y, $P18
.return ($P18)
.end


.namespace 
.sub _block12  :outer(_block10)
new $P13, Integer
assign $P13, 4 
set_global x, $P13
.return ($P13)
.end


--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


make pbc_to_c fails

2007-12-30 Thread Ovid
I'm having trouble with the initial Configure.pl and with the pbc_to_c
target on my Intel Macbook.  I have rough notes below about the steps
I've taken.  If anyone needs more information, just ask and I'd be
happy to send anything I can.

Following the instructions in chromatic's post at use.perl about
building a Perl 6 binary:

  http://use.perl.org/article.pl?sid=07/12/30/0912211

I got this error on the latest version from svn:

  parrot $ perl Configure.pl
  Base class package Parrot::Configure::Compiler is empty.
  (Perhaps you need to 'use' the module which defines that package
first.) 
  at lib/Parrot/Configure.pm line 44

chromatic recommended that I check out r24278, which I did with a clean
install (blew everything away and started over), and I tried again. 
Here's a summary:

  Checked out revision 24278.
  code $ cd parrot/
  parrot $ perl Configure.pl 
  Parrot Version 0.5.1 Configure 2.0
  Copyright (C) 2001-2007, The Perl Foundation.

  ... snip ...

  Checking MANIFEST...No such file: t/configure/104-init_miniparrot.t
  No such file: t/configure/106-init_headers.t
  No such file: t/configure/122-auto_ops.t
  No such file: t/configure/128-auto_va_ptr.t
  No such file: t/configure/144-auto_readline.t
  No such file: t/configure/148-auto_python.t
  No such file: t/configure/149-auto_m4.t
  No such file: t/configure/152-auto_revision.t
  No such file: t/configure/153-gen_icu.t
  No such file: t/configure/154-gen_config_h.t
  No such file: t/configure/155-gen_core_pmcs.t
  No such file: t/configure/156-gen_parrot_include.t
  No such file: t/configure/157-gen_languages.t
  No such file: t/configure/159-gen_platform.t

  Ack, some files were missing!  I can't continue running
  without everything here.  Please try to find the above
  files and then try running Configure again.

  step init::manifest failed: no result returned at Configure.pl line
349

  Setting up Configure's default
values.done.

  ... snip ...

  Recording configuration data for later
retrieval..done.
  During configuration the following steps failed:
  01:  init::manifest
  You should diagnose and fix these errors before calling 'make'
  parrot $

And later, the make pbc_to_c step fails with:

  compilation failed
  current instr.: '_throw' pc 438 (pbc_to_c.pir:250)
  called from Sub 'compile_file' pc 485 (pbc_to_c.pir:268)
  called from Sub 'main' pc 126 (pbc_to_c.pir:29)
  make: *** [pbc_to_c] Error 1

(More detailed error message below).

Cheers,
Ovid

parrot $ make pbc_to_c
perl tools/dev/pbc_to_c_gen.pl \
'./CFLAGS cc  -I./include -g -pipe -fno-common -no-cpp-precomp 
-I/usr/local/include -pipe -fno-common -Wno-long-double 
-DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_FORMAT 
-DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN 
-DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED 
-DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16
-mno-accumulate-outgoing-args -W -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts
-Wcomment -Wdeclaration-after-statement -Wdisabled-optimization -Wextra
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit
-Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self
-Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations
-Wmissing-field-initializers -Wmissing-include-dirs
-Wmissing-prototypes -Wnested-externs -Wno-endif-labels -Wno-shadow
-Wno-unused -Wnonnull -Wpacked -Wparentheses -Wpointer-arith
-Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing
-Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef
-Wunknown-pragmas -Wvariadic-macros -Wwrite-strings
-I/opt/local/include -g -Wno-shadow  -DHAVE_COMPUTED_GOTO   -I. -o  \
-o   blib/lib/libparrot.a  -lm -lreadline -L/usr/local/lib
-L/opt/local/lib  ' \
 pbc_to_c.pir
./parrot -o pbc_to_c.pbc pbc_to_c.pir
./parrot pbc_to_c.pir pbc_to_c.pbc
/usr/bin/ld: Undefined symbols:
_PackFile_fixup_subs
_PackFile_new
_PackFile_unpack
_Parrot_destroy
_Parrot_exit
_Parrot_loadbc
_Parrot_new
_Parrot_runcode
_do_sub_pragmas
collect2: ld returned 1 exit status
cc -I./include -g -pipe -fno-common -no-cpp-precomp
-I/usr/local/include -pipe -fno-common -Wno-long-double
-DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_FORMAT
-DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN
-DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED
-DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16
-mno-accumulate-outgoing-args -W -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts
-Wcomment -Wdeclaration-after-statement -Wdisabled-optimization -Wextra
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit
-Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self
-Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations
-Wmissing-field-initializers -Wmissing-include-dirs
-Wmissing-prototypes -Wnested-externs

Re: make pbc_to_c fails

2007-12-30 Thread Ovid
--- Ovid [EMAIL PROTECTED] wrote:
On a related note, I received this error message:

   Ack, some files were missing!  I can't continue running
   without everything here.  Please try to find the above
   files and then try running Configure again.

Configure.pl kept running yet the message implies that it can't.  Is
assume this is a bug?  If so, it seems that
Parrot::Configure::runsteps should include init::manifest in
%steps_to_die_for, regardless of options passed in.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


Re: make pbc_to_c fails

2007-12-30 Thread Ovid
--- James E Keenan [EMAIL PROTECTED] wrote:

Hi James,

 Although it is not required for running chromatic's process, you
 might wish to begin with:
 
 perl Configure.pl --test
 
 ... to see that the configuration and build tools all work properly 
 before you say 'make'.

Thanks for that tip.  I assume from other comments that you've made
that if there are Configure test failures, that trying to continue is
useless.

  svn co https://svn.perl.org/parrot/trunk parrot \
 cd parrot \
 perl Configure.pl --test

4/1089 tests failed.  Test below.  As usual, if there is anything else
I can do, please let me know.

Cheers,
Ovid

t/postconfigure/01-options...ok 
t/postconfigure/02-data_slurpok 
t/postconfigure/03-revision_no_DEVELOPINGok 
t/postconfigure/04-revision..ok   
t/postconfigure/05-trace.skipped: Tests
irrelevant unless configuration completed with tracing requested
t/postconfigure/06-data_slurp_temp...ok 
t/tools/pmc2cutils/00-qualify1/10 
# Failed test (t/tools/pmc2cutils/00-qualify.t at line 30)
# Looks like you failed 1 test of 10.
t/tools/pmc2cutils/00-qualify Dubious, test
returned 1 (wstat 256, 0x100)
 Failed 1/10 subtests 
t/tools/pmc2cutils/01-pmc2cutils.ok
t/tools/pmc2cutils/02-find_file..ok   
t/tools/pmc2cutils/03-dump_vtableok   
t/tools/pmc2cutils/04-dump_pmc...63/? 
# Failed test (t/tools/pmc2cutils/04-dump_pmc.t at line 297)
#   ''
# doesn't match '(?-xism:^cannot find file 'scalar\.dump' in path)'
t/tools/pmc2cutils/04-dump_pmc...92/? # Looks like you
failed 1 test of 106.
t/tools/pmc2cutils/04-dump_pmc... Dubious, test
returned 1 (wstat 256, 0x100)
 Failed 1/106 subtests 
t/tools/pmc2cutils/05-gen_c..ok
t/tools/pmc2cutils/06-print_tree.ok
t/tools/pmc2cutils/07-open_file..ok
t/tools/pmc2cutils/08-pmc-pm.ok   
t/tools/ops2cutils/01-newok
t/tools/ops2cutils/02-usage..ok
t/tools/ops2cutils/03-print_c_header_fileok
t/tools/ops2cutils/04-print_c_source_top.ok
t/tools/ops2cutils/05-print_c_source_bottom..ok
t/tools/ops2cutils/06-dynamicok
t/tools/ops2cutils/07-make_incdirok   
t/tools/ops2cutils/08-nolinesok
t/tools/ops2cutils/09-dynamic_nolinesok
t/tools/ops2pmutils/00-qualify...1/11 
# Failed test (t/tools/ops2pmutils/00-qualify.t at line 19)

# Failed test (t/tools/ops2pmutils/00-qualify.t at line 23)
# Looks like you failed 2 tests of 11.
t/tools/ops2pmutils/00-qualify... Dubious, test
returned 2 (wstat 512, 0x200)
 Failed 2/11 subtests 
t/tools/ops2pmutils/01-ops2pmutils...ok   
t/tools/ops2pmutils/02-usage.ok
t/tools/ops2pmutils/03-new...ok   
t/tools/ops2pmutils/04-prepare_ops...ok
t/tools/ops2pmutils/05-renum_op_map_file.ok
t/tools/ops2pmutils/06-load_op_map_files.ok
t/tools/ops2pmutils/07-no_ops_skip...ok
t/tools/ops2pmutils/08-sort_ops..ok
t/tools/ops2pmutils/09-prepare_real_ops..ok
t/tools/ops2pmutils/10-print_module..ok
t/tools/ops2pmutils/11-print_h...ok

Test Summary Report
---
t/tools/pmc2cutils/00-qualify.t  (Wstat: 256 Tests: 10
Failed: 1)
  Failed test number(s):  5
  Non-zero exit status: 1
t/tools/pmc2cutils/04-dump_pmc.t (Wstat: 256 Tests: 106
Failed: 1)
  Failed test number(s):  63
  Non-zero exit status: 1
t/tools/ops2pmutils/00-qualify.t (Wstat: 512 Tests: 11
Failed: 2)
  Failed test number(s):  8-9
  Non-zero exit status: 2
t/tools/ops2pmutils/08-sort_ops.t(Wstat: 0 Tests: 87
Failed: 0)
  TODO passed:   50
Files=36, Tests=1089, 24 wallclock secs ( 0.28 usr  0.29 sys + 18.09
cusr  2.18 csys = 20.84 CPU)
Result: FAIL
Failed 3/36 test programs. 4/1089 subtests failed.

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


Re: [perl #49228] [BUG] 'make pbc_to_c' fails on Darwin

2007-12-30 Thread Ovid
--- chromatic [EMAIL PROTECTED] wrote:

 The problem is -o -o in the two lines of the pbc_to_exe rule in the
 Makefile, 
 and I suspect that that's because you're linking against libparrot.a
 not 
 libparrot.so.  (Parrot::Embed failed for Tim Bunce for similar
 reasons.)
 
 I don't know the particular Makefile/compiler magic to get the right
 flags 
 passed to the program; someone who understands linking on Darwin
 better than 
 I will have to figure out what it needs.
 
 Getting rid of both -o flags should help though.

I manually edited the Makefile to get rid of both -o flags and I got
the same error.  I did a 'make realclean', rebuilt, and then manually
edited the Makefile to get rid of just one of those and it still failed
with the same error.  I don't know Makefiles very well, so I suppose my
cargo-culting around didn't help.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/