From bart at cs.pdx.edu  Sat Dec 10 14:29:37 2005
From: bart at cs.pdx.edu (Barton C Massey)
Date: Sat Dec 10 14:30:08 2005
Subject: [Nickle] Added &&= and ||= support, changed default loading
Message-ID: <200512102229.jBAMTbLL018984@murzim.cs.pdx.edu>

Two changes in the code I just uploaded worth mentioning.

First, &&= and ||= are now supported.  They are
short-circuiting, as you would expect.  May be bugs: let me
know.

Second, the namespaces Mutex, ARC4, PRNG, and Process are no
longer loaded when Nickle starts up.  To use these
namespaces, use the autoload or autoimport commands.  Expect
that future new namespaces may also have this property---the
startup time of Nickle would get very slow if we had to keep
compiling miles of un-needed code on every invocation.

Coming soon: the much-needed Sort namespace to rollup a
bunch of sort code I have lying around.

    Bart
From keithp at keithp.com  Sat Dec 10 16:52:53 2005
From: keithp at keithp.com (Keith Packard)
Date: Sun Dec 11 12:21:54 2005
Subject: [Nickle] Added &&= and ||= support, changed default loading
In-Reply-To: <200512102229.jBAMTbLL018984@murzim.cs.pdx.edu>
References: <200512102229.jBAMTbLL018984@murzim.cs.pdx.edu>
Message-ID: <1134262373.4909.27.camel@evo.keithp.com>

On Sat, 2005-12-10 at 14:29 -0800, Barton C Massey wrote:

> First, &&= and ||= are now supported.  They are
> short-circuiting, as you would expect.  May be bugs: let me
> know.

The code looks pretty good, although the comments are somewhat lacking.
(which may sound odd, coming from me)

> Second, the namespaces Mutex, ARC4, PRNG, and Process are no
> longer loaded when Nickle starts up.

Yeah, that's obviously correct.

> Coming soon: the much-needed Sort namespace to rollup a
> bunch of sort code I have lying around.

There's the sort code in examples; are there other sort routines you'd
like to add to those?

-keith

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/nickle/attachments/20051210/32bb10cb/attachment.pgp
From bart at po8.org  Sun Dec 11 14:52:57 2005
From: bart at po8.org (Bart Massey)
Date: Sun Dec 11 15:13:05 2005
Subject: [Nickle] Added &&= and ||= support, changed default loading 
In-Reply-To: <1134262373.4909.27.camel@evo.keithp.com> 
References: <200512102229.jBAMTbLL018984@murzim.cs.pdx.edu>
	<1134262373.4909.27.camel@evo.keithp.com>
Message-ID: <20051211231258.7375115F8246@keithp.com>

In message <1134262373.4909.27.camel@evo.keithp.com> you wrote:
> On Sat, 2005-12-10 at 14:29 -0800, Barton C Massey wrote:
> > Coming soon: the much-needed Sort namespace to rollup a
> > bunch of sort code I have lying around.
> 
> There's the sort code in examples; are there other sort routines you'd
> like to add to those?

Yeah, I've got a heapsort lying around somewhere, which IMHO
is the obviously right sort to use by default.  And I want
to work on the interfaces some: we can do better than C,
because we have more expressive power---I think.

    Bart
From bart at cs.pdx.edu  Sat Dec 24 00:56:06 2005
From: bart at cs.pdx.edu (Barton C Massey)
Date: Sat Dec 24 00:56:35 2005
Subject: [Nickle] printf/scanf for rationals?
Message-ID: <200512240856.jBO8u6hG021814@wezen.cs.pdx.edu>

There appears to be no current way to printf() a rational so
that it can be read back in accurately with scanf().  Am I
mistaken?  If not, is this a bug?  Should there be a scanf()
format string for e.g. (1/3)?  For 0.{3}?  Both?

    Bart
From keithp at keithp.com  Sat Dec 24 01:27:50 2005
From: keithp at keithp.com (Keith Packard)
Date: Sat Dec 24 01:28:05 2005
Subject: [Nickle] printf/scanf for rationals?
In-Reply-To: <200512240856.jBO8u6hG021814@wezen.cs.pdx.edu>
References: <200512240856.jBO8u6hG021814@wezen.cs.pdx.edu>
Message-ID: <1135416471.23187.5.camel@evo.keithp.com>

On Sat, 2005-12-24 at 00:56 -0800, Barton C Massey wrote:
> There appears to be no current way to printf() a rational so
> that it can be read back in accurately with scanf(). 

You can use %.-g, which will use an arbitrary number of digits after the
decimal, so that scanf can read it back in.

There isn't a scanf format that reads the fractional form.

-keith

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/nickle/attachments/20051224/ad6b3f01/attachment.pgp
From bart at po8.org  Sat Dec 24 01:46:43 2005
From: bart at po8.org (Bart Massey)
Date: Sat Dec 24 01:47:09 2005
Subject: [Nickle] printf/scanf for rationals? 
In-Reply-To: <1135416471.23187.5.camel@evo.keithp.com> 
References: <200512240856.jBO8u6hG021814@wezen.cs.pdx.edu>
	<1135416471.23187.5.camel@evo.keithp.com>
Message-ID: <20051224094659.AD3D11141F6@keithp.com>

Unfortunately, the output of printf("%.-g", 1/3) is
0.{3}, which can't be read back in by current scanf() at all
(as near as I can tell).  I think it probably *should*...

	Bart

In message <1135416471.23187.5.camel@evo.keithp.com> you wrote:
> On Sat, 2005-12-24 at 00:56 -0800, Barton C Massey wrote:
> > There appears to be no current way to printf() a rational so
> > that it can be read back in accurately with scanf().=20
> 
> You can use %.-g, which will use an arbitrary number of digits after the
> decimal, so that scanf can read it back in.
> 
> There isn't a scanf format that reads the fractional form.
From keithp at keithp.com  Sat Dec 24 10:22:52 2005
From: keithp at keithp.com (Keith Packard)
Date: Sat Dec 24 10:23:10 2005
Subject: [Nickle] printf/scanf for rationals?
In-Reply-To: <20051224094659.AD3D11141F6@keithp.com>
References: <200512240856.jBO8u6hG021814@wezen.cs.pdx.edu>
	<1135416471.23187.5.camel@evo.keithp.com>
	<20051224094659.AD3D11141F6@keithp.com>
Message-ID: <1135448572.23187.7.camel@evo.keithp.com>

On Sat, 2005-12-24 at 01:46 -0800, Bart Massey wrote:
> Unfortunately, the output of printf("%.-g", 1/3) is
> 0.{3}, which can't be read back in by current scanf() at all
> (as near as I can tell).  I think it probably *should*...

A trivial fix; the code just needed to allow for {} in the general
number format.

-keith

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/nickle/attachments/20051224/aeee6e3b/attachment.pgp
