[H-GEN] Mysql & bitwise xor

Greg Black gjb at gbch.net
Tue Nov 18 02:57:46 EST 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

On 2003-11-18, Anthony Towns wrote:
> On Tue, Nov 18, 2003 at 10:57:16AM +1000, Greg Black wrote:
> > On 2003-11-18, Raymond Smith wrote:
> > > Greg Black said:
> > > > On 2003-11-17, Paul Clarke wrote:
> > > >> So, the next question is what is the logic needed to do an xor using
> > > >> only &, |, and ~ (and, or, and not)?
> > > > Have you tried substituting X | ~Y for X ^ Y?
> > > Should that not be '(X & ~Y) | (~X & Y)' or '~((X&Y) | (~X&~Y))'?
> > It was a pedagogical answer, not a solution on a plate.
> 
> FWIW, my reaction was the same as Ray's.

It would be a boring old world if we all agreed with each other
all the time.

> The phrase "Have you tried ..." in response to a computer question
> traditionally profers a solution that is believed to be correct, but
> (usually) hasn't been proven to be correct.

I appreciate that lots of people do see it like that, but I
don't and I'm not in any danger of being converted by the mere
fact that some others don't see it the same way.

Generally, if I offer something as a solution, I will have
proved it correct; in the exceedingly rare cases where I'm not
in a position to verify what I'm saying, I'll make that clear.

When I'm teaching people how to get their cars around a race
track, I'm quite likely to ask one of those "have you tried xxx"
questions where xxx will certainly result in falling off the
black stuff -- if the person sitting next to me takes that as an
invitation to try it out, he will make an interesting discovery
and will, by direct experience, learn something quite quickly
that might have taken ages to learn through purely theoretical
means.  Obviously, as I am sitting next to him, I won't suggest
something that will result in anything worse than embarrassment
and a car full of dust.

Anyway, I can see that my answer did not suit everybody.  All I
can suggest is that people who might be distressed by this kind
of answer could choose either to read my messages with awareness
of this propensity of mine, or to avoid them altogether.

Cheers, Greg

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list