Using & for arrays of objects

Saluton!

  • Rudolf Polzer; 2003-06-30, 12:45 UTC:

i_think {
if we.do.to_past() |that|
should_not {
problems.with(that).any().exists?()
}
end
}

caugh That results in

undefined method `i_think’

:->

Gis,

Josef ‘Jupp’ Schugt

···


Someone even submitted a fingerprint for Debian Linux running on the
Microsoft Xbox. You have to love that irony :).
– Fyodor on nmap-hackers@insecure.org

Saluton!

  • Guillaume Marcais; 2003-06-30, 20:45 UTC:

You can speak latin with PERL:

    use Lingua::Romana::Perligata;
      ^^^

Isn’t grand?

‘use’ isn’t latin, is it?

Gis,

Josef ‘Jupp’ Schugt

···


Someone even submitted a fingerprint for Debian Linux running on the
Microsoft Xbox. You have to love that irony :).
– Fyodor on nmap-hackers@insecure.org

“Josef ‘Jupp’ Schugt” jupp@gmx.de wrote in message news:<20030630202051.GE913@jupp%gmx.de>…

undefined method `i_think’

def i_think
if ((current_time.after?(“11:00”) || $self.caffienated?)
yield
else
raise “insufficiently awake”
end
end

martin

“Josef ‘Jupp’ Schugt” jupp@gmx.de wrote in message news:<20030630235636.GB1672@jupp%gmx.de>…

‘use’ isn’t latin, is it?

It sure is. It’s the singular masculine vocative perfect passive participle
of the deponent verb ‘utor’ (“to use”).

Very loosely translated, “use Lingua::Romana::Perligata” means:

"Oh Roman language binding, you have been used."

Which is exactly the case.

:wink:

Damian

def i_think
assert i_am # :wink:
end

“Josef ‘Jupp’ Schugt” jupp@gmx.de wrote in message
news:<20030630235636.GB1672@jupp%gmx.de>…

‘use’ isn’t latin, is it?

It sure is. It’s the singular masculine vocative perfect passive
participle
of the deponent verb ‘utor’ (“to use”).

Very loosely translated, “use Lingua::Romana::Perligata” means:

"Oh Roman language binding, you have been used."

Which is exactly the case.

:wink:

Damian

I don’t know whether to be more impressed by that
post or the fact that Damian is actually lurking
here. (Or perhaps it’s just a cameo appearance?)

Drop by the Ruby Conference in Austin in November.
I have a book I’d like you to autograph. :wink:

Cheers,
Hal

···

----- Original Message -----
From: “Thoughtstream” damian@conway.org
Newsgroups: comp.lang.ruby
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Tuesday, July 01, 2003 11:49 AM
Subject: Re: Using & for arrays of objects


Hal Fulton
hal9000@hypermetrics.com

Saluton!

  • Thoughtstream; 2003-07-02, 10:47 UTC:

‘use’ isn’t latin, is it?

It sure is. It’s the singular masculine vocative perfect passive
participle of the deponent verb ‘utor’ (“to use”).

Why cannot as time traveller futurecomingpastgodestroy the city of
Rome so that it presenthistoryvanishes? (are the temporal forms
correct? :wink:

Quoting from the ten commandments of good programming style:

  • Thou shalt not bear false witness about the programming language a
    program is written in.

  • Let your commmunication be Perl, Perl; Ruby, Ruby: for whatsoever
    is more than these cometh of evil.

Gis,

Josef ‘Jupp’ Schugt

···


Someone even submitted a fingerprint for Debian Linux running on the
Microsoft Xbox. You have to love that irony :).
– Fyodor on nmap-hackers@insecure.org

Nah – what do you think he wrote the Perl module
Quantum::Superpositions for? It lets him read all his mail in
parallel. (In constant time, of course)

Answering occasionally takes a little longer, though… :slight_smile:

···

At 2:49 AM +0900 7/2/03, Hal E. Fulton wrote:

----- Original Message -----
From: “Thoughtstream” damian@conway.org
Newsgroups: comp.lang.ruby
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Tuesday, July 01, 2003 11:49 AM
Subject: Re: Using & for arrays of objects

“Josef ‘Jupp’ Schugt” jupp@gmx.de wrote in message
news:<20030630235636.GB1672@jupp%gmx.de>…

‘use’ isn’t latin, is it?

It sure is. It’s the singular masculine vocative perfect passive
participle
of the deponent verb ‘utor’ (“to use”).

Very loosely translated, “use Lingua::Romana::Perligata” means:

 "Oh Roman language binding, you have been used."

Which is exactly the case.

:wink:

Damian

I don’t know whether to be more impressed by that
post or the fact that Damian is actually lurking
here. (Or perhaps it’s just a cameo appearance?)


Dan

--------------------------------------“it’s like this”-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk

“Joel VanderWerf” vjoel@PATH.Berkeley.EDU schrieb im Newsbeitrag
news:3F013010.7030703@path.berkeley.edu…

def i_think
assert i_am # :wink:
end

Hmmm… assert verifies that i_am is true, but Descartes concluded that
i_am must return true if i_think returns true. IMHO it’s more like

class Human
attr_accessor :thinks
def am; @thinks; end
end

I = Human.new
I.am
I.thinks = true
I.am

Note, that “I” is a constant which reflects our understanding of identity
quite good.

:-))

