Re: [Fwd: a warning and a failure for parrot in Tru64]

2005-04-02 Thread Jarkko Hietaniemi
> 
> Not true. We've done successful compiles before on Tru64. Maybe as of 0.0.6 

True, not true :-)  I do manual test compiles in Tru64 once in a while.
Once the packfile portability problems were solved back when, the Parrot
core at least has been pretty good regarding 64-bitness.

Tru64 is 64-bit little-endian, with longsize=ptrsize=8 intsize=4
(shortsize=2).

P.S.  (I wish I still had Cray 90 access, the unusual-but-legal
longsize=ptrsize=intsize=shortsize=8 nicely shook bugs to the bright
light of day in Perl 5.)

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


Re: the PAPAgei asks for HELP! - BNF conversion / pascal grammar for PRD

2005-04-02 Thread Leopold Toetsch
Sven Schubert <[EMAIL PROTECTED]> wrote:
> Hi all,

> I am still working on PAPAgei - the PAscal for PArrot
> compiler which is my final year project at I.T.
> Carlow.

Hehe, good name.

> However, I've been struggling with the basic task of
> writing a PRD grammar for quite a while and am about
> to turn to YAPP instead, if I can't get PRD to work
> for me soon, as my project deadline is soon, _very_
> soon.

> I've come across two Perl scripts -
> /languages/converter.pl and
> /languages/conversion/test.pl

Dunno about these converters, but I'd start with that parser you know
best just to make progress. YAPP / perl is probably a good combination
to get it running RSN.

> Cheers,
> Sven.

leo


new Perl 6 module installer

2005-04-02 Thread Darren Duncan
Following a brief talk on #perl6 ...
It is my intent to start a Perl 6 module under Pugs that is analagous 
to Pugs::Makemaker, such that the Makefile.PL that comes with each 
ported Perl 6 module can itself be written in Perl 6, and function 
correctly.

Initially this module will be a shell that gathers necessary info 
from the Perl 6 modules and then invokes the Perl 5 Pugs::MakeMaker 
to do the dirty work of creating the Makefile that 'make' can use.

Later on, the full functionality can be made Perl 6 native, and can 
optionally be constructed so that 'make' is no longer a prerequisite.

The initial version will support the basics that simple Makefile.PL 
use; for example, these named arguments to WriteMakefile:

- NAME
- VERSION_FROM and VERSION
- PREREQ_PM
The basics should be enough to tell an automator using a Pure Perl 
module what the name and version of the current distro is, and the 
names and versions of the other Perl 6 modules that are its 
prerequisites.

The initial module version will likely be simple in its construction, 
including not being object oriented, so the current version of Pugs 
should be able to run it by itself or with few modifications.

I intend to deliver "something" along these lines tomorrow, prior to 
the .14 release.  The first delivery is not guaranteed to execute, 
but it should be easy to tell what it is trying to do by looking at 
it.

-- Darren Duncan


Re: Definitive and Complete Perl 6 Operator List

2005-04-02 Thread Luke Palmer
Andrew Savige said:
> Is there a definitive, official, complete list of all Perl 6 operators,
> along with their precedence levels?

I believe that Kurt Gödel, in a corollary to his famous theorem, also
showed that "Any Perl 6 list is either indefinitive or incomplete".

Well, Synopsis 3 is the list you're looking for, but it's clearly not
all there.  Take the table there to be your definitive list, and mail
questions about its accuracy here.  I'll do my best to keep up with you
and maintain it.

> For example, this Perl 6 program:
>
> my $i = 0;
> $i ~^= 2;
>
> Pugs currently rejects with:
>
> pugs: cannot cast into a handle: VInt 2
>
> Since ~^ is string xor, I guessed that ~^= would be allowed.

Yeah, any binary operator that takes two Xs to an X should have an =
form.  It might even be that any operator which takes an X on its left
hand side and maps it to an X should have an = form, but it's probably
best to keep it at the former requirement for now.

Luke



Bug in Net-SSLeay documentation

2005-04-02 Thread Walter Goulet
I found a bug in the perlpod documentation for one of the methods while 
adding some tests.

I've already submitted a patch to the author.
So chalk this up as another victory for the Phalanx effort...
By the way, I asked this a couple of days ago and didn't get an answer; 
how can I get Net-SSLeay added to the Phalanx SVN repository? I'm 
maintaining a local repository to track my own changes in the meantime.

-Walter


Re: Why a scoreboard?

2005-04-02 Thread Michael G Schwern
On Sat, Apr 02, 2005 at 01:43:47AM -0600, Andy Lester wrote:
> I'd be far more interested with we can tell about modules on their own 
> and how they can be improved, rather than make it a competition.

Maybe then it should track modules rather than authors.  The top AND the
bottom along with a quick "what's my module's rating" system.  Attached
to this is a simple checkbox "Do you think this kwalitee rating accurately
reflects the quality of his module?" [1] That way humans are feeding input
back into the system about how accurate it is.

[1] Yes, this is deliberately left vague.



Re: identity tests and comparing two references

2005-04-02 Thread Juerd
Thomas Sandlaß skribis 2005-04-02  1:17 (+0200):
> my $one = 1;
> my $two := $one;
> my $three = \$two;  # same as := ? was actually your question, or not?

No, that was not my question. I deliberately used binding and
assignment, for there to be an important difference, which I think =:=
should reflect. It should be true if both variables are the same thing,
without looking at the values. In other words: FOO =:= BAR should really
do \FOO == \BAR, with the \ applied symmetrically, so that if BAR is
only a reference to FOO, the outcome is false, for \FOO != \\BAR.

> my $four := three;

Assuming you meant $three instead of three.

> my $five = 5;
> $four = 4; # $one == 4 now?

No, $four (and thus $three, which it is bound to) is now 4. $three is a
reference, which is a value, which is now *replaced* with the new value.

> $$four := $five;

Cannot dereference a number. I'm assuming autovivification will continue
to not work on non-undef values.

> Values are immutable in the abstract. That means 3 is always 3. 

Is that so? Are we going to walk the path of inefficiency where $foo++
is really actually literally just $foo = $foo + 1, throwing away the old
variable, assigning a new one?

And will Perl 6 reference values rather than their containers, that is:
will \$foo differ when $foo gets a new value, just as in Python id(foo)
changes after foo += 1?

I certainly hope we still have mutable values by design and
implementation. Clear separation of names, containers and values is what
makes me like how Perl works. Being able to operate on the value without
doing anything to the container is a source of great efficiency in a
language in which things like string substitution are used almost every
other line.

> >If =:= tests variable sameness, then it should do that literally in
> >order to both be useful and look like :=. For reference equality you can
> >still use \FOO == \BAR (I assume).
> In my view of the world =:= checks for identity of values. 

Is your view of the world like Python or like Perl 5?

Values have no identity in Perl 5. Containers (variables, named or
anonymous) do. That also means that even though $foo = 5 and $bar = 5,
\$foo != \$bar. In Python, with foo = 5 and bar = 5, that means id(foo)
== id(bar), but I don't like that at all.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html


Re: identity tests and comparing two references

2005-04-02 Thread Juerd
James Mastros skribis 2005-04-01 22:48 (+0200):
> $x = 42;
> $a = \$x but false;
> $b = \$y but blue;
> $a =:= $b ???

Even without the buts, that is:

$x = 42;
$a = \$x;
$b = \$x;

