Re: Pre-OSCON hackathon

2007-07-18 Thread Michael G Schwern
Andy Lester wrote:
 There's a p5 reposithon going on at Schwern's before OSCON.  I'd like to
 hook up with Jonathan and whoever else is around pre-OSCON there, and
 have our own little Parrot hackathon on the corner.  I'm sure Schwern
 will be fine with that.

Sure, the corner... the street corner outside.  One hackathon is enough of a
squeeze at my place, I can't fit two.

May I suggest the Doubletree lobby?


Re: [perl #36677] Parrot cannot startup if STDERR or STDOUT is closed

2005-07-29 Thread Michael G Schwern
On Thu, Jul 28, 2005 at 12:31:33PM -0700, jerry gay via RT wrote:
 i've added a new test t/run/exit.t that checks parrot exit codes under
 different scenarios. the 8 subtests all pass on win32.

These tests pass, and yet:

$ perl -wle 'close STDOUT;  system parrot --version;  print STDERR $?  8'
Parrot IO: Failed init layer(unix).

66

It appears to be your redirect which is doing it.

$ perl -wle 'close STDOUT;  system parrot --version  /dev/null 21 ;  print 
STDERR $?  8'
0

It must be reopening STDERR and STDOUT.


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern
Ahh email, my old friend.  Do you know that revenge is a dish that is best 
served cold?  And it is very cold on the Internet!


Re: Test::Builder change BAILOUT - BAIL_OUT

2005-05-05 Thread Michael G Schwern
On Thu, May 05, 2005 at 12:24:34PM +0100, Adrian Howard wrote:
 Test::Simple/More/Builder 0.61 will introduce a change to Test::Builder
 whereby the BAILOUT() method becomes BAIL_OUT().  Additionally 
 Test::More
 finally features a BAIL_OUT() function.
 [snip]
 
 Just out of curiosity - any particular reason for the change?

Everything else in Test::Builder is this_style not thisstyle.


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
-- Phillip K. Dick


Re: Test::Builder change BAILOUT - BAIL_OUT

2005-05-03 Thread Michael G Schwern
On Tue, May 03, 2005 at 09:23:01PM -0700, chromatic wrote:
 Parrot bundles Test::Builder 0.11 (from Test-Simple 0.41).  Is it worth
 upgrading?

Couldn't hurt.  A whole mess of is_deeply() bugs have been fixed since
0.41.


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern
ROCKS FALL! EVERYONE DIES!
http://www.somethingpositive.net/sp05032002.shtml


Re: [perl #34978] lib/Parrot/Test.pm should not use in commands

2005-04-14 Thread Michael G Schwern
On Thu, Apr 14, 2005 at 03:52:23AM -0700, Jens Rieks wrote:
 lib/Parrot/Test.pm has several lines like
 $cmd = qq{(cd $path_to_parrot  $parrot $args $code_f)};
 As this command is executed with system(), it should not include .
 All tests on Win98/VC6 are failing with Command not found due to this.

This idiom shows up in several places. :(  Here's a quick scan.

./languages/m4/t/basic/003_getopt.t
./languages/m4/t/basic/012_eval.t
./languages/m4/t/freezing/001_freeze.t
./languages/m4/t/freezing/002_many_files.t
./languages/m4/t/harness(documentation)
./languages/parrot_compiler/lib/Parrot/Test/ParrotCompiler.pm
./languages/parrot_compiler/t/harness   (documentation)
./languages/python/t/harness(documentation)
./languages/tcl/README  (documentation)
./languages/testall (documentation)
./lib/Parrot/Test/m4.pm
./lib/Parrot/Test/Tcl.pm
./lib/Parrot/Test.pm

The cross-platform version of

system(cd $dir  command);

is

my($dir, @command) = @_;
my $orig_dir = cwd;
chdir $dir;
my $ret = system(@command);
chdir $orig_dir;

return $ret;

which I have added to Parrot::Test::_run_command() and made it publicly
available.  Lots of code was using it already anyway.

Also languages/m4/M4/Test.pm, languages/perl6/P6C/TestCompiler.pm,
languages/scheme/Scheme/Test.pm, lib/Parrot/Configure/Step.pm, have their
own probably duplicate _run_commands() which should probably be eliminated
but I'm not going to do in this patch.

I've also left the cd dir  foo idiom used in documentation alone,
though again this should probably be changed.

Finally I haven't fixed the m4 tests as they're just straight `` not going
through run_command() and require a bit more time to fix than I have at the
moment.

Index: lib/Parrot/Test/m4.pm
===
--- lib/Parrot/Test/m4.pm   (revision 7835)
+++ lib/Parrot/Test/m4.pm   (working copy)
@@ -2,10 +2,11 @@
 
 use strict;
 
-use Data::Dumper;
+package Parrot::Test::m4;
+
+require Parrot::Test;
 use File::Basename;
 
-package Parrot::Test::m4;
 
 =head1 NAME
 
@@ -48,16 +49,24 @@
   my $gnu_m4_out_f= Parrot::Test::per_test( '.gnu_out', $count );
 
   my $test_prog_args = $ENV{TEST_PROG_ARGS} || '';
-  my $parrot_m4  = (cd $self-{relpath}  $self-{parrot} 
languages/m4/m4.pbc ${test_prog_args} languages/${lang_f});
-  my $gnu_m4 = (cd $self-{relpath}  m4 ${test_prog_args} 
languages/${lang_f});
+  my $parrot_m4  = $self-{parrot} languages/m4/m4.pbc ${test_prog_args} 
languages/${lang_f};
+  my $gnu_m4 = m4 ${test_prog_args} languages/${lang_f};
 
   # This does nor create byte code, but m4 code
-  my $parrotdir   = File::Basename::dirname( $self-{parrot} );
+  my $parrotdir   = dirname( $self-{parrot} );
   Parrot::Test::generate_code( $code, $parrotdir, $count, $lang_f );
 
   # STDERR is written into same output file
-  my $parrot_exit_code = Parrot::Test::_run_command( $parrot_m4, STDOUT = 
$parrot_m4_out_f, STDERR = $parrot_m4_out_f );
-  my $gnu_exit_code= Parrot::Test::_run_command( $gnu_m4,STDOUT = 
$gnu_m4_out_f,STDERR = $gnu_m4_out_f );
+  my $parrot_exit_code = Parrot::Test::run_command( 
+  $parrot_m4, 
+  CD = $self-{relpath}, 
+  STDOUT = $parrot_m4_out_f, STDERR = $parrot_m4_out_f 
+  );
+  my $gnu_exit_code= Parrot::Test::run_command( 
+  $gnu_m4,
+  CD = $self-{relpath},
+  STDOUT = $gnu_m4_out_f,STDERR = $gnu_m4_out_f 
+  );
   
   my $pass = $self-{builder}-is_eq( 
Parrot::Test::slurp_file($parrot_m4_out_f) . 
Parrot::Test::slurp_file($gnu_m4_out_f),
   $output . $output,
Index: lib/Parrot/Test/Python.pm
===
--- lib/Parrot/Test/Python.pm   (revision 7835)
+++ lib/Parrot/Test/Python.pm   (working copy)
@@ -45,11 +45,11 @@
 # For some reason, if you redirect both STDERR and STDOUT here,
 # you get a 38M file of garbage. We'll temporarily assume everything
 # works and ignore stderr.
-$exit_code = Parrot::Test::_run_command($pycmd, STDOUT = $py_out_f);
+$exit_code = Parrot::Test::run_command($pycmd, STDOUT = $py_out_f);
 my $py_file = Parrot::Test::slurp_file($py_out_f);
 my $pirate_file;
 
-$exit_code |= Parrot::Test::_run_command($cmd,
+$exit_code |= Parrot::Test::run_command($cmd,
STDOUT = $pirate_out_f);
$pirate_file = Parrot::Test::slurp_file($pirate_out_f);
 $pass = $self-{builder}-is_eq( $pirate_file, $py_file, $desc );
Index: lib/Parrot/Test/Tcl.pm
===
--- lib/Parrot/Test/Tcl.pm  (revision 7835)
+++ lib/Parrot/Test/Tcl.pm  (working copy)
@@ -42,12 +42,13 @@
   my $exit_code = 0;
   my $pass = 0;
 
-  $cmd = (cd  . $self-{relpath} .. $self-{parrot} .  ${args} 
languages/tcl/tcl.pbc $lang_f);
+  $cmd = $self-{parrot} 

Re: [perl #34978] lib/Parrot/Test.pm should not use in commands

2005-04-14 Thread Michael G Schwern
And this patch has the added benefit of working.


Index: lib/Parrot/Test/m4.pm
===
--- lib/Parrot/Test/m4.pm   (revision 7835)
+++ lib/Parrot/Test/m4.pm   (working copy)
@@ -2,10 +2,11 @@
 
 use strict;
 
-use Data::Dumper;
+package Parrot::Test::m4;
+
+require Parrot::Test;
 use File::Basename;
 
-package Parrot::Test::m4;
 
 =head1 NAME
 
@@ -48,16 +49,24 @@
   my $gnu_m4_out_f= Parrot::Test::per_test( '.gnu_out', $count );
 
   my $test_prog_args = $ENV{TEST_PROG_ARGS} || '';
-  my $parrot_m4  = (cd $self-{relpath}  $self-{parrot} 
languages/m4/m4.pbc ${test_prog_args} languages/${lang_f});
-  my $gnu_m4 = (cd $self-{relpath}  m4 ${test_prog_args} 
languages/${lang_f});
+  my $parrot_m4  = $self-{parrot} languages/m4/m4.pbc ${test_prog_args} 
languages/${lang_f};
+  my $gnu_m4 = m4 ${test_prog_args} languages/${lang_f};
 
   # This does nor create byte code, but m4 code
-  my $parrotdir   = File::Basename::dirname( $self-{parrot} );
+  my $parrotdir   = dirname( $self-{parrot} );
   Parrot::Test::generate_code( $code, $parrotdir, $count, $lang_f );
 
   # STDERR is written into same output file
-  my $parrot_exit_code = Parrot::Test::_run_command( $parrot_m4, STDOUT = 
$parrot_m4_out_f, STDERR = $parrot_m4_out_f );
-  my $gnu_exit_code= Parrot::Test::_run_command( $gnu_m4,STDOUT = 
$gnu_m4_out_f,STDERR = $gnu_m4_out_f );
+  my $parrot_exit_code = Parrot::Test::run_command( 
+  $parrot_m4, 
+  CD = $self-{relpath}, 
+  STDOUT = $parrot_m4_out_f, STDERR = $parrot_m4_out_f 
+  );
+  my $gnu_exit_code= Parrot::Test::run_command( 
+  $gnu_m4,
+  CD = $self-{relpath},
+  STDOUT = $gnu_m4_out_f,STDERR = $gnu_m4_out_f 
+  );
   
   my $pass = $self-{builder}-is_eq( 
Parrot::Test::slurp_file($parrot_m4_out_f) . 
Parrot::Test::slurp_file($gnu_m4_out_f),
   $output . $output,
Index: lib/Parrot/Test/Python.pm
===
--- lib/Parrot/Test/Python.pm   (revision 7835)
+++ lib/Parrot/Test/Python.pm   (working copy)
@@ -45,11 +45,11 @@
 # For some reason, if you redirect both STDERR and STDOUT here,
 # you get a 38M file of garbage. We'll temporarily assume everything
 # works and ignore stderr.
-$exit_code = Parrot::Test::_run_command($pycmd, STDOUT = $py_out_f);
+$exit_code = Parrot::Test::run_command($pycmd, STDOUT = $py_out_f);
 my $py_file = Parrot::Test::slurp_file($py_out_f);
 my $pirate_file;
 
-$exit_code |= Parrot::Test::_run_command($cmd,
+$exit_code |= Parrot::Test::run_command($cmd,
STDOUT = $pirate_out_f);
$pirate_file = Parrot::Test::slurp_file($pirate_out_f);
 $pass = $self-{builder}-is_eq( $pirate_file, $py_file, $desc );
Index: lib/Parrot/Test/Tcl.pm
===
--- lib/Parrot/Test/Tcl.pm  (revision 7835)
+++ lib/Parrot/Test/Tcl.pm  (working copy)
@@ -42,12 +42,13 @@
   my $exit_code = 0;
   my $pass = 0;
 
-  $cmd = (cd  . $self-{relpath} .. $self-{parrot} .  ${args} 
languages/tcl/tcl.pbc $lang_f);
+  $cmd = $self-{parrot} $args languages/tcl/tcl.pbc $lang_f;
 
   # For some reason, if you redirect both STDERR and STDOUT here, 
   # you get a 38M file of garbage. We'll temporarily assume everything
   # works and ignore stderr.
-  $exit_code = Parrot::Test::_run_command($cmd, STDOUT = $out_f);
+  $exit_code = Parrot::Test::run_command($cmd, CD = $self-{relpath},
+STDOUT = $out_f);
   
   unless ($pass) {
 my $file = Parrot::Test::slurp_file($out_f);
Index: lib/Parrot/Test.pm
===
--- lib/Parrot/Test.pm  (revision 7835)
+++ lib/Parrot/Test.pm  (working copy)
@@ -125,6 +125,22 @@
 Use within a CSKIP: { ... } block to indicate why and how many test
 are being skipped. Just like in Test::More.
 
+=item Crun_command($command, %options)
+
+Run the given $command in a cross-platform manner.  
+
+%options include...
+
+STDOUT filehandle to redirect STDOUT to
+STDERR filehandle to redirect STDERR to
+CD directory to run the command in
+
+For example:
+
+# equivalent to cd some_dir  make test
+run_command(make test, CD = some_dir);
+
+
 =back
 
 =cut
@@ -136,6 +152,7 @@
 use Parrot::Config;
 use File::Spec;
 use Data::Dumper;
+use Cwd;
 
 require Exporter;
 require Test::Builder;
@@ -149,7 +166,9 @@
   pir_2_pasm_is  pir_2_pasm_like  pir_2_pasm_isnt
   c_output_isc_output_likec_output_isnt
   language_output_is
-  skip );
+  skip 
+ run_command
+   );
 @ISA = qw(Exporter);
 
 # tell parrot it's being tested.  this disables searching of installed 
libraries
@@ -170,9 +189,12 @@
 # this 

rsync has .svn directories?

2005-04-14 Thread Michael G Schwern
The rsync off of cvs.perl.org::parrot-HEAD as suggested on parrotcode.org
contains .svn directories.  This doesn't seem right.



Re: Takers wanted - a perl job

2005-04-13 Thread Michael G Schwern
On Wed, Apr 13, 2005 at 08:58:19AM -0700, Robert Spier wrote:
   Doesn't work when svk is used to check out the copy. But in that case
   svk list -R does.
  
  Hmm.  Maybe this should be a commit action and not a test.
 
 It was under CVS.  I'm pretty sure everyone ignored it there :)

They wouldn't ignore it if it caused the commit to fail now would they.



Re: Parrot and the web (PHP?)

2005-04-13 Thread Michael G Schwern
On Wed, Apr 13, 2005 at 04:23:01PM -0400, MrJoltCola wrote:
 Perl was the most famous web development environment some year ago, today 
 PHP is that. I think one of
 
 I disagree. How do you support that blanket statement?

I politely request that we not have a Perl vs PHP popularity discussion here.



Re: Takers wanted - a perl job

2005-04-12 Thread Michael G Schwern
On Tue, Apr 12, 2005 at 11:08:30AM +0200, Leopold Toetsch wrote:
 t/src/manifest.t tests 3 and 4 used to compare MANIFEST file entries 
 against CVS/Entries. The latter is now .svn/entries with an xmlish syntax.
 The job is now to replace t/src/manifest.t:scan_cvs so that it extracts 
 Cname items from .svn/entries and descends into Ckind=dir 
 subdirectories. And no - I don't think, we need a full-fledged XML 
 parser for this.

No need to parse the XML files, svn list -R lists everything in the repo.

And I suppose I just volunteered myself for the job.



Re: Takers wanted - a perl job

2005-04-12 Thread Michael G Schwern
On Tue, Apr 12, 2005 at 10:54:14AM +0100, Nicholas Clark wrote:
 On Tue, Apr 12, 2005 at 02:50:57AM -0700, Michael G Schwern wrote:
 
  No need to parse the XML files, svn list -R lists everything in the repo.
  
  And I suppose I just volunteered myself for the job.
 
 $ svn list -R
 svn: '.' is not a working copy
 
 Doesn't work when svk is used to check out the copy. But in that case
 svk list -R does.

Hmm.  Maybe this should be a commit action and not a test.



Re: $(TOUCH) in Perl: any reason not to use utime()?

2005-04-04 Thread Michael G Schwern
On Mon, Apr 04, 2005 at 12:00:20PM -0400, Chip Salzenberg wrote:
 Currently, config/gen/makefiles/root.in says:
 
   TOUCH  = $(PERL) -e ${PQ}open(A,qq{$$_}) or die foreach @ARGV${PQ}
 
 However, this fails for my source tree.  I habitually leave
 CVS-controlled files write-only until they are locally modified.
   read-only?

 (This is cvs -r behavior, also triggered by exporting CVSREAD=1.)
 
 Perl has a Cutime operator which should work even when files are
 read-only.  Is there a reason that $(TOUCH) doesn't use it?

ExtUtils::Command has a perfectly good and known working touch() function
which both opens for appending AND uses utime.

TOUCH = $(PERL) -MExtUtils::Command -e touch @ARGV

However, as currently implemented, it will die if the file is unwritable.
This can be corrected but I'm not confident in relying solely on utime 
because perlport sez...

   May not behave as expected.  Behavior depends on the C runtime
   library's implementation of utime(), and the filesystem being
   used.  The FAT filesystem typically does not support an access
   time field, and it may limit timestamps to a granularity of
   two seconds. (Win32)



Re: Passing on the hat

2005-03-21 Thread Michael G Schwern
On Mon, Mar 21, 2005 at 03:39:57PM -0500, Dan Sugalski wrote:
 As such, I'd like to say a big thanks to Chip Salzenburg who's agreed 
 to take the hat. The perl folks on the list will recognize Chip as 
 the perl 5.004 pumpking and the guy who took the first shot at Perl: 
 The Next Generation (aka Topaz). Chip's a darned sharp guy, 
 desperately over-qualified, and one of the few people I know who can 
 do off-the-cuff MST-ing of modern cinema.

So 0.1.3 will either be called Topaz or Hamdingers.



Re: svn

2004-12-09 Thread Michael G Schwern
On Wed, Dec 08, 2004 at 06:21:18PM -0700, Phil Frost wrote:
 On Wed, Dec 08, 2004 at 07:19:07PM -0500, William Coleda wrote:
  Is there a plan at any point to move to an svn repository from cvs?
  
  I'd like to work on a patch to move all the perl* pmcs into dynclasses, 
  which would involve quite a bit of file moving, and I'll happily wait for 
  svn if we're going that way, since it'll be smoother.
 
 If you are planning on switching revision control systems, I suggest
 something other than svn. There are a number of other systems available
 to the free software developer which offer serious advantages which
 might not be aparent to those who have not experienced them. Among them
 are arch, darcs, and monotone.

Arch is out.  Its Win32 support is crap.
http://wiki.gnuarch.org/moin.cgi/Native_20WIN32_20Support

monotone is out.  Its too unstable.  They just made an incompatible change
requiring *lossy* migration.
http://www.venge.net/monotone/README.changesets

This leaves just Darcs.  I would eshew Darcs for a large, Open project for
these reasons.

* Its immature.  What happens if we hit a bug and wedge the repository or
worse, corrupt it?  What happens if they introduce an incompatible change
as monotone did?

* We don't have any Darcs experts to solve the hard problems.

* The darcs manual proudly proclaims Darcs is refreshingly different 
from CVS.  Because of the different models used by cvs and darcs, it is 
difficult to provide a complete equivalence between cvs and darcs.  Parrot
has a lot of CVS users.  They do not want refreshingly different.


However, this does not mean distributed version control is out.  There is
an option.  SVK.  Its distributed version control WITHOUT everybody having
to learn and run SVK.  SVK is a *client* of a Subversion (or CVS or Perforce)
repository.  This means Parrot can switch to Subversion and those that want
to play with distributed version control can do so without everybody else
having to drink their brand of Kool-Aid.


For reference, here's the gauntlet I'd make any new revision control system 
for Parrot run through.

1)  Are they easily available on all the platforms Parrot is?  Various
Unixen, OS X, Windows.  Is there any hope for a VMS port?

2)  Can the command set and workflow be made similar to CVS?  You're going 
to have enough trouble convincing people to leave the warm, familiar, 
comforting, if slightly demented, embrace of CVS that they
have known for years.  Its best if the new system works as much like CVS
as possible.

3)  Do we need distributed version control?  Can this be gotten without
having to drink their brand of Kool-Aid, such as by individuals using SVK
over a Subversion repository?

4)  Are these systems mature enough that they're not going to fall apart
under a large repository?  Or that we don't have to worry about hitting a
bug which corrupts the repository or gets it into an inconsistent state?
Or that they'll introduce an incompatible change?

5)  Do we have any experts with these new version control systems?  Someone
who knows how to solve the hairy problems.

6)  Can we convert the existing CVS repository to it without losing
revision histories?

7)  Can we supply a read-only CVS mirror of the repository?

