Probably an FAQ, but

Hi all,

I’ve been getting into Ruby programming - largely because of Rails -
and enjoying it rather a lot. It certainly compares favorably to my
other favorite of Smalltalk and Scheme; however, I do have one
significant issue.

I CAN’T FIND A BLOODY ACCURATE AND UP TO DATE LANGUAGE DEFINITION

I’ve been working based on hint, allegations, and things left unsaid
(with a surprising degree of success I must add) in many sources of
web content, but my frustration is starting to get pretty - well
frustrating. Note that I said ‘language defnition’ above, the
libraries are very well documented.

I have to be missing something obvious. What am I missing?

david rush

On Jun 26, 2007, at 5:00 AM, David R. wrote:

frustrating. Note that I said ‘language defnition’ above, the
libraries are very well documented.

I have to be missing something obvious. What am I missing?

The pickaxe book.

http://pragmaticprogrammer.com/titles/ruby/index.html

The PDF version is particularly helpful while you writing code.

Regards, Morton

On Jun 26, 11:51 am, Morton G. [email protected] wrote:

On Jun 26, 2007, at 5:00 AM, David R. wrote:

I CAN’T FIND A BLOODY ACCURATE AND UP TO DATE LANGUAGE DEFINITION

I have to be missing something obvious. What am I missing?

The pickaxe book.

I have downloaded the free version. It is quite good, but it lacks a
certain technical rigor. Or perhaps it is just organized in a way
which is opaque to someone who is used to the more traditionally
organized specifications. I mean chatty is OK if you want to motivate
someone, but when you need accurate information with a minimum of
search overhead, I prefer a more traditional format.

It actually appears to me that the state of Ruby from a technical
specification POV is really quite immature. I mean, is there even a
BNF for the grammar? How about railroad diagrams?

david rush

On Jun 26, 2007, at 5:40 PM, David R. wrote:

which is opaque to someone who is used to the more traditionally
organized specifications.

The pickaxe book is basically organized into a tutorial front-end and
a reference back-end. The reference portion is about as good as you
can get in English.

The free version is quite out of date. If you’re serious about Ruby,
buy the 2nd edition bundle (hard copy book plus PDF). Buying the PDF
gets you free updates to each new printing until the 3rd edition
comes out.

I mean chatty is OK if you want to motivate
someone, but when you need accurate information with a minimum of
search overhead, I prefer a more traditional format.

While coding, it very easy to search the PDF for details on syntax or
semantics. I consult my copy on an almost daily basis.

It actually appears to me that the state of Ruby from a technical
specification POV is really quite immature. I mean, is there even a
BNF for the grammar? How about railroad diagrams?

There are those who want to be language lawyers and those who enjoy
using powerful and elegant tools to get computers to do interesting
things[*]. Which are you? If you are one of the former, I can only
suggest you find another programming language. Good luck.

Regards, Morton

[*] The set may well have a non-void intersection, but I doubt there
are any dedicated Ruby programmers there.

David R. wrote:

It actually appears to me that the state of Ruby from a technical
specification POV is really quite immature. I mean, is there even a
BNF for the grammar? How about railroad diagrams?

If this is what you need to use Ruby I’m afraid you’re going to remain
frustrated. Although the subject has arisen several times in the past
(search this list’s archives) to date (afaik) nobody has been
sufficiently motivated to take the time to produce such things. Perhaps
one day somebody will be so motivated. Until then we continue to
struggle along without them. Ruby, despite now being 14 years old, is
still a very dynamic language. Going by the continuing spirited and
opinionated discussions on this list about changes in the next release,
although some of us are more conservative than others, it’s my opinion
that most Ruby users prefer dynamism over formalism.

Morton G. wrote:

The pickaxe book is basically organized into a tutorial front-end and a
reference back-end. The reference portion is about as good as you can
get in English.

But, still, incomplete. You may want to also look at the API docs or ri
(though they, too, are incomplete).


There are those who want to be language lawyers and those who enjoy
using powerful and elegant tools to get computers to do interesting
things[*]. Which are you?