robert

Scripsit ille »Robert Klemme« bob.news@gmx.net:

“Joel VanderWerf” vjoel@PATH.Berkeley.EDU schrieb im Newsbeitrag news:3F013010.7030703@path.berkeley.edu…

def i_think
assert i_am # :wink:
end

Hmmm… assert verifies that i_am is true, but Descartes concluded that
i_am must return true if i_think returns true. IMHO it’s more like

class Human
attr_accessor :thinks
def am; @thinks; end
end

I = Human.new
I.am
I.thinks = true
I.am

Note, that “I” is a constant which reflects our understanding of identity
quite good.

Not really… that’s not Ruby.

In Ruby it would look like:

class Beer
def am?()
is?()
end
def are?()
is?()
end
end
class Human < Beer
def initialize()
@thinking = false
end
def think!()
@thinking = true
end
def drink!()
@thinking = false
end
def thinking?()
@thinking
end
def is?()
return true if @thinking
# … other sufficient conditions for being …
# otherwise…
false
end
end

BTW: it’s a Be-er, that is, someone who is. No cervisia!

i = Human.new()
i.think!()
p i.am?()

···


class Heisenberg; def initialize(r, p) @r = r; @p = p; end; def r();
@p += 2 * rand() - 1; @r; end; def p(); @r += 2 * rand() - 1; @p; end;
end; o = Heisenberg.new(17, 42); puts “impulse: %g, position: %g” %
[o.p(), o.r()]; puts “impulse: %g, position: %g” % [o.p(), o.r()];

“Rudolf Polzer” denshimeiru-sapmctacher@durchnull.ath.cx schrieb im
Newsbeitrag
news:slrnbg69ll.99k.denshimeiru-sapmctacher@message-id.durchnull.ath.cx…

class Human < Beer

Hm, I find this modeling a tad bit unrealistic.

i = Human.new()

In fact we both made an error here: you need a factory and a helper class
(both sub classes of Human) to create a new Human.

Cheese

robert

Scripsit ille »Robert Klemme« bob.news@gmx.net:

“Rudolf Polzer” denshimeiru-sapmctacher@durchnull.ath.cx schrieb im Newsbeitrag news:slrnbg69ll.99k.denshimeiru-sapmctacher@message-id.durchnull.ath.cx…

class Human < Beer

Hm, I find this modeling a tad bit unrealistic.

Beer = Be-er = someone who is :slight_smile:

Didn’t you read the (misplaced) comment?

i = Human.new()

In fact we both made an error here: you need a factory and a helper class
(both sub classes of Human) to create a new Human.

Which Ruby doesn’t support: an object cannot be created without using
a constructor.

So how is the “first” object created?

