Re:



Oh, one other excuse for wanting this:

I'm a firm believer in things working in parallel. If you can define an array of things indexed as truth or false, it should work, and if it works, you should be able to sort it.

That being said, I wouldn't mind that much a functionality that didn't let you define such a thing either.

xc

Xeno Campanoli wrote:

Another perspective is sorting is to bunch things into realms of like value.
That being said, it wasn't hard once I realized the problem to just use 1 and 0.
As far as which is bigger, I'd go with the concept that truth is like existence, and falsehood is like non-existence, and then to assume whole numbers as is done elsewhere in things like this and say that something is bigger than nothing.


Thank you, by the way, for answering me in person.

Best wishes.

Sincerely, Xeno

Yukihiro Matsumoto wrote:

Hi,

In message "Re: "
on Thu, 20 Oct 2005 02:50:03 +0900, Xeno Campanoli <xeno@xxxxxxxxxx> writes:


|# Here is my bug. It turns out it's not as whacky as I though. It just
|# was failing because Ruby cannot sort booleans; presumably an omission:


Sorting is to reorder items according to their value order.  How can
booleans can be sorted?  Is there any order between true and false?
Which is bigger, in that case?

                            matz.







-- Xeno Campanoli: http://www.eskimo.com/~xeno The real disaster is ANY TIME WE GET A BUSH FOR PRESIDENT!



.



Relevant Pages

  • Re: zero element array creation
    ... isn't a Mercedes-Benz more like the Ford Model-T since the Ford came first? ... will be due to "oh yeah the array was one larger than we thought." ... Saying it was always like this because of a coincidental truth that VB ... arrays are always made by typing the 'highest index' doesn't negate ...
    (microsoft.public.dotnet.languages.vb)
  • Re: OT: 7 Yr Old Fires Flare Gun on School Bus
    ... nothing but the truth but instead wrote: ... > I could see that if it were a .25 or .32 pocket pistol; ... >bigger than the full-size .45s. ... She knew enough to retrieve a flare, too, and load the thing, ...
    (alt.true-crime)
  • Re: How interesting article in anti-government website~~
    ... kyi"(escaped fish seems bigger!). ... politician did not see the objectives etc. ... But any observer with a decent intelligence know the truth. ... Yes there alway was and has been a tragic story ...
    (soc.culture.burma)
  • Re: Comments on parsing solution.
    ... keeps @files unique too; ... You don't need this function, though, as my code keeps the array ... "A teacher is never a giver of truth - he is a guide, a pointer to the truth that each student must find for himself. ...
    (comp.lang.perl.misc)
  • Re: Rich Comparisons Gotcha
    ... Traceback: ... The truth value of an array with more than one element is... ... It's this discrepancy that seems like a bug, not that a ValueError is raised in the former case, which is perfectly reasonable to me. ...
    (comp.lang.python)