8)  What's the documentation like?  Is there a well-written, comprehensive
tutorial?  Can I get going in under an hour?


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Home of da bomb


Re: svn

2004-12-09 Thread Michael G Schwern
On Thu, Dec 09, 2004 at 04:35:26PM -0800, Brent 'Dax' Royal-Gordon wrote:
 Michael G Schwern [EMAIL PROTECTED] wrote:
  1)  Are they easily available on all the platforms Parrot is?  Various
  Unixen, OS X, Windows.  Is there any hope for a VMS port?
 
 Can we add are there GUIs for Windows, OS X, and other platforms with
 wimpy users?  ;^)

A) Wimpy users don't hack Parrot and a lack of a GUI for the VC is not
   going to be what stops them.

B) If there's not a GUI now there's nothing stopping someone from writing 
   a GUI tomorrow.

So no, I would not consider a GUI to be important.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
7.  It is always something
 -- RFC 1925


Re: svn

2004-12-08 Thread Michael G Schwern
On Wed, Dec 08, 2004 at 10:16:21PM -0500, Matt Fowles wrote:
 While I personally like the idea, I think it is unlikely given how
 much slower svn is on sizable repositories.  Of course I have not
 tried it recently, so maybe that has changed...

If you wish to try out a recent Subversion on some sizable source
there's a mirror of the maint and bleadperl Perforce repositories here.
http://svn.clkao.org/svnweb/perl

You can pull them out using
svn://svn.clkao.org/perl

Subversion has improved a lot.  I'm using it now.  If you do try it I
recommend going straight to 1.1.1 and using fsfs based repositories.

Keep in mind that SVN is slower on checkouts than CVS.  However diff is
a purely local operation.  And if you're using something like SVK network
traffic isn't much of an issue after all after the initial mirror.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Now we come to that part of the email you've all been waiting for--the end.


Re: [off topic] an amusing side note

2004-11-24 Thread Michael G Schwern
On Wed, Nov 24, 2004 at 06:30:29PM -0500, Felix Gallo wrote:
 2.  perl 6 is a lot cleaner than perl 5.  It's also much, much
 larger than an already very large language.  I've been programming
 and evangelizing Perl in organizations small and gigantic since
 4.03x, and my eyes just glaze over at all the unnecessarily
 surfaced complexity bound to make reading other people's programs
 finally, at last, literally impossible:
 
 http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html
 
 I'm not going to use perl 6.

Now, think about what a similar table would look like for Perl 5.  How
different would it be?  For extra credit, make one.

As an exercise, go through those operators and remove all that are already in
Perl 5 (such as cmp), or have an equivalent in Perl 5 (such as ?), or are a 
simple expansion of an operator (such as ?=).

Another exercise, eliminate operators for operations you don't already do
much of in Perl 5 (such as bitwise operations).

For extra credit, note which operators are just altered versions of Perl 5
operators (such as +).

For extra credit, make another list from that of those new operators which 
replace existing common idioms in Perl 5 (such as hyperoperators) and make
them easier.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
The method employed I would gladly explain,
  While I have it so clear in my head,
If I had but the time and you had but the brain--
  But much yet remains to be said.
-- Hunting of the Snark, Lewis Carroll


Re: Inconsistent opcode names

2004-11-21 Thread Michael G Schwern
On Sat, Nov 20, 2004 at 08:06:33PM -0500, William Coleda wrote:
 Is there a reason why we have find_type, but loadlib; eq_str but 
 isnull ?

I was just reading something blasting PHP for not being consistent about
core naming conventions particularly about this_that vs thisthat.
FWIW.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
You're more radiant than a memory of breathtaking ecstasy.


Re: [perl #32245] [BUG] Makefile $(TOUCH), doesn't

2004-10-31 Thread Michael G Schwern
On Sun, Oct 31, 2004 at 12:33:53PM -0800, Jeff Clites wrote:
 The Makefile uses this in place of the 'touch' command:
 
   perl -e 'open(A,qq{$_}) or die foreach @ARGV'
 
 On Mac OS X at least, this doesn't result in updating the timestamp of 
 the passed-in files. (Also, by my reading of the POSIX/SUSv3 spec, this 
 is correct behavior--open() isn't supposed to update the timestamp of 
 an existing file.)
 
 I wonder if this works on any platform--maybe Win32?
 
 I suggest that the value of TOUCH be configurable, defaulting to the 
 'touch' command on Unix-like systems--not sure what to use for other 
 systems. Or we could try this, which might work for all systems:

ExtUtils::Command provides tested cross-platform versions of the most 
common shell functions.  These should be used.

For example:

perl -MExtUtils::Command -e touch


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
IIRC someone observed that they couldn't name identifiers in Ethiopian, 
because there was an Ethiopian character similar in function to _ which 
wasn't in \w
-- Nicholas Clark demonstrates that the Internet works
   in [EMAIL PROTECTED]


Re: C89

2004-10-21 Thread Michael G Schwern
On Thu, Oct 21, 2004 at 02:51:15PM -0400, Dan Sugalski wrote:
 At 11:25 AM -0700 10/21/04, Bill Coffman wrote:
 I read somewhere that the requirement for parrot code is that it
 should be compliant with the ANSI C'89 standard.  Can someone point me
 to a description of the C89 spec, so I can make sure my reg_alloc.c
 patch is C89 compliant?
 
 I don't think the ANSI C89 spec is freely available, though I may be 
 wrong. (Google didn't find it easily, but I don't always get along 
 well with Google) If the patch builds without warning with parrot's 
 standard switches then you should be OK. (ANSI C89 was the first big 
 rev of C after the original KR C. If you've got the second edition 
 or later of the KR C book, it uses the C89 spec)

Its available for the low, low price of $18.  Makes a great stocking stuffer.
Or frightening accessory this Halloween!
http://webstore.ansi.org/ansidocstore/product.asp?sku=INCITS%2FISO%2FIEC+9899%2D1999

(That's the C99 spec but it should be clear from it what was C89 and what's
been introduced with C99).


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Beef Coronary


Re: More perl5.005 problems

2004-07-08 Thread Michael G Schwern
On Mon, Jun 14, 2004 at 05:26:14PM -0400, Dan Sugalski wrote:
 At 4:39 PM -0400 6/14/04, Michael G Schwern wrote:
 On Mon, Jun 14, 2004 at 12:00:42PM -0400, Andy Dougherty wrote:
  For some reason I haven't been able to figure out, perl5.00503 can't seem
  to handle the TODO test in t/pmc/object-meths.t.  Here's the result of
 
 5.5.3's Test::Harness doesn't know how to handle that style of TODO.
 You'll have to make a dependency on T::H 2.x if you want to use TODO.
 
 Is there another style of TODO that could be used here that would be 
 compatible with 5.005_03?

Yes, but its more trouble than its worth.

You have to do it by test number as part of the plan.  If your numbering 
changes (for example, you add a new test before the TODO test in the script) 
you have to renumber all the todo tests.

Test.pm can output this style, Test::More doesn't bother.

perldoc -m Test::Harness and look for _deprecated to see a full
explaination.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
11. Every old idea will be proposed again with a different name and
a different presentation, regardless of whether it works.
 -- RFC 1925


Re: More perl5.005 problems

2004-07-08 Thread Michael G Schwern
On Mon, Jun 14, 2004 at 02:49:35PM -0700, chromatic wrote:
 In fact, I'm surprised he managed to install an acceptably recent
 version of Test::Simple on 5.5.3 without upgrading Test::Harness; the
 bundle's required Test::Harness 2.03 for a couple of years now.

Parrot ships with Test::Simple/More/Builder along with Text::Balanced to
avoid users having to resolve module dependencies.

Simplest thing to do would be to just throw a recent Test::Harness in there.
t/harness has a 'use lib qw(lib)' in it so it should automatically pick it
up.

Patch attached.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Never underestimate the bandwidth of a mag tape on a bicycle.
-- Carl Friedberg in 
[EMAIL PROTECTED]


harness.patch.gz
Description: harness.patch.gz


Re: More perl5.005 problems

2004-06-14 Thread Michael G Schwern
On Mon, Jun 14, 2004 at 12:00:42PM -0400, Andy Dougherty wrote:
 For some reason I haven't been able to figure out, perl5.00503 can't seem
 to handle the TODO test in t/pmc/object-meths.t.  Here's the result of

5.5.3's Test::Harness doesn't know how to handle that style of TODO.
You'll have to make a dependency on T::H 2.x if you want to use TODO.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Funny thing about weekends when you're unemployed--they don't mean quite
so much.  'Cept you get to hang out with your workin' friends.
- Primus Spaghetti Western


Re: OO inheritance in a hacker style

2004-02-04 Thread Michael G Schwern
On Wed, Feb 04, 2004 at 01:30:44AM -0500, Joseph Ryan wrote:
 Whether it should actually be in the language is up for debate.  I'd say
 that if you need to do this with any frequency whatsoever, you're not
 thinking about roles right.  A good example might be in order... :-)
 
 Well, what if the two classes you want to inherit from weren't
 designed with roles in mind?  For instance, there might be two
 CPAN modules that each have a dozen methods that you want to
 inherit, but they each have 1 that overlap whose conflict you
 want to easily resolve.

Same way you do it now.

package Foo;
use base qw(This That);

sub conflicting_inherited_method {
goto {That-can(conflicting_inherited_method)};
}


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Cheating is often more efficient.
- Seven of Nine


Re: Testing signal handlers

2004-01-28 Thread Michael G Schwern
On Tue, Jan 27, 2004 at 12:49:25PM -0500, Uri Guttman wrote:
 Test::* can't handle output from forked children

Yes, the problem is the child process can't inform the parent of how many
tests it ran.  The simplest way around this problem is to have the 
parent account for any tests run in the child by incrementing the test
counter manually.

use Test::More tests = 4;
my $builder = Test::More-builder;

pass 'some test in the parent';
if( fork ) {
# account for the one test run in the child.
$builder-current_test($builder-current_test + 1);
pass 'another test in the parent';
}
else {
pass 'a test in the child';
exit;
}

pass 'one last test in the parent';

It can also sometimes make things less complicated if you shut off test 
numbers ($builder-use_numbers(0)).


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
If it's stupid, but it works, it isn't stupid.


