[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[RCR] Object#blank?

why the lucky stiff

3/7/2005 6:57:00 AM

After some pretty even pro v. con discussion on RedHanded [1], I've
moved the vote to the official RCR site [2].

I present the other popular alternatives in the RCR. So, should this
one fail, hopefully we will still be left with a victor. But I trust my
groomed steed will prevail!!

_why

[1] http://redhanded.hobix.com/inspect/objectBlank.htm...
[2] http://rcrchive.net/rc...



9 Answers

Navindra Umanee

3/7/2005 7:20:00 AM

0

why the lucky stiff <ruby-talk@whytheluckystiff.net> wrote:
> After some pretty even pro v. con discussion on RedHanded [1], I've
> moved the vote to the official RCR site [2].
>
> I present the other popular alternatives in the RCR. So, should this
> one fail, hopefully we will still be left with a victor. But I trust my
> groomed steed will prevail!!

I can't believe people don't like "vapid?"... it's such a great name!

Cheers,
Navin.




Nikolai Weibull

3/7/2005 10:33:00 AM

0

* why the lucky stiff (Mar 07, 2005 10:50):
> After some pretty even pro v. con discussion on RedHanded [1], I've
> moved the vote to the official RCR site [2].

How about Float#nan?? Makes more sense than having 0 as blank, but
perhaps isn't as useful,
nikolai

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


Malte Milatz

3/7/2005 12:29:00 PM

0

Nikolai Weibull:
> How about Float#nan?

When will Float#nan? return true?

Neil Stevens

3/7/2005 12:41:00 PM

0

On Mon, 07 Mar 2005 13:29:25 +0100, Malte Milatz wrote:
> When will Float#nan? return true?

~> irb
001> (0.0 / 0.0).nan?

==== #<TrueClass:0x00000002> true
002> (0.0 / 0.0).class

==== #<Class:0x040a85e2> Float

--
Neil Stevens - neil@hakubi.us

'A republic, if you can keep it.' -- Benjamin Franklin

Malte Milatz

3/7/2005 4:43:00 PM

0

Neil Stevens:
>> When will Float#nan? return true?
> 001> (0.0 / 0.0).nan?

Sure. Thank you.

Interesting, however, that 1/0, which is described as Infinity, returns
false on 'nan?'. Must be some mathematical logic I'm not concerned with.

Malte

Neil Stevens

3/7/2005 6:36:00 PM

0

On Mon, 07 Mar 2005 17:42:33 +0100, Malte Milatz wrote:

> Neil Stevens:
>>> When will Float#nan? return true?
>> 001> (0.0 / 0.0).nan?
>
> Sure. Thank you.
>
> Interesting, however, that 1/0, which is described as Infinity, returns
> false on 'nan?'. Must be some mathematical logic I'm not concerned with.

IEEE FP math isn't the same as regular math. NaN is a specific value, but
there are other non-number values:

009> 1.0 / 0.0

==== #<Float:0x04094c2c> Infinity
010> -1.0 / 0.0

==== #<Float:0x041145f6> -Infinity

--
Neil Stevens - neil@hakubi.us

'A republic, if you can keep it.' -- Benjamin Franklin

oinkoink

3/8/2005 9:32:00 PM

0

why the lucky stiff wrote:
> I present the other popular alternatives in the RCR. So, should this

> one fail, hopefully we will still be left with a victor. But I trust
my
> groomed steed will prevail!!

Calling zero "blank" is really repulsive to mathematical mind.
Object#vapid? was cute, but why not Object#nought? This covers
the semantic territory both of being void and of being zero.

Regards, Bret

djberg96

3/8/2005 10:14:00 PM

0

oinkoink wrote:
> why the lucky stiff wrote:
> > I present the other popular alternatives in the RCR. So, should
this
>
> > one fail, hopefully we will still be left with a victor. But I
trust
> my
> > groomed steed will prevail!!
>
> Calling zero "blank" is really repulsive to mathematical mind.
> Object#vapid? was cute, but why not Object#nought? This covers
> the semantic territory both of being void and of being zero.
>
> Regards, Bret

Perhaps we could just use the literal Latin - .nihil?

Regards,

Dan

graham.r.jenkins

3/10/2005 2:00:00 PM

0

..nothing?

Daniel Berger wrote:
> oinkoink wrote:
> > why the lucky stiff wrote:
> > > I present the other popular alternatives in the RCR. So, should
> this
> >
> > > one fail, hopefully we will still be left with a victor. But I
> trust
> > my
> > > groomed steed will prevail!!
> >
> > Calling zero "blank" is really repulsive to mathematical mind.
> > Object#vapid? was cute, but why not Object#nought? This covers
> > the semantic territory both of being void and of being zero.
> >
> > Regards, Bret
>
> Perhaps we could just use the literal Latin - .nihil?
>
> Regards,
>
> Dan