[#335632] SOAP - issue with openssl verification failure — Venkat Alla <spinhoo2000@...>

I have the following code in a script that I am trying to use at work -

10 messages 2009/05/01

[#335755] Should I upgrade Ruby from 1.8.5 to 1.8.7? — Cali Wildman <caliwildman2004-info@...>

I just upgraded to Rails 2.3.2 but my Ruby is still 1.8.5. Rails 2.3.2

23 messages 2009/05/04

[#335777] my logroll code, please critique — Derek Smith <derekbellnersmith@...>

My goal is to keep 10 files each at 100Mb. Please critique and suggest

12 messages 2009/05/05

[#335842] '=||' — James Byrne <byrnejb@...>

Can someone point out to me where exactly in the API I find a discussion

18 messages 2009/05/05
[#335843] Re: '=||' — Eleanor McHugh <eleanor@...> 2009/05/05

On 5 May 2009, at 20:51, James Byrne wrote:

[#336031] Superclass of eigenclass — Danny O cuiv <danny.ocuiv@...>

On page 261 of The Ruby Programming Language, they state:

30 messages 2009/05/07
[#336052] Re: Superclass of eigenclass — Rick DeNatale <rick.denatale@...> 2009/05/07

On Thu, May 7, 2009 at 8:35 AM, Danny O cuiv <danny.ocuiv@gmail.com> wrote:

[#336056] Re: Superclass of eigenclass — Rick DeNatale <rick.denatale@...> 2009/05/07

On Thu, May 7, 2009 at 11:50 AM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#336061] Ruby memory usage — Pete Hodgson <ruby-forum@...>

Hi Folks,

23 messages 2009/05/07

[#336087] File over tcp? with out using net/ftp — Bigmac Turdsplash <i8igmac@...>

Im trying to send a file back and forth between a client.rb and

12 messages 2009/05/07

[#336160] CGI help — Jeff Leggett <hikerguy@...>

So, I am trying ot read the contents of a file and format the contents

19 messages 2009/05/08

[#336168] ruby string slice/[] w/ range, weird end behavior — Gary Yngve <gary.yngve@...>

First the docs:

17 messages 2009/05/08
[#336169] Re: ruby string slice/[] w/ range, weird end behavior — Eleanor McHugh <eleanor@...> 2009/05/08

On 9 May 2009, at 00:26, Gary Yngve wrote:

[#336205] converting UTF-8 to entities like &#x525B; — Jian Lin <winterheat@...>

15 messages 2009/05/09

[#336385] Any current preprocessor/Ruby language add-ons? — "C. Dagnon" <c-soc-rubyforum@...>

This is kind of a wide-ranging question but for some fairly specific

16 messages 2009/05/12

[#336411] Whaaaaat? — Tom Cloyd <tomcloyd@...>

p [0..5].include? 0

26 messages 2009/05/12

[#336458] what could be improved in Ruby for Science? — Diego Virasoro <Diego.Virasoro@...>

Hello,

20 messages 2009/05/13

[#336505] Syntactic sugar idea — Daniel DeLorme <dan-ml@...42.com>

It seems that often an object will be passed into a block only to invoke

26 messages 2009/05/14
[#336508] Re: [bikeshed] Syntactic sugar idea — Jan <jan.h.xie@...> 2009/05/14

* Daniel DeLorme <dan-ml@dan42.com> [2009-05-14 11:42:31 +0900]:

[#336766] Berkeley DB or Store equivalent? — Mk 27 <halfcountplus@...>

I have never used mySQL because perl's Storable or BerkeleyDB modules

16 messages 2009/05/17

[#336783] permute each element of a ragged array? — Phlip <phlip2005@...>

Rubies:

19 messages 2009/05/17

[#336821] Sorting numbers as strings — Jack Bauer <realmadrid2727@...>

I'm trying to sort some strings containing numbers. The strings

14 messages 2009/05/18

[#336850] Introducing RubyScience on GitHub! — Joshua Ballanco <jballanc@...>

In the tradition of actions vs. words, I present to you:

14 messages 2009/05/18

[#336930] Create an exe with Ruby 1.9.1 — Marc-antoine Kruzik <kadelfek@...>

Hello !

23 messages 2009/05/19

[#336939] Pythonic indentation (or: beating a dead horse) — J Haas <Myrdred@...>

Greetings, folks. First time poster, so if I breach

235 messages 2009/05/19
[#337016] Re: Pythonic indentation (or: beating a dead horse) — Roger Pack <rogerpack2005@...> 2009/05/20

> ...maybe something like this:

[#337699] Re: Pythonic indentation (or: beating a dead horse) — J Haas <Myrdred@...> 2009/05/28

On May 27, 10:21=A0pm, James Britt <james.br...@gmail.com> wrote:

[#337734] Re: Pythonic indentation (or: beating a dead horse) — James Britt <james.britt@...> 2009/05/28

J Haas wrote:

[#337740] Re: Pythonic indentation (or: beating a dead horse) — Juan Zanos <juan_zanos@...> 2009/05/28

On May 28, 2009, at 2:33 PM, James Britt wrote:

[#337745] Re: Pythonic indentation (or: beating a dead horse) — J Haas <Myrdred@...> 2009/05/28

On May 28, 11:15=A0am, Eleanor McHugh <elea...@games-with-brains.com>

[#337954] Re: Pythonic indentation (or: beating a dead horse) — Steven Arnold <stevena@...> 2009/05/30

After listening to this debate for some time, the position of allowing

[#338133] Re: Pythonic indentation (or: beating a dead horse) — Andy F <andchafow-ruby@...> 2009/06/02

[#338172] Re: Pythonic indentation (or: beating a dead horse) — Eleanor McHugh <eleanor@...> 2009/06/02

On 2 Jun 2009, at 06:20, Andy F wrote:

[#337023] Re: Pythonic indentation (or: beating a dead horse) — J Haas <Myrdred@...> 2009/05/20

On May 20, 8:51=A0am, Rick DeNatale <rick.denat...@gmail.com> wrote:

[#337025] Re: Pythonic indentation (or: beating a dead horse) — Rick DeNatale <rick.denatale@...> 2009/05/20

On Wed, May 20, 2009 at 2:35 PM, J Haas <Myrdred@gmail.com> wrote:

[#337045] Re: Pythonic indentation (or: beating a dead horse) — J Haas <Myrdred@...> 2009/05/20

On May 20, 12:25=A0pm, Tony Arcieri <t...@medioh.com> wrote:

[#337581] Re: Pythonic indentation (or: beating a dead horse) — J Haas <Myrdred@...> 2009/05/27

On May 22, 9:01=A0am, Roger Pack <rogerpack2...@gmail.com> wrote:

[#337673] Re: Pythonic indentation (or: beating a dead horse) — Juan Zanos <juan_zanos@...> 2009/05/28

[#337686] Re: Pythonic indentation (or: beating a dead horse) — Eleanor McHugh <eleanor@...> 2009/05/28

On 28 May 2009, at 15:06, Juan Zanos wrote:

[#337002] Ruby 1.8 vs. Ruby 1.9 — Calvin <cstephens4@...>

Hi,

17 messages 2009/05/20

[#337094] snailgun-1.0.2 — Brian Candler <b.candler@...>

New experimental project:

18 messages 2009/05/21

[#337115] w00t! Party for Gregory! — pat eyler <pat.eyler@...>

> On May 20, 2009, Gregory Brown wrote:

12 messages 2009/05/21

[#337221] Cryptogram II (#206) — Daniel Moore <yahivin@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

17 messages 2009/05/22

[#337323] String concatenation in Ruby — Jagadeesh <mnjagadeesh@...>

Hi,

18 messages 2009/05/25

[#337340] Do you nest classes inside classes? — Mike Stephens <rubfor@...>

Object Orientation is conceptually about a sea of objects interacting

11 messages 2009/05/25

[#337366] Runnin code at a certain time? — Tom Ricks <carrottop123@...>

Hello all,

20 messages 2009/05/25
[#337392] Re: Runnin code at a certain time? — Caleb Clausen <vikkous@...> 2009/05/25

On 5/25/09, Tom Ricks <carrottop123@gmail.com> wrote:

[#337413] Other languages to try? — Adam Gardner <adam.oddfellow@...>

So, I've been programming in Ruby for a good while now. Not an expert,

20 messages 2009/05/26

[#337421] Newbie on Threads — Nabs Kahn <nabusman@...>

I'm creating a screen scraping software and I want to have X (let's say

13 messages 2009/05/26
[#337424] Re: Newbie on Threads — Robert Klemme <shortcutter@...> 2009/05/26

2009/5/26 Nabs Kahn <nabusman@gmail.com>:

[#337507] Something Not going with my LDAP using SSL — Xeno Campanoli <xeno.campanoli@...>

I have the following working with cleartext LDAP:

20 messages 2009/05/26
[#337539] Re: Something Not going with my LDAP using SSL — Brian Candler <b.candler@...> 2009/05/27

Xeno Campanoli wrote:

[#338073] Re: Something Not going with my LDAP using SSL — Xeno Campanoli <xeno.campanoli@...> 2009/06/01

Brian Candler wrote:

[#338082] Re: Something Not going with my LDAP using SSL — Brian Candler <b.candler@...> 2009/06/01

Xeno Campanoli wrote:

[#338084] Re: Something Not going with my LDAP using SSL — Xeno Campanoli <xeno.campanoli@...> 2009/06/01

Brian Candler wrote:

[#338094] Re: Something Not going with my LDAP using SSL — Brian Candler <b.candler@...> 2009/06/01

Xeno Campanoli wrote:

[#338095] Re: Something Not going with my LDAP using SSL — Xeno Campanoli <xeno.campanoli@...> 2009/06/01

Brian Candler wrote:

[#338096] Re: Something Not going with my LDAP using SSL — Xeno Campanoli <xeno.campanoli@...> 2009/06/01

Xeno Campanoli wrote:

[#337574] Installing Ruby 1.9.1 Binary on Windows Vista — Joel Dezenzio <jdezenzio@...>

I've searched and only found one topic which did not have an answer or

27 messages 2009/05/27

[#337671] death toll — deka <rocha.deka@...>

Hi, I am a Brazilian girl and I have a doubt abour numbers in English.

13 messages 2009/05/28

[#337823] Endless Ruby 0.0.2 — Caleb Clausen <vikkous@...>

endless.rb is a pre-processor for ruby which allows you to use python-ish

22 messages 2009/05/29

[#337841] Regular expression — Harry Kakueki <list.push@...>

I want to write a regular expression to do the following.

13 messages 2009/05/29

[#337869] Quine (#207) — Daniel Moore <yahivin@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

46 messages 2009/05/29
[#338000] Re: [QUIZ] Quine (#207) — pjb@... (Pascal J. Bourguignon) 2009/05/31

Robert Dober <robert.dober@gmail.com> writes:

[#338018] Re: [QUIZ] Quine (#207) — Aureliano Calvo <aurelianocalvo@...> 2009/06/01

I did something like that, but with parenthesis.

[#337899] Requesting Japanese Translation — James Gray <james@...>

I'm adding a little Japanese to a Ruby presentation I am giving. I

13 messages 2009/05/30

[#337961] nokogiri 1.3.0 Released — Aaron Patterson <aaron@...>

nokogiri version 1.3.0 has been released!

32 messages 2009/05/30
[#337962] Re: nokogiri 1.3.0 Released — Roger Pack <rogerpack2005@...> 2009/05/30

Aaron Patterson wrote:

[#337966] Re: nokogiri 1.3.0 Released — Aaron Patterson <aaron@...> 2009/05/30

On Sun, May 31, 2009 at 06:43:05AM +0900, Roger Pack wrote:

[#337968] Re: nokogiri 1.3.0 Released — Iii Iii <bqotatjyujepur@...> 2009/05/30

> gem install nokogiri

[#337985] Re: nokogiri 1.3.0 Released — Aaron Patterson <aaron@...> 2009/05/31

On Sun, May 31, 2009 at 08:37:54AM +0900, Iii Iii wrote:

[#338049] Re: nokogiri 1.3.0 Released — Roger Pack <rogerpack2005@...> 2009/06/01

Re: Superclass of eigenclass

From: Danny O cuiv <danny.ocuiv@...>
Date: 2009-05-20 18:38:05 UTC
List: ruby-talk #337024
Rick Denatale wrote:
> But that's just me, after all it's all just images caused by smoke and mirrors <G>

:-) Perhaps. But there's also the more mundane possibility that it's 
just inconsistent semantics and bad terminology.

There seems to be two forces contributing to this. Firstly, the 
profusion of terms (many of which are clearly misnomers) is getting out 
of hand, and is unhelpful to newcomers. Secondly, many people still 
resort to referring to MRI runtime structures when discussing semantics 
even though Ruby is now being implemented on the JVM, on the CLR, on the 
Objective-C runtime and presumably elsewhere. There is now a clear need 
to be able to discuss semantics at a sufficient level of abstraction, 
i.e. purely in terms of what is revealed by the reflection API. If there 
are any inconsistencies or anomalies revealed by the API, then this 
should be addressed directly.

The central point that I think should be made here is that per-instance 
behaviour has nothing to do with inheritance, per se. One obvious 
language rule will be that per-instance behaviour should take precedence 
over instance-common behaviour and one convenient way of implementing 
that is to snap an eigenclass into the chain between the instance and 
its class. But that implementation-specific runtime structure won't 
serve as a definition of the semantics for implementations that work 
differently. Take, for example, a "Ruby in the browser" (perhaps one 
already exists?) that translates onto the JavaScript object model. It 
would make perfect sense for this to implement per-instance behaviour as 
object properties. The class << obj syntax would then just be a way of 
manipulating the per-instance behaviour collectively. The only 
assumption being that method resolution is correctly (and hopefully 
efficiently) implemented. And the eigenclass would be purely a 
conceptual notion, existing only as several properties of an object, 
taken together. No problem whatsoever.

It seems that the snapping of eigenclasses into the structure was 
intended to be a private implementation detail. Certain reflective 
methods were written in such a way as to skip over the eigenclasses, as 
though they were not to be regarded as part of the public (semantic) 
inheritance hierarchy. However, there were one or two leaks. For 
example, eigenclass.superclass reports the original class of the 
instance (in 1.9 at least). And, in a similar vein, the keyword super 
chains from an instance-specific method to a regular instance method. 
(As it happens, it transpires that this is convenient way of enabling 
interception.) Ideally, one would like to stem the leaks as far as 
possible without causing too much breakage of existing code.

Here's a few conclusions I've come to. I'd be interested to hear what 
others think.

(i) The correct way to present method resolution is the way 
Flanagan/Matz do on page 258 of their book, i.e. as an algorithm. It's 
simple, intuitive and easy to remember. Ruby implementations are free to 
implement this algorithm any way that's convenient (and fast) in their 
given context. The wrong way to present method resolution is the Pickaxe 
approach of using diagrams from MRI's runtime structure. Apart from not 
being portable (which will become a bigger and bigger problem), it's 
backwards. That runtime structure exists like that in order to support 
certain desired semantics. So deriving the semantics from the structure 
is neither here nor there. Just state them up front.

(ii) The keyword super should just be defined to work according to the 
method resolution algorithm, not the inheritance hierarchy. This is what 
happens at the moment, so it's just a formalising of the de facto 
situation and doesn't break anything. This would preserves the 
convenient chaining from a per-instance method to the regular instance 
method and makes it clear that there are potentially lots of other 
useful chaining opportunities. As Gary pointed out to David earlier in 
this thread, the sequence of classes produced by the method resolution 
algorithm is different from the inheritance hierarchy because of module 
mixin and eigenclasses. (And in Ruby, module mixin is not inheritance, 
regardless of the similarity.)

(iii) The superclass method should be defined to return Object for the 
eigenclass of a regular object. In other words, the original statement I 
alluded to from page 261 of RPL would now be true. The current situation 
(returning the class of the instance) is an implementation leak. I don't 
think there would be much breakage resulting from this and it cleans 
things up.

(iv) In principle, class method resolution could also be defined purely 
by an algorithm, as a language rule, which would then not require 
explicit semantic inheritance to work.

Lastly, the terminology situation needs to be addressed by the 
community. The term eigenclass is really spot on for a conceptual 
container for per-instance behaviour and it's great that RPL adopted it. 
The other terms are not acceptable synonyms; they are misnomers.

(a) metaclass
Even _why, in the 2005 piece that led to the widespread use of the term 
metaclass, acknowledged that the term was wrong: 'This definition 
doesn’t really work with Ruby, though, since "a class which defines a 
class" is simply: a Class'. The simplest way to illustrate this is to 
compare Smalltalk and Ruby. In Smalltalk, if you evaluate the expression 
"Integer class", you get "Integer class" (i.e. the same thing). The 
answer being the same as the question is an expression of the anonymous 
nature of the metaclass, but is read by a Smalltalk programmer as "the 
metaclass of Integer". In Ruby, if you evaluate the expression 
"Integer.class", you get "Class". Thus, even if the eigenclasses of 
class objects in Ruby play a similar role to metaclasses in Smalltalk, 
they are not metaclasses. By definition.

(b) singleton class
As pointed out in the "Ruby in the browser" example above, there is no 
need for the eigenclass to actually exist as a regular class, let alone 
have a single instance. Clearly then, the term singleton class would 
only be appropriate to some implementations and would consequently be a 
misnomer.

While I'm at it, the term "singleton method" is also a misnomer. The 
term "singleton" derives from set theory. A singleton set is a set with 
one element. As such, the GoF pattern is a perfect fit. However, there 
is no singleton set anywhere in this situation (unless you get really 
silly in your choice of set). You can have many instances, each with 
many per-instance methods. The only appearance of the word "one" is on 
one side of the cardinality of an association (and not on the method 
side). For reasons of symmetry, eigenmethod is a far better term.

Regards,

Danny.

-- 
Posted via http://www.ruby-forum.com/.

In This Thread