Re: [perl #24655] Re:

2003-12-14 Thread Michael G Schwern
On Fri, Dec 12, 2003 at 11:22:33PM -0800, Monica Kemp wrote:
 # New Ticket Created by  Monica Kemp 
 # Please include the string:  [perl #24655]
 # in the subject line of all future correspondence about this issue. 
 # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=24655 
 
 
 depict orchestrate singsong arthritis weller freest marty 
 restraint bookplate knowledge day panda wreckage beatific kleenex finesse indigenous 
 idiot venetian agglutinate lobster snuffer walsh barkeep autobiography 

The dolphins are in the jacuzzi.  The chair is against the wall.  The
owls are listening.  Wounds my heart with a monotonous languor.
SCUD missile militia South Africa Marxist Ft. Meade assassination
Croatian New World Order BATF ECHELON Kennedy FSF Lon Horiuchi Kenneth
Starr security


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
I sit on the floor and pick my nose
  and think of dirty things
Of deviant dwarfs who suck their toes
  and elves who drub their dings.
-- Frito Bugger, Bored Of The Rings


Re: [RFT] File Spec

2003-09-14 Thread Michael G Schwern
On Sat, Sep 13, 2003 at 09:55:48PM +0300, Vladimir Lipskiy wrote:
  To be clearer:  concat_dirnames(b, /foo) == error.
 
 As long as concat_dirnames() will be taught to divine whether its arguments
 are absolute paths or relative paths, it could easily rotate its arguments
 so the above-mentioned call would become concat_dirnames(/foo, b).

That would be really silly.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Quit looking, kids!  It'll EAT YOUR MIND!!
-- http://www.angryflower.com/fuck.gif


Re: [RFT] File Spec

2003-09-13 Thread Michael G Schwern
On Fri, Sep 12, 2003 at 10:29:04AM +0300, Vladimir Lipskiy wrote:
  People make mistakes.  Perhaps you should produce some errors if a user
  strays outside these rules.  Garbage in, garbage out: Bad.  Garbage in,
  error out: Good.
 
 It really does that. I mean that it returns a  when it suspects its
 arguments to be wrong.
 
  I'll admit to not knowing the general error philosophy of Parrot ops.
 
 It could throw an internal exception, but ... I am not convinced we should
 switch to that sort of indicating errors. Though what kind of errors it
 ought to provide is a subject to be arguing about.

This does sound like something that should be covered by some sort of
How should ops handle bad input design document.  If there is such a
beast, do what it recommends.  If there isn't, there should be one.


  What if I feed you:
 
  concat_dirnames(VOL1:[dir.dir], VOL2:[dir.dir])
 
  Well, I suppose that's simple, its an error since you can't usefully
  concatenate two absolute directories.  Anyhow, the point is is an *error*.
 
 Yes, and since concat_dirnames() isn't supposed to concatenate anything
 but dirnames.

Are you saying:

concat_dirnames(C:\foo, bar) == error?


  But I was unclear.  I meant the other way around.
 
  concat_dirnames(b, :my disk:a);
 
  Trying to concatenate an absolute directory onto a relative one should
  produce an error.
 
 What do you mean by absolute directory?

/foo
C:\foo
[foo]
VOL:[foo]
\foo

etc...

Which isn't clear from the example I gave above since :mydisk:a is
ambiguous on MacOS.

To be clearer:  concat_dirnames(b, /foo) == error.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Here's hoping you don't harbor a death wish!


Re: [RFT] File Spec

2003-09-11 Thread Michael G Schwern
On Thu, Sep 11, 2003 at 10:23:27AM +0300, Vladimir Lipskiy wrote:
 Unix et al
 ==
 append_filename(., ) = 

Shouldn't that be .?

 append_filename(a, ) = 

a

 append_filename(a, b) = a/b

What about

append_filename(, b)  ?

Would that be an error?

Don't forget absolute paths

concat_dirnames(/foo, /bar) = error?
concat_dirnames(foo, /bar) = error?
concat_dirnames(/foo, bar) = /foo/bar


  MS Win32
 ==
 append_filename(., ) = 

.

 append_filename(a, ) = 

a?


What about volumes?

concat_dirnames(C:\foo, bar) = C:\foo\bar
concat_dirnames(C:\foo, C:\bar) = error?
concat_dirnames(foo, C:\bar) = error?


  VMS
 =
 
 append_filename(, ) = 
 append_filename(null, ) = 
 append_filename(, null) = 
 append_filename(null, null) = 
 append_filename([], ) = 

Ditto.

 append_filename([a], ) = 

[a]

Same caveats about volumes.


  Mac
 =

Is Parrot really targetting MacOS Classic?

PS  I'd forward this bit to [EMAIL PROTECTED]


 concat_dirnames(, ) = 
 concat_dirnames(null, ) = 
 concat_dirnames(, null) = 
 concat_dirnames(null, null) = 
 concat_dirnames(:, ) = :
 concat_dirnames(, :) = :
 concat_dirnames(:, :) = :
 concat_dirnames(a, ) = :a
 concat_dirnames(, b) = :b
 concat_dirnames(a, :) = :a
 concat_dirnames(:, b) = :b
 concat_dirnames(a, b) = :a:b
 concat_dirnames(:a:b, :c) = :a:b:c
 
 append_filename(, ) = 
 append_filename(null, ) = 
 append_filename(, null) = 
 append_filename(null, null) = 
 append_filename(:, ) = 
 append_filename(:a, ) = 
 append_filename(:a, b) = :a:b
 



-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
I do have a cause though.  It is obscenity.  I'm for it.
-- Tom Lehrer Smut


Re: [RFT] File Spec

2003-09-11 Thread Michael G Schwern
On Thu, Sep 11, 2003 at 01:17:29PM +0300, Vladimir Lipskiy wrote:
  Shouldn't that be .?
  
   append_filename(a, ) = 
  
  a
 
 Umm. Don't think so. At least it will be that
 way until you convince me that it must be
 another way

concat_dirnames(a, ) = a
concat_dirnames(,  b)= b

ergo

append_filename(a, ) = a

Why wouldn't appending no filename onto a directory result in the directory
being returned?  Unless append_filename() guarantees that it will always
return a filepath ending in a filename?


  What about
  
  append_filename(, b)  ?
  
  Would that be an error?
 
 No. It's okay. I just forgot to mention that case.
 
 append_filename(, b) will produce b

Now wait a second.  append_filename(a, ) produces nothing but
append_filename(, b) produces a filename?  Isn't that a little
inconsistent?


  concat_dirnames(/foo, /bar) = error?
  concat_dirnames(foo, /bar) = error?
  concat_dirnames(/foo, bar) = /foo/bar
 
 I just want to remind you the Leo's words:
 
 Please keep in mind, that the intended usage inside Parrot just should
 be to locate some standard include or extension files for Parrot
 internals. More abstraction and complexity can always be added above
 that or implemented by HLLs. -- Him.(~:)
 
 I don't suppose Leo will be pass in spoiled data.

Famous last words: Our data is perfect, we don't need to check our inputs.


  What about volumes?
 
 I plan a special functions for volumes, and nodes,
 and root dirs like prepend_volume, prepend_node,
 prepend_rootdir.
 
 For example, prepend_rootdir could throw the
 prepend_rootdir is unsupported on this platform
 exception on windows. Of course, I will go implement
 those if Parrot needs those.

Ok, but what happens when I pass filepaths with volumes attached to 
concat_dirnames?  What if the volumes don't match?  What if I'm adding a 
path with a volume to one without?


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Death?  Its like being on holiday with a group of Germans.


Re: [RFT] File Spec

2003-09-11 Thread Michael G Schwern
On Thu, Sep 11, 2003 at 08:36:02PM +0300, Vladimir Lipskiy wrote:
  Famous last words: Our data is perfect, we don't need to check our
 inputs.
 
 Yes. Our data is perfect and we don't need to check our inputs if we
 play by rules. And the rules are:
 
 Always use concat_dirnames to concatenate directory names
 Always use append_filename to append a file name to a path
 Always keep in mind that this tool gives you a proper result
 when you give it proper input, which is simple directory
 names, simple file names, and paths produced by this tool only.
 If you observe the rules, you won't get into a mess.

People make mistakes.  Perhaps you should produce some errors if a user 
strays outside these rules.  Garbage in, garbage out: Bad.  Garbage in, 
error out: Good.

I'll admit to not knowing the general error philosophy of Parrot ops.


  Ok, but what happens when I pass filepaths with volumes attached to
  concat_dirnames?
 
 You get what you do, nonsense. Even File::Spec, a tool of a lot more
 higher level, doesn't protect you from such things.
 
 D:\perl -MFile::Spec::Functions -e print catdir('C:\hh','C:\dd'), qq(\n)
 C:\hh\C:\dd

Justifying your own tool's bad behavior using another tool's bad behavior
is not a terribly compelling design argument.  Just because File::Spec's
handling of volumes is historicly lousy doesn't mean yours has to be.


 What if the volumes don't match?
 
 Don't match against what? concat_dirnames doesn't do matching arguments
 against anything but PARROT_FS_DIRNAME_START and PARROT_FS_DIRNAME_END,
 which, for example, are '[' and ']' on VMS.

What if I feed you:

concat_dirnames(VOL1:[dir.dir], VOL2:[dir.dir])

Well, I suppose that's simple, its an error since you can't usefully
concatenate two absolute directories.  Anyhow, the point is is an *error*.


  What if I'm adding a path with a volume to one without?
 
 Still. You get what you do. On Mac:
 
 concat_dirnames('my disk:a', ':b') = ':my disk:a:b'

Mac's a special case since, IIRC, :b can either mean The volume called b
or The file/directory in the current directory called b.  On VMS or
Windows no such ambiguity exists.

But I was unclear.  I meant the other way around.

concat_dirnames(b, :my disk:a);

Trying to concatenate an absolute directory onto a relative one should
produce an error.


 File::Spec has an individual function for such purposes, catpath().
 We can't process more than two in-arguments in PASM, so we would take
 advantage of prepend_volume and things of such sort.

Unless I'm missing something, since the volumes and root dirs are already 
attached to the filepath string, you don't need more than two arguments.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
It's Ecstacy time!


Re: [PATCH] File Spec

2003-09-02 Thread Michael G Schwern
Though I haven't been following this thread, it seems you're coming up
with some File::Spec-like thing for Parrot?

I'd recommend looking at Ken Williams' excellent Path::Class module
which gives you actual file and directory objects.  EXTREMELY useful when
you're in an ultra-cross platform environment such as Parrot.  I wish I
had them for MakeMaker instead of fucking around with File::Spec.  Consider
using Path::Class for inspiration rather than File::Spec.


On Mon, Sep 01, 2003 at 02:38:36PM +0300, Vladimir Lipskiy wrote:
 Leo wrote:
  Albeit File::Spec is using catfile and catdir, I don't like the function
  names (cat file is on *nix what type file is on Win*). Maybe
  concat_pathname and concat_filename is better.
 
 Yes, indeed. I'm for having concat_pathname only since this patch or
 the File::Spec module makes no difference when concatenates paths and
 files (though I can be mistaken on account of VMS, Dan? (~:). So catdir
 and catfile give the same result. Morever, catfile is sort of a wrapper
 around
 catdir and does nothing smarter than just calling catdir on all platforms.

On VMS catfile and catdir do very different things because VMS filepath
syntax distinguishs between files and directories explicitly.

Unix:
/dir1/dir2/dir3
/dir1/dir2/file

Windows:
\dir1\dir2\dir3
\dir1\dir2\file

VMS:
[dir1.dir2.dir3]
[dir1.dir2]file

So yes, you must distinguish between concatenating directories and files.

You also must worry about volumes.

Unix:
No user visible concept of a volume

Windows:
VOLUME:\dir1\dir2\file

VMS:
VOLUME:[dir1.dir2]file


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Operation Thrusting Peach


Re: mission haiku

2003-08-28 Thread Michael G Schwern
On Thu, Aug 28, 2003 at 12:11:12AM +0100, Nicholas Clark wrote:
 I'm not convinced this is very good. But I believe that it is an accurate
 mission statement, for at least one of our goals:
 
   Perl internals slow,
   nigh on unmaintainable.
   So we write parrot.

Sounds like PONIE.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Beef Coronary


Re: What the heck is: timely destruction

2003-08-18 Thread Michael G Schwern
On Mon, Aug 18, 2003 at 10:52:50AM -0700, K Stol wrote:
 After reading most of the messages on timely destruction, I still don't quite 
 understand what it is. If someone has a spare minute free, could you please explain? 

In perl5 you can write this.

my $Destroyed = 0;
sub DESTROY { $Destroyed = 1; }
{
my $object = bless {};
}
die unless $Destroyed;
print That's timely destruction\n;

and expect it to work.  It doesn't die and you reach the final print
statement.  That's because object are destroyed *immediately* upon their
falling out of scope so you can trust that the DESTROY method is called
immediately following the block.

Other languages don't work this way.  Java, for example, cleans up unused
objects whenever it happens to get around to it.  This means your object
might be destroyed immediately, or after a few statements have run, or
stick around until the end of the program.

Timely destruction is simple in Perl5 because it has a simple garbage
collection scheme, reference counting.  Each bit of date keeps track of how
many variables and references point to it.  When it drops to 0, its cleaned
up.  This count is kept up-to-date all the time so timely destruction
is easy.

Reference counting has problems.  One is memory leaks due to circular
dependencies.

{ my $a;
  my $b;
  $a = \$b;
  $b = \$a;
}

$a refers to $b.  $b refers to $a.  Their ref counts remain 1 even after
the block ends and their variables fall out of scope.  The data is never
garbage collected.  Memory leak.

Another is that it turns out to be pretty slow (last I heard Dan talk about
it) compared to modern garbage collecting techniques.

So Parrot is going with something else.  Don't ask me what it is, I don't
know.  With this other garbage collecting technique its more involved than
ref counting to guarantee timely destruction as we desire in Perl.
Apparently someone's figured a way to do it and do it efficiently.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/


Re: What the heck is: timely destruction

2003-08-18 Thread Michael G Schwern
On Mon, Aug 18, 2003 at 11:38:22AM -0700, K Stol wrote:
 if I understood correctly, the problem is that some objects should be
 destroyed *immediately*, and should not wait for the GC. 

Yep.  In perl 5 *all* objects and variables are to be destroyed immediately.
This doesn't necessarily mean that their memory has to be freed but that
at least their destructor methods are called.


 In fact, the programmer may have never heard about a garbage collecting 
 system at all, and just *assume* that everything which is out of scope, 
 is destroyed. 

Yep.  That's how most languages with lexical variables work these days.


 In real life, these objects may live somewhere in memory, waiting for the GC,
 but in fact are still there, so checking them for being alive will not yield
 the correct result.

I don't understand what you're saying there.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
It's Absinthe time!


Re: What the heck is: timely destruction

2003-08-18 Thread Michael G Schwern
On Mon, Aug 18, 2003 at 11:56:53AM -0700, K Stol wrote:
  This doesn't necessarily mean that their memory has to be freed but that
  at least their destructor methods are called.
 
 So the objects may be still in memory. I thought the fact that they are
 still in memory
 was troublesome, but it's not, if I interpret your statement well.

I don't think its troublesome, no.  From the PoV of the programmer, the
object has been destroyed.  You can leave the freeing of memory for
later, that's an internal issue.


-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Beer still cheaper than crack!


Re: XGameStation

2003-08-14 Thread Michael G Schwern
On Mon, Aug 11, 2003 at 01:45:35AM -0700, Ask Bjoern Hansen wrote:
 We totally need to have Parrot running on this thing when it comes
 out.  :-)
 
   http://www.xgamestation.com/

Great idea, shame the hardware is crap. :(

Third-generation Motorola 68HCS12 16-bit processor @ 25 MHz.
 Graphics architecture similar to Commodore 64, Atari 800 and Apple II.

-- 
Michael G Schwern[EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Cheating is often more efficient.
- Seven of Nine


Re: I scare me.

2003-08-02 Thread Michael G Schwern
On Sat, Aug 02, 2003 at 10:35:56AM +0100, Nicholas Clark wrote:
 On Sat, Aug 02, 2003 at 01:49:05AM -0400, David H. Adler wrote:
  I'm sure it needs a few tweaks, but I've managed to write a hq9+
  interpreter in pasm.
 
  Any thoughts on this?
 
 + isn't a portable file name character is it?
 So although Unix (and CVS) will be quite happy, it would not be a great
 idea naming a subdirectory hq9+ ?
 
 What should we call it

hq9p, same as the .pasm file.

PS  I think READ needs s/S1/S5/ if I'm reading it correctly.  Otherwise
everything after the 1024th character will be ignored, and then you
couldn't write Enterprise Level hq9+ programs!


-- 
Quit looking, kids!  It'll EAT YOUR MIND!!
-- http://www.angryflower.com/fuck.gif


Re: About RT/Perl

2003-03-31 Thread Michael G Schwern
On Mon, Mar 31, 2003 at 12:54:38PM +0100, Alberto Simões/EPL wrote:
 Anybody can tell me the address for RT/perl software?
 Thanks a lot.

Go to google.com, type in RT, hit I'm feeling lucky


-- 
It wasn't false, just differently truthful.
-- Abhijit Menon-Sen in [EMAIL PROTECTED]


Re: benchmarking - it's now all(-1,0,1,5,6)% faster

2003-01-12 Thread Michael G Schwern
On Sat, Jan 11, 2003 at 07:05:22PM +, Nicholas Clark wrote:
 I was getting about 5% speedups on penfold against vanilla development perl.
 Penfold is an x86 box (actually a Citrix chip, which may be important) running
 Debian unstable, with gcc 3.2.1 and 256M of RAM.
 
 I tried the same tests on mirth, a ppc box, again Debian unstable, gcc 3.2.1,
 but 128M of RAM. This time I saw 1% slowdowns.

FWIW, in the past I've noticed that x86 and PPC do react differently to
optimizations.  I've had cases where things ran at the same speed on PPC
yet showed large differences on x86.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One



Re: DOS filename collisions

2002-12-04 Thread Michael G Schwern
On Wed, Dec 04, 2002 at 02:03:06PM -0500, Dan Sugalski wrote:
  DOS isn't an intended compilation target, no.
 
 Not even djgpp?
 
 Hadn't planned on it. What advantage does it give over windows?

It'll compile C programs on a 386/SX, 20M of disk, 4megs of RAM and some
form of DOS.

Dunno if hardware that old is inside Parrot's scope.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Only mindless violence can raise my spirits now!



Re: Self documenting comments for parrot

2002-10-02 Thread Michael G Schwern

On Thu, Oct 03, 2002 at 12:26:53AM -0400, Matt Fowles wrote:
 I don't like Java that much (for many reasons), but I have nothing but
 respect for the massive amount of documentation that is easily accessible as
 a direct result of JavaDoc.  I personnaly feel that it greatly helped java
 achieve the success it has.  If all of parrot's module were that well
 documented and that easily accessible, it would be a great boon in
 recruiting followers.
 
 Also, localizing the code and the documentation allow programmer to keep
 updated documentation more easily.  Furthermore, since the docs will be in
 the same files as the code, we can simply refuse to accept patches that do
 not update the infile documentation.  Thus preventing the horribly
 problematic outdated documentation.

POD has all the above attributes.  Any documentation format for Parrot must
unquestionably allow inlining with the code.


 I say all of these things as someone who is new to this project and doesn't
 know POD.  If some of my statements here are in ignorant of the way things
 are, please correct me.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Do you have a map? Because I keep getting lost in your armpits.



Re: [perl #16690] Disable t/src under testj

2002-08-22 Thread Michael G Schwern

On Wed, Aug 21, 2002 at 02:11:29PM +, Daniel Grunblatt wrote:
 Apart from that, does anyone know why test doesn't run on OpenBSD?
 I get:
 
 ar: illegal option -- s

Gnu-ism?  What ar does OpenBSD use?

   A  number  of modifiers (mod) may immediately follow the p
   keyletter, to specify variations on an operation's  behav­
   ior:

   ...

   s   Write an object-file index into the archive, or update
   an existing one, even if no other change  is  made  to
   the  archive.   You  may use this modifier flag either
   with any operation, or alone.   Running  ar  s  on  an
   archive is equivalent to running ranlib on it.


 usage:  ar -d [-Tv] archive file ...
 ar -m [-Tv] archive file ...
 ar -m [-abiTv] position archive file ...
 ar -p [-Tv] archive [file ...]
 ar -q [-cTv] archive file ...
 ar -r [-cuTv] archive file ...
 ar -r [-abciuTv] position archive file ...
 ar -t [-Tv] archive [file ...]
 ar -x [-CouTv] archive [file ...]
 *** Error code 1


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
If I got something to say, I'll say it with lead.
-- Jon Wayne



Re: Irrational fear of macros

2002-06-19 Thread Michael G Schwern

On Tue, Jun 18, 2002 at 01:25:49PM -0400, Melvin Smith wrote:
 1) Macros and debuggers don't play as well together.

I second that.  One of my biggest barriers to useful debugging of perl5 is
having, for example, an HV and having to unroll something like the
SvRMAGICAL() macro to figure out if it's a magical HV.

Now, there is a little trick I use in Perl with macros to get around this
problem and it might work with C.

$ cat ~/tmp/foo.plx 
#!/usr/bin/perl

BEGIN { eval 'use Filter::cpp' }

sub FOO {
my $bar = shift;
#define FOO($bar) \
FOO has .$bar
}

print FOO(42), \n;

$ perl ~/tmp/foo.plx 
FOO has 42

$ perl -dw ~/tmp/foo.plx 
Default die handler restored.

Loading DB routines from perl5db.pl version 1.07
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(/home/schwern/tmp/foo.plx:12):
12: print FOO has . 42  , \n;
  DB1 x FOO(23)
0  23
  DB2 

FOO() is both a macro *and* a real subroutine with a minimum of code
duplication.  I originally used this technique to avoid depending on
Filter::cpp and a C preprocessor, but it also has the nice side effect of
creating debugger friendly macros.

I'm sure someone can figure out an equivalent techique for C.


-- 
This sig file temporarily out of order.



Re: Roadmap for Parrot

2002-04-17 Thread Michael G Schwern

On Wed, Apr 17, 2002 at 03:27:51PM -0400, Dan Sugalski wrote:
 Okay, here are the milestones. Each is worth a point release. If we 
 manage to take them in this order, great. :)
 
 *) Working arrays
 
 *) Working hashes
 
 *) Regular expressions
 
 *) Symbol tables
 
 *) Method calls
 
 *) Lexicals
 
 *) Subroutines
 
 *) Attributes
 
 *) Per-object specials (variables  subs)
 
 *) Continuations
 
 *) Parser
 
 *) Compiler
 
 *) Simple optimizer

