Nonce

W00t! Had to share this discovery:

Nonce Definition & Meaning | Dictionary.com

Nonce word Definition & Meaning | Dictionary.com

T.

On 8/10/06, Trans [email protected] wrote:

W00t! Had to share this discovery:

Nonce Definition & Meaning | Dictionary.com

Nonce word Definition & Meaning | Dictionary.com

T.

Should we ask Matz to rename the singleton to the “nonce”? How about
a new keyword for referring to the singleton …

class << self

end

becomes

nonce self do

end

how about

module Kernel
def nonce( arg, &block )
n = class << arg; self end
return n.class_eval(&block) if block_given?
n
end
end

I do like the word, though – etymology is fun!

TwP

Tim P. wrote:

Should we ask Matz to rename the singleton to the “nonce”?

We’ll, I think it’s enough to point out that this term is there. It’s a
got a classy feel to it, “nonce class”, which is nice. So we can all
just sort of maul it over and we’ll see if it perculates upward. For
starters I’m using it when I assign it to var, eg. nonce =
(class<<self;self;end)


end

Like that. Never really cared for the << notation since it looks like
appending to an array or string, etc.

I do like the word, though – etymology is fun!
:slight_smile: Definitely. I was quite floored to find an honest ot goodness
synonym for singleton. And it’s obscure enough so it doesn’t have any
significant connotation baggage, which is great.

T.

Hi –

On Fri, 11 Aug 2006, Tim P. wrote:


end

I do like the word, though – etymology is fun!

The problem with it for singleton class is that it is really a time
word. It suggests “for now”, whereas a singleton class can be
accessed repeatedly. It’s kind of the same problem as “ad hoc”, since
if you use a singleton class twice, it’s not for one particular
purpose.

David

[email protected] wrote:

n = class << arg; self end
accessed repeatedly. It’s kind of the same problem as “ad hoc”, since
if you use a singleton class twice, it’s not for one particular
purpose.

An occassion need not be limited to an instantaneous moment. Could I
not say, “I have occassion for an Eigenclass”? It also has other
connotations, such as “need”.

I don’t think any word is ever going to be perfect, precisely becuase
there is no precise word for it. We have to define one. And the problem
with “singleton” is that it’s already taken.

T.

Trans wrote:

An occassion need not be limited to an instantaneous moment. Could I
not say, “I have occassion for an Eigenclass”? It also has other
connotations, such as “need”.

I don’t think any word is ever going to be perfect, precisely becuase
there is no precise word for it. We have to define one. And the problem
with “singleton” is that it’s already taken.

I’ve never perceived a problem there. “Singleton” is used in different
circumstances, as is “nonce.” Much of meaning depends on context.

But “nonce” does carry a strong connotation of “one-time usage.”

Hal

Trans wrote:

Honestly. Have you ever even used the work nonce in your entire life?

s/work/word/

T.

Hal F. wrote:

I’ve never perceived a problem there. “Singleton” is used in different
circumstances, as is “nonce.” Much of meaning depends on context.

But “nonce” does carry a strong connotation of “one-time usage.”

Honestly. Have you ever even used the work nonce in your entire life?

Right. So how “strong” can any connotation possibly be? The idea here
is clearly to give it a new connotation --that’s the point. With
Singleton, it’s not just a connotation but rather a complete
redefinition of an already accepted term in OOP parlance.

T.

On Fri, 11 Aug 2006, Trans wrote:

Trans wrote:

Honestly. Have you ever even used the work nonce in your entire life?

s/work/word/

T.

more than i use ‘singleton’ or ‘meta’ :wink:

-a

Hal F. wrote:

Trans wrote:

Honestly. Have you ever even used the work nonce in your entire life?

I have used it many times over the last twenty years, mostly in
the phrase “for the nonce.”

Hal

Also in the contexts of cryptography, mathematics, and Lojban.

Hal

Trans wrote:

with “singleton” is that it’s already taken.

