Ruby for Philosophers

Hi there,
Maybe I’m helpless; don’t know. I use and like to read a lot, to write a
lot, but, honestly, my favorite time goes by just thinking. So, I’ve
been thinking a lot during all my entire life, and specially the last,
maybe, six years, when most of this game of thinking started to become
itself focused around certain aspect of reality, mostly Philosophy of
Art, or Aesthetics.

One Philosopher’s great ambition may be to create almost one new.concept
during his or her life, almost one concisely written idea, in whatever
language. At certain point, doesn’t really matter what language. Anyway
almost everybody knows that Philosophy’s History Most-Most Greatest Hits
were written in Greek, Latin or German. I still don’t know well why but,
maybe, think, that could be related to some language’s kind of
flexibility that favors the creation -to get together in a mind- of
major concepts.

So, what all this got to do with Ruby? Well, I’ve been thinking about to
learn a second language from scratch. It could be Ruby. And I say could
cause I can’t find one document that shows me the foundation. If I not
wrong, in Ruby, everything belongs to one class or another. Then, the
class Class itself must inherit certain characteristics from something
else. Anyway, my question is what leads: ¿Where can I find a
documentation that lists and defines all the elements of the class
Class? ¿Is it possible to think about learning Ruby as to learn, for
example, chess? If that’s true, which are the most basics rules for
playing Ruby?

I’m a philosopher, I got to think all the stuff by myself, so I’m not
very interested on what programmers are doing with the latest classes or
objects created by them. Just the basic rules; to comprehend and then
start thinking -or playing-.

Forgive my ignorance.

And thanks in advance.

On 02.11.2008 04:10, Sebastian T. wrote:

One Philosopher’s great ambition may be to create almost one new.concept
during his or her life, almost one concisely written idea, in whatever
language. At certain point, doesn’t really matter what language. Anyway
almost everybody knows that Philosophy’s History Most-Most Greatest Hits
were written in Greek, Latin or German. I still don’t know well why but,
maybe, think, that could be related to some language’s kind of
flexibility that favors the creation -to get together in a mind- of
major concepts.

I for myself think the reasons for your observation are historic rather
than linguistic. The fact that we know these writings has to do with a
lot of lucky coincidences and the fact that Greek philosophy became
fashionable in different periods of European history. Btw, I believe
you forgot to mention a few other languages, namely Hindi, Chinese and
probably others which were also used to write important philosophical
texts.

So, what all this got to do with Ruby? Well, I’ve been thinking about to
learn a second language from scratch. It could be Ruby.

You should be very clear about the fact that a programming language is
very different from a natural language. I am not sure whether
programming languages are suited to write philosophical texts although
they can help in reasoning about and solving of a certain class of
problems (usually in the area of logic).

And I say could
cause I can’t find one document that shows me the foundation.

The Pickaxe could be a good start, you can find it here
Programming Ruby: The Pragmatic Programmer's Guide although I’d recommend buying
the second edition. There are also numerous tutorials e.g. “Learning to
Program” which you can find from http://ruby-doc.org/ .

Is it possible to think about learning Ruby as to learn, for
example, chess?

Do you want to think about learning Ruby or do you want to learn Ruby?

If that’s true, which are the most basics rules for
playing Ruby?

I’d say they are the same for all procedural programming languages (on a
certain level at least): you have state and you have instructions that
operate on this state transforming it into another state (-> Turing
Machine).

I’m a philosopher, I got to think all the stuff by myself, so I’m not
very interested on what programmers are doing with the latest classes or
objects created by them. Just the basic rules; to comprehend and then
start thinking -or playing-.

I am not sure whether it is a good idea to ignore the purpose of a tool
when trying to understand how to use it. Good luck!

Kind regards

robert

On 02.11.2008 12:23, Josef ‘Jupp’ Schugt wrote:

I changed the topic because “Ruby for Philosophers” is highly misleading.
It suggests you want to present Ruby to Philosophers (say to do automatic
theorem testing).

I believe OP wants something different:

One Philosopher’s great ambition may be to create almost one new.concept
during his or her life, almost one concisely written idea, in whatever
language. At certain point, doesn’t really matter what language.

As far as I understand him he considers using Ruby to write a
philosophical treatise.

Viele Grüße :wink:

robert

Hi!

I changed the topic because “Ruby for Philosophers” is highly
misleading.
It suggests you want to present Ruby to Philosophers (say to do
automatic
theorem testing).

