RE: Revamping the build system

2001-10-22 Thread Angel Faus
Hi, > > From: Dan Sugalski [mailto:[EMAIL PROTECTED]] > There's nothing really past what make does. The reason for having our own is: > *) Make isn't everywhere (like windows) > *) Make on various platforms has different syntax (VMS, Windows, and Unix > are all different) > *) Not speaking for an

RE: Languages in the core source tree?

2001-10-22 Thread Wizard
> 1) Do we put them all in the parrot CVS tree I think it would be good for the languages to be in tree, but I would like to have it under a different mechanism for cvs checkout. In other words, the default cvs checkout of parrot does NOT check out the languages tree, but a separate checkout is r

Shared objects and handoffs (was Re: Parrot's threading model)

2001-10-22 Thread David M. Lloyd
On Tue, 16 Oct 2001, Dan Sugalski wrote: > An interpreter can get access to a shared PMC in another interpreter > only at interpreter clone time, or if explicitly passed in via an (as > yet undetermined) handoff method. One thing I'd really like to be able to do in Parrot/Perl 6 is to be able t

Minor bugfix to the Artistic-2.0 proposal

2001-10-22 Thread Bradley M. Kuhn
I am sure that Larry won't be writing an apocalypse on licensing anytime soon, but in the meantime I was reading over the Artistic-2.0 proposal and noted a minor grammar error in it. I can't update the RFC, but figured I'd post the bugfix here. Attached is a unified diff and a full copy of the c

RE: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread David Whipp
> > Aaron Sherman wrote > Larry's hubris notwithstanding, I'd like to suggest that > "more", in this > case means "no, it prints nothing". > > This *must* be true, as you don't want: > > @a ^+ @b > > to always return an infinite list. You want it to produce a list with > (as a3 suggested

Re: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 01:36:02PM -0700, David Whipp wrote: > OK, now we've got this resolved, I'd like to return the focus > back to the original point. > > @x ^= 0; > @x[5]++; > > does not have problems with NaNs; and does not generate a warning > with -w. Someone's missing some

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Jonathan Scott Duff
On Mon, Oct 22, 2001 at 04:21:32PM -0400, Aaron Sherman wrote: > On Mon, Oct 22, 2001 at 08:25:21PM +0100, Piers Cawley wrote: > > > > What REALLY worries me is that values that seem to be numbers, but are > > > in fact garbage ARE going to screw my average up. I dare Perl6 to fix > > > that for

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Damian Conway
Okay, in the (probably forlorn) hope of beating this subject to death, let me offer a possible (post-A3/E3) position on NaN. NaN is dead. Except perhaps under a C pragma of some kind, in which case it would be a proper IEEE NaN. C with numerify to zero (it always has; and we always intended th

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Damian Conway
[Oops, I fired off too-early a draft. Here's the full thing...] Okay, in the (probably forlorn) hope of finally Beating This Subject To Death, let me offer a (possible) new position on NaN. NaN is dead. It's not pinin'! It's passed on! This value is no more! It has ceased to be! It's expired a

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Mon, Oct 22, 2001 at 07:39:44PM +0100, Piers Cawley wrote: > >> Yeah, but it's correct. If you extract something and get garbage then >> you're going to screw your average up. Admittedly, in 400,000 lines, >> it's unlikely to shift the average by mu

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Jonathan Scott Duff
On Tue, Oct 23, 2001 at 07:30:00AM +1000, Damian Conway wrote: > To check for numericity of input, you'll write: > > $number = +<$fh> > until defined $number; > > If you ignore the definedness, the C will just promote to zero > in numeric contexts. I'm confused. By the

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Damian Conway
> > To check for numericity of input, you'll write: > > > > $number = +<$fh> > > until defined $number; > > > > If you ignore the definedness, the C will just promote to zero > > in numeric contexts. > > I'm confused. By the time $number see

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Mon, Oct 22, 2001 at 11:30:01AM -0700, David Whipp wrote: >> > > More, someone has mentioned the %x{$_}++ feature, which IMHO, MUST >> > > continue to work. >> > >> > What is void plus one? >> >> Can't we utilize the lazy arrays stuff to make all t

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 08:25:21PM +0100, Piers Cawley wrote: > > What REALLY worries me is that values that seem to be numbers, but are > > in fact garbage ARE going to screw my average up. I dare Perl6 to fix > > that for me. > > It's not going to. Getting NaN as a result in this context shoul

Re: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 12:23:34PM -0700, David Whipp wrote: > Aaron Sherman wrote > > > > my @a; > > @a ^= 0; > > print @a > > > > Are you saying that this should print an infinite number of zeros? > > > > Quoting Larry on this subject (apocalypse 3, bottom of page 3): "I > can th

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 07:39:44PM +0100, Piers Cawley wrote: > Yeah, but it's correct. If you extract something and get garbage then > you're going to screw your average up. Admittedly, in 400,000 lines, > it's unlikely to shift the average by much, but it will shift it. No, I'm interpreting u

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 11:30:01AM -0700, David Whipp wrote: > > > More, someone has mentioned the %x{$_}++ feature, which IMHO, MUST > > > continue to work. > > > > What is void plus one? > > Can't we utilize the lazy arrays stuff to make all this work. > Out of the box, all entries could defau

Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread David Whipp
Aaron Sherman wrote > On Mon, Oct 22, 2001 at 11:30:01AM -0700, David Whipp wrote: > > > > More, someone has mentioned the %x{$_}++ feature, which > IMHO, MUST > > > > continue to work. > > > > > > What is void plus one? > > > > Can't we utilize the lazy arrays stuff to make all this work. > >

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 04:27:24PM +0100, Sam Vilain wrote: > On Fri, 19 Oct 2001 09:27:50 -0400 > Aaron Sherman <[EMAIL PROTECTED]> wrote: > > > > I am implementing a textbook algo in Perl (the textbook has > > > it written in C++) and have realized that if undef was to > > > numericize to NaN i

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Glenn Linderman
Aaron Sherman wrote: > Let's take this code as an example: > > while(<>) { > $count++; > $total += substr($_,22,2); > } > printf "Average: %.2f\n", $total/$count; > > Right now, if my expected numeric column has garbage in it on the > 400,00

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Sam Vilain
On Mon, 22 Oct 2001 12:18:16 -0400 Aaron Sherman <[EMAIL PROTECTED]> wrote: > > > $z[0] = 50; > > > $z[2] = 20; > > > @x = @y[@z]; > > In your code, should @x contain (@y[50,0,20]) or (@y[50,20]) or > > (@y[50,undef,20]) ? > @y[50,undef,20], which in Perl5 is @y[50,0,20]. An arbitrary and

Re: De NaN-ibus

2001-10-22 Thread Damian Conway
Hufgo suggested: > :Have I missed anything? > > Code, and docs, for ieee.pm. Other than that, it looks good to me. :) Ah, but that's a SMoP, left as an exercise to the reader. ;-) Damian

RE: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread David Whipp
Aaron Sherman wrote: > Someone's missing something, and I sure hope it's not me. Let me write > a code sample here: > > sub incrind (@ary, $ind) { > @ary[$ind]++ > } > > Are you suggesting that by adding in "@ary ^= 0", like so: > > sub incrind (@ary, $ind) { >

RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread HellyerP
> Aaron Sherman <[EMAIL PROTECTED]> wrote: > while(<>) { > $count++; > $total += substr($_,22,2); > } > printf "Average: %.2f\n", $total/$count; > >Right now, if my expected numeric column has garbage in it on the >400,000th line, I treat it as zero a

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 09:39:50AM -0700, Glenn Linderman wrote: > > Indeed, you might consider "ignoring garbage" as producing a "meaningful > result", and in the application you envision, that could be extremely useful. > > However, in other applications, the fact that there was garbage on the

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 05:43:58PM +0100, Sam Vilain wrote: > > More, someone has mentioned the %x{$_}++ feature, which IMHO, MUST > > continue to work. > > What is void plus one? According to every Perl book I've ever read, 1. I've yet to run into someone who finds that a difficult concept when

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Glenn Linderman
Aaron Sherman wrote: > I see your point, but going from: "you have to error-check to be > sure that the average you get is valid" to "you get NaN and like it" > is a bit steep. "you get NaN and like it" only happens when you put garbage in... and get garbage out. Yes, NaN is garbage. But when

RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread David Whipp
> > More, someone has mentioned the %x{$_}++ feature, which IMHO, MUST > > continue to work. > > What is void plus one? Can't we utilize the lazy arrays stuff to make all this work. Out of the box, all entries could default to NaN. But its easy to write @a ^= 0; to change this default.

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Sam Vilain
On Fri, 19 Oct 2001 09:27:50 -0400 Aaron Sherman <[EMAIL PROTECTED]> wrote: > > I am implementing a textbook algo in Perl (the textbook has > > it written in C++) and have realized that if undef was to > > numericize to NaN instead of 0, there are a lot of uninitialization > > errors that would g

Re: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Mon, Oct 22, 2001 at 04:27:24PM +0100, Sam Vilain wrote: >> On Fri, 19 Oct 2001 09:27:50 -0400 >> Aaron Sherman <[EMAIL PROTECTED]> wrote: >> >> > > I am implementing a textbook algo in Perl (the textbook has >> > > it written in C++) and have reali

Re: [perl6]Re: Resync your CVS...

2001-10-22 Thread Zach Lipton
On 10/22/01 3:44 PM, "Dan Sugalski" <[EMAIL PROTECTED]> wrote: > On Tue, 23 Oct 2001, Tom Hughes wrote: > >> In message <[EMAIL PROTECTED]> >> Dan Sugalski <[EMAIL PROTECTED]> wrote: >> >>> On Mon, 22 Oct 2001, Sam Tregar wrote: >>> Fresh checkout won't compile on Redhat Linux 7

Re: [perl6]Re: Resync your CVS...

2001-10-22 Thread Dan Sugalski
At 05:00 PM 10/22/2001 -0700, Zach Lipton wrote: >On 10/22/01 3:44 PM, "Dan Sugalski" <[EMAIL PROTECTED]> wrote: > > > On Tue, 23 Oct 2001, Tom Hughes wrote: > > > >> In message <[EMAIL PROTECTED]> > >> Dan Sugalski <[EMAIL PROTECTED]> wrote: > >> > >>> On Mon, 22 Oct 2001, Sam Tregar wr

RE: Languages in the core source tree?

2001-10-22 Thread Dan Sugalski
At 07:15 AM 10/22/2001 -0700, Wizard wrote: > > 1) Do we put them all in the parrot CVS tree > >I think it would be good for the languages to be in tree, but I would like >to have it under a different mechanism for cvs checkout. In other words, the >default cvs checkout of parrot does NOT check ou

Memory management!

2001-10-22 Thread Dan Sugalski
Okay folks, a quick heads up. *Any* function in the parrot core that allocates a parrot-managed structure (such as a string or PMC) *must* have a valid interpreter structure hanging around. I'm in the middle of rejigging everything so we can start allocating PMCs & string structures, and prope

Re: [PATCH] Register Window Base Macros

2001-10-22 Thread Dan Sugalski
At 06:37 PM 10/19/2001 -0400, Jason Gloudon wrote: >Here is the patch (again) to use the appropriate bitmask determined by >Configure for the different register chunks. Applied. Thanks. Dan --"it's like this"--

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

Resync your CVS...

2001-10-22 Thread Dan Sugalski
I just finished the skeleton of the PMC/string (and soon bigint/bigfloat) allocation system and checked it in. This meant a lot of changes to stuff all over the place. (As a side-effect, we lost the standalone string testing) I think we're now in a position to start dealing with our own memory

Schedule of things to come

2001-10-22 Thread Dan Sugalski
Okay, here's a tentative list 'o stuff that is in the works for Parrot 0.03 (and possibly 0.04): *) Scalar PMCs *) Simple I/O *) Multiple interpreter & thread creation *) A simple arena allocation system *) Garbage collection So in the next week or three we should be able to read and write file

