[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby for [...] programmers

Doug Bromley

3/22/2006 12:23:00 AM

Hi all

I've come across an online book concerning Ruby for Perl programmers but
I've yet to find any for other languages.

The Pick Axe book is a little to slow and simplistic telling far to many of
the core fundamentals of programming OO in general.

I'd like a book that gives more of a conversion from one language set to
another. Pointing out idioms and syntactic differences.

A programmers Ruby guide/tutorial.

Does anyone know of anything that may help me in this?

All the best

Doug
8 Answers

Jason N.Perkins

3/22/2006 12:35:00 AM

0


On Mar 21, 2006, at 6:22 PM, Doug Bromley wrote:

> Hi all
>
> I've come across an online book concerning Ruby for Perl
> programmers but
> I've yet to find any for other languages.
>
> The Pick Axe book is a little to slow and simplistic telling far to
> many of
> the core fundamentals of programming OO in general.
>
> I'd like a book that gives more of a conversion from one language
> set to
> another. Pointing out idioms and syntactic differences.
>
> A programmers Ruby guide/tutorial.
>
> Does anyone know of anything that may help me in this?

You may want to give Hal Fulton's, "The Ruby Way," a try. More
advanced material and includes chapters on moving to Ruby from Perl
and Python.

HTH,

--
Jason Perkins
jperkins@sneer.org

"The key to performance is elegance, not
battalions of special cases."
- Jon Bentley and Doug McIlroy




Pistos Christou

3/22/2006 4:42:00 AM

0

Doug Bromley wrote:
> I'd like a book that gives more of a conversion from one language set to
> another. Pointing out idioms and syntactic differences.
>
> A programmers Ruby guide/tutorial.

Consider:

http://www.onestepback.org/articles/...
http://www.waits.net/~swaits/LearnRubyTalk/lear...

Pistos

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


benjohn

3/22/2006 9:39:00 PM

0


On 22 Mar 2006, at 00:35, Jason Perkins wrote:

>
> On Mar 21, 2006, at 6:22 PM, Doug Bromley wrote:
>
>> Hi all
>>
>> I've come across an online book concerning Ruby for Perl
>> programmers but
>> I've yet to find any for other languages.
>>
>> The Pick Axe book is a little to slow and simplistic telling far
>> to many of
>> the core fundamentals of programming OO in general.
>>
>> I'd like a book that gives more of a conversion from one language
>> set to
>> another. Pointing out idioms and syntactic differences.
>>
>> A programmers Ruby guide/tutorial.
>>
>> Does anyone know of anything that may help me in this?
>
> You may want to give Hal Fulton's, "The Ruby Way," a try. More
> advanced material and includes chapters on moving to Ruby from Perl
> and Python.

Curious; I found it was a lot less advanced, and gave far more rote
stuff I could find anywhere else (using abstract data types to
describe trees and stacks, etc). For the most part, I skimmed the
chapters and found almost nothing I didn't already know. Ironically,
from my very limited exposure to Ruby, it didn't at all hint at "the
ruby way"; it gave the feel of doing things very conventionally.

But then, the Pickaxe turned up at the same time as Ruby for me, and
together, they re-ignited my love of programming, so I probably have
an overly positive slant on it.

I wonder - perhaps the gaps in my generally c++ background was well
filled by the Pickaxe book, where as yours was well filled with The
Ruby Way?

Cheers,
Benjohn


benjohn

3/22/2006 9:39:00 PM

0


On 22 Mar 2006, at 00:22, Doug Bromley wrote:

> Hi all
>
> I've come across an online book concerning Ruby for Perl
> programmers but
> I've yet to find any for other languages.
>
> The Pick Axe book is a little to slow and simplistic telling far to
> many of
> the core fundamentals of programming OO in general.
>
> I'd like a book that gives more of a conversion from one language
> set to
> another. Pointing out idioms and syntactic differences.
>
> A programmers Ruby guide/tutorial.
>
> Does anyone know of anything that may help me in this?

:) Well, that was the Pickaxe for me, but you've already said you
differ on that. ... The reason I say that, is I came from a c++
background (I like to think I'm reasonably capable at it too). While
I never felt that c++ gave an especially good way of describing
anything much (and I think OO is pretty limited, on the whole), it
was still very helpful to read the Pickaxe and find out just how much
I'd been missing out on.

> All the best
>
> Doug



Gregory Seidman

3/22/2006 10:29:00 PM

0

On Thu, Mar 23, 2006 at 06:39:10AM +0900, Benjohn Barnes wrote:
[...]
} :) Well, that was the Pickaxe for me, but you've already said you
} differ on that. ... The reason I say that, is I came from a c++
} background (I like to think I'm reasonably capable at it too). While
} I never felt that c++ gave an especially good way of describing
} anything much (and I think OO is pretty limited, on the whole), it
} was still very helpful to read the Pickaxe and find out just how much
} I'd been missing out on.
[...]