I’ve never perceived a problem there. “Singleton” is used in different
circumstances, as is “nonce.” Much of meaning depends on context.

But “nonce” does carry a strong connotation of “one-time usage.”

Honestly. Have you ever even used the work nonce in your entire life?

I have used it many times over the last twenty years, mostly in
the phrase “for the nonce.”

Hal

Instead of a singleton class how about using it to denote code that is
executed
only the first time it is processed.

def learn_leason
nounce { touch :hand => :stove_top; puts ‘Ouch’ }
touch :hand => :cool_water; puts ‘Ahhh’
end

loop { learn_leason }

Output:
Ouch
Ahhh
Ahhh
Ahhh

or even like this

loop { nounce { index = 0 }
do_something_useful
index += 1
}

– Tom.


“Nothing will ever be attempted, if all
possible objections must first be
overcome.” - Samuel Johnson

“Luck is what happens when
preparation meets opportunity.” - Seneca

On Fri, 11 Aug 2006, Martin DeMello wrote:

Same here. Also “nonce word”. And I agree, it carries the wrong
connotations for the singleton class, whereas “eigenclass” seems to me
to be just about perfect, both in literal meaning and connotations.

Hmmm, I wonder if there would be anything that would qualify as an
eigerclass?

And, yes, I use nonce on occasion. I read a lot of British fiction.

– Matt
It’s not what I know that counts.
It’s what I can remember in time to use.

On 8/11/06, Hal F. [email protected] wrote:

there is no precise word for it. We have to define one. And the problem
I have used it many times over the last twenty years, mostly in
the phrase “for the nonce.”

Same here. Also “nonce word”. And I agree, it carries the wrong
connotations for the singleton class, whereas “eigenclass” seems to me
to be just about perfect, both in literal meaning and connotations.

martin

Hal F. wrote:

Also in the contexts of cryptography, mathematics, and Lojban.
Okay, well I stand corrected then. I have never heard the word used in
common speech before. But it does come up in techincal uses, and since
your so heavily involved, that make sense.

Oh well, so much for nonce. I guess I’m the only person left who cares
the singleton has a different meaning, and in the very same field
(OOP), than Ruby’s use.

T.

On Fri, Aug 11, 2006 at 10:55:05AM +0900, Trans wrote:

Honestly. Have you ever even used the work nonce in your entire life?

I used it on Tuesday, actually, in the phrase “for the nonce”.

fr Paul

Urban Dictionary: Nonce

On 11/08/06, Matt L. [email protected] wrote:

And, yes, I use nonce on occasion. I read a lot of British fiction.

Are you aware of its meaning, though?

Paul.

On 11/08/06, Peña, Botp [email protected] wrote:

fr Paul

Urban Dictionary: Nonce

Nonce - definition of Nonce - synonyms, pronunciation, spelling from Free Dictionary

I just wanted to bring attention to the British slang meaning before
anyone had the bright idea of naming anything in Ruby a ‘nonce’!

Paul.

On 8/10/06, Trans [email protected] wrote:

Hal F. wrote:

But “nonce” does carry a strong connotation of “one-time usage.”
Honestly. Have you ever even used the work nonce in your entire life?

Yes.

It’s actually a relatively common term in cryptographic references,
IIRC. The cryptographic nonce is some (random?) string that is used
once and only once (it doesn’t repeat and it isn’t typically
predictable) and typically in a challenge/response identification
protocol.

http://computing-dictionary.thefreedictionary.com/Nonce+(cryptography)
http://www.atis.org/tg2k/_nonce.html

IMO, TFD has semi-backronymed nonce here, ignoring that there’s an
English word, but TFD tends to do that.

Right. So how “strong” can any connotation possibly be? The idea here
is clearly to give it a new connotation --that’s the point. With
Singleton, it’s not just a connotation but rather a complete
redefinition of an already accepted term in OOP parlance.

I agree with you that ‘nonce’ is close to what we want, but it isn’t
quite meaningful enough on its own.

-austin