I strongly believe that $a =:= $b must be false. Assignment copies! $a
=:= $b should be true only if $a and $b are the same variable
themselves, as can be accomplished by a simple $a = $b or by passing $b
as an argument to a closure somehow, like in given $a -> $b { ... }.

If =:= has nothing to do with :=, it shouldn't look like it that much.
If it tests reference equality, possibly referencing non-references, it
should be spelled =\= instead, although I really question the practical
use of such operator.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html


Re: [Fwd: a warning and a failure for parrot in Tru64]

2005-04-02 Thread Nick Glencross
Jarkko Hietaniemi wrote:
Not true. We've done successful compiles before on Tru64. Maybe as of 0.0.6 
   

True, not true :-)  I do manual test compiles in Tru64 once in a while.
Once the packfile portability problems were solved back when, the Parrot
core at least has been pretty good regarding 64-bitness.
Tru64 is 64-bit little-endian, with longsize=ptrsize=8 intsize=4
(shortsize=2).
P.S.  (I wish I still had Cray 90 access, the unusual-but-legal
longsize=ptrsize=intsize=shortsize=8 nicely shook bugs to the bright
light of day in Perl 5.)
 

Ok, so intsize=4, which is why my md5 test tried to run. I'd be really 
grateful if some could run my instrumented MD5.imc from a previous post 
on this platform.

So what I'm confused about is why intsize=4 when you say the Parrot core 
is 64 bit. Isn't one of the points of a 64-bit processor to have larger 
ints (often accompanied by larger address space)? So if ints are just 4 
bytes, what would trip things up on Tru64?

There are  a few reasons why I'm keen to get this resolved. 1) My 
assumption that intsize!=4 for 64-bit processors is broken, which is why 
the test is seen to fail. 2) I would like the library to work on all 
platforms. 3) I'm curious to know why it doesn't work, as it was 
expected to work on different endianess and word size. 4) the md5 
library has been, and hopefully will continue to be, a good way to shake 
problems out of the parrot core.

Thanks all,
Nick


Re: [Fwd: a warning and a failure for parrot in Tru64]

2005-04-02 Thread Nick Glencross
Jay,
Jay Scherrer wrote:
> Attached is my make test output from my laptop running Fedora Core 3
> x86_64bit: makeTest.txt
> Is there any other way I can help?
>
Thanks for that Jay. What's happened is that in the last week a new test 
has gone into CVS, but I haven't had access to systems besides an i386 
to test it, which is why it will be skipped on unfamiliar platforms. 
It's the 3rd md5 test which is new, and the one that I am interested in 
making sure works:

t/library/dumper...ok
t/library/getopt_long..ok
t/library/md5..ok  <--
t/library/parrotlibok
...
If you can get a newer parrot (from CVS or rsync'd), then I would be 
grateful if you could try the following.

$ md5sum ABI_CHANGES
84195669527b120240cdd20a02edd63b  ABI_CHANGES
$ ./parrot examples/assembly/md5sum.imc ABI_CHANGES
84195669527b120240cdd20a02edd63bABI_CHANGES
You'll probably get a warning that you're on a 64-system, but if the 
checksums are the same, then I can remove the warning, and enable the test.

Thanks in advance,
Nick


Re: [Fwd: a warning and a failure for parrot in Tru64]

2005-04-02 Thread Jarkko Hietaniemi
Nick Glencross wrote:
> Jarkko Hietaniemi wrote:
> 
> 
>>>Not true. We've done successful compiles before on Tru64. Maybe as of 0.0.6 
>>>   

> Ok, so intsize=4, which is why my md5 test tried to run. I'd be really 
> grateful if some could run my instrumented MD5.imc from a previous post 
> on this platform.
> 
> So what I'm confused about is why intsize=4 when you say the Parrot core 
> is 64 bit.  

Weelll... I did not say *quite* that.  What I said that so far the
Parrot's core seems to have worked well in systems with _some_ 64-bit
integer types available.  So the Parrot core has been 64-bit _safe_,
which doesn't mean it has been _using_ 64-bit integers explicitly
(e.g. in Tru64 it has been using 64-bit longs implicitly).

> Isn't one of the points of a 64-bit processor to have larger
> ints (often accompanied by larger address space)? So if ints are just 4 

The 64-bit type can be int, long, long long, quad_t, int64_t, ...

> bytes, what would trip things up on Tru64?
> 
> There are  a few reasons why I'm keen to get this resolved. 1) My 
> assumption that intsize!=4 for 64-bit processors is broken, which is why 

Please do not assume such things.  The only thing C promises in this
regard is that sizeof(int) <= sizeof(long).   4 <= 8, or 8 <= 8
(or 4 <= 4 in the 32-bit world.)  See e.g.
http://www.unix.org/version2/whatsnew/lp64_wp.html

> the test is seen to fail. 2) I would like the library to work on all 
> platforms. 3) I'm curious to know why it doesn't work, as it was 
> expected to work on different endianess and word size. 4) the md5 
> library has been, and hopefully will continue to be, a good way to shake 
> problems out of the parrot core.
> 
> Thanks all,
> 
> Nick
> 


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


Re: Definitive and Complete Perl 6 Operator List

2005-04-02 Thread Brent 'Dax' Royal-Gordon
Luke Palmer <[EMAIL PROTECTED]> wrote:
> Andrew Savige said:
> > Is there a definitive, official, complete list of all Perl 6 operators,
> > along with their precedence levels?
> 
> Well, Synopsis 3 is the list you're looking for, but it's clearly not
> all there.  Take the table there to be your definitive list, and mail
> questions about its accuracy here.  I'll do my best to keep up with you
> and maintain it.

Uploaded so it doesn't get word-wrapped and thus rendered useless to tools:


I've included assignment forms of all operators in the exponentiation,
multiplicative, additive, junctive, and tight logical levels; this may
be overkill or underkill. I've not included hyper forms of these
operators, as I figure they're handled by metaoperators.  Also, the
"terms" level isn't really exhaustive.

In any case, let me know if anything's missing--or for that matter if
anything's there that shouldn't be.

-- 
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]>
Perl and Parrot hacker

"I used to have a life, but I liked mail-reading so much better."


+<< or +

2005-04-02 Thread Juerd
Bitshift, which one is it?

+<<

or

+<

I believe only +< is possible, because +<< has to be +«, but S03 is
still inconsistent, and +<< comes up everywhere, including Brent's
perl6op.txt.

Can there please be a definitive answer, and an update to S03?


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html


Re: [Fwd: a warning and a failure for parrot in Tru64]

2005-04-02 Thread Nick Glencross
Jarkko Hietaniemi wrote:
Nick Glencross wrote:
 

Ok, so intsize=4, which is why my md5 test tried to run. I'd be really 
grateful if some could run my instrumented MD5.imc from a previous post 
on this platform.

So what I'm confused about is why intsize=4 when you say the Parrot core 
is 64 bit.  
   

Weelll... I did not say *quite* that.  What I said that so far the
Parrot's core seems to have worked well in systems with _some_ 64-bit
integer types available.  So the Parrot core has been 64-bit _safe_,
which doesn't mean it has been _using_ 64-bit integers explicitly
(e.g. in Tru64 it has been using 64-bit longs implicitly).
 

Ok, so ints on Tru64 are 32-bit, just like on my PC. In which case, I 
wonder which operation is behaving differently between the two platforms?

