[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Probably an FAQ, but...

David Rush

6/26/2007 8:59:00 AM

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

12 Answers

Morton Goldberg

6/26/2007 10:51:00 AM

0

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

> 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?

The pickaxe book.

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

The PDF version is particularly helpful while you writing code.

Regards, Morton

David Rush

6/26/2007 9:37:00 PM

0

On Jun 26, 11:51 am, Morton Goldberg <m_goldb...@ameritech.net> wrote:
> On Jun 26, 2007, at 5:00 AM, David Rush 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
--
language-theoretical whinger extraordinaire

Tim Hunter

6/26/2007 10:13:00 PM

0

David Rush 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.

--
RMagick OS X Installer [http://rubyforge.org/project...]
RMagick Hints & Tips [http://rubyforge.org/forum/forum.php?for...]
RMagick Installation FAQ [http://rmagick.rubyforge.org/instal...]


Morton Goldberg

6/27/2007 1:43:00 AM

0

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

> On Jun 26, 11:51 am, Morton Goldberg <m_goldb...@ameritech.net> wrote:
>> On Jun 26, 2007, at 5:00 AM, David Rush 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.

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.

James Britt

6/27/2007 2:05:00 AM

0

Morton Goldberg 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...

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

--
James Britt

"Hackers will be expelled"
- The Breakfast Club (1985)

Morton Goldberg

6/27/2007 2:40:00 AM

0

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

> Morton Goldberg 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 Rush.

Regards, Morton

Peña, Botp

6/27/2007 4:27:00 AM

0

From: David Rush [mailto:kumoyuki@gmail.com] :
# 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-...

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?

David Rush

6/27/2007 8:18:00 AM

0

On Jun 27, 3:39 am, Morton Goldberg <m_goldb...@ameritech.net> wrote:
> On Jun 26, 2007, at 10:05 PM, James Britt wrote:
>
> > Morton Goldberg 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.

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 Rush.

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 :)

david rush
http://cyber-ru... <- a very messy construction^Wwebsite
--
[1] and 'crabby' apparently is a term derived from Falconry, arguably
one of the oldest hacker careers

David Rush

6/27/2007 8:23:00 AM

0

On Jun 27, 3:05 am, James Britt <james.br...@gmail.com> 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...
>
> ( or spec.ruby-doc.org, which does a redirect to the above page but is
> easier to remember. Well, for me at least. :) )

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
--
http://cyber-ru... <- a very messy construction^Wweb site

M. Edward (Ed) Borasky

6/27/2007 3:04:00 PM

0

David Rush 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? ;)

> 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.
;) 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. :)

> 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 :)
>
> david rush
> http://cyber-ru... <- 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.