···


Du fingst mit Einem heimlich an,
Bald kommen ihrer mehre dran,
Und wenn dich erst ein Dutzend hat,
So hat dich auch die ganze Stadt.

“Rudolf Polzer” denshimeiru-sapmctacher@durchnull.ath.cx schrieb im
Newsbeitrag
news:slrnbg987m.fb3.denshimeiru-sapmctacher@message-id.durchnull.ath.cx…

Scripsit ille »Robert Klemme« bob.news@gmx.net:

“Rudolf Polzer” denshimeiru-sapmctacher@durchnull.ath.cx schrieb im
Newsbeitrag
news:slrnbg69ll.99k.denshimeiru-sapmctacher@message-id.durchnull.ath.cx…

class Human < Beer

Hm, I find this modeling a tad bit unrealistic.

Beer = Be-er = someone who is :slight_smile:

Didn’t you read the (misplaced) comment?

I did but obviously this eluded me. :slight_smile:

i = Human.new()

In fact we both made an error here: you need a factory and a helper
class
(both sub classes of Human) to create a new Human.

Which Ruby doesn’t support: an object cannot be created without using
a constructor.

No OO language that I know does (maybe JavaScript), but you can have
factories nevertheless. And you might hide the constructor from the
public somewhere deep in the womb of the factory.

So how is the “first” object created?

I guess you’ll find out quite easily by looking into Ruby source code. :slight_smile:

robert

Saluton!

  • Rudolf Polzer; 2003-07-04, 09:43 UTC:

Scripsit ille »Robert Klemme« bob.news@gmx.net:

class Human < Beer

Hm, I find this modeling a tad bit unrealistic.

Beer = Be-er = someone who is :slight_smile:

Could also mean a BeOS user.

In fact we both made an error here: you need a factory and a
helper class (both sub classes of Human) to create a new Human.

Which Ruby doesn’t support: an object cannot be created without
using a constructor.

Well, the correct terminus technicus in this case is creator, not
constructor. An instance of Human is made by a creator that
(depending on circumstances) takes up to two instances of Human to
form a new instance of Human as in (for details see Gen 2 and Gen 4):

adam = Human.new()
eve = Human.new(adam)
kain = Human.new(adam,eve)

The single-argument form not requires h.gender == male as can be seen
from

jesus = Human.new(mary)

So how is the “first” object created?

That question does exist as long as philosophy. I think that we are
not expected to solve this here:

Gis,

Josef ‘Jupp’ Schugt

···


Someone even submitted a fingerprint for Debian Linux running on the
Microsoft Xbox. You have to love that irony :).
– Fyodor on nmap-hackers@insecure.org

Which Ruby doesn’t support: an object cannot be created without using
a constructor.

No OO language that I know does (maybe JavaScript), but you can have
factories nevertheless. And you might hide the constructor from the
public somewhere deep in the womb of the factory.

So how is the “first” object created?

I guess the statement “it is normal for somebody your age to be curious
about these things, but…” is a cliché :-))

I guess you’ll find out quite easily by looking into Ruby source code. :slight_smile:

Beware: you could be talking to a minor. Some say that such immoral
material (C code) should be kept away from the impressionable minds of
The Children ™.

···

On Fri, Jul 04, 2003 at 04:54:38PM +0900, Robert Klemme wrote:


_ _