Re: Resync your CVS...

2001-10-22 Thread Sam Tregar
Fresh checkout won't compile on Redhat Linux 7.1: string.c: In function `string_compare': string.c:161: warning: passing arg 1 of pointer to function from incompatible pointer type string.c:161: too few arguments to function string.c:164: warning: passing arg 1 of pointer to function from incompa

Re: Resync your CVS...

2001-10-22 Thread Dan Sugalski
On Mon, 22 Oct 2001, Sam Tregar wrote: > Fresh checkout won't compile on Redhat Linux 7.1: Damn. It compiled cleanly before I checked it in. I'll patch up again and see what I missed. Probably some odd dependency or timing issue somewhere. (It's emacs fault! Yeah, that's the ticket! :)

Re: Resync your CVS...

2001-10-22 Thread Tom Hughes
In message <[EMAIL PROTECTED]> Dan Sugalski <[EMAIL PROTECTED]> wrote: > On Mon, 22 Oct 2001, Sam Tregar wrote: > > > Fresh checkout won't compile on Redhat Linux 7.1: > > Damn. It compiled cleanly before I checked it in. I'll patch up again and > see what I missed. Probably some odd

Re: Resync your CVS...

2001-10-22 Thread Dan Sugalski
On Tue, 23 Oct 2001, Tom Hughes wrote: > In message <[EMAIL PROTECTED]> > Dan Sugalski <[EMAIL PROTECTED]> wrote: > > > On Mon, 22 Oct 2001, Sam Tregar wrote: > > > > > Fresh checkout won't compile on Redhat Linux 7.1: > > > > Damn. It compiled cleanly before I checked it in. I'll pa

