[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wierd bug
- Date: Sun, 28 Nov 1999 17:35:54 -0500
- From: Kevin Lenzo <firstname.lastname@example.org>
- Subject: Re: Wierd bug
Expanding upon this --
the basic problem is that '-' can be either unary
or binary minus -- unary as in some negative integer,
or binary, as in something minus something.
right now it's a regex (!) that tests whether
something is a valid 'math expression'. It is OK on positive
numbers because it's \d+, but the - could be
(null) minus integer or minus integer. so the
point of inserting something that checks if the
result is the same as the input is a crap workaround
for a true expression parser, or some better constraints
on the input/respond-without-addressing relationship,
which is a tricky bugger.
Kevin Lenzo wrote:
> My suggestion would be to compare the input and the
> output and not return undef from the math routine
> if it's identical. I'll queue that one up for
> the next release.
> Simon Cozens wrote:
> > On Sun, Nov 28, 1999 at 03:07:30AM -0600, David Blache wrote:
> > > > Get two infobots in the same room and type:
> > > > -938133838
> > > I've seen that before; and I don't consider it a bug. It's just doing the
> > > math and returning the result. You have two bots in the same channel giving
> > > math results.
> > I do consider it a bug, simply 'cos it's not what we want to have happen.
> > If the two bots are in each others friendly bots array we should be able to
> > easily sort this out. I'm not sure where to plug the leak, though; it can be
> > cool to ask one bot something which causes it to ask the other one something
> > and then get a response. However, we don't want two bots throwing negative
> > numbers at each other. Suggestions?
> > --
> > Laugh and the world thinks you're an idiot.