[EVALUATION] - E03c - The Ruby Object Model (Revised Documentation)

[EVALUATION] - E03b - The Ruby Object Model
http://groups-beta.google.com/group/comp.lang.ruby/msg/e9d841fedb35903f

···

-

The above thread has shown, that the existen documentation is false.

Within this page, you'll find a link to an UML diagramm

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

-

Please review the diagramm.

If it's correct, please ensure that the existent documentation is corrected.

..

--
http://lazaridis.com

Let it be noted that c.l.python has absolutely refused to respond to
your latest demand for filling in your template (1000s of page views, 1
bump, 0 responses):

http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/10a30cec57515249/ad0fac1509db3964#ad0fac1509db3964

Ilias Lazaridis wrote:

[EVALUATION] - E03b - The Ruby Object Model

http://groups-beta.google.com/group/comp.lang.ruby/msg/e9d841fedb35903f

-

The above thread has shown, that the existen documentation is false.

Within this page, you'll find a link to an UML diagramm

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

-

Please review the diagramm.

If it's correct, please ensure that the existent documentation is

corrected.

···

.

--
http://lazaridis.com

Ilias Lazaridis wrote:

[EVALUATION] - E03b - The Ruby Object Model
http://groups-beta.google.com/group/comp.lang.ruby/msg/e9d841fedb35903f

-

The above thread has shown, that the existen documentation is false.

Within this page, you'll find a link to an UML diagramm

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

-

Please review the diagramm.

If it's correct, please ensure that the existent documentation is corrected.

an example for wrong ruby documentation:

···

-

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) |
                             ^ |
                             > >
                             +----------------+

..

--
http://lazaridis.com

Ilias Lazaridis wrote:

[EVALUATION] - E03b - The Ruby Object Model
http://groups-beta.google.com/group/comp.lang.ruby/msg/e9d841fedb35903f

-

The above thread has shown, that the existen documentation is false.

Within this page, you'll find a link to an UML diagramm

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

-

Please review the diagramm.

If it's correct, please ensure that the existent documentation is corrected.

the new diagramm (needs possibly a refresh within your browser):

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

···

-

please do _not_ focus on the nil issue, but on the existing documentation.

this is covered for now with this statement:

"class Object inherits from nothing (represented by object nil)"

..

--
http://lazaridis.com

[EVALUATION] - E03b - The Ruby Object Model

please re-tag as [ILIAS]

Please note that I'm 'closing' this thread [means that I'll not respond herein anymore]

I'll give it a final try within this thread:

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

..

···

--
http://lazaridis.com

lostboard2001@yahoo.com wrote:

Ilias Lazaridis wrote:

[EVALUATION] - E03b - The Ruby Object Model
http://groups-beta.google.com/group/comp.lang.ruby/msg/e9d841fedb35903f

-

The above thread has shown, that the existen documentation is
false.

Within this page, you'll find a link to an UML diagramm

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

-

Please review the diagramm.

If it's correct, please ensure that the existent documentation is corrected.

Let it be noted that c.l.python has absolutely refused to respond to your latest demand for filling in your template

what has this to do with "false ruby language core documentation"?

additionally: possibly the python community is scared about a transparent direct comparison with ruby and other languages.

(1000s of page views, 1 bump, 0 responses):

where do you get the information "1000s of page views"?

what do you mean by "bumbp"?

http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/10a30cec57515249/ad0fac1509db3964#ad0fac1509db3964

Anyone of the ruby community knows python?

please fill the python template, to showcase the differences.

···

-

and please don't forget to ensure the quality of the ruby documentation.

..

--
http://lazaridis.com

Ilias Lazaridis wrote:

an example for wrong ruby documentation:

-

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'."

Well, yes. If I'm not mistaken, horizontal arrows represent "instance of". Only vertical ones represent inheritance.

Ilias Lazaridis <ilias@lazaridis.com> writes:

Ilias Lazaridis wrote:

an example for wrong ruby documentation:

-

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) |
                             ^ |
                             > >
                             +----------------+

I do not see what's wrong here, can you explain?

···

http://lazaridis.com

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

But, as stated, this is wrong.

Object doesn't inherit from nil or NilClass.

The existing diagram is far better than your attempt.

-austin

···

On 4/19/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:

Ilias Lazaridis wrote:
please do _not_ focus on the nil issue, but on the existing documentation.

this is covered for now with this statement:

"class Object inherits from nothing (represented by object nil)"

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

I wish I didn't have to but you have a clearly incorrect arrow and label. This has been adequately proven by plenty of experts on this list. The language designer himself has asked you to remove it. You have become the problem you were complaining about: You are now publishing false documentation.

You claim your "evaluation" is a service to the Ruby community. However, making incorrect documentation easily accessible is just the opposite. If someone learning Ruby stumbles upon your site and believes what they read there, you have done both the individual and the community a great disservice.

You are constantly proving a complete lack of all essential social skills and I feel we're going above and beyond the call to ignore this and find any possible value for your discussions. Worse, you display the same void of essential programming skills, causing you to obsess over minute language details and totally bypass helpful insights into the language itself. This too we have gone to great lengths to tolerate. Unfortunately, you've crossed the line from annoying to dangerous.

I must now strongly encourage all people still learning Ruby to avoid your information, as the results are likely outright incorrect and you are proving yourself incapable of admitting that.

That's my evaluation of your evaluation.

James Edward Gray II

···

On Apr 19, 2005, at 5:14 AM, Ilias Lazaridis wrote:

the new diagramm (needs possibly a refresh within your browser):

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

-

please do _not_ focus on the nil issue, but on the existing documentation.

what has this to do with "false ruby language core documentation"?

Why do you say that?

what do you mean by "bumbp"?

Maybe your plans have something to do with this.

Anyone of the ruby community knows python?

Are you sure that anyone of the ruby community knows python?

please fill the python template, to showcase the differences.

Is it because of your life that you are going through all this?

and please don't forget to ensure the quality of the ruby documentation.

I don't understand.

···

--
M-x doctor

Carlos wrote:

Ilias Lazaridis wrote:

an example for wrong ruby documentation:

-

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'."

Well, yes. If I'm not mistaken, horizontal arrows represent "instance of".

not exactly, it's more a "becomes" relation:

"class definition" ----"becomes"----> "(class) instance"

···

-

"instance of" would be false, because:

   * the direction fo the arrow would be wrong
   * all 'metaclasses' are instances of the class "Class"

Only vertical ones represent inheritance.

yes.

so, the minimum correction would be:

additional text:
"the vertical arrows represent XXXX"

..

--
http://lazaridis.com

Christian Neukirchen wrote:

Ilias Lazaridis <ilias@lazaridis.com> writes:

Ilias Lazaridis wrote:

an example for wrong ruby documentation:

-

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) |
                            ^ |
                            > >
                            +----------------+

I do not see what's wrong here, can you explain?

definitive errors:

a) not all arrows represent inheritance, just the verticals.

b) the relation "(Object)"---[inherits from]--->"Class" is false.

correct: "(Object)"---[inherits-from]------->nil

or

correct: "(Object)"---[is-an-instance-of]--->Class

···

-

and finally:

the diagramm gives the impression, that "Object" and "(Object)" (etc.) are both classes, which is of course false. There is a "definition" and an "(instance)".

-

I will shortly update the UML diagramm to version 1.1, to simplify it a little bit more:

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

..

--
http://lazaridis.com

James Edward Gray II wrote:

the new diagramm (needs possibly a refresh within your browser):

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

-

please do _not_ focus on the nil issue, but on the existing documentation.

I wish I didn't have to but you have a clearly incorrect arrow and label. This has been adequately proven by plenty of experts on this list.

which experts?