Please; that’s a false choice and needlessly insulting to Mr. Rush.

In fact there are efforts underway to create a Ruby language spec,
driving by the recognition of its value.

See http://www.headius.com/rubyspec/index.php/Main_Page

( or spec.ruby-doc.org, which does a redirect to the above page but is
easier to remember. Well, for me at least. :slight_smile: )


James B.

“Hackers will be expelled”

  • The Breakfast Club (1985)

On Jun 26, 2007, at 10:05 PM, James B. wrote:

Morton G. wrote:

There are those who want to be language lawyers and those who
enjoy using powerful and elegant tools to get computers to do
interesting things[*]. Which are you?

Please; that’s a false choice and needlessly insulting to Mr. Rush.

I allowed that one could be both, but not both and a happy Ruby
coder. See the footnote. But that’s only my opinion, and I respect
the other poster who has begged to differ.

I was miffed by his attitude. but I agree that I should not have gone
ad hominem on him. My apologies to David R…

Regards, Morton

In message [email protected], Morton
Goldber
g writes:

There are those who want to be language lawyers and those who enjoy
using powerful and elegant tools to get computers to do interesting
things[*]. Which are you? If you are one of the former, I can only
suggest you find another programming language. Good luck.

[*] The set may well have a non-void intersection, but I doubt there
are any dedicated Ruby programmers there.

I don’t know about that. I would consider myself a language lawyer sort
(I was on the C committee for most of a decade on my own dime as a
hobby,
and will likely resume now that I have a job such that I can afford to
do
so), and I think Ruby is awesome. Some of the boundaries work out in
surprising ways, most noticably
x = 3
a.each { |x| oops }
but in general I think it’s an excellent language, and for the sorts of
things Ruby is good for, it’s my current default choice. (No one, I
think,
will consider me less sincere in my admiration for Ruby if I admit no
plans to use it for drivers on embedded boards.)

-s

From: David R. [mailto:[email protected]] :

It actually appears to me that the state of Ruby from a technical

specification POV is really quite immature. I mean, is there even a

BNF for the grammar? How about railroad diagrams?

not to discourage you but
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/15599

at the last hint my matz, i would reckon that it would not be easy but
possible. perhaps as a start, someone could make parse.y less cryptic?

On Jun 27, 3:05 am, James B. [email protected] wrote:

In fact there are efforts underway to create a Ruby language spec,
driving by the recognition of its value.

Seehttp://www.headius.com/rubyspec/index.php/Main_Page

( or spec.ruby-doc.org, which does a redirect to the above page but is
easier to remember. Well, for me at least. :slight_smile: )

Thank you very much. After less then 3 minutes looking at it, I have
found one or two answers already. Clearly this is still a work in
progress, but very helpful nonetheless.

david rush

On Jun 27, 3:39 am, Morton G. [email protected] wrote:

coder.
Who said happiness had any part of it? Certainly your footnote did
not. You referred to ‘dedicated’ Ruby coders, actually - I was unaware
I was signing up to the new religion. I would also suggest that I am
one of those people who does lie in the intersection of the set of
language lawyers and hard-core hackers (if you will pardon my
assertion of semantic equivalence) - as my long-ish career in
programming on a wide variety of platform shows.

I was miffed by his attitude.

Sorry for saying that the Emperor has a hole in his trousers, but I
really didn’t say he was naked - because he is not. However, formal
specifications are hugely useful, assuming that you have learned how
to think rigorously enough to make use of them. And as the history of
some programming languages has shown, need not be a barrier to
innovation even within the language specified.

cue the old geezer tape … on second thought let’s not

My attitude is what I said it was. I’m having a fair bit of fun
programming in Ruby - enough that I’m actively thinking about ways to
implement a native-code compiler - but the way that the language is
specified is a problem to me from many angles. And the process of
discovering that specification by trial and error brings back to mind
the worst of the bad old days of cross-assembly development and hand-
patching device drivers use hex editors.

whoopsie … I did the old geezer thing anyway

but I agree that I should not have gone
ad hominem on him. My apologies to David R…