When you get a chance, do you mind trying out my instrumented MD5.imc 
file? I'd be extremely grateful!

CHeers,
Nick


Re: [perl #34637] [PATCH] A couple more md5 library tweaks

2005-04-02 Thread Leopold Toetsch
Nick Glencross <[EMAIL PROTECTED]> wrote:

> A small patch to:

Thanks, applied.
leo


Re: [perl #34625] [PATCH] make setup on MSWin32

2005-04-02 Thread Leopold Toetsch
Francois PERRAD <[EMAIL PROTECTED]> wrote:

> I add a new target 'setup' in the main Makefile.

> That's allow the creation of a setup-parrot-x.y.z.exe ('standard' binary
> distribution) that contains all parrot install directories and the ICU
> shared libraries.

Shouldn't that better read:

   make win32-setup

Just "setup" seems to be to general, IMHO. Or does the term "setup"
apply to Win32 only and all the time - like "make rpm" to a different
category of OS?

leo


Re: identity tests and comparing two references

2005-04-02 Thread Leopold Toetsch
Larry Wall <[EMAIL PROTECTED]> wrote:
>: On Thu, 2005-03-31 at 23:46 -0800, Darren Duncan wrote:
>:
>: In P6, an object is a data-type. It's not a reference, and any member
>: payload is attached directly to the variable.

> Well, it's still a reference, but we try to smudge the distinction in P6.

A reference as a Perl5 reference or just as a C pointer or a Parrot PMC?

  newclass cl, "Foo"  # create new "Foo" class - 0 attributes
  $P0 = new "Foo" # make a new "Foo" instance
  $P1 = $P0   # both PMCs refer to the same object now
  $P1."meth"()# same as $P0."meth"()

  $P2 = clone $P0 # 2 distinct objects now

  $P3 = new Undef
  assign $P3, $P0 # same

leo


Re: Lexical scope pad stack

2005-04-02 Thread Leopold Toetsch
Cory Spencer <[EMAIL PROTECTED]> wrote:

>> Is there currently any method of determining the depth of the lexical scope
>> pad stack?  None of the ops in var.pod seem to be able to provide that
>> information at the moment...

You can query the pad depth like in [1], but ...

> Actually, I suppose I should clarify what I want to get at here, which is
> when lexical pads popped off the stack.  Am I responsible for cleaning up
> any lexical pads I push on the stack? (I assume I am, but just wanted to
> be sure)  ie) If I'm in a subroutine that just pushed a lexical pad on the
> stack and an exception gets thrown, do I have to catch the exception, pop
> the pad off the stack, and then rethrow the exception?

... you don't need to. The lexical pads hangs off the context structure.
Whenever the context changes, either by returning from a Sub call or
when an exception was thrown, the context is restored to the previous
state, and the lexicals with their pads are gone.

> Cory

leo

[1]

$ cat lex.imc
.sub main @MAIN
new_pad 0
new_pad -1
$P0 = peek_pad
$I0 = elements $P0
print $I0
new_pad -1
$P0 = peek_pad
$I0 = elements $P0
print $I0
print "\n"
.end
$ ./parrot lex.imc
23


Re: [Fwd: a warning and a failure for parrot in Tru64]

2005-04-02 Thread Leopold Toetsch
Jarkko Hietaniemi <[EMAIL PROTECTED]> wrote:

> P.S.  (I wish I still had Cray 90 access, the unusual-but-legal
> longsize=ptrsize=intsize=shortsize=8 nicely shook bugs to the bright
> light of day in Perl 5.)

Would break nicely ;)

leo


Re: Again the infix ops

2005-04-02 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote:

> Can 2 different bytecode segments each try to define a new infix operator?
> If so, how do they number their infix operators to avoid a clash?

The same problem arises with user defined opcodes or generally for a
name => index mapping for which the assembler and the Parrot run cores
need the same view.

I see three possible solutions:

1) demand predeclaration of such resources in main (at compile time):

  $I0 = register_infix "__hyper_add" # assign next infix op number

or a variation of this theme: demand that the assembler and runtime
"executes" such registration in the same order.

2) do a runtime lookup

  infix "__hyper_add", Pd, Pl, Pr

3) treat unknown infix ops as ordinary multi sub calls

  Pd = "__hyper_add"(Pl, Pr)

With runcores that can rewrite the bytecode all three boil down to the
same and fast PIC-based operation.

> Nicholas Clark

leo


Re: Why a scoreboard?

2005-04-02 Thread David A. Golden
Andy Lester wrote:
Why is there a scoreboard?  Why do we care about rankings?  Why is it
necessary to compare one measure to another?  What purpose is being
served?
Why is there XP on perlmonks?  Or Karma on Slashdot?  Or for that 
matter, why do we grade students' exams (particularly, why do we often 
grade them on a curve)?

I think the advantage of a scoreboard system is that metrics like this 
are a motivator.  Rather than defining a qualitative standard of "good 
module style", CPANTS defines a quantitative standard and measures 
against it,  Many programmers may well be motivated to improve their 
metrics, either for personal improvement or through competitive spirit.

This is standard process improvement stuff.  Whether you call it by 
fancy names like "Six Sigma" or not, the basic steps are:

* Define what's important
* Measure it quantitatively
* Analyze root causes of metrics below a desired standard
* Improve the process accordingly
* Measure again and repeat
The advantage of a scoreboard is that it provides a peer benchmark, 
which is a self-defining and evolving standard.  (And for those into 
these kinds of things, it's an emergent property of a complex system of 
individual actors!)  Otherwise, there's no way to calibrate a score 
except with an arbitrary scale saying that 0-12 is an F, 13 is a D, 14 a 
C, and so on.

We can/should debate the metrics (what is important to quality), but not 
the philosophy of measurement.  Kwalitee defined by CPANTS may not be 
perfect, but it's a start.  Should it become the "official standard" for 
quality for perl?  I don't know -- that's worthy of debate, certainly, 
though I'm not sure what reflects "official" except perhaps inclusion on 
the CPAN page for a module.

Regards,
David Golden


Re: [Fwd: a warning and a failure for parrot in Tru64]

2005-04-02 Thread Jarkko Hietaniemi
Forgot to add: in many environments (at least SGI/MIPS, AIX Power/PPC,
HP-UX/HPPA) things are even more interesting -- one can in compile time
decide between different 32-bit modes and different 64-bit modes.
(E.g. in IRIX there are two of each.)  I believe the new x86-ish
processors and Linux/gcc offer similar options.

Whether one can mix and match such executables/libraries depends
on how the processors/operating system have been configured.

So one can't really assume much about the integer sizes.

I heartily recommend people interested in portability matters
getting machines and/or accounts in different machines.  It Will
Make Your Code Better.

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


Re: [MSWin32] t/op/spawnw.t

2005-04-02 Thread Leopold Toetsch
Ron Blaschke <[EMAIL PROTECTED]> wrote:
> F currently fails on Windows.  The reason is that the
> test expects the exit code in the higher byte of the termination
> status.

[ code snippet ]

> The documentation for spawnw (F) says:
>   Spawn a subprocess and wait for it to finish. The return status,
>   which is very system-dependent, goes in $1.

Yeah. What does Perl5?

> Thus, I guess the place to change is F.  Should I skip
> the original tests on Windows, and add Windows specific ones (that are
> run only there)?

Or provide a more unified view of the result?

> Ron

leo


Re: [MSWin32] t/op/spawnw.t