On Sun, 02 Nov 2008 04:10:29 +0100, Sebastian T.
[email protected] wrote:

If I not wrong, in Ruby, everything belongs to one class or another.
Then, the class Class itself must inherit certain characteristics from
something else.

The basic class in Ruby is “Object”, not “Class”. Every object in Ruby
is
an instance of “Object” but most objects are no instance of “Class”.

For the class hierarchy see

 http://objectgraph.rubyforge.org/

For the what makes up the Object class see

http://www.ruby-doc.org/core/classes/Object.html

¿Where can I find a documentation that lists and defines all the
elements of the class Class?

Start at

 http://www.ruby-doc.org/core/classes/Class.html

BTW: El ‘¿’ no es utilisado en el inglés…

¿Is it possible to think about learning Ruby as to learn, for example,
chess?

That depends on you mental disposition.

Forgive my ignorance.

There hardly is anything more unforgivable than ignorance as it is known
to be the most productive source of conflicts.

Josef ‘Jupp’ Schugt

On Sun, 02 Nov 2008 13:33:43 +0100, toomln [email protected] wrote:

As far as I understand him he considers using Ruby to write a
philosophical treatise.

I personally would like to see Heidegger’s “Sein und Zeit” rewritten
in prolog. This could be fun.

May I suggest writing “Critik(*) der reinen Vernunft” by Immanuel Kant
in
Lisp?

(*) No, that is no misspelling. In modern German it reads “Kritik” but
in
the original print it is written with initial “C”.

Josef ‘Jupp’ Schugt

Josef ‘Jupp’ Schugt wrote:

(*) No, that is no misspelling. In modern German it reads “Kritik” but
in the original print it is written with initial “C”.

Josef ‘Jupp’ Schugt

Rudolph Carnap’s “Der logische Aufbau der Welt” (logical reconstruction
of the world) could be ported to ruby, but it would suffer from the same
flaw as the original:

NoMethodError: undefined method `Rs’ for …

(Rs was the relation of similarity between sense experiences, etc.,
IIRC.)

As far as I understand him he considers using Ruby to write a
philosophical treatise.

I personally would like to see Heidegger’s “Sein und Zeit” rewritten
in prolog. This could be fun.

Joel VanderWerf wrote:

Josef ‘Jupp’ Schugt wrote:

(*) No, that is no misspelling. In modern German it reads “Kritik” but
in the original print it is written with initial “C”.

Josef ‘Jupp’ Schugt

Rudolph Carnap’s “Der logische Aufbau der Welt” (logical reconstruction
of the world) could be ported to ruby, but it would suffer from the same
flaw as the original:

NoMethodError: undefined method `Rs’ for …

(Rs was the relation of similarity between sense experiences, etc.,
IIRC.)

Why, I am in fact slowly working on implementing in Ruby Montague’s
system which relies heavily on Carnap’s. I’ll keep ya posted :slight_smile:

Sebastian T. wrote:

So, what all this got to do with Ruby? Well, I’ve been thinking about to
learn a second language from scratch. It could be Ruby. And I say could
cause I can’t find one document that shows me the foundation. If I not
wrong, in Ruby, everything belongs to one class or another. Then, the
class Class itself must inherit certain characteristics from something
else. Anyway, my question is what leads: ¿Where can I find a
documentation that lists and defines all the elements of the class
Class? ¿Is it possible to think about learning Ruby as to learn, for
example, chess? If that’s true, which are the most basics rules for
playing Ruby?

I was going to suggest this link:
http://www.ruby-doc.org/docs/ProgrammingRuby/html/classes.html
as a good starting point (assuming they know ruby).
The 2nd paragraph definitely bears a closer reading.

I don’t know how you’d write philosophy in Ruby, but the
ruby universe does seem kind of tidy and self-consistent (putting
to one side the dark internals) - I’m sure philosophers like
Spinoza, for instance, would have appreciated the structure
and maybe taken inspiration from it :slight_smile:

From a pedagogical point of view, wouldn’t it be helpful to
have a diagram showing how ruby is structured based on
Object#class and Class#superclass?
I don’t mean listing all the in-built classes like File, IO… etc
but just mapping out fundamentally how ruby is structured.
This would be trivial to people who do ruby metaprogramming
in their sleep, but it might help other people get their heads round
classes and object instances and modules etc… ?