By all means, feel free to go ad hominem all you want - there’s a long
and glorious Usenet tradition there. Many of us have felt deprived
since the departure of Erik Naggum from comp.lang.lisp, but the one
constant in the world is change…and crabby[1] hackers :slight_smile:

david rush
David Rush on the Web ← a very messy construction^Wwebsite

On Jun 27, 2:22 am, David Rush [email protected] wrote:

On Jun 27, 3:05 am, James B. [email protected] wrote:

See http://www.headius.com/rubyspec/index.php/Main_Page
Thank you very much. After less then 3 minutes looking at it, I have
found one or two answers already. Clearly this is still a work in
progress, but very helpful nonetheless.

Though certainly not normative, I offer up this diagram I created to
help understand the Big Picture:


http://phrogz.net/RubyLibs/RubyMethodLookupFlow.pdf

(I certainly find it easier to follow and more descriptive than the
ASCII diagram included in the RDocs for Class.)

Corrections are always welcome.

David R. wrote:

Who said happiness had any part of it? Certainly your footnote did
not. You referred to ‘dedicated’ Ruby coders, actually - I was unaware
I was signing up to the new religion. I would also suggest that I am
one of those people who does lie in the intersection of the set of
language lawyers and hard-core hackers (if you will pardon my
assertion of semantic equivalence) - as my long-ish career in
programming on a wide variety of platform shows.

Hooray!! Another person on this list that’s been programming a “longish”
time and is in the intersection of language lawyers (aka people who
appreciate the formalisms of computer science) and hard-core hackers!!

Have you been doing it long enough to have earned a living programming
in assembler? :wink:

Sorry for saying that the Emperor has a hole in his trousers, but I
really didn’t say he was naked - because he is not. However, formal
specifications are hugely useful, assuming that you have learned how
to think rigorously enough to make use of them. And as the history of
some programming languages has shown, need not be a barrier to
innovation even within the language specified.

My take on the history of programming languages is that the hacks and
innovations have led the formal specifications, not followed them.
People had been doing concurrent programming long before CCS and CSP and
mobile programming long before the Pi-calculus, for example. In fact,
I’d go even farther and say that almost all of the innovations in what
we call “computer science” originated at the hardware level, with the
software being crafted to use the hardware and the computer science
being crafted to explain the software.

cue the old geezer tape … on second thought let’s not

My attitude is what I said it was. I’m having a fair bit of fun
programming in Ruby - enough that I’m actively thinking about ways to
implement a native-code compiler - but the way that the language is
specified is a problem to me from many angles. And the process of
discovering that specification by trial and error brings back to mind
the worst of the bad old days of cross-assembly development and hand-
patching device drivers use hex editors.

I can assure you, the “core” of the Ruby community, which I define as
the people implementing the interpreters and with active Ruby internals
projects, are aware that this needs to be done and soon. Other things
that need to be done and soon are performance tuning of the inner
interpreter, getting Unicode on the mainstream, and stabilizing the
syntax and semantics. Other people have pointed out the web sites where
most of this is going on.

I’ve briefly flirted with the idea of doing a Ruby implementation
myself, or, actually, resurrecting one called Carbone that’s based on
gForth and vmgen. That’s mostly because I’m a better Forth programmer
than I am a C programmer, and because I think “vmgen” is a masterpiece
of the intersection of computer science and hard-core hardware hacking.
:wink: But in the end, it looks like the Ruby 1.9 inner interpreter in C
will be as good or better, so I’m happy to work on applications and use
them to test 1.9 instead. :slight_smile:

By all means, feel free to go ad hominem all you want - there’s a long
and glorious Usenet tradition there. Many of us have felt deprived
since the departure of Erik Naggum from comp.lang.lisp, but the one
constant in the world is change…and crabby[1] hackers :slight_smile:

david rush
David Rush on the Web ← a very messy construction^Wwebsite

[1] and ‘crabby’ apparently is a term derived from Falconry, arguably
one of the oldest hacker careers

I was not aware of that – I always thought falconry was cool, but never
bothered to dig into it.