[EVALUATION] - E03e - The Ruby Object Model (Summary)

I

Ilias Lazaridis

[EVALUATION] - E03d - The Ruby Object Model (End Game)
http://groups-beta.google.com/group/comp.lang.ruby/msg/ea9da543dc256b42

-

The above thread has led to this code:

class Class
def Meta()
@META ||= (class<<self;self;end)
end
end

which is modified here to:

class Object
def sso()
@sso ||= (class<<self;self;end) # see code below
end
end

simplified:
def sso()
unless @sso
@sso = (class<<self; self; end) #
end
@sso
end

-

sso = Specializing Singleton Object

-

The sso contains definitions (methods, attributes, constants) which
specialize the behaviour of its carrying object.

The "sso" of a "class object" is used to specialize the behaviour of the
class (against Class).

-

The sso's are essentially internal implementation details, although they
are accessible (see code above).

The sso's are _not_ part of the Ruby Object Model (e.g. inheritance
hierarchy).

-
-
-

As stated before, the following documentation is false:

cmd:> ri Class

"Classes, modules, and objects are interrelated. In the diagram that
follows, the arrows represent inheritance, and the parentheses
meta-classes. All metaclasses are instances of the class `Class'."

+------------------+
| |
Object---->(Object) |
^ ^ ^ ^ |
| | | | |
| | +-----+ +---------+ |
| | | | |
| +-----------+ | |
| | | | |
+------+ | Module--->(Module) |
| | ^ ^ |
OtherClass-->(OtherClass) | | |
| | |
Class---->(Class) |
^ |
| |
+----------------+

-

a) The term "meta-classes" is false.
Correction: "specializing-singleton-objects"

b) vertical arrows do not represent inheritance
e.g.: Object---->(Object)
Correction: Object-----(Object)

c) the classes in "()" do not belong to the object model
Correction: remove (showcase sso in seperate topic)

-
-
-

My final questions are basicly:

* Ruby is OO. Why is the sso not directly accessible?

* Who has written the "ri Class" documentation?

* Can I expect an apology for this false documentation?

-
-
-

http://lazaridis.com/case/lang/ruby

..
 
A

Austin Ziegler

[Fair warning to those who plan on emailing me regarding this
response. I'll be ignoring you. I am posting this to make sure that
there is a public refutation to Ilias's incorrect statements below.
-a]

As stated before, the following documentation is false:

Stated incorrectly. The documentation is, in fact, correct. It
doesn't mesh with UML, perhaps, and it doesn't mesh with your
limited capacity for understanding, but that doesn't make it
incorrect.

Metaclass -- singleton class, virtual class, or whatever you wish to
call it -- is something that doesn't mesh well with standard object
notations. You are the first person that I've seen in three and a
half years to suggest that they don't understand this documentation
once they've started playing with the capabilities of Ruby and
understanding the practical means by which the object model is
supported in the language. As others have pointed out -- with lots
of supporting code -- it is not the documentation which is wrong
here.

[...]
a) The term "meta-classes" is false.
Correction: "specializing-singleton-objects"

It is not false. It is, perhaps, over used in a variety of terms. It
is "meta" in terms of Ruby objects. Your term may be more useful in
the future, but I have my doubts. As Class is an Object, a MetaClass
is a MetaObject ;)
b) vertical arrows do not represent inheritance
e.g.: Object----> (Object)
Correction: Object-----(Object)

Those are horizontal, not vertical. It is also one of those things
that, as others have pointed out, is not *quite* as *you* understand
it. Metaobjects don't show up in the public inheritance hierarchy,
but that makes them no less real.
c) the classes in "()" do not belong to the object model
Correction: remove (showcase sso in seperate topic)

This is incorrect. The metaobjects/metaclasses shown in the diagrams
are essential, if not normally visible, parts of the Ruby Object
Model. I do not believe that this is just an implementation detail,
as it is exposed to the language for use.
My final questions are basicly:
* Ruby is OO. Why is the sso not directly accessible?

The metaobjects/metaclasses are not directly accessible because Matz
has chosen not to make them directly accessible. There is an RCR
which recommends the creation of a method to make this easily and
directly accessible because Ruby developers have discovered the
value and utility that these metaobjects have. There is significant
disagreement on the name of what this method should be. However, as
Why the Lucky Stiff has demonstrated, it's a no-brainer for users to
develop this single method themselves -- and he's even written it
for them to copy or use as they please.
* Who has written the "ri Class" documentation?

Matz wrote the essentials. I don't think that anyone knows the Ruby
object model better than he.
* Can I expect an apology for this false documentation?

Given that the docuemntation isn't false, no. Of course, even if you
*were* correct and the documentation was false, I suspect that you'd
get an apology only if hell is endothermic. And, as we all know,
it's exothermic. (Either that, or you'll get your apology after all
atomic motion has stopped because.)

-austin
 
J

James Edward Gray II

b) vertical arrows do not represent inheritance
e.g.: Object---->(Object)
Correction: Object-----(Object)

Pretty sure you mean "horizontal arrows" not "vertical arrows".
My final questions are basicly:

* Ruby is OO. Why is the sso not directly accessible?

You've posted code in this message showing how to access an "sso".

James Edward Gray II
 
H

Henrik Horneber

You've posted code in this message showing how to access an "sso".


which is an indirection.

My question contains "directly".

[please no more harisplitting]


Strange, first you complain about somebody else not following your
question word-by-word, and next sentence you complain about
hairsplitting. Pot. Kettle. Black. And just in case you don't know that
phrase, the german equivalent'd be "Wer im Glashaus sitzt, sollte keine
Steine werfen." (Your website is registered in Germany and your
snail-mail address is german).

So, to come back to topic, maybe you should define "directly" first?

You can access your so called "sso"s from within Ruby, without
resorting to third party libraries or low level C code. That is
"direct", in my book at least.Just because you don't like the syntax
_how_ you can access them doens't mean they're not readily accessible,
as numerous posters before have answered already. And you even got a
"direct" answer to your question, from Austin Ziegler

---8<-----
The metaobjects/metaclasses are not directly accessible because Matz
has chosen not to make them directly accessible. There is an RCR
which recommends the creation of a method to make this easily and
directly accessible because Ruby developers have discovered the
value and utility that these metaobjects have. There is significant
disagreement on the name of what this method should be. However, as
Why the Lucky Stiff has demonstrated, it's a no-brainer for users to
develop this single method themselves -- and he's even written it
for them to copy or use as they please.
---8<-----

So. There. Respect somebody investing time to answer by at least reading
the answers.
 
I

Ilias Lazaridis

Henrik said:
My final questions are basicly:
* Ruby is OO. Why is the sso not directly accessible?

You've posted code in this message showing how to access an "sso".

which is an indirection.

My question contains "directly".

[please no more harisplitting]

Strange, first you complain about somebody else not following your
[...] - (even more hairsplitting)

I hope the responsible person has more courage.

..
 
T

Tanner Burson

[...] - (even more hairsplitting)
I hope the responsible person has more courage.

Since you are no longer contributing to this thread, and have been
given the answers you requested. This thread is closed, please
refrain from posting further in it.

[thread closed]
 
I

Ilias Lazaridis

Austin said:
[Fair warning to those who plan on emailing me regarding this
response. I'll be ignoring you. I am posting this to make sure that
there is a public refutation to Ilias's incorrect statements below.
-a]

As stated before, the following documentation is false:

Stated incorrectly. The documentation is, in fact, correct. It
[...] - (babbling, justifying, talkaround)

the documentation is false.

see below.
It is not false.
[...] - (babbling, justifying, talkaround)

"meta-classes" is completely false.

possibly you believe this one more:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/40537
Those are horizontal, not vertical.

ok, my mistake.

I apologize.
It is also one of those things
[...] - (babbling)

please focus.

ri Class states: "the arrows represent inheritance"

but: the _horizontal_ arrows do _not_ represent inheritance.

this is a simple, clear and undoubtable error.
This is incorrect. The metaobjects/metaclasses shown in the diagrams
are essential, if not normally visible, parts of the Ruby Object
Model.

This is false, see below
I do not believe that this is just an implementation detail,
as it is exposed to the language for use.

what you believe is irrelevant.

reality counts.

and (especially for you) possibly this here:

http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/40548
The metaobjects/metaclasses are not directly accessible because Matz
has chosen not to make them directly accessible.
[...]

I see.
Matz wrote the essentials.

what do you mean by "essentials"?

Is Mr. Matsumoto the author of the "ri Class" content or not?
I don't think that anyone knows the Ruby
object model better than he.

"knowing" means not in the same time "ability to communicate".
Given that the docuemntation isn't false, no.
[...] - (babbling)

This question target's the responsible person.

..
 
T

Tanner Burson

Austin said:
[Fair warning to those who plan on emailing me regarding this
response. I'll be ignoring you. I am posting this to make sure that
there is a public refutation to Ilias's incorrect statements below.
-a]

As stated before, the following documentation is false:

Stated incorrectly. The documentation is, in fact, correct. It
[...] - (babbling, justifying, talkaround)

the documentation is false.

see below.
[...] - (repeating questions already answered)
ok, my mistake.

I apologize.
[...] - (repeating questions already answered)
what you believe is irrelevant.

reality counts.

what you believe to be reality is irrelevant.
the opinions of those actually using the language on a daily basis for
real applications, counts.
the opinions of those glancing across the language without attempting
to use it, is rrelevant.

what do you mean by "essentials"?
Possibly this will help?
http://dictionary.reference.com/search?q=essentials
Is Mr. Matsumoto the author of the "ri Class" content or not?


"knowing" means not in the same time "ability to communicate".
have you attempted communication with him? if so please provide
transcripts or links of this.
Given that the docuemntation isn't false, no.
[...] - (babbling)

This question target's the responsible person.
responsible for what? providing documentation you are incapable of
understanding?
 
L

Lyndon Samson

[...] - (even more hairsplitting)

I hope the responsible person has more courage.

Since you are no longer contributing to this thread, and have been
given the answers you requested. This thread is closed, please
refrain from posting further in it.

Crikey, I woke up one morning and ruby-talk was a dictatorship...

:)
 
A

Alan Garrison

Lyndon said:
Crikey, I woke up one morning and ruby-talk was a dictatorship...

:)
"I didn't know we had a king. I thought we were an autonomous collective."

The various Ilias threads are funnier if you envision the "Argument
Sketch" from Flying Circus while reading them...
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|I hope the responsible person has more courage.

I may be the responsible person.

I assume your question is why there's no method to obtain singleton
class (per object hidden class), right? That's because I see no real
"need" for it.

Besides seeing no real need, such method is highly connected to the
current implementation. Future Ruby (or different implementation of
Ruby interpreter) may want to choose other strategy, for example,
creating a temporary class-like object to manipulate singleton
methods, then update internal object structure according to that
class-like object. Under the implementation like this, a method to
obtain singleton class has no meaning.

Anyway, for your information, David Alan Black is in the process of
persuading me to add such a method.

matz.
 
T

Tanner Burson

Ilias said:
[EVALUATION] - E03d - The Ruby Object Model (End Game)
http://groups-beta.google.com/group/comp.lang.ruby/msg/ea9da543dc256b42

-

The above thread has led to this code:

class Class
def Meta()
@Meta ||= (class<<self;self;end)
end
end

which is modified here to:

class Object
def sso()
@sso ||= (class<<self;self;end) # see code below
end
end

simplified:
def sso()
unless @sso
@sso = (class<<self; self; end) #
end
@sso
end

-

sso = Specializing Singleton Object

ISBO = Instance Specific Behaviour Object

dvto = Dedicated Virtual Table Object

dvco = Dedicated Virtual Class Object

dvc = Dedicated Virtual Class

....

introduction of more confusing non-standard acronyms for your
understanding will do nothing but confuse the issue at hand.

please remain on-topic and discontinue this line of off-topic communication.

have you also decided not to reply to my above comments?
this is considered rude, and should be stopped. again, i must insist
this thread is closed and you should refrain from further off-topic
discussions in it.
 
I

Ilias Lazaridis

Ilias said:
[EVALUATION] - E03d - The Ruby Object Model (End Game)
http://groups-beta.google.com/group/comp.lang.ruby/msg/ea9da543dc256b42

-

The above thread has led to this code:

class Class
def Meta()
@Meta ||= (class<<self;self;end)
end
end

which is modified here to:

class Object
def sso()
@sso ||= (class<<self;self;end) # see code below
end
end

simplified:
def sso()
unless @sso
@sso = (class<<self; self; end) #
end
@sso
end

-

sso = Specializing Singleton Object

ISBO = Instance Specific Behaviour Object

dvto = Dedicated Virtual Table Object

dvco = Dedicated Virtual Class Object

dvc = Dedicated Virtual Class

....


..
 
I

Ilias Lazaridis

Yukihiro said:
Hi,

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|I hope the responsible person has more courage.

I may be the responsible person.

"may be" is not an answer that I would expect from an PL designer.
I assume your question is why there's no method to obtain singleton
class (per object hidden class), right?

You find my 3 questions within the original message of this thread.

Could you please have the courtesy to reply there?
That's because I see no real "need" for it.

I see.
Besides seeing no real need, such method is highly connected to the
current implementation. Future Ruby (or different implementation of
Ruby interpreter) may want to choose other strategy, for example,
creating a temporary class-like object to manipulate singleton
methods, then update internal object structure according to that
class-like object. Under the implementation like this, a method to
obtain singleton class has no meaning.

There's something that irritates me with all this.

But I'm not sure what.
Anyway, for your information, David Alan Black is in the process of
persuading me to add such a method.

I don't know "David Alan Black".

But: not he should 'pursuade' you to add such a method.

Rationality should do.

..
 
Y

Yukihiro Matsumoto

In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|You find my 3 questions within the original message of this thread.
|Could you please have the courtesy to reply there?
* Who has written the "ri Class" documentation?

I wrote the original figure. The documentation is not by me, but by
the English doc team members.
* Can I expect an apology for this false documentation?

I'm not sure how much useful an apology can be, but you can. I feel
sorry that you've misunderstood.

|I don't know "David Alan Black".
|
|But: not he should 'pursuade' you to add such a method.
|
|Rationality should do.

You don't have to worry about him to force me to add it without
rationality.

matz.
 
I

Ilias Lazaridis

Tanner said:
Ilias said:
[EVALUATION] - E03d - The Ruby Object Model (End Game)
http://groups-beta.google.com/group/comp.lang.ruby/msg/ea9da543dc256b42

-

The above thread has led to this code:

class Class
def Meta()
@Meta ||= (class<<self;self;end)
end
end

which is modified here to:

class Object
def sso()
@sso ||= (class<<self;self;end) # see code below
end
end

simplified:
def sso()
unless @sso
@sso = (class<<self; self; end) #
end
@sso
end

-

sso = Specializing Singleton Object

ISBO = Instance Specific Behaviour Object

dvto = Dedicated Virtual Table Object

dvco = Dedicated Virtual Class Object

dvc = Dedicated Virtual Class

dsc = dedicated singleton class

sco = singleton class object

asco = attached singleton class object

"singleton instance" = the one and only instance
"singleton method" = a method, exclusively for one instance
"singleton class" = a class, exclusively for one instance

=>

sco = Singleton class object

sc = Singleton class

s = singleton

=> <object>.singleton

=> <object>.singletonClass

obj.class
obj.class_singleton
obj.singleton_class
introduction of more confusing non-standard acronyms for your
understanding will do nothing but confuse the issue at hand.
???

please remain on-topic and discontinue this line of off-topic communication.

what ???
have you also decided not to reply to my above comments?
this is considered rude, and should be stopped. again, i must insist
this thread is closed and you should refrain from further off-topic
discussions in it.

please.

get serious.

..
 
I

Ilias Lazaridis

Yukihiro said:
In message "Re: [EVALUATION] - E03e - The Ruby Object Model (Summary)"

|You find my 3 questions within the original message of this thread.
|Could you please have the courtesy to reply there?
* Who has written the "ri Class" documentation?

I wrote the original figure. The documentation is not by me, but by
the English doc team members.

where can I find a list of the english doc team members?

I would like to know who is responsible for this text.
I'm not sure how much useful an apology can be, but you can.

you are not the direct responsible (although you should have verified
this critical documentation part).
I feel sorry that you've misunderstood.

If you really feel sorry, than you should possibly reply to my initial
message and comment what i've worked-out within the last 2 weeks.

As you see, the community has problems to accept a very simple fact:

the "ri Class" documentation is defective.
|I don't know "David Alan Black".
|
|But: not he should 'pursuade' you to add such a method.
|
|Rationality should do.

You don't have to worry about him to force me to add it without
rationality.

I don't worry about this.

You should trust your userbase.

And let them decide the power which they will use (or abuse).

..
 
B

Bill Atkins

------=_Part_2012_10759132.1114102331277
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Enough! The documentation is not wrong and posting all of these threads=20
isn't productive for anyone - nor is blaming matz for your own incompetence=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top