those who are unable to communicate their knowledge?

e.g. due to commonly recognised terminology and notations?

The language designer himself has asked you to remove it. You

no, he has stated that it's _confusing_ (not wrong).

[but I have a surprise in the next version]

have become the problem you were complaining about: You are now publishing false documentation.

You claim your "evaluation" is a service to the Ruby community. However, making incorrect documentation easily accessible is just the opposite.

the incorrect (and thus completely missleading) documentation is within
"ri class"

If someone learning Ruby stumbles upon your site and believes what they read there, you have done both the individual and the community a great disservice.

everything is evaluatable by a ruby standard installation and an small
irb session.

You are constantly proving a complete lack of all essential social skills and I feel we're going above and beyond the call to ignore this

[...] - (aborted processing)

I'm tired of this "bad-boy-stuff"

James Edward Gray II

..

···

On Apr 19, 2005, at 5:14 AM, Ilias Lazaridis wrote:

--
http://lazaridis.com

Martin Ankerl wrote:
[...] - (several babbling)

I don't understand.

no, you don't _want_ to understand.

cause you don't want to admit that the ruby documentation is false.

but anyhow - it's irrelevant.

One should call Mr. Matz to review this.

Most possibly he's the only one who knows.

..

···

--
http://lazaridis.com

Ilias Lazaridis wrote:

Christian Neukirchen wrote:

Ilias Lazaridis <ilias@lazaridis.com> writes:

Ilias Lazaridis wrote:

an example for wrong ruby documentation:

-

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) |
                            ^ |
                            > >
                            +----------------+

I do not see what's wrong here, can you explain?

definitive errors:

a) not all arrows represent inheritance, just the verticals.

b) the relation "(Object)"---[inherits from]--->"Class" is false.

correct: "(Object)"---[inherits-from]------->nil

As other people have pointed out this is wrong since nothing can inherit from nil, since it isn't a class.

The mistake you're making is that (Object) doesn't represent an instance of Object. It represents Object's metaclass.

Using _why's metaid library

Object.metaclass.superclass #=> Class

So the ruby documentation is correct, (Object) does inherit from Class

or

correct: "(Object)"---[is-an-instance-of]--->Class

This is correct. (Object) both inherits from and is an instance of Class.

-

and finally:

the diagramm gives the impression, that "Object" and "(Object)" (etc.) are both classes,

Object and (Object) are both classes.

which is of course false. There is a "definition" and an "(instance)".

no there is a "class" and a (metaclass)

···

--
Mark Sparshatt

[Ilias Lazaridis <ilias@lazaridis.com>, 2005-04-19 04.04 CEST]

>>"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'."
>
>Well, yes. If I'm not mistaken, horizontal arrows represent "instance
>of".

not exactly, it's more a "becomes" relation:

"class definition" ----"becomes"----> "(class) instance"

(?) Please see (attempt to) explanation below. I got a bit enthused with the
ascii art, sorry, but it helped to my understanding of the issue, too.

"instance of" would be false, because:

  * the direction fo the arrow would be wrong

Normally, the standard arrow goes from instance to class

   person ----is an instance of the class---> Person

  * all 'metaclasses' are instances of the class "Class"

Yes, the text says that to avoid drawing too many arrows.

Here is the explanation. Please bear with me and correct possible errors:

Objects have only data (instance variables). Their classes have methods.
When you write "person.say_hello", Ruby looks up the method "say_hello" in
the Person class, sets "self" to the object "person" and executes the
method. If you call a method not in the class Person, the method is looked
up in Person's superclass, and so on. We agree until here, yes?

                                       [Object ]
                                             ^
                                             >
   [person ] ---- instance of ----> [Person ]
    @name say_hello()

But now, you have a special person, who says hello differently. If you
change the method "say_hello()" in Person, *all* instances will use it. So
you insert a singleton class, only for the object "person":

                                       [Object ]
                                             ^
                                             >
   [person ] ----- instance of ----> [Person ]
    @name say_hello()
                                             ^
                                             >
   [mute ] ---- instance of ----> [(mute) ]
    @name say_hello() (redefined only for
                                                     "mute")