I don't see World Domination or Nervous Breakdown in there anywhere.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Fuck with me and I will saw off your legs.
http://www.unamerican.com/



Re: OpenVMS V7.2-1H1 configure.pl results using the defaults

2002-04-01 Thread Michael G Schwern

On Mon, Apr 01, 2002 at 07:00:57AM -0800, Charles Bunders wrote:
 Checking some things by compiling and running another small C program (this
 could take a while):
 
   Building ./testparrotsizes.cfrom testparrotsizes_c.in...
 
 #include parrot/parrot.h
 ..^
 %CC-F-NOINCLFILEF, Cannot find file parrot/parrot.h specified in #include
 directive.
 at line number 9 in file TESTPARROTSIZES.C;1
 C compiler died! at (eval 1) line 13.
 %RMS-E-FNF, file not found

This problem came up a few weeks ago.
http:[EMAIL PROTECTED]/msg08963.html

If I'm reading it correctly, it seems one can't mix Unix and VMS path
styles between your INCLUDE_DIRECTORY and header files.

So this combination will work:

CC/DECC /INCLUDE=(./include) testparrotsizes.c

#include parrot/parrot.h

but this will not:

CC/DECC /INCLUDE=([.include]) testparrotsizes.c

#include parrot/parrot.h

which just seems wrong.  It has to be wrong, because Perl5 builds with
things like:

CC/DECC/NOANSI_ALIAS 
/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/float=ieee/ieee=denorm_results
 /Include=([],[.ext.dynaloader])/Object=[.EXT.DYNALOADER]DL_VMS.OBJ 
[.EXT.DYNALOADER]DL_VMS.C


Ahh, here's something I didn't notice before.  compiletestc() is
coming from hints/vms.pl.  It's different from the one in Configure.pl
most significantly in that it doesn't tell you what the command was.

Fixing that, we get:

C compiler died!  Command was 'CC/DECC 
/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALIAS/include=([.include],/here)
 testparrotsizes.c'

now what's that /here thing doing there?  Taking it out doesn't fix
things.

I'm stumped.  I'll go ask on VMSperl.



-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
I'm successful because I'm lucky.   The harder I work, the luckier I get.



[PATCH hints/vms.pl] VMS Configure fix

2002-04-01 Thread Michael G Schwern

My research was right.  You *can't* mix Unix and VMS style include
paths on VMS.  It will just dumbly concatinate them.

CC/DECC /include=[.include]

Result:  [.include]parrot/parrot.h  *wrong*

CC/DECC /include=./include

Result: ./include/parrot/parrot.h   *right*

Perl5 simply avoids ever using '#include foo/bar.h' syntax except in
one instance (SDBM_File) where the include directory is the cwd, so it
works by luck.


So this patch gets VMS past Configure and it immediately vomits
because of a syntax error in the descrip.mms

$ mmk
%MMK-F-PARSERR, error parsing description line mops: examples/assembly/mopsexe 
examples/mops/mopsexe
-MMK-I-ERRLOC, at line number 148 in file USER1:[SCHWERN.SRC.PARROT]MAKEFILE.;7
-LIB-F-SYNTAXERR, string syntax error detected by LIB$TPARSE



--- hints/vms.pl4 Jan 2002 17:39:29 -   1.5
+++ hints/vms.pl1 Apr 2002 18:48:40 -
@@ -1,8 +1,10 @@
 use Cwd;
-$c{ccflags} = 
/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALIAS/include=([.include],\/here\);
+$c{ccflags} = 
+qq{/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALIAS/include=./include};
+
 if (!defined $c{exe}) {
   $c{exe} = exe;
 }
+
 {
local $^W;  #no warnings on redefinition
 
@@ -10,8 +12,11 @@
my $name;
$name = shift;
$name = test unless $name;
-   system($c{cc} $c{ccflags} $name.c) and die C compiler died!;
-   system(link/exe=test_siz $name) and die Link failed!;
+my $cmd = $c{cc} $c{ccflags} $name.c;
+   system($cmd) and die C compiler died!  Command was '$cmd';
+
+$cmd = link/exe=test_siz $name;
+   system($cmd) and die Link failed!  Command was '$cmd';
};
 
*runtestc=sub {

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
If you have to shoot, shoot!  Don't talk.
-- Tuco, The Good, The Bad And The Ugly



[PATCH Makefile.in] MMS syntax errors

2002-04-01 Thread Michael G Schwern
)
+rxstacks$(O) : $(GENERAL_H_FILES)
 
-stacks$(O): $(GENERAL_H_FILES)
+stacks$(O) : $(GENERAL_H_FILES)
 
-embed$(O): $(GENERAL_H_FILES)
+embed$(O) : $(GENERAL_H_FILES)
 
-core_ops$(O): $(GENERAL_H_FILES) core_ops.c
+core_ops$(O) : $(GENERAL_H_FILES) core_ops.c
 
-core_ops.c $(INC)/oplib/core_ops.h: $(OPS_FILES) ops2c.pl lib/Parrot/OpsFile.pm 
lib/Parrot/Op.pm
+core_ops.c $(INC)/oplib/core_ops.h : $(OPS_FILES) ops2c.pl lib/Parrot/OpsFile.pm 
+lib/Parrot/Op.pm
$(PERL) ops2c.pl C $(OPS_FILES)
 
-core_ops_prederef$(O): $(GENERAL_H_FILES) core_ops_prederef.c
+core_ops_prederef$(O) : $(GENERAL_H_FILES) core_ops_prederef.c
 
-core_ops_prederef.c $(INC)/oplib/core_ops_prederef.h: $(OPS_FILES) ops2c.pl 
lib/Parrot/OpsFile.pm lib/Parrot/Op.pm
+core_ops_prederef.c $(INC)/oplib/core_ops_prederef.h : $(OPS_FILES) ops2c.pl 
+lib/Parrot/OpsFile.pm lib/Parrot/Op.pm
$(PERL) ops2c.pl CPrederef $(OPS_FILES)
 
-warnings$(O): $(H_FILES)
+warnings$(O) : $(H_FILES)
 
-misc$(O): $(H_FILES)
+misc$(O) : $(H_FILES)
 
-vtable.ops: make_vtable_ops.pl
+vtable.ops : make_vtable_ops.pl
$(PERL) make_vtable_ops.pl  vtable.ops
 
-$(STICKY_FILES): Configure.pl config_h.in
+$(STICKY_FILES) : Configure.pl config_h.in
$(PERL) Configure.pl
 
-$(INC)/vtable.h: vtable.tbl vtable_h.pl
+$(INC)/vtable.h : vtable.tbl vtable_h.pl
$(PERL) vtable_h.pl
 
-$(INC)/jit_struct.h: jit2h.pl lib/Parrot/OpLib/core.pm lib/Parrot/Jit.pm 
jit/${jitcpuarch}/core.jit jit/${jitcpuarch}/string.jit
+$(INC)/jit_struct.h : jit2h.pl lib/Parrot/OpLib/core.pm lib/Parrot/Jit.pm 
+jit/${jitcpuarch}/core.jit jit/${jitcpuarch}/string.jit
$(PERL) jit2h.pl ${jitcpuarch}  $(INC)/jit_struct.h
 
-docs: docs/.dummy
+docs : docs/.dummy
 
-docs/.dummy:
+docs/.dummy :
cd docs  $(MAKE)  cd ..
 
-$(CLASS_O_FILES):
+$(CLASS_O_FILES) :
cd classes  $(MAKE)  cd ..
 
-languages: languages.dummy
+languages : languages.dummy
 
-languages.dummy:
+languages.dummy :
cd languages  $(MAKE)  cd ..
 
 
@@ -389,30 +389,30 @@
 #
 ###
 
-test: $(TEST_PROG) assemble.pl .test_dummy
+test : $(TEST_PROG) assemble.pl .test_dummy
 
-.test_dummy:
+.test_dummy :
$(PERL) t/harness
 
-testp: $(TEST_PROG) assemble.pl blib/lib/libcore_prederef$(SO) 
blib/lib/libparrot$(SO) $(TEST_PROG_SO) .test_dummy_p
+testp : $(TEST_PROG) assemble.pl blib/lib/libcore_prederef$(SO) 
+blib/lib/libparrot$(SO) $(TEST_PROG_SO) .test_dummy_p
 
-.test_dummy_p:
+.test_dummy_p :
$(PERL) t/harness -P
 
-testj: $(TEST_PROG) assemble.pl .test_dummy_j
+testj : $(TEST_PROG) assemble.pl .test_dummy_j
 
-.test_dummy_j:
+.test_dummy_j :
$(PERL) t/harness -j
 
-quicktest: $(TEST_PROG) assemble.pl .quicktest_dummy
+quicktest : $(TEST_PROG) assemble.pl .quicktest_dummy
 
-.quicktest_dummy:
+.quicktest_dummy :
$(PERL) t/harness quick
 
-mopstest: $(TEST_PROG) examples/assembly/mops.pbc
+mopstest : $(TEST_PROG) examples/assembly/mops.pbc
$(TEST_PROG) examples/assembly/mops.pbc
 
-lifetest: $(TEST_PROG) examples/assembly/life.pbc
+lifetest : $(TEST_PROG) examples/assembly/life.pbc
$(TEST_PROG) examples/assembly/life.pbc
 
 
@@ -422,7 +422,7 @@
 #
 ###
 
-clean: testclean
+clean : testclean
$(RM_F) $(O_FILES)
$(RM_F) *.s
$(RM_F) $(FLUID_FILES)
@@ -436,22 +436,22 @@
cd classes  $(MAKE) clean  cd ..
cd languages  $(MAKE) clean  cd ..
 