2005-04-02 Thread Ron Blaschke
Leopold Toetsch wrote:
> Ron Blaschke <[EMAIL PROTECTED]> wrote:
>> The documentation for spawnw (F) says:
>>   Spawn a subprocess and wait for it to finish. The return status,
>>   which is very system-dependent, goes in $1.
> Yeah. What does Perl5?

$?
"This is just the 16-bit status word returned by the wait() system call
(or else is made up to look like it)."

>> Thus, I guess the place to change is F.  Should I skip
>> the original tests on Windows, and add Windows specific ones (that are
>> run only there)?

> Or provide a more unified view of the result?

That's what I am thinking.  I'd even return something more structured
than a "16-bit status word," with
"the exit value of the subprocess is really ("$? >> 8"), and "$? &
127" gives which signal, if any, the process died from, and "$? & 128"
reports whether there was a core dump."

The platform specific implementations seem to be the best place to
handle _all_ platform differences, including input parameter,
execution, and return values.

Ron





Re: Testing Net-SSLeay

2005-04-02 Thread Tels
-BEGIN PGP SIGNED MESSAGE-

Moin,

On Friday 01 April 2005 21:47, Walter Goulet wrote:
> Hi,
>
> I've been in contact with the author of Net-SSLeay about testing his
> module. One limitation I have to work with is that the module has to
> work out of the box with perl 5.6.0 which doesn't include the
> Test::Simple and Test::More modules.

I am sometimes quite sick of having to work around already-fixed bugs or 
already-implemented features just because someone insists of using 
outdated software.

There is at least 5.6.1, and AFAICT this doesn't even include the last 
security fix from a few weeks ago. 

I'd say toss in a prerequisite for Test::Simple and be done with it. 
Anybody who is still using 5.6.0 with no additional modules does 
something wrong.

Best wishes,

Tels

- -- 
 Signed on Sat Apr  2 12:54:19 2005 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "My other computer is your Windows box." -- Dr. Brad (19034) on
 2004-08-13 at /.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQk56ZXcLPEOTuEwVAQE9Rwf+OmKKnNWn8U8DjABgf/ctooPLZEvWfU0O
5ZoSg+/CP08X+xOjCeARkjuSX+2tZtXjHWktvjo+JT+GczfPE4Moil5O5V7wQfM+
GeFXXP+r2UJNYjKtzAh+U7kT46hjfz+/gXsJ36A5OkZZ/UEc0aCiXE61mLgb7Uh0
Nb5spd7v5KeAzTKkxv25dDhImo88XC+b6h0qgbhXyZJx+Lklj6cYgmnSm3rQxYQQ
JxoW5nVMehj6X9KJZrAjQ8P/4JU9+UlXR+DkHu/zOWiTTzGRaRlWXmHmxQ52Dc7x
AWCwS6ASLAiNHfl9bNiZ+Uf5dAqGV7XXou9gCL+Y2yy74vZPkImV1g==
=+L1z
-END PGP SIGNATURE-


Re: Why a scoreboard?

2005-04-02 Thread Smylers
David A. Golden writes:

> Andy Lester wrote:
> 
> > Why is there a scoreboard?  Why do we care about rankings?  Why is
> > it necessary to compare one measure to another?  What purpose is
> > being served?
> 
> Why is there XP on perlmonks?  Or Karma on Slashdot?

Indeed, and those also have odd effects: rather than being pure measures
of users' abilities/reputations/whatever, their very existence changes
how some users behave, where they do things specifically to increase XP
rather than because they have intrinsic value.

In the UK the government a few years ago introduced league tables for
hosptials, taking things such as length of waiting lists into account.
This has had ridiculous consequences where a hospital will choose to
postpone a complex operation in favour of several simpler ones, because
the latter will remove more people from the waiting list and improve
their ranking in the league tables!

I know clothes shop workers who were given weekly sales targets, with a
bonus for meeting them.  If they were close to the target towards the
end of the week they might buy a few garments themselves to trigger the
bonus, then bring those clothes back for a refund early the following
week.  Or if they'd already met the target for one week, they might
start hoarding some sales tags and keeping them to enter into the
computer system the following week, to increase the chance of getting
that bonus too.

The fact that measurements are taking place changes how people behave.
Sometimes this only results in gaming the measurement system
("kwalitee") and actually having a negative affect on the thing that the
measurers really want improving ("quality").

So I largely agree with Andy's point.  Except that I don't really mind:
anybody who's getting worked up about the kwalitee score of their
modules is taking kwalitee too seriously, and they deserve what they
get.

> I think the advantage of a scoreboard system is that metrics like this 
> are a motivator.  Rather than defining a qualitative standard of "good 
> module style", CPANTS defines a quantitative standard and measures 
> against it,  Many programmers may well be motivated to improve their 
> metrics, either for personal improvement or through competitive spirit.

Yup, but all the above apply even without a public chart.

> The advantage of a scoreboard is that it provides a peer benchmark, 

Depends what "peer" means.  For example, here's a journal entry
complaining that is_prereq is worthless because modules with high-level
functionality specifically aimed at being used in scripts rather than by
other modules will never achieve it:

  http://use.perl.org/~ethan/journal/23949

I reckon that doesn't matter, and when considering which of several
modules to use, all the candidates are going to be of one type or the
other, so their relative kwalitees are comparable and useful.  But the
leaderboard encourages apples-and-oranges comparisions between different
sorts of modules.

The above author is also frustrated that he's getting a non-perfect
score for is_prereq yet there isn't anything he can directly do about
this.  That's true, but it shouldn't matter: kwalitee is trying to
approximate the quality of a module, and if a kwalitee-measured factor
has a correlation with quality then the causation of that factor is
obviously irrelevant.

Yet it apparently does matter to some people.  The fact that there's a
public chart on which they appear with a lower ranking than others
through something that they can't change probably doesn't help here.

> We can/should debate the metrics, but not the philosophy of
> measurement.

It isn't the measurement that Andy was objecting to, but the
presentation of it as a per-user chart.  As far as possible it should be
ensured that the measuring itself doesn't have negative consequences ...

Smylers



other language compiler to parrot?

2005-04-02 Thread bloves
hi,all

have a Php compiler to parrot project?

have a ruby compiler to parrot project?



Re: +<< or +

2005-04-02 Thread Patrick R. Michaud
On Sat, Apr 02, 2005 at 12:05:37PM +0200, Juerd wrote:
> Bitshift, which one is it?
> +<<
> or
> +<
> 
> I believe only +< is possible, because +<< has to be +«, but S03 is
> still inconsistent, and +<< comes up everywhere, including Brent's
> perl6op.txt.
> 
> Can there please be a definitive answer, and an update to S03?

The definitive answer is +< -- the pod document at 
http://dev.perl.org/perl6/synopsis/S03.html is out of date.