Now, classes are objects, too, with the difference that they have methods
for their instances to use. So, when you call "Person.new", Ruby looks up
the method "new" in Person's class, which is "Class". Then it sets "self" to
the object "Person" and executes the method.

[Object ] [Module ]
       ^ ^
       > >
[Person ] ---- instance of ----> [Class ]
                                      new()

Now say that you want the class Person to have a new method, for example
"new_with_name()". You must define the method in its class, but if you
define it in "Class", *all* objects that are instances of class (that is,
all classes) will have that method. So you create a singleton class for
Person:

                                                    [Module ]
                                                        ^
                                                        >
                                                    [Class ]
                [Object ] new()
                      ^ ^
                      > >
  person -----> [Person ] ---- instance of ----> [(Person) ]
                                                     new_with_name()

We agree until now? "person.id()" will try to find "Person#id", then
"Object#id". "Person.attr_accessor" will try to find
"(Person)#attr_accessor", then "Class#attr_accessor", then
"Module#attr_accessor". First go to the right, then up until you find it.

Now let's say you create a new class "Man", inheriting from "Person". You
expect to be able to say "Man.new_with_name()", so the class of "Man"
shouldn't be "Class", but "(Person)". Well, let's assume that the singleton
class for "Man" is already created:

                                                    [Class ]
                [Object ] new()
                      ^ ^
                      > >
  person -----> [Person ] ---- instance of ----> [(Person) ]
                 ^ ^ new_with_name()
  mute -> [(mute)] | ^
                      > >
  man --------> [Man ] ---- instance of ----> [(Man) ]

Of course, the same logic applies to "Person". If "Object" has a singleton
class, we expect that "(Person)" inherits from it ("(Object)"). And also,
all these singleton classes (metaclasses) are instances of "Class". So let's
complete the diagram:

                                                    [Class ]
                                                     new()
                                                        ^
                                                        >
                [Object ] ---- instance of ----> [(Object) ] ---> [Class]
                      ^ ^
                      > >
  person -----> [Person ] ---- instance of ----> [(Person) ] ---> [Class]
                 ^ ^ new_with_name()
  mute -> [(mute)] | ^
                      > >
  man --------> [Man ] ---- instance of ----> [(Man) ] ---> [Class]

Well, that's all. I can't squeeze out any more understanding of metaclasses
metaclasses are instances of Class, but also ultimately inherit from it, so
you need a diagram as the one in "ri Class" to sort these relationships out.
But I don't think that diagram is wrong at all.

Hope this helped. It helped me, at least.

class Person
  class << self # now we are in class (Person)
    def new_with_name name
      o = new
      o.name = name
      o
    end
  end
  
  def say_hello
    puts "Hello"
  end
  
  attr_accessor :name
end

class Other
end

person = Person.new_with_name "Someone"
puts person.name
person.say_hello

mute = Person.new

class << mute # now we are in class (mute)
  def say_hello
    puts "..."
  end
end

mute.say_hello

class Man < Person
end

fred = Man.new_with_name "Fred"
puts fred.name

other = Other.new_with_name "x"

···

from my brain. In the upper stages things get a little mixed up, because

> I wish I didn't have to but you have a clearly incorrect arrow and
> label. This has been adequately proven by plenty of experts on this
> list.

which experts?

those who are unable to communicate their knowledge?

Among others, people who are authors the of code you're profiting from.

Among others the highly respected creator of the Ruby language, who
many here believe to be a genius and a person of excellent human
qualities.

Will you show us some minimal display of decency ?

Ilias Lazaridis, April 18:

One should call Mr. Matz to review this.

Most possibly he's the only one who knows.

It seems that you don't anyway,
        nikolai

···

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}