Re: Ord, v0.3, and ideas on chr

2001-10-22 Thread Simon Cozens
On Tue, Oct 23, 2001 at 03:02:09AM -0400, James Mastros wrote: > + /* FIXME: How should I report this error? If someone's failed to implement ord, that's grounds for a segfault. > 74658072 Not portable. :( > output_is( <<'CODE', <

PackFile_unpack in pdump.c is missing the first arg

2001-10-22 Thread Peter Cornelius
I get a the following error when I do a 'make' with a fresh checkout. pdump.c: In function `main': pdump.c:63: warning: passing arg 1 of `PackFile_unpack' from incompatible pointe r type pdump.c:63: warning: passing arg 2 of `PackFile_unpack' from incompatible pointe r type pdump.c:63: warning: p

RE: Revamping the build system

2001-10-22 Thread Robert Spier
>> Ant is different. Instead of a model where it is extended with shell based >commands, it is >> extended using Java classes. Instead of writing shell commands, the >configuration files >> are XML based calling out a target tree where various tasks get executed. >Each task is run >> by an object

Re: Revamping the build system

2001-10-22 Thread Simon Cozens
On Thu, Oct 11, 2001 at 03:24:31PM -0400, Dan Sugalski wrote: > 1) Build minimal perl 6 with default parameters using platform build tool But "platform build tool" is going to be 'make' - the alternative is that we maintain and ship every flavour of batch or shell script we can think of. I don't

Ord, v0.3, and ideas on chr

2001-10-22 Thread James Mastros
Hey all. This is a much nicer implementation of ord, which does it properly as a string encoding "method". The only real uglyness I see is the "I have no mouth and I must scream" problem. I could take a Perl_Interpreter * parameter, but the only reason I need it is to fire off exceptions.