__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’ \
) | (| | |
__ \ | | | | | (| | | | |
.__/ _,
|_|/| || ||_,|| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

How should I know if it works? That’s what beta testers are for. I
only coded it.
– Attributed to Linus Torvalds, somewhere in a posting

Scripsit ille »Josef ‘Jupp’ Schugt« jupp@gmx.de:

  • Rudolf Polzer; 2003-07-04, 09:43 UTC:

Scripsit ille »Robert Klemme« bob.news@gmx.net:

In fact we both made an error here: you need a factory and a
helper class (both sub classes of Human) to create a new Human.

Which Ruby doesn’t support: an object cannot be created without
using a constructor.

Well, the correct terminus technicus in this case is creator, not
constructor.

Hm… really?

I thought the creator calls the constructor.

An instance of Human is made by a creator that
(depending on circumstances) takes up to two instances of Human to
form a new instance of Human as in (for details see Gen 2 and Gen 4):

adam = Human.new()
eve = Human.new(adam)
kain = Human.new(adam,eve)

The single-argument form not requires h.gender == male as can be seen
from

jesus = Human.new(mary)

Hm… that is, jesus is created the same way as eve? Seems like it should
rather be

jesus = Human.new(God, mary)

Note the capitalization: God is a constant, an instance of a singleton
class. It’s normally not created directly but using wrapper classes
like Jahwe, Allah, maybe even KamiSama (well, the exact class name can
only be written in multi-byte character codings, but how to uppercase
the first character then to make it a constant?). There’s at least one
such wrapper class per religion. Some people even call their personal
God wrapper class instance “root”, which has the advantage of it being
modifiable (lower case). [1]

But all of these are local variables. A global ($) variable pointing
directly or indirectly to some God reference seems to not exist, which
explains why there are so many different religions.

So how is the “first” object created?

That question does exist as long as philosophy. I think that we are
not expected to solve this here:

Maybe in a C module? It should be possible to “manually” create a Ruby
object from inside C code, without using a constructor.

[1]: Some people think God is the world’s root but forgot His password,
losing all control over it. But as long as nobody finds a local[3]
root exploit[2], there shouldn’t be any big problems with that.

[2]: The US for example seem to be looking for one extensively.

[3]: Hm… how would a REMOTE root exploit look like then?

LLLL OOOOO LLLL
LLLL OOOOOOO LLLL
LLLL OOO OOO LLLL
LLLL OOO OOO LLLL
LLLL OOO OOO LLLL
LLLL OOO OOO LLLL
LLLL OOO OOO LLLL
LLLLLLLLLLL OOOOOOO LLLLLLLLLLL
LLLLLLLLLLL OOOOO LLLLLLLLLLL

“Mauricio Fernández” batsman.geo@yahoo.com schrieb im Newsbeitrag
news:20030704091432.GC9681@student.ei.uni-stuttgart.de

Which Ruby doesn’t support: an object cannot be created without
using
a constructor.

No OO language that I know does (maybe JavaScript), but you can have
factories nevertheless. And you might hide the constructor from the
public somewhere deep in the womb of the factory.

So how is the “first” object created?

I guess the statement “it is normal for somebody your age to be curious
about these things, but…” is a cliché :-))

I guess you’ll find out quite easily by looking into Ruby source code.
:slight_smile:

···

On Fri, Jul 04, 2003 at 04:54:38PM +0900, Robert Klemme wrote:

Beware: you could be talking to a minor. Some say that such immoral
material (C code) should be kept away from the impressionable minds of
The Children ™.


_ _

__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’
) | (| | |
__ \ | | | | | (| | | | |
.__/ _,
|_|/| || ||_,|| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

How should I know if it works? That’s what beta testers are for. I
only coded it.
– Attributed to Linus Torvalds, somewhere in a posting

That is why, when you mention the C language in front
of a child, you should spell the name…

Hal

···

----- Original Message -----
From: “Mauricio Fernández” batsman.geo@yahoo.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, July 04, 2003 4:14 AM
Subject: [OT] Re: Using & for arrays of objects

Beware: you could be talking to a minor. Some say that such immoral
material (C code) should be kept away from the impressionable minds of
The Children ™.

yes - fashion it from bits so to speak. perhaps perl is more onto things
here: objects must be blessed before they exist as such :slight_smile:

···

On Sat, Jul 05, 2003 at 03:19:14AM +0900, Rudolf Polzer wrote:

So how is the “first” object created?

That question does exist as long as philosophy. I think that we are
not expected to solve this here:

Maybe in a C module? It should be possible to “manually” create a Ruby
object from inside C code, without using a constructor.


01CB B175 70D8 2E39 CA13 AEA6 3A2B 2219 31CD 5381