I've said it before and I'll say it again. C++ has duck typing. (It's in
the templates.) It just happens at compile time instead of run time. This
has some significant advantages, not least of which is that the compiler
can do a lot of static analysis of your code, allowing it to catch errors
in code paths that runtime testing may not exercise.

C++ is good for a different class of problems than Ruby but if you don't
think C++ is especially good for any purpose, or you even think that C++ is
exclusively OO, then you didn't really know C++ that well and you didn't
use it to its full potential.

--Greg



benjohn

3/22/2006 11:28:00 PM

0


On 22 Mar 2006, at 22:29, Gregory Seidman wrote:

> I've said it before and I'll say it again. C++ has duck typing.
> (It's in
> the templates.)

It's not Ruby's duck typing that makes me like it (I I agree with
your templating point). It's Ruby's libraries, its clean and simple
syntax, it's pre-installedness on OS X, the standard profiler,
debugger, interactive shell, and documentation system that come out
of the box. It's packaging system. I especially like irb - the shell.

> It just happens at compile time instead of run time. This
> has some significant advantages, not least of which is that the
> compiler
> can do a lot of static analysis of your code, allowing it to catch
> errors
> in code paths that runtime testing may not exercise.
>
> C++ is good for a different class of problems than Ruby but if you
> don't
> think C++ is especially good for any purpose, or you even think
> that C++ is
> exclusively OO, then you didn't really know C++ that well and you
> didn't
> use it to its full potential.

:) I can only say I'm happy to have been spared that which I missed.



Austin Ziegler

3/23/2006 12:47:00 AM

0

On 3/22/06, Gregory Seidman <gsslist+ruby@anthropohedron.net> wrote:> On Thu, Mar 23, 2006 at 06:39:10AM +0900, Benjohn Barnes wrote:> [...]> } :) Well, that was the Pickaxe for me, but you've already said you> } differ on that. ... The reason I say that, is I came from a c++> } background (I like to think I'm reasonably capable at it too). While> } I never felt that c++ gave an especially good way of describing> } anything much (and I think OO is pretty limited, on the whole), it> } was still very helpful to read the Pickaxe and find out just how much> } I'd been missing out on.> [...]> I've said it before and I'll say it again. C++ has duck typing. (It's in> the templates.) It just happens at compile time instead of run time. This> has some significant advantages, not least of which is that the compiler> can do a lot of static analysis of your code, allowing it to catch errors> in code paths that runtime testing may not exercise.C++ has *very bad* and almost unusable "duck-typing". C++ is apiss-poor object language and a mediocre generics language. The bestthing going for C++ is that it's mostly C underneath.And I know C++ reasonably well and have been trying to exercise C++ towhat *should* work: struct ToString { ToString() { } template <class T> std::string operator()(const T::values& v) { return T::to_str(v); } };So far as I can tell, it doesn't work. Without something like that(where, ideally, T could *either* be a real class and we're talkingabout typedefs and static member functions inside the class or anamespace), C++ can't claim that it does "duck typing", even atcompile time.-austin--Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca

Logan Capaldo

3/23/2006 1:44:00 AM

0


On Mar 22, 2006, at 7:47 PM, Austin Ziegler wrote:

> And I know C++ reasonably well and have been trying to exercise C++ to
> what *should* work:
>
> struct ToString
> {
> ToString()
> {
> }
>
> template <class T>
> std::string operator()(const T::values& v)
> {
> return T::to_str(v);
> }
> };
>
> So far as I can tell, it doesn't work. Without something like that
> (where, ideally, T could *either* be a real class and we're talking
> about typedefs and static member functions inside the class or a
> namespace), C++ can't claim that it does "duck typing", even at
> compile time.
>
> -austin

What compiler are you using? I'm pretty sure I've gotten g++ to do
acrobatics like this in the past.