My understanding is:
All ruby objects have an associated class-like object (see below)
courtesy of Object#class. This class gives them their method
definitions.
Class-like objects have their class set to Class itself. This gives
ruby’s class-like objects a hierarchy (ie classical inheritance) because
Class has the method ‘superclass’. Object ends up being at the top of
this hierarchy.
Putting aside how all this is implemented internally, it seems
that Class sets up the idea of “class” and class hierarchy; which allows
Object to be given the ultimate superclass status in the ruby universe.
Seems like both Object and Class are intertwined a little; with Module
sitting between them (just looking at it philosophically from the
surface).

The diagram I was thinking of would have 3-4 sections with pointers
mapping ‘class’ relationships and ‘superclass’ relationships.
The sections would be something like:

  1. Class
  2. Class.new, Object, Module, class Foo;…;end, File, IO, …

  1. Module.new, module Bar;…;end, Kernel, …
  2. Object.new, Class.new.new , Foo.new, …

Sections 1 and 2 are the class-like objects whose ‘class’ is Class
(including Class itself) and so have the idea of a superclass hierarchy;
.
Class itself interestingly is at the bottom of the class hierarchy,
followed
by Module and then Object at the top. Classes created by us eg Foo have
their superclass set by default to Object unless you specify
that they inherit from some other class.

The diagram bascially splits the ruby universe into two groups:
class-like objects (1 and 2) which have a class hierarchy and non
class-like objects (3 and 4).
3) is sort of an in-between, halfway house. These objects (ruby
modules) resemble classes in 2) but can’t be instantiated and don’t have
class Class
and as a result no superclass.

Any thoughts?


Daniel B.

Sebastian T. wrote:

If that’s true, which are the most basics rules for
playing Ruby?

If you are thinking of it as a game, and are prepared to persevere
through the noise, then maybe this is for you:
http://poignantguide.net/ruby/

Sebastian T. wrote:

Forgive my ignorance.

And thanks in advance.

Perhaps a more general description of the concepts that form the
foundation of Ruby and other Object Oriented languages would help you
decide.

IMHO, the ease that Ruby offers in creating Domain Specific Language
should be
very useful in exploring new concepts and their relationships.

It would depend, of course, on whether the concepts you are working with
can be
modeled in this context but that’s the challenge, after all.

Just some of my thoughts here, not necessarily interesting or even
original.

On 11/1/08, Sebastian T. [email protected] wrote:

almost everybody knows that Philosophy’s History Most-Most Greatest Hits
were written in Greek, Latin or German. I still don’t know well why but,
maybe, think, that could be related to some language’s kind of
flexibility that favors the creation -to get together in a mind- of
major concepts.

As Robert pointed out, it may be very difficult to write an expository
text in ruby. Programming languages and natural languages aren’t used
for (quite) the same thing. Most statements in ruby are imperative,
whereas in natural languages, mostly declarative statements are used.
So does this mean that you should be trying to learn prolog or SQL
instead? I don’t know the answer to that.

So, what all this got to do with Ruby? Well, I’ve been thinking about to
learn a second language from scratch. It could be Ruby. And I say could
cause I can’t find one document that shows me the foundation. If I not
wrong, in Ruby, everything belongs to one class or another. Then, the
class Class itself must inherit certain characteristics from something

The interesting thing about Class is that it is an instance of itself.
Object and Module are the only other cases of this, as far as I know.

There’s definitely a link between category theory (is that the right
name?) in philosophy and the design of object systems in computer
science. You should check out Francis H.'s talk at last year’s
rubyconf. It’s on video:
http://rubyconf2007.confreaks.com/d2t1p7_conversations_vs_laws.html

I’m a philosopher, I got to think all the stuff by myself, so I’m not
very interested on what programmers are doing with the latest classes or
objects created by them. Just the basic rules; to comprehend and then
start thinking -or playing-.

The best tool for learning and playing with ruby is irb… it’s the
ruby program that overall has given me the most joy. If you’re going
to learn by playing in irb, I recommend learning about some of ruby’s
introspection features… things like Class#instance_methods.

The pickaxe has a writeup on irb:
http://www.rubycentral.com/pickaxe/trouble.html
#scroll down to the second section.

and introspection:
http://www.rubycentral.com/pickaxe/ospace.html

Well,
Thank´s a lot for all your replies!
Now I have a good starting point to figure out if it´s possible or not.

Thanks again.

I would consider myself the last one who can give a tip but maan is
this discussion good. I mean this stuff can create history in the
world, not to mention give enough food to Sci-Fi writers