This has been corrected in the perl6 svn repository for some time
(http://svn.perl.org/perl6/doc/trunk/design/syn/S03.pod), but I don't
know the magic for getting updates in the svn repository reflected
on the website.

Pm


Re: Bug in Net-SSLeay documentation

2005-04-02 Thread Andy Lester
By the way, I asked this a couple of days ago and didn't get an 
answer; how can I get Net-SSLeay added to the Phalanx SVN repository? 
I'm maintaining a local repository to track my own changes in the 
meantime.
You tell me and I'll have Robert set up access for it.
Are you going ahead with it?
--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance


Re: Testing Net-SSLeay

2005-04-02 Thread Andy Lester
I'd say toss in a prerequisite for Test::Simple and be done with it.
Anybody who is still using 5.6.0 with no additional modules does
something wrong.
But it's the author's choice, not ours.
xoa
--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance


Re: Why a scoreboard?

2005-04-02 Thread Ricardo SIGNES
* "David A. Golden" <[EMAIL PROTECTED]> [2005-04-02T05:27:18]
> Andy Lester wrote:
> >Why is there a scoreboard?  Why do we care about rankings?  Why is it
> >necessary to compare one measure to another?  What purpose is being
> >served?
> 
> Why is there XP on perlmonks?  Or Karma on Slashdot?  Or for that 
> matter, why do we grade students' exams (particularly, why do we often 
> grade them on a curve)?

This is not a good analogy to Kwalitee, because XP and Karma are
primarily awarded by humans who can make judgements based on reason.
Kwalitee is a judgement based on statistical analysis.  What if XP on
perlmonks was awarded by automated grammar analysis, use of "strict" in
code snippets, and the finding of dictionary words in acrostic
interpretation of paragraphs?

That wouldn't be so good.

> I think the advantage of a scoreboard system is that metrics like this 
> are a motivator.

Absolutely!  Do we want to motivate people to go back and add
pod-coverate.t when they already use Devel::Cover?  Or would we rather
they improve clarify of documentation?  Et cetera.

I think the scoreboard is fun and cute, but I think that there is an
extent to which people are going to let it distract them from actual
improvements.

-- 
rjbs


pgpEP9LybWthq.pgp
Description: PGP signature


Re: Testing Net-SSLeay

2005-04-02 Thread Tels
-BEGIN PGP SIGNED MESSAGE-

Moin,

On Saturday 02 April 2005 17:14, Andy Lester wrote:
> > I'd say toss in a prerequisite for Test::Simple and be done with it.
> > Anybody who is still using 5.6.0 with no additional modules does
> > something wrong.
>
> But it's the author's choice, not ours.

Of course. Can we convince him? :)

I would like to clarify that supporting "plain 5.6.0" really doesn't make 
sense. If you don't want to update your environment for whatever reasons 
past 5.6.0 (e.g. "don't fix it if it ain't broke"), why would you install 
a new version of module Foo? Wouldn't you want to _not_ update Foo, too, 
because updating makes a change and risks something not working?

And if you dare to try to install a newer Foo, why not install the 
harmless "Test::Simple", too? :)

Best wishes,

Te"who hasn't had a 5.6.x installation under his belt for a loong time"ls

>
> xoa

- -- 
 Signed on Sat Apr  2 17:41:03 2005 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "The campaign should combat the messages of pornography by putting signs
 on buses saying sex with children is not OK." -- Mary Anne Layden in
 ttp://tinyurl.com/6a9cy

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQk69mncLPEOTuEwVAQEk4Qf+N1HaMQVzgzV+tAqhfs8B1HCdrP47wzNn
+xz5KgUHVI1ss3OrfidXf2JX7Ev5pwHM2GaBB18D7cQe/LfAtjADR7H9cJsraa6L
kviSyEW2VeUrScxOkUyZ7gdQYtal+X/lO4K1FPzYkX/nFV5pY2CyNlkt5Ti/DiZs
DAoF6xNMccZ84HNAgCmSDhujIpG03bNBAAwN8VgKECdp3HX+JL7357Z1kboiVIPQ
tgjVo5XHaerrySrH2NFDMRZGbxvtcJeV5zPclZ9EfhYPWEK32be0SCTOj57Vi5zi
cBGcZAzo8wm57AtaiN8mK0U8A+1Csg5AWAqp9LRQ4esnPjnHXXRf9A==
=PLr6
-END PGP SIGNATURE-


Re: Bug in Net-SSLeay documentation

2005-04-02 Thread Walter Goulet
Andy Lester wrote:
By the way, I asked this a couple of days ago and didn't get an 
answer; how can I get Net-SSLeay added to the Phalanx SVN repository? 
I'm maintaining a local repository to track my own changes in the 
meantime.

You tell me and I'll have Robert set up access for it.
Are you going ahead with it?
Yes, I'm going to forge ahead with Net-SSLeay. Please get it added to 
the repository.

walter


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [perl #34625] [PATCH] make setup on MSWin32

2005-04-02 Thread Ron Blaschke
Leopold Toetsch wrote:
> Francois PERRAD <[EMAIL PROTECTED]> wrote:
>> I add a new target 'setup' in the main Makefile.

>> That's allow the creation of a setup-parrot-x.y.z.exe ('standard' binary
>> distribution) that contains all parrot install directories and the ICU
>> shared libraries.

> Shouldn't that better read:
>make win32-setup
> Just "setup" seems to be to general, IMHO. Or does the term "setup"
> apply to Win32 only and all the time - like "make rpm" to a different
> category of OS?

Or even:

nmake win32-installer

?

The Windows equivalent of "rpm" would be "msi".
Cf 
http://www.microsoft.com/windows2000/community/centers/management/msi_faq.mspx

Ron




S03 problem in Hyperoperators

2005-04-02 Thread Aaron Sherman
At the beginning of the section on hyper operators, the following:

The Unicode characters » (\x[BB]) and « (\x[BB])

should be:

The Unicode characters » (\x[BB]) and « (\x[AB])





Re: Definitive and Complete Perl 6 Operator List

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 01:49:24AM -0800, Brent 'Dax' Royal-Gordon wrote:
: I've included assignment forms of all operators in the exponentiation,
: multiplicative, additive, junctive, and tight logical levels; this may
: be overkill or underkill. I've not included hyper forms of these
: operators, as I figure they're handled by metaoperators.

I would say that assignment operators are also metaoperators.  They're
just a bit picky about which precedence levels they metastasize.
In other words, if someone adds an appropriate binary operator, it
would automatically get the assignment meta-operator.  But not if
it's a chaining binary, non-chaining binary, or assignment operator.
(We could define the levels that it *does* work on, but then it doesn't
work on user-defined precedence levels by default.  Alternatively,
we could develop a profile apart from precedence levels for operators
that are omitted, such as ones that return boolean values, or that create
new objects, or that mutate their left argument already.)

: In any case, let me know if anything's missing--or for that matter if
: anything's there that shouldn't be.

Seems to be missing:

infix:
infix:.
infix:.

The shifts are all X< rather than X<< to avoid confusion with Texas Quotes.

Oh, and we recently moved => to assignment precedence so it would
more naturally be right associative, and to keep the non-chaining
binaries consistently non-associative.  Also lets you say:

key => $x ?? $y :: $z;

plus it moves it closer to the comma that it used to be in Perl 5.

Larry


Re: identity tests and comparing two references

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 11:06:01AM +0200, Juerd wrote:
: Is your view of the world like Python or like Perl 5?

Them's fightin' words. :-)

: Values have no identity in Perl 5.

That's slightly not true, insofar as Perl 5 distinguishes hash keys
by value (albeit filtered through stringification).

: Containers (variables, named or
: anonymous) do. That also means that even though $foo = 5 and $bar = 5,
: \$foo != \$bar. In Python, with foo = 5 and bar = 5, that means id(foo)
: == id(bar), but I don't like that at all.