-testclean:
+testclean :
$(RM_F) t/op/*.pasm t/op/*.pbc t/op/*.out
 
-realclean: clean
+realclean : clean
$(RM_F) $(STICKY_FILES)
 
-distclean:
+distclean :
$(PERL) -MExtUtils::Manifest=filecheck -le ${PQ}sub 
ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1;unlink $$_ for 
filecheck()${PQ}
 
-cvsclean:
+cvsclean :
$(PERL) -MExtUtils::Manifest=filecheck -le ${PQ}sub 
ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1; do { unlink $$_ 
unless $$_ =~ m!(?:CVS/|\.cvs)! } for filecheck()${PQ}
 
-reconfig:
+reconfig :
$(MAKE) clean; $(PERL) Configure.pl --reconfig
 
-manitest:
+manitest :
$(PERL) -MExtUtils::Manifest=fullcheck -e fullcheck
 
 ###
@@ -460,13 +460,13 @@
 #
 ###
 
-update:
+update :
cvs -q update -dP
 
-status:
+status :
cvs -n -q upd -dP
 
-lint: ${test_prog}
+lint : ${test_prog}
$(LINT) ${cc_inc} ${cc_hasjit} -Iclasses $(LINTFLAGS) `echo $(O_FILES) | sed 
's/\.o/\.c/g'`
$(LINT) ${cc_inc} $(LINTFLAGS) test_main.c
 

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
An official I want James Earl Jones' cock up my ass t-shirt.
http://www.goats/com

[PATCH Makefile.in] assemble.pl target missing

2002-04-01 Thread Michael G Schwern

DECC's make utility, MMS, speaks a very, very strict and unforgiving
dialect of make.  It's very useful for finding things like macros
defined twice or missing targets:

$ mms
%MMS-W-MBREDEFILL, Illegal attempt to redefine macro 'LD'


test : $(TEST_PROG) assemble.pl .test_dummy
%MMS-W-DRVPARSERR, Parser error: syntax error in file USER1:[SCHWERN.SRC.PARRO
T]MAKEFILE.;10, line 392.
%MMS-F-DRVBADPARSE, Parser detected a fatal syntax error in the description file
..

which translates into:

LD is defined twice.
assemble.pl isn't defined at all!

the first one is easy enough to take care of.  As for assemble.pl...?

--- Makefile.in 29 Mar 2002 07:07:20 -  1.142
+++ Makefile.in 1 Apr 2002 19:11:18 -
@@ -109,7 +109,6 @@
 C_LIBS = ${libs}
 
 CC = ${cc}
-LD = ${ld}
 PERL = ${perl}
 
 


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Perl_croak(aTHX_ Believe me, you don't want to use \-u\ on a Macintosh);
-- perl.c



[PATCH] VMS fixups. Configure hints Makefile syntax

2002-04-01 Thread Michael G Schwern
 lib/Parrot/OpLib/core.pm lib/Parrot/Jit.pm 
jit/${jitcpuarch}/core.jit jit/${jitcpuarch}/string.jit
+$(INC)/jit_struct.h : jit2h.pl lib/Parrot/OpLib/core.pm lib/Parrot/Jit.pm 
+jit/${jitcpuarch}/core.jit jit/${jitcpuarch}/string.jit
$(PERL) jit2h.pl ${jitcpuarch}  $(INC)/jit_struct.h
 
-docs: docs/.dummy
+docs : docs/.dummy
 
-docs/.dummy:
+docs/.dummy :
cd docs  $(MAKE)  cd ..
 
-$(CLASS_O_FILES):
+$(CLASS_O_FILES) :
cd classes  $(MAKE)  cd ..
 
-languages: languages.dummy
+languages : languages.dummy
 
-languages.dummy:
+languages.dummy :
cd languages  $(MAKE)  cd ..
 
 
@@ -389,30 +394,30 @@
 #
 ###
 
-test: $(TEST_PROG) assemble.pl .test_dummy
+test : $(TEST_PROG) assemble.pl test_dummy
 
-.test_dummy:
+test_dummy :
$(PERL) t/harness
 
-testp: $(TEST_PROG) assemble.pl blib/lib/libcore_prederef$(SO) 
blib/lib/libparrot$(SO) $(TEST_PROG_SO) .test_dummy_p
+testp : $(TEST_PROG) assemble.pl blib/lib/libcore_prederef$(SO) 
+blib/lib/libparrot$(SO) $(TEST_PROG_SO) test_dummy_p
 
-.test_dummy_p:
+test_dummy_p :
$(PERL) t/harness -P
 
-testj: $(TEST_PROG) assemble.pl .test_dummy_j
+testj : $(TEST_PROG) assemble.pl test_dummy_j
 
-.test_dummy_j:
+test_dummy_j :
$(PERL) t/harness -j
 
-quicktest: $(TEST_PROG) assemble.pl .quicktest_dummy
+quicktest : $(TEST_PROG) assemble.pl quicktest_dummy
 
-.quicktest_dummy:
+quicktest_dummy :
$(PERL) t/harness quick
 
-mopstest: $(TEST_PROG) examples/assembly/mops.pbc
+mopstest : $(TEST_PROG) examples/assembly/mops.pbc
$(TEST_PROG) examples/assembly/mops.pbc
 
-lifetest: $(TEST_PROG) examples/assembly/life.pbc
+lifetest : $(TEST_PROG) examples/assembly/life.pbc
$(TEST_PROG) examples/assembly/life.pbc
 
 
@@ -422,7 +427,7 @@
 #
 ###
 
-clean: testclean
+clean : testclean
$(RM_F) $(O_FILES)
$(RM_F) *.s
$(RM_F) $(FLUID_FILES)
@@ -436,23 +441,23 @@
cd classes  $(MAKE) clean  cd ..
cd languages  $(MAKE) clean  cd ..
 
-testclean:
+testclean :
$(RM_F) t/op/*.pasm t/op/*.pbc t/op/*.out
 
-realclean: clean
+realclean : clean
$(RM_F) $(STICKY_FILES)
 
-distclean:
-   $(PERL) -MExtUtils::Manifest=filecheck -le ${PQ}sub 
ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1;unlink $$_ for 
filecheck()${PQ}
+distclean :
+   $(PERL) -MExtUtils::Manifest=filecheck -le ${PQ}sub 
+ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1;unlink $$_ for 
+filecheck()${PQ}
 
-cvsclean:
-   $(PERL) -MExtUtils::Manifest=filecheck -le ${PQ}sub 
ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1; do { unlink $$_ 
unless $$_ =~ m!(?:CVS/|\.cvs)! } for filecheck()${PQ}
+cvsclean :
+   $(PERL) -MExtUtils::Manifest=filecheck -le ${PQ}sub 
+ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1; do { unlink $$_ 
+unless $$_ =~ m!(?:CVS/|\.cvs)! } for filecheck()${PQ}
 
-reconfig:
+reconfig :
$(MAKE) clean; $(PERL) Configure.pl --reconfig
 
-manitest:
-   $(PERL) -MExtUtils::Manifest=fullcheck -e fullcheck
+manitest :
+   $(PERL) -MExtUtils::Manifest=fullcheck -e fullcheck
 
 ###
 #
@@ -460,13 +465,13 @@
 #
 ###
 
-update:
+update :
cvs -q update -dP
 
-status:
+status :
cvs -n -q upd -dP
 
-lint: ${test_prog}
-   $(LINT) ${cc_inc} ${cc_hasjit} -Iclasses $(LINTFLAGS) `echo $(O_FILES) | sed 
's/\.o/\.c/g'`
+lint : ${test_prog}
+   $(LINT) ${cc_inc} ${cc_hasjit} -Iclasses $(LINTFLAGS) `echo $(O_FILES) | sed 
+'s/\.o/\.c/g'`
$(LINT) ${cc_inc} $(LINTFLAGS) test_main.c
 
--- hints/vms.pl4 Jan 2002 17:39:29 -   1.5
+++ hints/vms.pl1 Apr 2002 21:09:49 -
@@ -1,8 +1,12 @@
 use Cwd;
-$c{ccflags} = 
/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALIAS/include=([.include],\/here\);
+$c{ccflags} = 
+qq{/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALIAS/include=./include};
+
+$c{perl} = MCR $c{perl};
+
 if (!defined $c{exe}) {
   $c{exe} = exe;
 }
+
 {
local $^W;  #no warnings on redefinition
 
@@ -10,8 +14,11 @@
my $name;
$name = shift;
$name = test unless $name;
-   system($c{cc} $c{ccflags} $name.c) and die C compiler died!;
-   system(link/exe=test_siz $name) and die Link failed!;
+my $cmd = $c{cc} $c{ccflags} $name.c;
+   system($cmd) and die C compiler died!  Command was '$cmd';
+
+$cmd = link/exe=test_siz $name;
+   system($cmd) and die Link failed!  Command was '$cmd';
};
 
*runtestc=sub {


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern

Re: Misc portability cleanups

2002-03-30 Thread Michael G Schwern

On Sun, Mar 31, 2002 at 12:49:08AM -0500, Melvin Smith wrote:
 I did some browsing of the code for potential problems in compiling
 for embedded platforms and/or general porting and here are some of the
 things I found.

Do embedded C compilers often not conform to ANSI C 89?


 1- assert.h and use of assert()
 assert is easy enough to implement we need to do this and not depend
 on its existence on the target because its not guaranteed.

assert is part of ANSI C 89, it should always be there.  The only
limitation is the expression must be an int.


 2- errno.h same thing.

errno is also in ANSI C 89.

However, using errno to transmit error messages has bitten us in the
ass in Perl5.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Monkey tennis



Re: 64 bit Debian Linux/PowerPC OK but very noisy

2002-03-17 Thread Michael G Schwern

On Sun, Mar 17, 2002 at 10:16:13AM -0800, Brent Dax wrote:
 Michael G Schwern:
 # On Sat, Mar 16, 2002 at 02:36:45PM -0800, Hong Zhang wrote:
 # 
 #  Can you check what is the sizeof(INTVAL) and sizeof(void*)?
 #  Some warnings should not have happened.
 #
 # (Note: Not a C programmer)
 #
 # INTVAL?  I can't find where its defined.
 
 INTVAL is in config.h.  Make sure you #define PARROT_IN_CORE--or you can
 just test Parrot_Int, which should be the same thing and is publicly
 defined.

From config.h

typedef long long INTVAL;
typedef unsigned long long UINTVAL;


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Out of ammunition.  God save the King.



Re: 64 bit Debian Linux/PowerPC OK but very noisy

2002-03-17 Thread Michael G Schwern

On Sun, Mar 17, 2002 at 12:50:57PM -0800, Hong Zhang wrote:
 
 It looks like you are running in 32-bit environment, but
 using 64-bit INTVAL. The INTVAL must be the same size as
 void* in order to cast between them without warning.
 Please try to reconfig using 32-bit INTVAL, or running
 process in 64-bit mode.

Huh?

Remember, I am not a C programmer.  I just took my perl 5.6.1 that's
compiled with 64 bit ints and ran Configure.pl with it.  


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Out of ammunition.  God save the King.



Re: [PATCH Configure.pl] (still broken) Re: OpenVMS can't get past configure

2002-03-17 Thread Michael G Schwern

On Sun, Mar 17, 2002 at 05:06:35PM -0800, Brent Dax wrote:
 # Checking some things by compiling and running another small C
 # program (this
 # could take a while):
 #
 #   Building ./testparrotsizes.cfrom testparrotsizes_c.in...
 #
 #
 # #include parrot/parrot.h
 # #include parrot/parrot.h
 # ..^
 # ..^
 # %CC-F-NOINCLFILEF, Cannot find file parrot/parrot.h
 # specified in #include directive.
 # %CC-F-NOINCLFILEF, Cannot find file parrot/parrot.h
 # specified in #include directive.
 # at line number 9 in file USER1:[SCHWERN.SRC.PARROT]TESTPARROTSIZES.C;1
 # at line number 9 in file USER1:[SCHWERN.SRC.PARROT]TESTPARROTSIZES.C;1
 # C compiler died! at (eval 1) line 13.
 # %RMS-E-FNF, file not found
 
 Yikes.  Does the C compiler recognize that sort of path?  How about
 the -I switch (it may be set differently by VMS's hints file) that tells
 it to look in ./include?

main::(configure.pl:668):   compiletestc(testparrotsizes);
  DB2 s
main::CODE(0x7a1c8c)((eval 4)[configure.pl:297]:10):
10: my $name;
  DB2 n
main::CODE(0x7a1c8c)((eval 4)[configure.pl:297]:11):
11: $name = shift;
  DB2 
main::CODE(0x7a1c8c)((eval 4)[configure.pl:297]:12):
12: $name = test unless $name;
  DB2 
main::CODE(0x7a1c8c)((eval 4)[configure.pl:297]:13):
13: system($c{cc} $c{ccflags} $name.c) and die C compiler 
died!;
  DB2 x $c{cc} $c{ccflags} $name.c
0  'CC/DECC 
/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALIAS/include=([.include],/here)
 testparrotsizes.c'
  DB3 use Cwd
  DB4 x cwd
0  'USER1:[SCHWERN.SRC.PARROT]'
  DB5 n


#include parrot/parrot.h
#include parrot/parrot.h
..^
..^
%CC-F-NOINCLFILEF, Cannot find file parrot/parrot.h specified in #include directive.
%CC-F-NOINCLFILEF, Cannot find file parrot/parrot.h specified in #include directive.
at line number 9 in file USER1:[SCHWERN.SRC.PARROT]TESTPARROTSIZES.C;3
at line number 9 in file USER1:[SCHWERN.SRC.PARROT]TESTPARROTSIZES.C;3
C compiler died! at (eval 4)[configure.pl:297] line 13.
main::__ANON__[(eval 4)[configure.pl:297]:15]('testparrotsizes') called 
Debugged program terminated.  Use q to quit or R to restart,



Poking around in the DECC manual, there's two problems.
http://www.openvms.compaq.com/commercial/c/5492p004.htm#index_x_113

First, its INCLUDE_DIRECTORY, not INCLUDE (although INCLUDE works).

Second, there seems to be some confusing rules about mixing VMS and
Unix style paths.  It seems that the style used in INCLUDE_DIRECTORY
has to match the style used in the #include.  

   Search the places specified in the /INCLUDE_DIRECTORY qualifier, if
   any. A place that can be parsed successfuly as an OpenVMS file-spec
   and that does not contain an explicit file type or version
   specification is edited to append the default header file type
   specification (.h or .).  
   
   A place containing a / character is considered to be a UNIX-style
   name. If the name in the #include directive also contains a /
   character that is not the first character and is not preceded by a
   ! character (it is not an absolute UNIX-style pathname), then the
   name in the #include directive is appended to the named place,
   separated by a / character, before applying the decc$to_vms
   pathname translation function. The result of the decc$to_vms
   translation is then used as the filespec to try to open.

so this works:

CC/DECC /INCLUDE=(./include) testparrotsizes.c

but you might want to get independent confirmation from the vmsperl
folks about that.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Not king yet



Re: 64 bit Debian Linux/PowerPC OK but very noisy

2002-03-17 Thread Michael G Schwern

On Sun, Mar 17, 2002 at 09:21:12PM -0800, Brent Dax wrote:
 # Remember, I am not a C programmer.  I just took my perl 5.6.1 that's
 # compiled with 64 bit ints and ran Configure.pl with it.
 
 Okay.  When Configure asks:
 
   How big would you like integers to be? [long long]
 
 just type 'long' (without quotes) and hit enter.  You won't get 64-bit
 support, but you will get a building Parrot, which is usually a good
 thing.  ;^)

Well, the point isn't that Parrot builds.  The point is that Configure
should DWIM when I throw it Interesting (in the Chinese sense) perl
configurations.  Currently it doesn't.

If Parrot is busted wrt 64 bit ints on 32 bit platforms, could
Configure just throw a warning?


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
rocking chairIn the old days (say, Amiga :-) we had only kilobytes
of stack.  And the road to school was surrounded by hungry wolves.
And it was steep uphill.  Both ways./rocking chair
-- Jarkko Hietaniemi in [EMAIL PROTECTED]



Stock Debian Linux/PowerPC OK

2002-03-16 Thread Michael G Schwern
-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -Wall -Wstrict-prototypes -Wmissing-prototypes -Winline 
-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion 
-Waggregate-return -Winline -W -Wno-unused -Wsign-compare-I../include -o default.o 
-c default.c
default.pmc: In function `Parrot_default_get_integer_keyed':
default.pmc:50: warning: control reaches end of non-void function
default.pmc: In function `Parrot_default_get_number_keyed':
default.pmc:58: warning: control reaches end of non-void function
default.pmc: In function `Parrot_default_get_string_keyed':
default.pmc:67: warning: control reaches end of non-void function
default.pmc: In function `Parrot_default_get_pmc_keyed':
default.pmc:87: warning: control reaches end of non-void function

more to come

cc -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -Wall -Wstrict-prototypes -Wmissing-prototypes -Winline 
-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion 
-Waggregate-return -Winline -W -Wno-unused -Wsign-compare-I./include  -o 
encodings/singlebyte.o -c encodings/singlebyte.c
encodings/singlebyte.c: In function `singlebyte_skip_forward':
encodings/singlebyte.c:49: warning: cast discards qualifiers from pointer target type
encodings/singlebyte.c: In function `singlebyte_skip_backward':
encodings/singlebyte.c:57: warning: cast discards qualifiers from pointer target type
cc -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -Wall -Wstrict-prototypes -Wmissing-prototypes -Winline 
-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion 
-Waggregate-return -Winline -W -Wno-unused -Wsign-compare-I./include  -o 
encodings/utf8.o -c encodings/utf8.c
encodings/utf8.c: In function `utf8_skip_forward':
encodings/utf8.c:113: warning: cast discards qualifiers from pointer target type
encodings/utf8.c: In function `utf8_skip_backward':
encodings/utf8.c:125: warning: cast discards qualifiers from pointer target type
cc -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -Wall -Wstrict-prototypes -Wmissing-prototypes -Winline 
-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion 
-Waggregate-return -Winline -W -Wno-unused -Wsign-compare-I./include  -o 
encodings/utf16.o -c encodings/utf16.c
encodings/utf16.c: In function `utf16_skip_forward':
encodings/utf16.c:87: warning: cast discards qualifiers from pointer target type
encodings/utf16.c: In function `utf16_skip_backward':
encodings/utf16.c:112: warning: cast discards qualifiers from pointer target type
cc -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -Wall -Wstrict-prototypes -Wmissing-prototypes -Winline 
-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion 
-Waggregate-return -Winline -W -Wno-unused -Wsign-compare-I./include  -o 
encodings/utf32.o -c encodings/utf32.c
encodings/utf32.c: In function `utf32_skip_forward':
encodings/utf32.c:54: warning: cast discards qualifiers from pointer target type
encodings/utf32.c: In function `utf32_skip_backward':
encodings/utf32.c:62: warning: cast discards qualifiers from pointer target type





-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
you're a bleeding-heart
liberal.  LET ME PLUG MY
ASS WITH PASTE RIGHT NOW!
-- japhy



Re: 64 bit Debian Linux/PowerPC OK but very noisy

2002-03-16 Thread Michael G Schwern

On Sat, Mar 16, 2002 at 02:36:45PM -0800, Hong Zhang wrote:
 
 Can you check what is the sizeof(INTVAL) and sizeof(void*)?
 Some warnings should not have happened.

(Note: Not a C programmer)

INTVAL?  I can't find where its defined.

int main (void) {
printf(int %d, long long %d, void %d\n, 
   sizeof(int), sizeof(long long), sizeof(void*));
}

int 4, long long 8, void 4.

From perl -V:

intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
The key, my friend, is hash browns.
http://www.goats.com/archive/980402.html



Re: Perl6/Parrot status

2002-02-07 Thread Michael G Schwern

On Thu, Feb 07, 2002 at 07:12:18PM +0100, Sebastian Bergmann wrote:
   Is this for real? I can't really believe this...

Yes, I have it on good authority from the Easter Bunny.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
conway: unit of mind expansion.  One Conway == ~20 lines of Perl code
  found in $CPAN/authors/id/D/DC/DCONWAY, which gives the sensation
  of your brain being wrapped around a brick, with kiwi juice squeezed
  on top.
-- Ziggy



Re: Perl6/Parrot status

2002-02-07 Thread Michael G Schwern

On Thu, Feb 07, 2002 at 01:01:43PM -0800, Randal L. Schwartz wrote:
  Jason == Jason Gloudon [EMAIL PROTECTED] writes:
 
 Jason In case everyone is not familiar with the easter bunny concept,
 Jason this is a joke.
 
 It's a joke that everyone is not familiar with the easter bunny
 concept?  I don't get it.  Can someone have Santa Claus explain it to
 me?

This, too, is a joke.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Fuck with me and I will saw off your legs.
http://www.unamerican.com/



[PATCH lib/Parrot/Test.pm] More info about failed compiles

2002-01-30 Thread Michael G Schwern

This little patch makes command failures in tests (ie. if Parrot pukes
on compile) report the command and exit code like so:

# 'perl assemble.pl t/op/basic2.pasm --output t/op/basic2.pbc' failed with exit code 1

I don't know if that's informative enough, but its a start anyway.


--- lib/Parrot/Test.pm  29 Jan 2002 02:32:15 -  1.12
+++ lib/Parrot/Test.pm  30 Jan 2002 11:38:11 -
@@ -37,6 +37,8 @@
   }
 
   system $^X -e \$redir_string;system q{$command};\;
+  my $exit_code = $? / 256;
+  $Builder-diag('$command' failed with exit code $exit_code) if $exit_code;
 }
 
 my $count;


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
sort God kill 9, @ARGV;



Re: *poke* *poke* Parrot::Test - Test::Builder patch

2002-01-28 Thread Michael G Schwern

On Mon, Jan 28, 2002 at 04:07:06PM -0500, Dan Sugalski wrote:
 At 1:55 AM -0500 1/28/02, Michael G Schwern wrote:
 This patch seems to have slipped by in the post New Year's haze.  It
 updates Parrot's version of Test::More to 0.41 and makes Parrot::Test
 use Test::Builder instead of doing Evil things to Test::More.
 
 Where's Test/Builder.pm, though?

Hells bells.  Here it is.

--- /dev/null   Mon Jan 28 02:17:54 2002
+++ Test/Builder.pm Sat Jan 12 17:05:41 2002
@@ -0,0 +1,1189 @@
+package Test::Builder;
+
+use 5.004;
+
+# $^C was only introduced in 5.005-ish.  We do this to prevent
+# use of uninitialized value warnings in older perls.
+$^C ||= 0;
+
+use strict;
+use vars qw($VERSION $CLASS);
+$VERSION = '0.11';
+$CLASS = __PACKAGE__;
+
+my $IsVMS = $^O eq 'VMS';
+
+use vars qw($Level);
+my @Test_Results = ();
+my @Test_Details = ();
+my($Test_Died) = 0;
+my($Have_Plan) = 0;
+my $Curr_Test = 0;
+
+
+=head1 NAME
+
+Test::Builder - Backend for building test libraries
+
+=head1 SYNOPSIS
+
+  package My::Test::Module;
+  use Test::Builder;
+  require Exporter;
+  @ISA = qw(Exporter);
+  @EXPORT = qw(ok);
+
+  my $Test = Test::Builder-new;
+  $Test-output('my_logfile');
+
+  sub import {
+  my($self) = shift;
+  my $pack = caller;
+
+  $Test-exported_to($pack);
+  $Test-plan(@_);
+
+  $self-export_to_level(1, $self, 'ok');
+  }
+
+  sub ok {
+  my($test, $name) = @_;
+
+  $Test-ok($test, $name);
+  }
+
+
+=head1 DESCRIPTION
+
+ITHIS IS ALPHA GRADE SOFTWARE  Meaning the underlying code is well
+tested, yet the interface is subject to change.
+
+Test::Simple and Test::More have proven to be popular testing modules,
+but they're not always flexible enough.  Test::Builder provides the a
+building block upon which to write your own test libraries Iwhich can
+work together.
+
+=head2 Construction
+
+=over 4
+
+=item Bnew
+
+  my $Test = Test::Builder-new;
+
+Returns a Test::Builder object representing the current state of the
+test.
+
+Since you only run one test per program, there is Bone and only one
+Test::Builder object.  No matter how many times you call new(), you're
+getting the same object.  (This is called a singleton).
+
+=cut
+
+my $Test;
+sub new {
+my($class) = shift;
+$Test ||= bless ['Move along, nothing to see here'], $class;
+return $Test;
+}
+
+=back
+
+=head2 Setting up tests
+
+These methods are for setting up tests and declaring how many there
+are.  You usually only want to call one of these methods.
+
+=over 4
+
+=item Bexported_to
+
+  my $pack = $Test-exported_to;
+  $Test-exported_to($pack);
+
+Tells Test::Builder what package you exported your functions to.
+This is important for getting TODO tests right.
+
+=cut
+
+my $Exported_To;
+sub exported_to {
+my($self, $pack) = @_;
+
+if( defined $pack ) {
+$Exported_To = $pack;
+}
+return $Exported_To;
+}
+
+=item Bplan
+
+  $Test-plan('no_plan');
+  $Test-plan( skip_all = $reason );
+  $Test-plan( tests = $num_tests );
+
+A convenient way to set up your tests.  Call this and Test::Builder
+will print the appropriate headers and take the appropriate actions.
+
+If you call plan(), don't call any of the other methods below.
+
+=cut
+
+sub plan {
+my($self, $cmd, $arg) = @_;
+
+return unless $cmd;
+
+if( $cmd eq 'no_plan' ) {
+$self-no_plan;
+}
+elsif( $cmd eq 'skip_all' ) {
+return $self-skip_all($arg);
+}
+elsif( $cmd eq 'tests' ) {
+if( $arg ) {
+return $self-expected_tests($arg);
+}
+elsif( !defined $arg ) {
+die Got an undefined number of tests.  Looks like you tried to .
+say how many tests you plan to run but made a mistake.\n;
+}
+elsif( !$arg ) {
+die You said to run 0 tests!  You've got to run something.\n;
+}
+}
+}
+
+=item Bexpected_tests
+
+my $max = $Test-expected_tests;
+$Test-expected_tests($max);
+
+Gets/sets the # of tests we expect this test to run and prints out
+the appropriate headers.
+
+=cut
+
+my $Expected_Tests = 0;
+sub expected_tests {
+my($self, $max) = @_;
+
+if( defined $max ) {
+$Expected_Tests = $max;
+$Have_Plan  = 1;
+
+$self-_print(1..$max\n) unless $self-no_header;
+}
+return $Expected_Tests;
+}
+
+
+=item Bno_plan
+
+  $Test-no_plan;
+
+Declares that this test will run an indeterminate # of tests.
+
+=cut
+
+my($No_Plan) = 0;
+sub no_plan {
+$No_Plan= 1;
+$Have_Plan  = 1;
+}
+
+=item Bskip_all
+
+  $Test-skip_all;
+  $Test-skip_all($reason);
+
+Skips all the tests, using the given $reason.  Exits immediately with 0.
+
+=cut
+
+my $Skip_All = 0;
+sub skip_all {
+my($self, $reason) = @_;
+
+my $out = 1..0;
+$out .=  # Skip $reason if $reason;
+$out .= \n;
+
+$Skip_All = 1;
+
+$self-_print($out) unless $self-no_header;
+exit(0);
+}
+
+=back
+
+=head2 Running tests
+
+These actually run the tests, analogous

Re: *poke* *poke* Parrot::Test - Test::Builder patch

2002-01-28 Thread Michael G Schwern

On Mon, Jan 28, 2002 at 09:36:19PM -0500, Dan Sugalski wrote:
 At 7:47 PM -0500 1/28/02, Michael G Schwern wrote:
 On Mon, Jan 28, 2002 at 04:07:06PM -0500, Dan Sugalski wrote:
  At 1:55 AM -0500 1/28/02, Michael G Schwern wrote:
  This patch seems to have slipped by in the post New Year's haze.  It
  updates Parrot's version of Test::More to 0.41 and makes Parrot::Test
  use Test::Builder instead of doing Evil things to Test::More.
 
  Where's Test/Builder.pm, though?
 
 Hells bells.  Here it is.
 
 And the patch is in. Thanks.

Thanks.  Simon mentioned something about Parrot::Test not reporting
segfaults and weird exit codes well?


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Right Wing Enema:
Flush Immorality Now!
God gums gay gorgings.
-- boojum



Re: *poke* *poke* Parrot::Test - Test::Builder patch

2002-01-28 Thread Michael G Schwern

On Mon, Jan 28, 2002 at 09:33:06PM -0800, Steve Fink wrote:
 On Mon, Jan 28, 2002 at 09:36:19PM -0500, Dan Sugalski wrote:
  At 7:47 PM -0500 1/28/02, Michael G Schwern wrote:
  On Mon, Jan 28, 2002 at 04:07:06PM -0500, Dan Sugalski wrote:
   At 1:55 AM -0500 1/28/02, Michael G Schwern wrote:
   This patch seems to have slipped by in the post New Year's haze.  It
   updates Parrot's version of Test::More to 0.41 and makes Parrot::Test
   use Test::Builder instead of doing Evil things to Test::More.
  
   Where's Test/Builder.pm, though?
  
  Hells bells.  Here it is.
  
  And the patch is in. Thanks.
 
 *kaboom*
 
 From the commit log:
 
 Parrot::Test no longer exports Test::More's functions.  Instead they
 can simply be used together.  The few tests which used Test::More
 features (ie. skip) have 'use Test::More' added.

Is there something wrong with rsync cvs.perl.org::parrot-HEAD?  It
doesn't seem to keep up to date.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
It's Airplane Glue sniffing time!



Re: *poke* *poke* Parrot::Test - Test::Builder patch

2002-01-28 Thread Michael G Schwern

On Tue, Jan 29, 2002 at 12:39:36AM -0500, Dan Sugalski wrote:
 Dammit, I had that working before I committed things. I'll fix.

Looks like things drifted a bit since I wrote the patch.  Want me to
do it over?

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
I need a SHOWER a BURGER and some ROBOTS, STAT!
-- http://www.angryflower.com/allrigh.gif



*poke* *poke* Parrot::Test - Test::Builder patch

2002-01-27 Thread Michael G Schwern

This patch seems to have slipped by in the post New Year's haze.  It
updates Parrot's version of Test::More to 0.41 and makes Parrot::Test
use Test::Builder instead of doing Evil things to Test::More.

Less Evil is Good.

http:[EMAIL PROTECTED]/msg07760.html


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Stupid am I?  Stupid like a fox!



When Licenses Attack

2002-01-13 Thread Michael G Schwern

Attached is the legal document that comes with Ruby.  In it you'll
find out what happens if you don't enforce a uniform license of your
project.  It contains one or more of the following...

LGPL
Free Software License
GPL
Artistic License
Public domain
Regents of USC
Sun
old-style BSD
Aladdin Enterprises
new-style BSD
beer-ware
semi-public-domain

Beware any software license that comes compressed.


I just post this as a cautionary tale.  The next time you think
Parrot's licensing policy is getting in your way, it could be worse.

It could be beer-ware.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
IMHO bugs in Perl 5 shouldn't carry over to Perl 6. (Unless, of course,
we *like* the bugs... ;)
-- Ken Fox in [EMAIL PROTECTED]


LEGAL NOTICE INFORMATION


All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.

regex.[ch]:

  These files are under LGPL.  Treat them as LGPL says. (See the file
  LGPL for details)

Extended regular expression matching and search library.
Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc.

The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file LGPL.  If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */

Multi-byte extension added May, 1993 by t^2 (Takahiro Tanimoto)
Last change: May 21, 1993 by t^2
removed gapped buffer support, multiple syntax support by matz [EMAIL PROTECTED]
Perl5 extension added by matz [EMAIL PROTECTED]
UTF-8 extension added Jan 16 1999 by Yoshida Masato  [EMAIL PROTECTED]

configure:

  This file is free software.

Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.

This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.

config.guess:
config.sub:
parse.c:

  As long as you distribute these files with the file configure, they
  are covered under the Ruby's license.

  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
  Free Software Foundation, Inc.

This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

As a special exception to the GNU General Public License, if you
distribute this file as part of a program that contains a
configuration script generated by Autoconf, you may include it under
the same distribution terms that you use for the rest of that program.

util.c (partly):
win32/win32.[ch]:

  You can apply the Artistic License to these files. (or GPL,
  alternatively)

Copyright (c) 1993, Intergraph Corporation

You may distribute under the terms of either the GNU General Public
License or the Artistic License, as specified in the perl README file.

lib/getoptlong.rb:

  This file is under GPL.  Treat them as GPL says. (See the file GPL
  for details)

Copyright (C) 1998, 1999, 2000  Motoyuki Kasahara

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

st.[ch]:
x68/*:
missing/alloca.c:
missing/dup2.c:
missing/finite.c:
missing/hypot.c:
missing/isinf.c:
missing/isnan.c

Big Bucket o' Warnings

2002-01-12 Thread Michael G Schwern

Attached is a build of a just rsync'd parrot on Linux/PowerPC machine.
Stock configure using Debian's perl (so nothing fancy like 64bit
integers).

There's a lot of warnings.

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Obscenity is the last resort of the illiterate, Mother Fucker
-- KAL



parrot.out.gz
Description: Binary data


[PATCH] Parrot::Test meets Test::Builder

2002-01-12 Thread Michael G Schwern
) = @_;
-return 0 unless @$a1 == @$a2;
 return 1 if $a1 eq $a2;
 
 my $ok = 1;
-for (0..$#{$a1}) {
-my($e1,$e2) = ($a1-[$_], $a2-[$_]);
+my $max = $#$a1  $#$a2 ? $#$a1 : $#$a2;
+for (0..$max) {
+my $e1 = $_  $#$a1 ? $DNE : $a1-[$_];
+my $e2 = $_  $#$a2 ? $DNE : $a2-[$_];
+
+push @Data_Stack, { type = 'ARRAY', idx = $_, vals = [$e1, $e2] };
 $ok = _deep_check($e1,$e2);
+pop @Data_Stack if $ok;
+
 last unless $ok;
 }
 return $ok;
@@ -766,7 +1009,7 @@
 
 my $eq;
 {
-# Quiet unintialized value warnings when comparing undefs.
+# Quiet uninitialized value warnings when comparing undefs.
 local $^W = 0; 
 
 if( $e1 eq $e2 ) {
@@ -783,7 +1026,21 @@
 {
 $ok = eq_hash($e1, $e2);
 }
+elsif( UNIVERSAL::isa($e1, 'REF') and
+   UNIVERSAL::isa($e2, 'REF') )
+{
+push @Data_Stack, { type = 'REF', vals = [$e1, $e2] };
+$ok = _deep_check($$e1, $$e2);
+pop @Data_Stack if $ok;
+}
+elsif( UNIVERSAL::isa($e1, 'SCALAR') and
+   UNIVERSAL::isa($e2, 'SCALAR') )
+{
+push @Data_Stack, { type = 'REF', vals = [$e1, $e2] };
+$ok = _deep_check($$e1, $$e2);
+}
 else {
+push @Data_Stack, { vals = [$e1, $e2] };
 $ok = 0;
 }
 }
@@ -804,13 +1061,18 @@
 
 sub eq_hash {
 my($a1, $a2) = @_;
-return 0 unless keys %$a1 == keys %$a2;
 return 1 if $a1 eq $a2;
 
 my $ok = 1;
-foreach my $k (keys %$a1) {
-my($e1, $e2) = ($a1-{$k}, $a2-{$k});
+my $bigger = keys %$a1  keys %$a2 ? $a1 : $a2;
+foreach my $k (keys %$bigger) {
+my $e1 = exists $a1-{$k} ? $a1-{$k} : $DNE;
+my $e2 = exists $a2-{$k} ? $a2-{$k} : $DNE;
+
+push @Data_Stack, { type = 'HASH', idx = $k, vals = [$e1, $e2] };
 $ok = _deep_check($e1, $e2);
+pop @Data_Stack if $ok;
+
 last unless $ok;
 }
 
@@ -840,60 +1102,71 @@
 return eq_array( [sort _bogus_sort @$a1], [sort _bogus_sort @$a2] );
 }
 
-
 =back
 
-=head1 NOTES
 
-Test::More is Bexplicitly tested all the way back to perl 5.004.
+=head2 Extending and Embedding Test::More
 
-=head1 BUGS and CAVEATS
+Sometimes the Test::More interface isn't quite enough.  Fortunately,
+Test::More is built on top of Test::Builder which provides a single,
+unified backend for any test library to use.  This means two test
+libraries which both use Test::Builder Bcan be used together in the
+same program.
+
+If you simply want to do a little tweaking of how the tests behave,
+you can access the underlying Test::Builder object like so:
 
 =over 4
 
-=item Making your own ok()
+=item Bbuilder
 
-This will not do what you mean:
+my $test_builder = Test::More-builder;
 
-sub my_ok {
-ok( @_ );
-}
+Returns the Test::Builder object underlying Test::More for you to play
+with.
 
-my_ok( 2 + 2 == 5, 'Basic addition' );
+=cut
 
-since ok() takes it's arguments as scalars, it will see the length of
-@_ (2) and always pass the test.  You want to do this instead:
+sub builder {
+return Test::Builder-new;
+}
 
-sub my_ok {
-ok( $_[0], $_[1] );
-}
+=back
+
+
+=head1 NOTES
+
+Test::More is Bexplicitly tested all the way back to perl 5.004.
+
+=head1 BUGS and CAVEATS
+
+=over 4
+
+=item Making your own ok()
 
-The other functions act similiarly.
+If you are trying to extend Test::More, don't.  Use Test::Builder
+instead.
 
-=item The eq_* family have some caveats.
+=item The eq_* family has some caveats.
 
 =item Test::Harness upgrades
 
 no_plan and todo depend on new Test::Harness features and fixes.  If
-you're going to distribute tests that use no_plan your end-users will
-have to upgrade Test::Harness to the latest one on CPAN.
+you're going to distribute tests that use no_plan or todo your
+end-users will have to upgrade Test::Harness to the latest one on
+CPAN.  If you avoid no_plan and TODO tests, the stock Test::Harness
+will work fine.
 
 If you simply depend on Test::More, it's own dependencies will cause a
 Test::Harness upgrade.
 
 =back
 
-=head1 AUTHOR
-
-Michael G Schwern Elt[EMAIL PROTECTED]gt with much inspiration from
-Joshua Pritikin's Test module and lots of discussion with Barrie
-Slaymaker and the perl-qa gang.
-
 
 =head1 HISTORY
 
 This is a case of convergent evolution with Joshua Pritikin's Test
-module.  I was largely unware of its existence when I'd first
+module.  I was largely unaware of its existence when I'd first
 written my own ok() routines.  This module exists because I can't
 figure out how to easily wedge test names into Test's interface (along
 with a few other problems).
@@ -911,16 +1184,37 @@
 some tests.  You can upgrade to Test::More later (its forward
 compatible).
 
-LTest for a similar testing module

Re: [PATCH] Skip tests, don't comment them out

2002-01-10 Thread Michael G Schwern

On Thu, Jan 10, 2002 at 03:56:57PM +, Simon Glover wrote:
 
  As the subject line says.

Technically that should be a TODO.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
come sing my fun song
my bologna has a first name
p a s t e
-- Fmh



Re: [PATCH] It's a trick, sir...

2002-01-04 Thread Michael G Schwern

On Mon, Dec 31, 2001 at 10:57:54PM -0500, Bryan C. Warnock wrote:
 ...there's *two* of them!

My very first ever attempt at obfuscated code circa 1997.

#!/usr/lib/perl -w

use strict;

eval unpack('u*', 'JOKE');
M;7D@0'-IF5S(#T@7H;6%N('-Q=6%D('!L871O;VX@=5A;2!C;VUP86YY
M()A='1A;QI;VX@F5G:6UE;G0@8G)I9V%D90H)0D@(!D:79IVEO;BD[
M@IM2`E;G5M,G=OF0[D!N=6TR=V]R9'L@;6%P('L@,BHJ)%\@?2`P+BY`
MVEZ97,@?2`](`H@('%W*!O;F4@='=O('1HF5E(YI;F4@V5V96YT965N
M('1H:7)T2UO;F4@VEX='DM='=O(`H)(!O;F4M:'5N9')E9UA;F0M=AI
MG1Y('1W;RUH=6YDF5D+6%N9UF:69T2US:7@*2`@9FEV92UH=6YDF5D
M+6%N9UT=V5L=F4@*3L*G!R:6YT(5V86P@)W%Q?N=6YP86-K*=U*BL
M(#P\)TI/2T4G*2XG?[DTP,B%,.38]23M66$`[5CA`-$9=33@V6$`Z-EE
M.#995#Q'1$`Z-RQ`/2I03U-4P[)D5..5(A5#HG*4\*-CTV/4@H)S%(.3(A
M,SA6750Z-RU(*953SM7*5,K0!@F`*2D]+10H*(RCFUY(1N=6T@/2`Q
M.PIM2`DVEZ93L*9F]R(1S:7IE(A`VEZ97,I('L*(!PFEN=!E=F%L
M(=Q7PG+G5N%C:R@G=2HG+`\/=*3TM%)RDN)WPG.PI-(D4M53DF,44[
M1E%9*Q2#DW1$`Z)C5!/$(A02@F+4@X-E%,.3991SDR(5DY-E%,.38P0#E'
M*4\[,B%/DT]1C52*Q2#DR(4@Z-E%,*T)83B)`2$(R,B%!.S(A+#M7*40H
M)%5#-%9=4CLF-50Z(B%/.4(A5#HF-$`*334W(5`Y-RE3.R9=5#TF-5(Q)B5-
M.T(A+3M675(H,F!`,5I13@W,44\5S!`-%]3SQ,5,[-B5.*]2`I-.U!(
M0#DW.44\0B%,.CY13DB)$`H)$1'.R900#A7-50H)T5//3H0#A-5,](F!$
M/%9%6CDR(50[4B%2DTZ-BE.U994R@R*%LB0$DS.U(A5#HF-$`[)C5'.C9=
M3B@F+4\[-E5!.T8Q13Q(50]-RE./%(A5#M2(4@*33HW+$`T5B52.58U3CTB
M4HH12U!/$8]13M',$$H(B$S.3991@F14XH)EU5/$(A0CDW+50H(C%3.C=)
M10I-*#(H*B)$)4XY(B%4.B8T0#16)5(Y5C5./2(A63DV44P\4E`J*$4I3SHV
M/4@](B1`*0Y03LF4$`Z-EA!DTH(B$C,B1!*#(D02$T1#TE*#(H*B)$)4XY
M(B%4.B8T0DG+4D^1C1`.59=13Q2(4\]1C52*Q2#DR(4@*33HV44PK0EA.
M*8D0#Q6754[1C!`.U8X0#@R(50Y-RE2.C8I3#DR(4(X-S%4.R8T0#DV65,]
M-C53*#!),PI-.%I13@V55,H)EU*Q13Q'*4\\0E!`.#991@B,4X]-E12
M/59=4CDG3$0[1S5-/S(A8#Y53$`I)EE5DT[,F!=+S)@42@C7$`I5D%%.#8P
M0#A674TY-RQ'*-(0E6044X-C%3*8M3SLV-$H)55=*I3SLF44D*,CM
M/$`Y)EU7.T(A5#HF-$`Z)D5,.R)8*@I@DI/2T4*B`@)YU;2`](1N=6T@
M*B`R.PI]@H*')I;G0@979A;`G7%\)RYU;G!A8VLH)W4J)RP\/=*3TM%
M)RDN)WPG.PI-*$4I23E6050H,BA`/%8M4CDV)4T\4B%4.B8T0#LF-4Z-EU.
M*8M3SLV54$[1C%%/$)00A'+44[1C!`DTZ-EA`/29!12@G/4@[5E%%*8I
M3#M6740^,B%,.38]23M66$$H0$@J-%90#TF044H)2U!/$8]13M',$`*33XV
M-4P[)RQ,(D(I,CM614Z)S!,*0Y(3,D4$`R-%A!*(A(S(D)3(Q5#1!*$!(
M*C`V640H)S%(.3(A3`I-.38]23M66$`Y5EU%/%(A3SU-5(H)S%(.3(A2#HV
M44PK0EA.*8D0#Q6754[1C!`.U8X0#@R(50Y-RE2DTZ-BE,.3(A0C@W,50[
M)C1`.3994STV-5,H,$DS.%I13@V55,H)EU*Q13Q'*4\\0E!`.#991@B
M,4X*33TV5%(]5EU2.2=,1#M'-4T_,B%(.38E1#Q2(4,[5E5%*I3SLF44D[
M1CQ`.29=5SM(50Z)C1`.B9%3`I-.R)8*B)$)$`[-B5.*8M3SLV-5,H)RE5
M.T9923M/$`[5SE%/$(A5#HF-$`Z)D5,.R)00#TF044H)%%%DTY5D5/.T(A
M0SM654TX-EE$.3H0#E7*4$X1RQ`.B9%32@F)5,H)D%%*I53M'+H\)B53
M/2(A03M,$`*33XV-4P[)RQ,(D(I-SHF)50I5RQ`.59=23M/$`[5EA`.UY
M13Q(50Z)C52.3-02A`2HU)EQ`/59!20I-.%9`0#TF044H)RU/.R8Q23DW
M*$`\1C50.R9%13Q24$`]5D54.B(A02@F+5(X-TE%.2(A3#M674LH)D5.DTH
M)D%)/%(A13XV-5,K8$A-$U3BLB(5,Z-RA!*(A*3TG+$`X-EA`.#950CTW
M+4@K(B%4.B8U4CDR/5,*+R@G,5[4B%/.4(A5#HF-4TH,B@JF`*2D]+10H*
M(R!*;VME(9R;VT@4W1E=F5N($H@3W=E;G,*(R!#;V1E(9R;VT@36EC:%E
M;!'(%-C:'=EFX@/'-C:'=EFY`W1AFUE9EA+FYE=#X*(R!'964L('=A
5VXG=!T:%T(%=/4E1(($E4/R$*
`
JOKE



-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
and I pull out the Magnum from under the desk where I keep it in case
someone laughs at a joke that's so dry it's got a built in
water-fountain, and blow the lot of them away as a community Service.
-- BOFH



Re: JIT me some speed!

2001-12-20 Thread Michael G Schwern

Dan Sugalski [EMAIL PROTECTED] wrote:
 To run a program with the JIT, pass test_parrot the -j flag and watch it
 scream. Well, scream if you're on x86 Linux or BSD (I get a speedup on
 mops.pbc of 35x) but it's a darned good place to start.

$ ./test_parrot -j examples/assembly/mops.pbc 
Illegal instruction

That's not supposed to happen is it?  Its Linux/PowerPC, so maybe it
is supposed to happen.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
mendel ScHWeRnsChweRNsChWErN   SchweRN  SCHWErNSChwERnsCHwERN
  sChWErn  ScHWeRn  schweRn   sCHWErN   schWeRnscHWeRN 
   SchWeRN  scHWErn SchwErn   scHWErn   ScHweRN   sChwern  
scHWerNscHWeRn   scHWerNScHwerN   SChWeRN scHWeRn  
SchwERNschwERnSCHwern  sCHWErN   SCHWErN   sChWeRn 



Re: Nmake is stupid.

2001-12-12 Thread Michael G Schwern

On Wed, Dec 12, 2001 at 01:58:49PM -0500, Dan Sugalski wrote:
 At 08:54 PM 12/12/2001 +0200, Jaen Saul wrote:
 Well, another small post again :)
 As you see, -C doesn't do anything useful on NMAKE. So Win32 is still
 broken. The -C way doesn't work.
 
 VMS is broken this way too, as is anything without GNU make. We'll get your 
 patches integrated in soon, and a longer-term solution (i.e. a perl make) 
 should be ready not too long after that.

Anyone insane enough to try this?
http://www.cpan.org/modules/by-module/Make/Make-1.00.tar.gz

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
Stupid am I?  Stupid like a fox!



Re: Parrot FAQ

2001-12-06 Thread Michael G Schwern

On Thu, Dec 06, 2001 at 12:54:54PM -0500, Dan Sugalski wrote:
 Not that I'm contemplating actually having parrot run z-code natively, 
 but... is there anything in the Z machine that we might want to 
 steal^Wreproduce?

I for one would like a PCKUP_FONEBOOTH_N_DIE op.

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
and that, children, is how to clean and load a .38 revolver.  Questions?



Re: Parrot FAQ

2001-12-04 Thread Michael G Schwern

On Tue, Dec 04, 2001 at 04:27:22PM -0500, Adam Turoff wrote:
 Besides, Schwern is having no end of problems with the Perl QA
 wiki.  I'd much rather put the docs in CVS later this week.

Actually, I make a lot more noise than I'm actually having trouble.
With the exception of that one big glitch (caused by my webmaster
flipping on Apache SuEXEC without telling me) UseModWiki has just
chugged along without maintenance.  Once I found a Wiki implementation
that wasn't total crap, things were fine.  It even has pseudo-RCS
history.

Just don't look at the code.

For the truly lazy there's always http://www.swiki.net.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
If you got the wax out of your ears you could hear the twister picking up
the trailer park of your future!



Re: Request for new feature: attach a perl debugger to a running process

2001-10-29 Thread Michael G Schwern

On Mon, Oct 29, 2001 at 05:27:30PM +, David Trusty wrote:
 I would like to request a new feature for perl:  The ability to
 attach a perl debugger to a running process.

The DB module gives you the tools to do this sort of thing, though
there is some assembly required for certain very large values of
some.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
There is a disurbing lack of PASTE ENEMA on the internet.



Re: Languages in the core source tree?

2001-10-22 Thread Michael G Schwern

On Sun, Oct 21, 2001 at 12:45:14PM -0400, Dan Sugalski wrote:
 Okay, we've now got minimal:
 
   *) Parrot assembly
   *) Perl
   *) Python
   *) JVM
   *) Scheme
   *) Jako
   *) Ruby? (Do we? I can't remember for sure)
 
 support for Parrot. This is a cool thing, but it brings up the questions:
 
 1) Do we put them all in the parrot CVS tree

Yes, most definitely yes.

 2) Do we require them to meet the same levels of quality as the core 
 interpreter?

Sort of.


Those little languages represent the closest thing to a practical
application we have for Parrot at the moment.  More importantly, you
don't have to be an assembly programmer to use them.

As each new feature of Parrot is added, the little languages quickly
make use of them.  If they're widely distributed (ie. with Parrot)
people can quickly make use of the little languages, seeing just how
much they can get away with in such a small space.  So Parrot and the
interpreters will grow in parallel.

This means more people beating on Parrot sooner and with more and
more varied sticks.

However, the author(s) of each individual interpreter should be
responsible for their own language.  Basically, a mini-pumpinking.
This means they *do* have to stand up to the same standards as Parrot
because, essentially, they're acting as very practical test cases.  If
the mini-Scheme interpreter works on Linux but not on VMS, then it's
likely exposed a bug inside Parrot.  Whether or not a release should
be held up because a given language is broken is up to Simon.


So yes, put them in the default Parrot tree.  Later on when they've
matured they can branch off into seperate projects and go their own
way.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
Nature is pissed.
http://www.unamerican.com/



Re: use parrot;

2001-10-20 Thread Michael G Schwern

On Sat, Oct 20, 2001 at 08:11:27PM +0200, raptor wrote:
 will it be possible to do this inside Perl program :
 
 use parrot;
 ...parrot code...
 no parrot;

Bad idea of the day -- Inline::Parrot!


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
HA HA HA  You're all so ridiculous!  But thanks for the money!



Re: PMCs and how the opcode functions will work

2001-10-09 Thread Michael G Schwern

On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote:
 Questions, anyone? ;-)

Will there be a test on this?

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
It sure is fun masturbating.
http://www.unamerican.com/



Re: Perl6 Tinderbox

2001-10-05 Thread Michael G Schwern

On Fri, Oct 05, 2001 at 05:18:07PM -0700, Zach Lipton wrote:
 Because the need for a tinderbox testing platform is fairly urgent right now
 for perl6, I am releasing my (place your favorite adjective in the blank
 here) tinderbox client for perl6 ahead of the near-rewrite that I am working
 on to use Devel::Tinderbox::Reporter (which was just written) and
 Test::Smoke (which wouldn't help perl6 all that much anyway.

There's an existing Parrot::Smoke module, I forget where it is off hand.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
That which stirs me, stirs everything.
-- Squonk Opera, Spoon



Re: SV: OpenVMS

2001-10-03 Thread Michael G Schwern

On Wed, Oct 03, 2001 at 07:09:06PM +0100, Simon Cozens wrote:
 On Wed, Oct 03, 2001 at 01:55:39PM -0400, Dan Sugalski wrote:
  If you want to wait, that's fine. I don't think I'm going to get untangled 
  for another day or three, though.
 
 Waiting might also help to shake out whatever's wrong with Win2K. Maybe
 it's just Brent's system being funny. (And I'd try playing with Compaq
 Test Drive's OpenVMS system, but I can't find gzip, vmstar or, unfortunately,
 perl. And damn, it's been a long time since I used DCL.)

Unpleasent things happen with 5.005_03

$ perl Configure.pl
Subroutine ln redefined at /perl_root/lib/ExtUtils/Manifest.pm line 27.
Parrot Configure
Copyright (C) 2001 Yet Another Society

Since you're running this script, you obviously have
Perl 5--I'll be pulling some defaults from its configuration.

First, I'm gonna check the manifest, to make sure you got a 
complete Parrot kit.

Okay, we found everything.  Next you'll need to answer 
a few questions about your system.  Rules are the same 
as Perl 5's Configure--defaults are in square brackets, 
and you can hit enter to accept them.

What C compiler do you want to use? [CC/DECC] 
How about your linker? [Link] 
What flags would you like passed to your C compiler? 
[/float=ieee/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList -I./include] 
Which libraries would you like your C compiler to include? [] 
How big would you like integers to be? [long] 
And your floats? [double] 
What is your native opcode type? [long] 
Okay.  Now I'm gonna probe Perl 5's configuration to see
what headers you have around.  This could take a bit on slow 
machines...
Out of memory!
Out of memory!
%SYSTEM-F-ABORT, abort


bleadperl 12109 is slightly less unpleasent.

Okay.  Now I'm gonna probe Perl 5's configuration to see
what headers you have around.  This could take a bit on slow 
machines...

Alright, now I'm gonna check some stuff by compiling and running
a small C program.  This could take a bit...
Use of uninitialized value in concatenation (.) or string at configure.pl line 137.
%DCL-W-VALREQ, missing qualifier or keyword value - supply all required values 
\INCLUDE\
C compiler died! at configure.pl line 137.
%RMS-E-FNF, file not found



-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
36 haikus
would scare the shit out of me.
Thank goodness for paste!
-- Schwern



Report on Linux/PowerPC w/64 bits

2001-10-01 Thread Michael G Schwern
 91  11.11%  1
t/op/string.t  1   256101  10.00%  2
5 subtests skipped.
Failed 6/8 test scripts, 25.00% okay. 21/99 subtests failed, 78.79% okay.
make: *** [test] Error 29



-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One



Linux/PowerPC w/o 64bits a-ok

2001-10-01 Thread Michael G Schwern

Debian Linux/PowerPC without 64 bit integers tests out 100% ok.

-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
Let's face it, said bearded Rusty Simmons, opening a can after the
race.  This is a good excuse to drink some beer.  At 10:30 in the
morning?  Well, it's past noon in Dublin, said teammate Mike
[Joseph] Schwern.  It's our duty.
-- Sure, and It's a Great Day for Irish Runners 
   Newsday, Sunday, March 20, 1988



Re: Solaris problems with trans.t

2001-09-28 Thread Michael G Schwern

On Sat, Sep 29, 2001 at 05:22:41AM +0200, Buggs wrote:
 if(sin(1) == sin(1.0))

The ubc cc has sin(1) as being 0.000.  You have to cast it to a
double.  SunPRO handles it fine.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One



Re: t/op/number.t output confuses Test::Harnss

2001-09-21 Thread Michael G Schwern

On Fri, Sep 21, 2001 at 11:05:29AM +0200, Mattia Barbon wrote:
 not ok 15 - gt_nc_ic
 # Failed test (Parrot/Test.pm at line 74)
 #  got: undef
 # expected: 'ok 1
 ok 2
 ok 3
 '
 
 So Test::Harenss keeps whining about test 2 answrd ( yes, the PC
 with the brokn keyboard again ) after test 9, and such.

Yes, that problem was exposed by Test::More 0.19 when it started
sending diagnostics to STDOUT instead of STDERR.  0.20 will fix.

I sent in a patch for this (the one that added Test::More into the
distribution) but it seems to have not been applied.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
And God was pleased.
And Dog was happy and wagged his tail.
And Adam was greatly improved.
And Cat did not care one way or the other.
-- http://www.catsarefrommars.com/creationist.htm



Re: Example assembler code (primes.pasm)

2001-09-20 Thread Michael G Schwern

On Wed, Sep 19, 2001 at 02:49:58PM +0100, Leon Brocard wrote:
 Attached is a cute prime number printer.
 
 It strikes me that we need a central place to put these things - it'd
 really help people get stuck into the lowlevel stuff.

It wouldn't hurt to throw it in as a test.  Probably the most
complicated test case we've got at the moment.



-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
If you see an animal with (-) 100 points and (+) 70 points, would you eat it? 
Hell no, and you should run for your life!
 --Alex Chiu, Immortality Guy



Re: Darwin - looking good

2001-09-20 Thread Michael G Schwern

On Thu, Sep 20, 2001 at 12:42:13AM +0100, Robin Houston wrote:
 I only had one real problem with Parrot on Darwin, which really has
 nothing to do with Darwin at all.  The first time I tried to make test
 I got a slew of errors about Test::More, so I diligently went to CPAN
 and downloaded the latest version.

The latest version of the Test-More tarball should have blown up in
your face with a big Don't use this, download Test-Simple instead! 
to prevent exactly this sort of thing from happening.  For some reason
that last version doesn't seem to have made it into
modules/by-module/Test/, it's just sitting in my author directory.

Sorry for the inconvenience, I'll go poke the CPAN folks.


 Are there any plans to remove the dependency of Parrot::Test on
 non-core modules? It's bound to be a stumbling block for quite
 a few people, surely? If not, I'll contribute a patch which
 makes the failure more graceful and informative.

These actually are core, but not until 5.7.2.  And we don't want to
take a Great Leap Backward to Test.pm.

For *exactly* such a contingency (I sound like an Acme saleman now) we
have Test-SDK (remember the SDKs?) which includes new-enough versions
of Test::More, Test::Simple, Test::Inline and Test::Harness in one
handy, easy to install tarball for those of you that don't use the
CPAN shell.

As a third alternative, you can simply distribute Test::Simple/More
(and even the new versions of Test::Harness) as part of parrot, same
as you do Parrot::Test.  That involves the least work for the test
runner.


I'd suggest creating a lib/ directory and moving Parrot/ into it now
before you get a proliferation of individual Perl module directories.
And change the Makefile to this:

PERL = perl
PERLRUN = $(PERL) -Ilib

test:
$(PERLRUN) t/harness

and the other targets that use $(PERL) change to $(PERLRUN).


I could do this myself.  What's the best way to submit a bunch of
file/directory moves?


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
purl Hey, Schwern!  THERE IS A HUGE GAZORGANSPLATTEDFARTMONGERING-
LIGHTENINGBEASTASAURSOPOD BEHIND YOU!  RUN, BEFORE IT GAFLUMMOXES YOUR
INNARDLYBITS!



Re: Complete failure on Linux/PowerPC with 64bit ints.

2001-09-20 Thread Michael G Schwern

On Thu, Sep 20, 2001 at 09:03:45AM -0400, Andy Dougherty wrote:
 On Thu, 20 Sep 2001, Michael G Schwern wrote:
  But if we run Configure.pl with bleadperl that *does* use 64bit ints
  and has debugging flags on, there's trouble.
 
  And all of the tests fail with This isn't Parrot bytecode!
 
 That's because assemble.pl hasn't been patched yet to use the right
 pack_type.  You can either apply my patch from yesterday or you can
 hand-patch the pack_type for 'i' to be 'q'.

This one?
http:[EMAIL PROTECTED]/msg04540.html


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
Death follows me like a wee followey thing.
-- Quakeman



Re: instructions per second benchmark (in parrot ;)

2001-09-20 Thread Michael G Schwern

On Thu, Sep 20, 2001 at 04:54:21PM -0500, Brian Wheeler wrote:
 Since all benchmarks are crap anyway, I've written a test which tells
 the average number of instructions per second.  On my athlon 700 I get
 3966053 instructions per second and on my PIII 866 I get 5081485
 instructions per second.  Do those sound like reasonable numbers?  Of
 course, since time_i is one of the opcodes looped, it probably brings
 the numbers down.

1.59 MIPS here.  1.77 if I shut off the mp3 player. :)

G3/266.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
mendel ScHWeRnsChweRNsChWErN   SchweRN  SCHWErNSChwERnsCHwERN
  sChWErn  ScHWeRn  schweRn   sCHWErN   schWeRnscHWeRN 
   SchWeRN  scHWErn SchwErn   scHWErn   ScHweRN   sChwern  
scHWerNscHWeRn   scHWerNScHwerN   SChWeRN scHWeRn  
SchwERNschwERnSCHwern  sCHWErN   SCHWErN   sChWeRn 



Re: instructions per second benchmark (in parrot ;)

2001-09-20 Thread Michael G Schwern

On Thu, Sep 20, 2001 at 11:52:50PM +0100, Tom Hughes wrote:
 I have test.pasm reporting 7.14M ops/sec on a 200MHz K6 running
 linux with the interpreter compiled -O3. That's about twice the
 speed that I get without any optimisation.

Oh, right.  Optimization.

I'm getting 2.67 MIPS with -O3.

Hmmm, why would a K6/200 come out so much faster than a G3/266?  If
anything it should be the other way around.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
Jesus hates me.
http://www.unamerican.com/



Re: The core platforms list

2001-09-18 Thread Michael G Schwern

On Tue, Sep 18, 2001 at 02:43:07PM -0400, Dan Sugalski wrote:
 If a platform's not here it's not because we don't want to run on it, 
 rather it's because we can't guarantee the manpower to make it right. (If 
 we can, then new platforms can and will come on board)

I can handle Linux (PowerPC).  There shouldn't be much difference from
x86 except the byte ordering, I hope.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
Maybe they hooked you up with one of those ass-making magazines.
-- brian d. foy as misheard by Michael G Schwern



Re: Math functions? (Particularly transcendental ones)

2001-09-09 Thread Michael G Schwern

On Sun, Sep 09, 2001 at 02:33:17PM +1000, Jeremy Howard wrote:
 Uri Guttman wrote:
   BS == Benjamin Stuhl [EMAIL PROTECTED] writes:
 
 Can anyone think of things I've forgotten? It's been a while since
 I've done numeric work.
 
BS ln, asinh, acosh, atanh2?
 
  dan mentioned log (base anything) but i don't recall ln. and definitely
  the arc hyberbolics are in after i pointed them out. dunno about atanh2.
 
 We only really need ln(). Then [log(y) base x] is simply [ln(y)/ln(x)].
 There's no need to have separate functions for different bases.

If we try to get away with just implementing ln(), we'll probably
waste more time, space and effort answering FAQs about How do I do
log base X in Perl? than we ever would just implementing log(y,
base_x).

Do ln(y) and log(y, base_x) and you pretty much cover everything.

Besides, we have to have at least log(y) for backwards
compatibility--and I don't think because it's mathematically
redundant is a valid reason to bust compatibility for a tiny little
function like log().


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
The desired effect is what you get when you improve your interplanetary 
funksmanship.



Re: Math functions? (Particularly transcendental ones)

2001-09-08 Thread Michael G Schwern

On Sat, Sep 08, 2001 at 02:55:36PM -0400, Uri Guttman wrote:
 zap is an ibm 360/370/390 assembler op code and i bet they
 trademarked/patented/whatevered its name. :)
 
 Zero and Add Packed.
 
 gawd, i can't believe i remembered that. i don't recall exactly what it
 does but i think it was decimal math (packed decimal).

From The Free On-line Dictionary of Computing (06 Jun 01) [foldoc]:

  Zero and Add Packed
  
 language (ZAP) An {IBM 360}/370 {assembly language}
 instruction used when performing {packed arithmatic} to
 initialise an {accumulator}.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
Ooops, fatal mutation in the test script.



Re: Accessing a variable's attributes (was Re: RFC 241 (v1) ...)

2000-09-18 Thread Michael G Schwern

On Mon, Sep 18, 2000 at 04:04:56PM +0100, Simon Cozens wrote:
 On Mon, Sep 18, 2000 at 10:51:52AM -0400, John Porter wrote:
  I would think that if it could be done at all,
  it would only be in extension (formerly XS) code.
 
 Why? I don't want to go to C just to add a flag to a variable. That smacks of
 making easy things hard and hard things impossible. You'll note that that
 isn't the motto of Perl.

I'll have to go with John here.  Mucking about with variable attribute
flags (with the exceptions of the fixed set which have been proposed)
falls firmly into the "hard but possible" realm of things.  It should
be done in XS code.

Also, just being able to tack flags onto a variable means each
variable (that has a flag) would have to carry around a hash!

Anyhow, this doesn't mean someone couldn't write a module to do it and
then you use that.


-- 

Michael G Schwern  http://www.pobox.com/~schwern/  [EMAIL PROTECTED]
Just Another Stupid Consultant  Perl6 Kwalitee Ashuranse
"You are wicked and wrong to have broken inside and peeked at the
 implementation and then relied upon it."
Tom Christiansen in 31832.969261130@chthon



Re: RFC 227 (v1) Extend the window to turn on taint mode

2000-09-15 Thread Michael G Schwern

On Fri, Sep 15, 2000 at 01:52:00AM -, Perl6 RFC Librarian wrote:
 =head1 TITLE
 
 Extend the window to turn on taint mode

As long as we're talking about tainting (this is a good idea, BTW) how
does everyone feel about a few other tainting widgets...

- A way to know when taint mode is on. ($TAINT or something)

This can be useful for debugging and testing purposes.  It might also
be used as a flag to indicate paranoia.  If tainting is on, the
program may wish to do additional security checks which it might not
have done otherwise.

- A way to explicity taint a variable (taint(@this)).

Consider DBI.  It must explicitly taint the results coming from a
database and must to this inside XS.  It would be nice to be able to
easily do this in Perl without alot of messy hacks.  (I had to do this
for Ima::DBI before DBI started tainting its data.  Wasn't fun and
never really worked 100%.)

And no, there shouldn't be an untaint() function.  Orthoginality can
blow me, detainting without filtering should remain hard.

- A way to explicitly check if a variable is tainted (is_tainted(%this))

Useful for debugging and testing.  Also for choosing between a secure
yet slower, more complicated, less featureful method and an unsecure
yet faster, easier, more featureful method.  Also useful for throwing
insecure dependency exceptions of your own (used to have to do this
for Ima::DBI, too.)

is_tainted() would always return false if tainting is off.


Any other basic tainting utilities needed?  I think pretty much
anything else can be built from these.

-- 

Michael G Schwern  http://www.pobox.com/~schwern/  [EMAIL PROTECTED]
Just Another Stupid Consultant  Perl6 Kwalitee Ashuranse
An 87 year old man had no sex at all before wearing my device.
 --Alex Chiu, Immortality Guy



Re: RFC 227 (v1) Extend the window to turn on taint mode

2000-09-15 Thread Michael G Schwern

On Fri, Sep 15, 2000 at 01:03:50PM -0400, Dan Sugalski wrote:
 Take a look at the Taint modules on CPAN. Mine does just these, and I think 
 Tom Phoenix's does a bunch more.

Tom's Taint.pm has never worked for me.  I just tried installing it
again and it failed a bunch of tests (in both 5.005 and 5.6.0, but
different tests) I never knew your Taint existed since they mask each
other in the CPAN shell.  Your tests fail with with an "Insecure
$ENV{PATH}" in IO::File.  (Yeah, I know.  patches welcome)

Anyhow, however these extra tainting functions are implemented is fine
(as long as they work).  The simplest thing would be to just merge and
patch up Taint.pm and distribute it with perl6.

PS  Your Taint.zip archive... something is very odd.  All the filenames came
out lowercase.


-- 

Michael G Schwern  http://www.pobox.com/~schwern/  [EMAIL PROTECTED]
Just Another Stupid Consultant  Perl6 Kwalitee Ashuranse
Work like hell, tell everyone everything you know, close a deal with
a handshake, and have fun.
-- Harold "Doc" Edgerton



Re: RFC 155 - Remove geometric functions from core

2000-08-25 Thread Michael G Schwern

On Fri, Aug 25, 2000 at 09:12:32AM -0400, Stephen P. Potter wrote:
 Lightning flashed, thunder crashed and Michael G Schwern [EMAIL PROTECTED] wh
 ispered:
 | PS  The idea of adding acos, asin and tan is good.
 
 You just answered your own question.  It is very difficult to add new
 functions to the core.  It is very easy to write new modules.  Doesn't it
 make sense that if you have to use Math::Trig to get to acos and friends,
 you might as well make the language definition clean and say all of acos
 friends should be in that module, not some in the core?

Actually I was suggesting that acos, asin and tan be added to the core.

Most likely, splitting this out into a module wouldn't make anything
much simpler.  To get anything like the performance math functions
need, Math::Trig could not be written in plain Perl.  It would have to
be written in C or XS (or whatever perl6 winds up being written in)
probably calling the system's math libraries and still dragging in all
the basic problems of a core patch and configuration.


 That's the basic goal behind my RFCs for moving things to modules.  In
 general, I hope to make the language cleaner, easier to learn and use, and
 easier to extend.  If at the same time the language became better
 performing because of a removal of some of the core, all the better.  As
 you say, 200 lines isn't much.  But combine that with the IPC, the
 environment, the system, etc it all adds up.

I think I basically agree with tchrist here.  This is nickel and dime
stuff.  Cutting out the math functions isn't going to do squat.  IPC
and the system... that might do something, but Dan pointed out that it
doesn't amount to much either.

I think we should back up and reconsider what the intent of this RFC
is.  

If the intent is to make perl more maintainable and easier to patch,
I've already commented on that.  You're just shuffling code around.
And only a small fraction at that.

If you wish to make perl smaller and faster, just tearing things out
isn't going to help.  Its hit-or-miss optimizing.  You could remove
half the core functions and find out you only gained 5%.

Like all other optimizing attempts, the first step is analysis.
People have to sit down and systematically go through and find out
what parts of perl (and Perl) are eating up space and speed.  The
results will be very surprising, I'm sure, but it will give us a
concrete idea of what we can do to really help out perl's performance.

There should probably be an RFC to this effect, and I'm just visiting
here in perl6-language so I dump it on somebody else.

exit('stage'  1);


-- 

Michael G Schwern  http://www.pobox.com/~schwern/  [EMAIL PROTECTED]
Just Another Stupid Consultant  Perl6 Kwalitee Ashuranse
When faced with desperate circumstances, we must adapt.
- Seven of Nine



Re: Design by Contract for perl internals

2000-08-17 Thread Michael G Schwern

On Thu, Aug 17, 2000 at 01:28:29PM -0400, Chaim Frenkel wrote:
 I posted this to -qa and -internal, since I was suggesting this
 for the internal development of perl. Not for the user visible
 pieces.

My mistake.  For the internals, sounds like it couldn't hurt.  Though
I have no idea how put together a DBC system for... what language are
we writing this in again?

-- 

Michael G Schwern  http://www.pobox.com/~schwern/  [EMAIL PROTECTED]
Just Another Stupid Consultant  Perl6 Kwalitee Ashuranse
Plus I remember being impressed with Ada because you could write an
infinite loop without a faked up condition.  The idea being that in Ada
the typical infinite loop would be normally be terminated by detonation.
-- Larry Wall in [EMAIL PROTECTED]