[Nickle] Bugs with new output formatting

Bart Massey bart at po8.org
Thu Oct 18 11:28:13 PDT 2007

In message <1192686104.8212.52.camel at koto.keithp.com> you wrote:
> On Wed, 2007-10-17 at 16:15 -0700, Barton C Massey wrote:
> > Unfortunately, the new output formatting seems to have some
> > problems...
> > 
> >   > 1/(2**64-1)
> Do you have something in your .nicklerc file? This works for me
> >   > 1/3
> >   0.3
> As does this.

Huh.  I apparently have build problems or something; I can't
reproduce it from a new build and install.  My guess is that
the new binary wasn't playing well with the old nickle
directory.  Sorry for the confusion.

> > I can't find any way to get the curly braces
> > *back*.
> format="%G" does this trick.

Cool.  I missed that one reading the source.

> > It's never been obvious to me why the first format command
> > is acceptable, but the second is not :-).
> Yeah, we need some consistent documented behaviour for the various
> format flags.

For now, I think that setting any numeric format should work like
"%g" does; use "%v" for anything non-numeric.  In general,
what would probably make more sense would be to provide some
more sophisticated output mechanism than a format specifier;
probably a formatting function is the right approach.

> > I'm not sure what to do about all this.  I think the user
> > should be able to select between a "%f"-like or "%g"-like
> > output format and the old format with the curly braces for
> > repeats using the format variable.  I also think that Nickle
> > should accept curly-repeats on the input, although I know
> > that's a pain in the neck.
> Uh, this works for both the lexer and scanf...

OK, I officially am an idiot.  My apologies.


More information about the Nickle mailing list