On the other hand, it would be nice to have an operator that tells
you if two things would be considered the same hash thing if handed
to a hash of shape(Any).  That's how I think of =:=.  If that's more
like Python and less like Perl 5, I don't care.  I'm trying to make
Perl 6 like Perl 6, not like anything else.

Objects are by default unique, but any particular class of objects
(including value types) is allowed to define its own idea of
uniqueness.  Unique identity is precisely what we're looking for
in a hash key, whether we stringify it or not.

Larry


Re: [perl #34625] [PATCH] make setup on MSWin32

2005-04-02 Thread Leopold Toetsch
Ron Blaschke <[EMAIL PROTECTED]> wrote:

> Or even:

> nmake win32-installer

> ?

> The Windows equivalent of "rpm" would be "msi".

Maybe then:

  nmake win32-inno-installer
  nmake win32-msi-installer
  ...

(which make the win32 prefix rather superfluent)

> Ron

leo


Re: identity tests and comparing two references

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 11:22:43AM +0200, Leopold Toetsch wrote:
: Larry Wall <[EMAIL PROTECTED]> wrote:
: >: On Thu, 2005-03-31 at 23:46 -0800, Darren Duncan wrote:
: >:
: >: In P6, an object is a data-type. It's not a reference, and any member
: >: payload is attached directly to the variable.
: 
: > Well, it's still a reference, but we try to smudge the distinction in P6.
: 
: A reference as a Perl5 reference or just as a C pointer or a Parrot PMC?

In that context, I just meant somebody's got a pointer to it somewhere,
if only in the symbol table, though it could also be in a PMC.
As I mentioned in a recent message, Perl 6's notion of identity is
class based.  "Perl5" refs are not really objects in that sense of
having an identity.  If $foo contains a reference to something else,
you have to work harder to get at the container $foo rather than object
$foo points to.  By default, any OO operation is going to deref it,
and that includes asking it for its identity, or asking its class to
compare two of its objects for identity.

Does this make sense?  The only application I see for typed references
is to tunnel object references through some other language so that that
language sees the reference as an object of its type, but if it calls
back into your language, you get your original object reference back.
I'd classify that as a necessary evil, but one I'd prefer to hide from
stock Perl 6 programmers.

Larry


Re: Documentary annotations: $what doc

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 03:19:33PM +0800, Sam Vilain wrote:
: Luke Palmer wrote:
: >>Supposing I had a "doc" trait, could I say:
: >>   sub f2c (Num $temp doc)
: >>   doc
: >>   {...}
: >>Or would I be forced to spell it  doc('stuff')  ?
: >Well, first you need an `is` somewhere in there.  And after that I think
: >you'll need to do it in doc('stuff') form.  If we did allow doc<>, then
: >this:
: 
: A word of warning...
: 
: Perldoc[*] will eventually support this sort of thing, for sure.  But it
: will lead to the unfortunate side effect that your code needs to at
: least compile without syntax errors, and without too many obscene
: mistakes - so that these traits are accessible by the dialect that
: interprets them into a Perldoc tree.

It should also be pointed out that we're making the structure of the
surrounding POD available to the code.  Working from that end has
the advantage of keeping cruft out of the signature, while keeping
the information close and verifiable.

: That's if you care about seeing the information presented nicely when
: you use `perldoc Foo', of course.

If we work it out right, it won't be an either/or thing.  The POD
will be easily recognizable as POD (albeit with different parsing
rules than Perl 5), but at the same time it's available as data for
introspective and class-browserly purposes.

: * - the project aiming to provide dialect-agnostic inline documentation
: for Perl 5 and Perl 6.  The Perl 5 prototype is on CPAN... still in
: early stages.

If by "dialect-agnostic" you mean that it presents that view to
the user, that's fine.  But at minimum, the project will have to be
"gnostic" about parsing difference between Perl 5 POD and perl 6 POD.
For example, =cut is going away, and the requirements for blank lines
are being reduced.  Plus there will probably be some changes to help
the computer navigate to its associated documentation, such as tagged
fields that turn into a hash value when accessed via %=POD or whatever
the interface turns out to be.

Larry


Re: S03 problem in Hyperoperators

2005-04-02 Thread Luke Palmer
Aaron Sherman writes:
> At the beginning of the section on hyper operators, the following:
> 
> The Unicode characters  (\x[BB]) and  (\x[BB])
> 
> should be:
> 
> The Unicode characters  (\x[BB]) and  (\x[AB])

You should probably read S03 from:

http://svn.perl.org/perl6/doc/trunk/design/syn/S03.pod

from now on, as that's the one that I'll be fixing.

Luke


Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-04-02 Thread Larry Wall
On Thu, Mar 31, 2005 at 01:11:37PM -0500, Aaron Sherman wrote:
: If you declare a variable to be of a type (let's even say a class to be
: specific), then you have hinted to the compiler as to the nature of that
: variable, but nothing is certain.
: 
: That is to say that the compiler cannot:
: 
:   * Make any type-massaging choices yet on (implicit or explicit)
: method invocations
:   * Issue any errors based on signature miss-matches
: 
: Ok?

Yes.  You might perhaps be able to get warnings on things that
look like signature mismatches, but I certainly wouldn't make it
mandatory, or even the default.

: Now we move on to the idea of finalization. Please correct me where I
: conflate finalization and openness. I'm not sure I understand the
: difference at all (no, I'm certain I don't).

I think you already dug this up, but no harm in reiterating:

open/closed: whether you can munge the class definition itself.
final/non-final: whether this is guaranteed to be a leaf node class.

: We assert (don't have the docs handy, but I'll just arm-wave the syntax)
: that the class is now finalized.

We don't allow assertions that a particular class is final, because that's a
reversed dependency.  We only allow you to assert that a particular class is
non-final.  One way to do that is simply to derive from it.

: This means any attempt to re-define the
: interface of the class is a compile-time error, correct?

If we let you do it, but we don't.  :-)

The interface can be assumed frozen by the compiler only if the
entire application requests the class finalization optimization,
and if by CHECK time nobody has registered a dependency on the class
by either deriving from it or claiming that they will derive from it
in the future.  Applications with pluggable architecture should probably
not request the optimization unless there is some point in time at which
it can be determined that all plugins have been linked in.

: What about
: changing the internals of the class (e.g. changing the code associated
: with a method without re-defining the signature)?

That's more like the open/closed distinction, though for an open
class you could also change the interface on the fly, which would
invalidate some or all of your method dispatch caches.

The optimizer is also in control of open/closed classes, and you
may only declare that a class must remain open.  You may not declare
a class closed.  Again, your application may ask that all closable
classes be closed.

Final classes are a subset of closed classes, so if the optimizer
determines that it can finalize a class but not close a class, the
class is not finalized either.  That's not actually a big problem,
because unlike with finalization, classes may only remain open
by explicit declaration of the dependency, whereas classes may be
implicitly made non-final by deriving from them.

This is all policy of the default metaclasses.  You may, of course,
have other metaclasses that establish different policies.  There are
applications where you probably want your classes to be born closed.
This may negativly impact your ability to do AOP.

: Next, what are the conditions under which a class can be finalized?
: 
:   * Can we finalize a class which has non-finalized ancestors?

All ancestors are by definition non-final.

:   * What if it has method parameters/return values or member
: variables whose types are not finalized?

Depends on the extent to which we support named type equivalence vs
structural type equivalence, I suppose, and whether the compiler uses
type name information to make assumptions about the structure.

:   * What if it applies roles which are not finalized?

Roles cannot be derived from, so they're always final in that sense.
We should probably consider them closed by default as well, or at least
closed after first use.  If a role specifies implementation, it's always
default implementation, so overriding implementation always occurs in a class
instead.

Basically, in Perl 6 I think roles take on the, er, role of finalized
classes in specifying immutable interfaces, to a large extent.

: Obviously each one of these questions comes with a host of "what happens
: if" questions given a "yes" answer
: 
: Another question: how does finalization interact with a class's
: metaclass? Does the metaclass become a const? Is the type of a metaclass
: itself a finalized class? If not, can it be finalized by user code?

Metaclasses can do whatever they like.  They're worse than traits,
if that's possible.

As I say, the default metaclass is what provides the standard policies,
but they can be warped in whatever direction you like, if you want
everyone to hate you.

: > One additional wrinkle is that *anyone* is allowed to declare a
: > class non-cooperative (open or non-final) during *any* part of the
: > compilation
: 
: ... even after it is declared final?

Can't declare anything final in Standard Perl.

: Will core types be f

Re: S03 problem in Hyperoperators

2005-04-02 Thread Patrick R. Michaud
On Sat, Apr 02, 2005 at 11:41:18AM -0500, Aaron Sherman wrote:
> At the beginning of the section on hyper operators, the following:
> 
> The Unicode characters » (\x[BB]) and « (\x[BB])
> 
> should be:
> 
> The Unicode characters » (\x[BB]) and « (\x[AB])

This is already fixed in the svn repository; again, I don't know
how to get it to become listed on dev.perl.org.  :-)

For the time being, when making suggestions/corrections to the 
Apocalypses/Synopses I'd recommend looking at the files that are at
http://svn.perl.org/perl6/doc/trunk/design rather than the ones
that are on dev.perl.org.

Pm


Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-04-02 Thread Larry Wall
On Thu, Mar 31, 2005 at 03:03:09PM +0200, Thomas Sandlaß wrote:
: Larry Wall wrote:
: >On Sat, Mar 26, 2005 at 02:37:24PM -0600, Rod Adams wrote:
: >: How can you have a level independent position?
: >
: >By not confusing positions with numbers.  They're just pointers into
: >a particular string.
: 
: I'm not the Unicode guru but my understanding is that all composition
: sequences are finite and stateless with respect to everything before
: and after them in the string.  Which brings me to the question if these
: positions are defined like positions in Emacs as lying *between* the
: chars?  Then the set of positions of a higher level is a subset of the
: positions of lower levels.

Yes, that's how I've been thinking of them.  Thanks for making that explicit.

: With defining position as between chars many operations on strings are
: downwards compatible between levels, e.g. splitting. If one determines
: e.g. an insert position on a higher level there's no problem in letting
: the actual insertion beeing handled by a lower level.  With fractional
: positions on higher levels some degree of upward or tunneling
: compatibility can be achieved.

That's my feeling.

: BTW, will bidirectionality be supported? Does it make sense to reflect
: it in the StrPos type such that $pos_start < $pos_end means a non-empty
: left to right string, $pos_start > $pos_end is a non-empty right to left
: string and $pos_start == $pos_end delimit an empty (sub)string? As a
: natural consequence the sign indicates direction with negative length
: beeing right to left.  And that leads to two times two types of iterators:
: left to right, right to left, start to end and end to start.

Offhand I'd rather have end < start be undefined, I think, but I
suppose we could give it a meaning if it turns out not to be an
easily generated degenerate case like 0..-1.  On the other hand,
I think right-to-left might deserve more Huffman visibility than an
itty-bitty sign that might be hidden down in a varible.

But then, we've played games with signs in substr and splice before.
It's not clear that people would want substr($x, -3) to return the
characters in reversed order, though.

: All the above leads me to rant about an array like type. Please forgive
: me if the following is not proper Perl6. My point is to illustrate how
: I imagine the future communication between implementor and user of such
: a class.  Actually some POD support for extracting the type information
: into the documentation would be great, too!
: 
: And yes, the :analyse should be made lazy. The distinction between the
: first and second index method could be even more specific by using
: type 'Index ^ List of Str where { $_.elems == 1 }' to convey the
: information that indexing with a list of one element doesn't result
: in a List of Str but a plain Str. OTOH this will incur a performance
: penalty and violate the intuitive notion "list in, list out".

MEGO.

: class StrPosArray does Array where { ::Index does StrPos }
: {
:has Str$:data;
:has StrPos @:pos;
: 
:multi method postcircumfix:<[ ]>
:(:  Index $i ) returns Str {...}
:multi method postcircumfix:<[ ]>
:(: List  of Index $i ) returns List of Str {...}
:multi method postcircumfix:<[ ]>
:(: Range of Index $i ) returns List of Str {...}
:multi method postcircumfix:<[ ]>
:(:Int $i ) returns Str {...}
: 
:# more stuff here for push, pop, shift etc.
: 
:method infix:<=> (: Str $rhs ) returns ::?CLASS
:{
:   $:data = $rhs;
:   :analyse;
:}
: 
:method :analyse ()
:{
:   # scan $:data for all between char positions
:   # and store them into @:pos
:}
: }
: 
: Question:
:   does the compiler go over this source in multiple passes
:   such that the declaration of :analyse is known before its
:   usage in infix:<=>?

No, you just throw in a forward declaration with {...} in that case.

Larry


Re: use less in perl6?

2005-04-02 Thread Larry Wall
On Wed, Mar 30, 2005 at 10:20:28AM +0200, Yuval Kogman wrote:
: How should this stuff be expressed? 'use less' is cute, but i don't
: think it really gets there.

It's mostly there as a placeholder for all the "true pragmas" that
can be ignored if you don't understand them, an idea I originally
stole from Ada.  We sort of got away from that notion in Perl 5,
but it'd be nice if we could have some way of recognizing hints that
can be ignored if unrecognized.  That was the original intent of the
uppercase/lowercase distinction in "use", but we lost the distinction
somewhere along the way.  At least we've gotten rid of "use overload".
Maybe we can reclaim the lowercase modules for futureproofed hinting,
or establish some other convention.  I agree that "use less" ain't it.

: Perhaps this interface, or it's principals should also allow
: similarly controlled debugging/tracing. Usually when trying to look
: inside a big app, you are only concerned about a specific part. I
: think this is very analogeous to optimization hints:
: 
:   sometimes you want to override it form the command line
: 
:   sometimes you only want it to apply to calls from a certain
:   place
: 
:   sometimes you want to enable it from within the code it applies
:   to, and sometimes outside of it
: 
:   you often want a volume knob for this behavior
: 
:   you want several instances of usage to not conflict
: 
: I'd like to see what the design team can do about this.

Welcome to the design team.  Have at it.  :-)

This problem seems to be a generalization of the earlier discussion
about turning warnings on or off in lexical vs dynamic scopes.

Larry


Re: other language compiler to parrot?

2005-04-02 Thread William Coleda
As far as I know, no one is working on these at the moment.
Volunteers welcome, of course. ^_^
[EMAIL PROTECTED] wrote:
hi,all
have a Php compiler to parrot project?
have a ruby compiler to parrot project?


Re: other language compiler to parrot?

2005-04-02 Thread Matt Fowles
All~

On Apr 2, 2005 3:53 PM, William Coleda <[EMAIL PROTECTED]> wrote:
> As far as I know, no one is working on these at the moment.
> 
> Volunteers welcome, of course. ^_^
> 
> [EMAIL PROTECTED] wrote:
> > hi,all
> > have a Php compiler to parrot project?
> > have a ruby compiler to parrot project?
> 


There is a ruby project, although I think it is dead, called cardinal.
http://rubyforge.org/projects/cardinal/

Matt
-- 
"Computer Science is merely the post-Turing Decline of Formal Systems Theory."
-???


Re: Why a scoreboard?

2005-04-02 Thread Michael G Schwern
On Sat, Apr 02, 2005 at 11:29:17AM +, Smylers wrote:
> Indeed, and those also have odd effects: rather than being pure measures
> of users' abilities/reputations/whatever, their very existence changes
> how some users behave, where they do things specifically to increase XP
> rather than because they have intrinsic value.

Yes, and this is the danger of any system which attempts to quantify
"quality".  The runaway systems you've described can result from not having
enough humans in the loop checking how closely the measurement is actually
jiving with reality.  Its as simple as having some reliable humans rating
some pathological cases, some modules which are universally agreed to have
a high quality and some which are universally agreed to have a low quality,
and see if their kwalitee ratings match.  If they don't then corrections
need to be made.  You can do the same for authors.

Acme::Raise_my_kwalitee is a perfect example.  A low quality module with a
high Kwalitee rating. 


One can also measure the heuristics for bias by checking to see if its just
a small clump of authors which pass that test.  I suspect the Test::Pod
check will fall into that category.


Finally, the scoreboard does have a purpose.  Part of the original idea of
CPANTS was to provide an automated checklist for a good distribution.

Has a README... check
Declares a $VERSION...  check
Well behaved tarball... no

I know a lot of my modules don't bother with a lot of things they should.
CPANTS shoves this in my face.

Then, if this were a web page, the author could just click on that to get
an explaination of why this is a Good Thing and what they can do to fix it.
This is information which is kind of floating around out there in the
collective knowledge of the community but is rarely written down [1] and when
it is its often well out of date with current practice.

There were issues of how to diseminate this information to authors.  Many
expressed "I don't want to get spam telling me some arbitrary standard says
my module is wrong" so it couldn't be push, it has to be pull.  How do you
get authors to actually look at the CPANTS information and make corrections?
Well, we like competition.  Make it a game!


[1] The spirit of Sam Tregar has knocked on my laptop and asked me to tell
you that his "Writing Perl Modules for CPAN" is now available for free.
http://www.apress.com/free/



Re: New S29 draft up

2005-04-02 Thread wolverian
On Mon, Mar 21, 2005 at 03:31:53PM +0100, Juerd wrote:
> In fact, won't things be much easier if shift and pop workend on strings
> as well as on arrays? Now that we have multis, this should be easy to
> do.
 
How about defining String is Array? I don't know if I would like that,
but it's an idea.

> Juerd

--
wolverian


signature.asc
Description: Digital signature


Re: New S29 draft up

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 11:27:09PM +0300, wolverian wrote:
: On Mon, Mar 21, 2005 at 03:31:53PM +0100, Juerd wrote:
: > In fact, won't things be much easier if shift and pop workend on strings
: > as well as on arrays? Now that we have multis, this should be easy to
: > do.
:  
: How about defining String is Array? I don't know if I would like that,
: but it's an idea.

Unfortunately it'd have to be an Array of String, since most characters
these days are not fixed width, even in UTF-16.  There's no reason
in principle we couldn't do that, but it'd be a lot of extra overhead
for most strings, and you can always split to an array explicitly
if you really need that.  (Plus it would only encourage people coming
from C to keep thinking in C.)

That being said, we will have a way of taking an array of strings and
treating it as a single string for pattern matching.  But there's no
guarantee that the array elements correspond to individual characters
unless you made it that way yourself to begin with.

Larry


Pugs Bug

2005-04-02 Thread Stevan Little
Autrijus,
I was writing tests for split(, ) and I stumbled upon this 
bug:

pugs -e 'split(rx:perl5//, "not good")'
Will go into an infinite loop. I also tried the empty regexp in a match 
on it's own, and it was not a problem.

- Steve


Re: Pugs Bug

2005-04-02 Thread Andrew Savige
--- Stevan Little wrote:
> I was writing tests for split(, ) and I stumbled upon this
> bug:
> 
> pugs -e 'split(rx:perl5//, "not good")'
> 
> Will go into an infinite loop. I also tried the empty regexp in a match
> on it's own, and it was not a problem.

Further to that, I noticed that the somewhat arcane semantics of p5 split
are not honoured by Pugs. Since S29 split is not written yet I'm not sure,
but I expect p6 split will be p5 split compatible. For example, p5 split
retains leading empty fields, but lops trailing ones:

# cat s.pl
my $x = ":a:z:";
my @x = split(":", $x);
for (@x) { print "v='$_'\n" }

# perl -w s.pl
v=''
v='a'
v='z'

# pugs s.pl
v=''
v='a'
v='z'
v=''

The sometimes seemingly arbitrary semantics of p5 split seem to have become
something of a de facto standard, with even Java and .NET following suit
(I *think*, not certain about this and too lazy to check right now).

/-\


Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com


Re: Why a scoreboard?

2005-04-02 Thread Johan Vromans
Michael G Schwern <[EMAIL PROTECTED]> writes:

> Has a README...   check

Bonus points if it differs from the stub, and additional bonus points
if it really describes briefly what the product is.
Rationale: When browsing READMEs they are often meaningless.

> Declares a $VERSION...check

Bonus points if it a $VERSION that can be parsed and compaed unambigously.
Rationale: Many tools want/need to decide whether a version is actual,
or newer.

Just some thoughts.

-- Johan


Re: Pugs Bug

2005-04-02 Thread Uri Guttman
> "AS" == Andrew Savige <[EMAIL PROTECTED]> writes:

  AS> The sometimes seemingly arbitrary semantics of p5 split seem to
  AS> have become something of a de facto standard, with even Java and
  AS> .NET following suit (I *think*, not certain about this and too
  AS> lazy to check right now).

just remember perl derived the semantics from awk and/or sed.

uri

-- 
Uri Guttman  --  [EMAIL PROTECTED]   http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs    http://jobs.perl.org


Re: Testing Net-SSLeay

2005-04-02 Thread Andrew Savige
--- Andy Lester wrote:
> I'd throw my hands up and let it go, then.  One of the key functions of
> Phalanx is to modernize the testing infrastructure of the modules we
> touch.  If he needs it to stay compatible back to the relative dark
> ages, then let's just leave it that way.

Though many modules must remain compatible way back, their Phalanx test
suites do not, their primary goal being to test against Ponie.

How about the perhaps silly or wild idea of decoupling a module's test
suite from the module itself? You could even have multiple test suites
for the same module. What triggered this idea is the recent impressive
work from Autrijus (Pugs) and Ingy (FreePAN) using a model with committer
rights handed out liberally, wiki-style. I could imagine a Phalanx svn
respository with all Phalanxers having commit rights, and a free-for-all,
where any Phalanxer could write any test for any Phalanx module, always
using modern test tools. Low barrier of entry, low communication costs,
lots of test duplication perhaps -- but in the testing world, variety
and duplication can be your friend.

I'm sorry but I don't have the skill or time to provide much practical
assistance for such a project but thought I'd throw it out there anyway.

/-\


Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com