Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Ruby Developer's Guide

timothy posted more than 12 years ago | from the today-is-in-fact-tuesday dept.

Programming 94

Reader Cole Tucker writes with this review: "The Ruby Developer's Guide was written with the intent to provide an overview of Ruby tools used for developing real-world applications. The book touches on a variety of areas, from GUI development to neural networks, and discusses existing Ruby packages that developers can take advantage of. In the end, the book comes out as a Ruby version of the Perl Cookbook." To see what he means by that, read on below for the rest of Cole's assessment of this book.

The writers of the book are very enthusiastic about both Ruby and the Ruby Application Archive (RAA), Ruby's response to CPAN. Overall, the text does a very good job demonstrating the base knowledge necessary for each of the libraries introduced and so can be quite useful to any developer with an understanding of core Ruby programming.

Directed towards programmers with a working knowledge of Ruby, the text is a quick read even with working through the examples. It effortlessly introduces the basic concepts of each package worked through and then gives locations where more in-depth information can be gathered. If you wish to work through any of the topics covered without digging through documentation just to obtain a basic grasp of the package, then this book is for you.

The book itself is a Syngress publication, and comes with a "1 year upgrade buyer protection plan" which seems to mean they have an errata page for the book and an "Ask the Author" section on the books website, along with a couple of other features mostly involving email. Looking at the errata page, it seems to be useful and up to date. The "Ask the Author" section also seemed to be fairly well-used by prior customers. Syngress seems to be serious about keeping customers up to date about the state of the book and providing services beyond that.

As for the book's problems, none of which are horrible, but do get old after a while: First, the book is big, and not completely because of content. The examples in the book span pages, and the text used in the source is a larger font that in the rest of the text. The examples also are full applications within themselves, instead of being presented in chunks and then having the full source available online. Another annoyance is each time the book mentions installing a package or library it goes through the whole "$./configure.rb; make; make install" process. The book also appears to have some organization issues, with notes for the text in the table of contents, which just served to irritate me. The final negative thing I noticed was that, though the text assumes programming knowledge of Ruby, the first chapter is dedicated to walking the reader through downloading and installing Ruby. The chapter is a big one too. So the book has a couple of hitches, mostly related to layout or mixed expectations towards the ability of the reader.

If you can deal with these small issues and are interested in the material covered, I can definitely recommend the Ruby Developer's Guide. The content is definitely there and they authors know their stuff.

Chapter List:

  1. Booting Ruby Discusses downloading and installing Ruby, IDE and editor support for Ruby and syntax stylings.

  2. GUI Toolkits for Ruby Covers use of Tk, GTK+, FOX and SWin GUI toolkits with a brush through on others available.

  3. Accessing Databases with Ruby Introduces the Ruby/DBI, Ruby/ODBC, Ruby/LDAp and Ruby DBM-file drivers.

  4. XML and Ruby Talks about the use of XML, including a basic introduction to it and then goes into parsing and creating XML using libraries from the RAA.

  5. Web Services and Distributed Ruby Goes into the libraries used for RPC's, SOAP and running distributed services with Ruby.

  6. WWW and Networking with Ruby Implements a server using high-level and low-level Ruby networking classes, then goes into using Ruby for the web, finishing up with a discussion of mod_ruby and eruby.

  7. Miscellaneous Libraries and Tools This chapter finishes the discussion centered around the RAA, going into graphics programming, data structures, genetic algorithms and other topics that didn't fit into a chapter of their own.

  8. Profiling and Performance Tuning Introduces the aspect of analyzing algorithms in Ruby, profiling your programs and discusses the advantages of similar Ruby constructs depending on what your focus is, with the intent of getting lean, mean programs.

  9. Parse Generators Discusses using Ruby instead of Bison or Yacc for creating a parser, and then goes into the advantages of various Ruby libraries to each other.

  10. Extending and Embedding Ruby Covers writing extensions to Ruby in C and C++ and later embedding Ruby into programs.


You can purchase the Ruby Developer's Guide from bn.com. Want to see your own review here? Just read the book review guidelines, then use Slashdot's handy submission form.

cancel ×

94 comments

Sorry! There are no comments related to the filter you selected.

FP Stench (-1)

L0rdkariya (562469) | more than 12 years ago | (#3435550)

Is in the air.

Creamy, Wholesome HOT GRITS in Red Eye Gravy (-1, Troll)

Anonymous Coward | more than 12 years ago | (#3435873)

6 servings Grits
1/2 cup Brewed Coffee
Ham Drippings

1 stick Margarine

Directions

Prepare 6 servings of grits as package directs. Pour into 8 x 4 or 9 x 5 inch loaf pan. Cover, refrigerate several hours or overnight. Unmold, cut into 1/2 inch slices.

In small amount of margarine or drippings, fry grits over medium-high heat about 10 minutes per side, or until golden brown.

In iron skillet, cover ham with water and cover. Cook country ham slices until browned. Remove from Iron skillet. Add a little water to ham fat, creating a brown or "red eye" gravey. Some folks add a little coffee.

Cook over medium heat 2 to 3 minutes, stirring in ham drippings from bottom of skillet. Spoon over hot cooked grits and serve.

Does my fp apply (-1, Offtopic)

SeorMankypants (575692) | more than 12 years ago | (#3435551)

Will it stick?

Re:Does my fp apply (-1)

Yr0 (224662) | more than 12 years ago | (#3435698)

no, your comment has been forwarded to the 2nd post Dept, 2nd Class, and you have been awarded a 2nd class degree in 2nd posting.

2.

two

zwei.

tired jokes (1)

tps12 (105590) | more than 12 years ago | (#3435552)

from the today-is-in-fact-tuesday dept.

I bet this gets old within, oh, about 13 days of programming in Ruby.

Re:tired jokes (1)

tomstdenis (446163) | more than 12 years ago | (#3435701)

{insert perl joke}

s/13/"RIGHT NOW"/ge;

Tom

Re:tired jokes (-1)

Yr0 (224662) | more than 12 years ago | (#3435804)

yes, its troll tuesday, no less!
you-in-fact-lose!

C A K E (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435568)

Do you think she's swimming in your lies?
Do you think it's all just murky green?
Don't you think that she would realize?
Yeah, do you think she has never seen?

Cause when the seaweed sinks and the sun gets low,
When the waves retire to the darkness below,
I know, I know Ruby sees all.
I know, I know Ruby sees.

I can feel the pressure building high.
You should see you're headed for a storm.
Don't you see it building in the sky?
Don't you think it's time to swim to shore?

Cause when the seaweed sinks and the sun gets low,
When the waves retire to the darkness below,
I know, I know Ruby sees all.
I know, I know Ruby sees all.
I know, I know Ruby sees.

Re:C A K E (-1)

Yr0 (224662) | more than 12 years ago | (#3435669)

i like cake.
this is not cake.
but i like it all the same.
CAKE!

WTF? (0, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435569)

What the hell is ruby? Just another IDE?

Re:WTF? (-1)

Grape Smuggler (569838) | more than 12 years ago | (#3435582)

Atually, it is SCSI.

Off topic? (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435587)

How the FUCK was that off topic tard boy?

Gents, I do believe we have a dumbass in the ranks of slashdot. Also, to hell with this 20 second limit on entries, I type fast. Also, what the hell is up with this 2 minute hold until I can post again. Slashdot gets lamer by the month.

PS: This message will most likely be removed by some ass of a moderator.

Re:Off topic? (-1)

Adolf Hitroll (562418) | more than 12 years ago | (#3435621)

This truely desserves to be added to the Troll Library, next to Taco's Valentine Day Declaration, and GWB 911 speech :-)

Re:Off topic? (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435643)

Dude, that was some messed up shite! How can asking a question about the topic be off topic. Some mod needs his ops taken from him.

I see... (-1)

Adolf Hitroll (562418) | more than 12 years ago | (#3435861)

I guess you are Jon Katz and you don't want to be caught trolling before your weekly shite, aren't you ?

damn (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3436831)

Damn, my plans foiled by some pesky kid.

intresting language (5, Interesting)

Abnormal Coward (575651) | more than 12 years ago | (#3435586)

Lanugage homepage is http://www.ruby-lang.org/en/.

Theres a intresting presentation of it, comparing to some other languages here:

http://www.io.com/~jimm/downloads/rubytalk/talk. ht ml

Looks like the language uses lots of sort cuts, might give it a try sometime :).

Re:intresting language (5, Insightful)

keesh (202812) | more than 12 years ago | (#3435726)

Disclaimer: I do a lot of work with both Perl and Ruby, and I've just finished converting 50,000 lines of hacked Perl into 6000 lines of maintainable Ruby. I'm prejudiced.

It's not that the language uses shortcuts really. Sure, there's a $_ in there to keep the Perl people happy, but it's not often used. No, the reason Ruby is so fast to code is because the libraries are so good.

See, Perl has some nice little tricks like map and grep. In Ruby these are methods of the Array class. However, they're implemented in a module. Want to grep a hash? No problem. Want to map (collect) on your own custom build data structure? Just import the module into your class and there you go. One short line of code. That's modularity for you.

Sure, there are a few problems. The I/O stuff isn't half as modular as it should be, but that will change soon.

Basically, though, there aren't any of those kludges associated with other languages. Everything is nice, clean, pure, unlike Perl's 'most of the time it does this, except when it does this' attitude. It's that that is the real time saver.

Ruby shines with unit tests (5, Interesting)

pong (18266) | more than 12 years ago | (#3436139)

I haven't been a fan of dynamically typed languages like ruby until about 5 months ago, but the combination of

* a terse syntax
* True object orientation
* dynamic typing
* and *unit tests*

is a winning combination. The first three allows you to write well-factored, compact and flexible code. With a comprehensive test suite you have much more confidence in your code than you get from static typing, so it effectively voids that issue.

Another thing I really like about Ruby is that you can reopen classes. This means that you can add features to existing classes, if that is where they really belong. When you do that every object of that type automagically gets the new features. Along with the fact that a lot of built-in features in ruby are methods, and the fact that you can rename and redefine existing methods means that ruby itself can be extended in very interesting ways! E.g, lets say you want to load ruby modules from zip files! Simple, just redefine Kernel.require to access zip files as well as directories.

Most of all, though, I just like the ease of expression you get with ruby.

sadly enough (1)

Karma Star (549944) | more than 12 years ago | (#3436205)

i feel that this will mark the decline of perl. please don't take what i say as flamebait - perl will always be the language of choice for system administration - but ruby will eat up the application market's need for a fast, scriptable language. it's portable, it's syntax is wonderful, and it makes RAD a cinch (in contrast to perl, java, c, and c++ combined).

i'm enthusiastic about ruby's future (can't you tell).

Re:sadly enough (1)

Colonel Panic (15235) | more than 12 years ago | (#3436573)

I tend to agree that "this will mark the decline of perl", but I'm not sad about it. It's progress. Perl just doesn't cut it when it comes to OO design - sure you can do OO in Perl, but it's so UGLY. (And I used to like Perl a lot).

Re:Ruby shines with unit tests (2, Interesting)

innerraver (576361) | more than 12 years ago | (#3437130)

I have used ruby. What exactly do you mean by "Ruby shines with unit tests"? In the project I was working on I rolled my own tests. Was I missing something convenient or easy?

Re:Ruby shines with unit tests (2)

pong (18266) | more than 12 years ago | (#3437276)

I mean:

Ruby is dynamically typed, so if you have no means of automatically exercise most lines of code in your program, you cannot be reasonably sure you wont get runtime errors, because e.g

* you pass the wrong number of arguments to functions
* objects do not respond to the messages that are send to them
* etc etc

Re:intresting language (1)

Abnormal Coward (575651) | more than 12 years ago | (#3436579)

It seems to have good bindings to most tookits, I wonder how pratical it would be, lets for writing small to medium sized gnome applications, instead of using C# ...

It does look like the code is very neat, and easy to prduce maintainable code. This is a big plus for software engineer (like me).

I've also stayed clear of perl because of this, most of the perl code I've seen looks horrible :p.

I have nothing againest perl, I've seen some pretty neat stuff done with regular expressions.

Anyway my 1 cents worth :-).

Ruby is dying (-1, Troll)

Anonymous Coward | more than 12 years ago | (#3435772)

THis dying langueage is even more worthless then
fortran77.

imagine (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435594)

imagine a beowulf cluster of these

the_fire_horse says... (-1)

The_Fire_Horse (552422) | more than 12 years ago | (#3435595)

nothing at all....

oh... umm... 7th post ?

Re:the_fire_horse says... (-1)

YourMissionForToday (556292) | more than 12 years ago | (#3436971)

there's a ruby chinese restaraunt by my house. I don't eat there-that shit is undoubtedly in violation of Health Code.

don't sue me for libel!

Ruby (2, Informative)

Nameless (8793) | more than 12 years ago | (#3435599)

is a programming language. It is beginning to catch on in the EN world, but has been going strong in JP for some time now.

Ruby is Swell but... (0, Flamebait)

stever1975 (263126) | more than 12 years ago | (#3435657)

how many here are using ruby?
There is Like no Documentation on it and most bindings are buggy... Maybe if Ruby got out there before Python It would be more widely Accepted.

Re:Ruby is Swell but... (2, Informative)

Aragorn DeLunar (311860) | more than 12 years ago | (#3435708)

I use Ruby and love it.

No documentation? The entire Programming Ruby: The Pragmatic Programmer's Guide book is online for free at http://www.rubycentral.com/book/index.html [rubycentral.com] . The book (in HTML Help format) also comes with the Windows install package at http://www.rubycentral.com/downloads/ruby-install. html [rubycentral.com] .

Re:Ruby is Swell but... (2)

keesh (202812) | more than 12 years ago | (#3435736)

Documentation: the book [rubycentral.com] (Ruby's answer to the Camel) is available online. That's all the documentation you need. It's all there.

No Documentation? (3, Informative)

Jonathan (5011) | more than 12 years ago | (#3435751)

No Documentation? You can download the entire text of Programming Ruby [pragmaticprogrammer.com] for crying out loud -- what more do you want? You just don't get this amount of free documentation in the Perl or Python worlds. Additionally, the Developer's guide is at least the fourth dead-tree Ruby book published, so it is clear that *somebody* is buying them. As for buggy bindings, I haven't noticed that Ruby bindings are any more buggy than those of other languages.

Re:No Documentation? (1)

RevDiaBLo (4291) | more than 12 years ago | (#3437256)

You just don't get this amount of free documentation in the Perl or Python worlds.

Before making such bold claims, you should probably check out man perl, and the plethora of man pages which are listed therein.

Re:No Documentation? (2)

Jonathan (5011) | more than 12 years ago | (#3437957)

Before making such bold claims, you should probably check out man perl, and the plethora of man pages which are listed therein.

Believe me, I am quite aware of the Perl man pages -- I even learned Perl from them in 1992 and I still use Perl (and its man pages and perldoc) today. But to really know Perl you have to read the Camel book. And Wall and Schwartz haven't made that free yet. The Ruby version is free, however.

Re:Ruby is Swell but... (2, Informative)

Anonymous Coward | more than 12 years ago | (#3435766)

No documentation? Like Programming Ruby [rubycentral.com] and the Library Reference [rubycentral.com] ? People are even working on a javadoc-like documentation system called RDOC [sourceforge.net] . There are lots of documentation and books out there: you just have to read them!

Re:Ruby is Swell but... (0)

Anonymous Coward | more than 12 years ago | (#3435784)

I use Ruby almost everyday... unfortunately, I'm not getting paid for it. Perl just wasn't what I needed for my current project (a langauge (as in English) parser), so I used Ruby instead. It provides a nice, clean interface, while still allowing a Perl-ish style instead of something like Java (ick!).

Re:Ruby is Swell but... (2)

swagr (244747) | more than 12 years ago | (#3435792)

Although I am a Java developer, I use alot of Ruby.

See "The Pragmatic Programmer", page 103, tip# 29: "Write Code That Writes Code"

(Ruby code that writes Java code).

alot -- a lot (1)

swagr (244747) | more than 12 years ago | (#3435819)

Someone will surely correct my grammar if I don't.

Re:Ruby is Swell but... (1)

beme (85862) | more than 12 years ago | (#3436777)

Ever given Jython [jython.org] a try?

Re:Ruby is Swell but... (2)

swagr (244747) | more than 12 years ago | (#3437418)

Looked into it briefly on a couple of occasions.

I'm not so much interested in having Ruby and Java work together in any sense.
I'm just using Ruby as one of my tools to write Java.

Re:Ruby is Swell but... (3, Insightful)

jbgreer (4245) | more than 12 years ago | (#3435837)

I'm using Ruby. [ I like Slashdot, but I'm not sure your message is going to be a useful poll. ]


WRT to your 'maybe if it had gotten out there before python' comment: explain, then, why it is MORE popular than Python in Japan, in spite of having come out later. I think the acceptance issues have been driven more by the fact that much of the work has been done in Japan (and, hence, much of the documentation is in Japanese).


/me swivels in chair and looks at shelf behind
As for 'Like no documention': Like, dude, I've got Like 4 books on the shell behind me about, Like, Ruby.


As for wrong bindings. You have actually written the authors about these, right? So far I've found Ruby module authors to be just as pleasant and helpful has their Perl and Python counterparts, in spite of my complete lack of Japanese language skills and their oft admitted poor English skills.


I would argue that Ruby is benefitting from maturing after Python, like all languages should. Matz is learning what to include and what to avoid in his language design.


Finally... you can't seriously expect us to take the "this software has bugs, so we can't use it" argument, do you? All software has bugs. All languages have warts in their design and bugs in their implementation.

Re:Ruby is Swell but... (0)

Anonymous Coward | more than 12 years ago | (#3436032)

I see the claim "Ruby is more popular than Python in Japan" a lot, but never any actual evidence. Proof by assertion?

Re:Ruby is Swell but... (0)

Anonymous Coward | more than 12 years ago | (#3436135)

Even if it is more popular in Japan, who the heck cares? Python is more widely used, supported, etc. everywhere else.

I choose Python over Ruby because Ruby is actually *proud* of its Perl heritage. Gimme a break!

Re:Ruby is Swell but... (1)

PythonOrRuby (546749) | more than 12 years ago | (#3436247)

Ruby should be proud of its Perl heritage. Having worked in Perl, Python, and Ruby, and enjoyed both of the latter, I can tell you that Ruby is much more frequently useful to me. If for no other reason than that Ruby allows for literal type regular expressions, it blows away Python in terms of productivity.

Then there's the fact that in Ruby everything really is an object. I don't have to ask myself, "ok, can I do this with an instance method, or do I pass the object to a function?" Even when Python gets this right, methods far too infrequently return self, requiring extraneous assignments, and decreasing efficiency, both in terms of computer efficiency, and programmer efficiency.

Re:Ruby is Swell but... (0)

Anonymous Coward | more than 12 years ago | (#3436537)

It's pretty easy to see that (1) you've never actually used Ruby in a professional setting and (2) you know next to nothing about real-world Python programming.

My favorite part is when you said "it blows away Python in terms of productivity". Good one!

I've been using Python professionally for several years now. I tried the Ruby stuff and thought it was cute, and good for Perlers who cringe at Perl6, but that's about it. I heartily recommend you take about 6 months to use Ruby in the workplace, and another 6 months to do the same with Python. Keep good track of time spent designing, coding, and debugging, and the time it takes someone new to come up to speed on your code. Also keep track of how much time you lose due to real problems, and not time spent worrying about theoretical problems. Once you've done that, *then* you can come back and make silly assertions.

Ruby has some nice features, but it'll never be more than a tiny niche language, regardless of whatever is going on in Japan.

Re:Ruby is Swell but... (1)

bluetea (175189) | more than 12 years ago | (#3439690)

Once you've done that, *then* you can come back and make silly assertions.

Ruby has some nice features, but it'll never be more than a tiny niche language, regardless of whatever is going on in Japan.


Why don't you take your own advice?

There are way too may people making silly assertions on both side of the fence. Different people are interested in different problem domains. People work and think in different ways, so what is a productive environment for one person may not be for another. Your lack of productivity with Ruby means no more than the previous poster's lack of productivity with Python. As far as niches go, I've got news for you - both of them are niche languages. At least they're niches compared to some other general purpose languages like Java or C++. Be happy that you have a chance to use Python in your work; most people don't get that opportunity. I guess I'm just argumentative tonight, but people in the Ruby community have (for the most part) already bored of constantly carrying on this same tiresome argument about Python and Perl. It's just not interesting anymore.

Re:Ruby is Swell but... (1)

PythonOrRuby (546749) | more than 12 years ago | (#3439938)

Thank you. I wish I'd worded my original post so well.

It is a matter of which is more useful for a given task. For myself, Ruby has all of the text manipulation-y goodness of Perl, but with a pure OO design that lends itself to predictability(and those things that surprise me always manage to be good things).

I am productive in Python, but I've found Ruby clearly superior in situations, such as web programming, which require loads of text manipulation. The ability to modify existing classes without having to subclass them is also extremely useful.

Re:Ruby is Swell but... (3, Interesting)

King Babar (19862) | more than 12 years ago | (#3436591)

Even if it is more popular in Japan, who the heck cares? Python is more widely used, supported, etc. everywhere else.

The problem of support is, of course, a real one in many applications. The fallacy of the "who cares?" argument here is that the same argument could probably have been used against every programming language since the first assembler was written. Not every new language "makes it" by a long shot, but not every well-supported language lives forever, either. Python was barely on people's radar for the very longest time; it has succeeded because enough people were convinced it had advantages that outweighed a temporary (or possibly even permanent) disadvantage in publicity, support, or whatever reason-to-fail you might give.

I choose Python over Ruby because Ruby is actually *proud* of its Perl heritage. Gimme a break!

Well, you can be proud of your heritage without repeating the sins of your parents. :-) As far as I can tell (I've programmed in Perl since 1991 and in Ruby for a few months), Ruby retains much of Perl's flexibility while hugely reducing the amount of (non-regexp) "line noise" feel that even I think Perl sometimes has, and dramatically reducing the number of oddball special cases. I know you could say the same thing about Python, but I never really "got into" Python, for whatever reason. Like it or not, I think we all realize that tastes vary somewhat in these things.

Re:Ruby is Swell but... (1)

stever1975 (263126) | more than 12 years ago | (#3437064)

Geez
so there is documentation. I should have said very little Documentation and the majority of it kinda poor, and in comparison to other main stream languages it has virtually no documentation.
more popular in japan? my response is have the python Docs been translated to japanese?
probable not, and there's your answer.
:)

Re:Ruby is Swell but... (1)

JudasBlue (409332) | more than 12 years ago | (#3438250)

"..., then, why it is MORE popular than Python in Japan,..."

Dude, seriously, our band is HUGE in Sweden!

Re:Ruby is Swell but... (0)

Anonymous Coward | more than 12 years ago | (#3436101)

I use Ruby and love it. No documentation? The entire Programming Ruby: The Pragmatic Programmer's Guide book is online for free at http://www.nigger.com/book/index.html. The book (in HTML Help format) also comes with the Windows install package at http://www.diejewsdie.com/downloads/ruby-install.h tml.

I prefer Ruby to Python, but... (3, Informative)

HiThere (15173) | more than 12 years ago | (#3436131)

Python currently has better database connections, and it's currently easier to distribute Python for computers that don't already have Python installed than it is to distribute Ruby to computers that don't have Ruby installed.

Also, there is a bit of a disagreement about the GUI interface to use with Ruby. Fox is preferred on Windows machines, but it often causes library conflicts if you attempt to install it on Linux machines.

These are "growing pains", but for the moment Python is significantly more useable for many purposes. (OTOH, if I'm only using it on my own machine, or I only intend to distribute it to other programmers, and if GUI doesn't need to port to a system that can't handle gtk properly (e.g., Win95), then I prefer Ruby.)

OTOH, I'm still not totally convinced that importable modules can actually replace multiple inheritence. So far I haven't run into any show stoppers, but I keep having the nagging feeling that one is lurking somewhere in the future ... and that by the time I hit it I may have several thousand lines of code to re-write. I don't know of any proof, and anyway proofs tend to deal with possibility rather than practicality. (E.g., one could use the method of Goedels proof to create an essentially unbreakable cypher. The problem is that it would take an truly unreasonable amount of time to both create the message and to decode it. So it's totally useless.)

Re:I prefer Ruby to Python, but... (0)

Anonymous Coward | more than 12 years ago | (#3436298)

abort the project! we do not have multiple inheritance!

ridiculous.

Re:I prefer Ruby to Python, but... (2)

King Babar (19862) | more than 12 years ago | (#3436908)

OTOH, I'm still not totally convinced that importable modules can actually replace multiple inheritence. So far I haven't run into any show stoppers, but I keep having the nagging feeling that one is lurking somewhere in the future ... and that by the time I hit it I may have several thousand lines of code to re-write.

Given the number of object-oriented languages (including Java) that have been doing Just Fine without MI, I suspect your nagging feeling is probably just needless worry. I have no doubt that your code could have a different conceptual feel without multiple inheritance, but, hey, single (implementation) inheritance itself is probably over-used. Stepanov, god of the STL would argue (I think) that what people really want in most cases is generic programming on well-structured data. Interestingly, Ruby can be used in this way, too, despite the pretensions to being "pure OO".

Re:I prefer Ruby to Python, but... (1)

JLyle (267134) | more than 12 years ago | (#3437996)

Also, there is a bit of a disagreement about the GUI interface to use with Ruby. FOX is preferred on Windows machines, but it often causes library conflicts if you attempt to install it on Linux machines.


For the record, I've never heard of FOX causing "library conflicts" if you attempt to install it on Linux machines (can you substantiate this claim at all?). In fact, Linux is the primary development platform for FOX (although it's equally well-supported on Windows).

If we're still comparing Ruby with Python, what's your point anyway? The last time I checked there was plenty of disagreement about which GUI interface to use with Python as well.

Re:I prefer Ruby to Python, but... (2)

HiThere (15173) | more than 12 years ago | (#3438988)

Substantiate? Well, I've got two machines that *it* won't finish building on. (However, it means the Fox-FxRuby-Ruby combination ... not just Fox.) I'm hoping that the next release will have Fox rpms that solve this (the conflict is with some OpenGL stuff that I don't even know that I use, but FxRuby won't finish building...And I can't fix it because when I try the system says I'm about to break [something really important..don't remember exactly what, but it uses ?Motif??]. I could push harder, but I don't want to break an already severly flexed system.)

Now one of these machines is a beta Mandrake 8.2 and the other's a beta Red Hat 7.3, so it's not conclusive. But the Mandrake that I've ordered hasn't told me that it's shipped yet, so... that's the best I can do.

As to Python GUI, Tkinter seems solid on all platforms I've tested. It might not do everything that I'd want, but it works. The Ruby version .. last time I looked it was called beta, and nobody seems to be pushing behind it (I could easily be wrong. When I looked the only info was in Japanese, which didn't do me any good.) So it seems that Python has a basic GUI and Ruby has a better one coming along (though FxPython also exists).

I don't know whether or not I would have been able to compile Fox on Windows. Probably not (I'd depend on CygWin). But the Professional Programmers site has a nice install that puts a working copy of Fox in the Ruby folder of even a Win95 machine (nice, as that's what I use). But (as I said) I can't use it on the Linux side of things. Yes, it isn't really Fox, it's a coordination between Fox, FxRuby, and OpenGL, but the effect is that the build won't complete.
(It's better than it was... for awhile I had three mutually incompatible versions of things running. Now I've got Fox compiled, and the Fox Calculator working, etc. But the Ruby connection is still non-functioning.)

SpecRuby seems to almost work (on Win95), but every time I exit it, it crashes (so did a prior version of Fox, though less regularly). I think that these must be designed for Win98, and Win95 is doing something differently. I suppose I might decide to build all of my windows on the Linux side, and port them to the Windows side, but I find mechanically generated code hard to tinker with. (Perhaps I should just try harder, but ... I really don't want to invest a bunch of time on tk, and with Python I'm much of the way up the learning curve.)

Glade is the obvious answer, but unfortunately the use of gtk with Win95 is ... flakey. I understand that it works well with Win98, but that's no help. (I don't intend to buy another OS from MS.)

Re:Ruby is Swell but... (0)

Anonymous Coward | more than 12 years ago | (#3436163)

"How many here are using Ruby?"
I raise my hand.

"There is Like no Documentation on it and most bindings are buggy."

So apparently 5 books = No documentation. (?)

As far as "most bindings are buggy" goes - I have no idea what you're talking about.

Very much 'Not Insightful' - List of Docs follows (4, Informative)

maddog2o_2o (577019) | more than 12 years ago | (#3436178)

Actually, the entire content of the post is one question and two outright falsehoods.

Check out the ruby-lang pages list of docs [ruby-lang.org] there's a lot of good stuff there.

I own Programming Ruby - The Pragmatic Programmer's Guide [rubycentral.com] (available in full online) known as 'The Pickaxe Book' (ie the Ruby Camel) and Ruby in a Nutshell [oreilly.com] from OReilly by the language designer Yukihiro Matsumoto (known as matz on the mailing list). Hail matz! :)
Then there's a personal favorite dead tree of mine The Ruby Way [prenhall.com] by Hal Fulton. I haven't finished it yet but it's full of crunchy goodness.

Between, those books and the wealth of tutorials and docs linked from www.ruby-lang.org/en there's a lot more material available than there was for Python when I started using it.

And the fact that these books keep selling and getting published implies to me that people are using Ruby.

When in doubt check the Ruby Book list at www.rubygarden.org [rubygarden.org] to see whats out now and whats in the pipe.

As far as the bindings being buggy - I've only played with a few but they seem as good as I recall pythons bindings from when I used python. (admittedly that was a while ago)

C'mon give Ruby a try - I've found it a delight to play with. You might like it - and if not -well, learning why you dislike it is a valuable type of learning as well :)

I suggest the Pickaxe book [rubycentral.com] (you'll eventually want to buy a hardcopy) and if you don't want to download the interpreter right now - well hold onto your hats. A clever fellow named Clemens Wyss has an 'interactive' version of the Pickaxe with all the code examples live in your browser so you can play with the code a lil. Find it here [www.ruby.ch]

In closing:
RubyCentral [rubycentral.com]
RubyGarden [rubygarden.org]
Ruby-Lang [ruby-lang.org]
Ruby-Talk Mailinglist [ruby-talk.org]

or check out the newsgroup at comp.lang.ruby

Kevin
--
'Just another Ruby Miner'

Re:Ruby is Swell but... (1)

Colonel Panic (15235) | more than 12 years ago | (#3436418)

"how many here are using ruby?"
I am! After doing OO Perl for a while I find Ruby to be oh so much cleaner.

"There is Like no Documentation on it"
Hmmm.... let's see there are five English language books on Ruby now:
"Programming Ruby: The Pragmatic Programmer's Guide"
"Ruby In a Nutshell" (by Matz himself)
"The Ruby Way"
"The Ruby Developer's Guide"
"Teach Yourself Ruby in 21 days" (actually very good book)

And in fact the full text of "Programming Ruby" can be read online at http://rubycentral.com

I'm not sure how you can say there's no documentation.

"and most bindings are buggy"
I'm not sure what you mean by 'bindings' here.

Re:Ruby is Swell but... (0)

Anonymous Coward | more than 12 years ago | (#3444401)

I have converted over from Perl, Ruby makes my job much more fun, all in all its just a very well thought out language with enough library support now to allow me to never code in Perl again.

Its still uncommon in the workplace but I dont expect that to last.

So that's how it's done (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435659)

Man, the book reviews of late really suck. Write a paragraph, then write up the chapter list, throw in a link to Amazon, and boom. You're published.

RIAA? but we hate them! (2, Funny)

Corby911 (250281) | more than 12 years ago | (#3435670)

(arms flamethrower)

Ohhhh... he said "RAA"... never mind.

BUG-SPLAT! (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435684)

Rooby dum langueege. Why need I, when have commun lisp. Git bigg phat joosee bug lots of yellow green bug guts. Bug SPLAT on rooby, antennules legs and eyes plus yellow bug guts dripping and splattering.
All bug supereeor to hooman.

BUG-SPLAT!

LUNIX SUCKS!!! LOLOLOLOLOLOLOLOLOLOLOLOLOL!!! (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435711)

LUNIX SUCKS!!!

Re:LUNIX SUCKS!!! LOLOLOLOLOLOLOLOLOLOLOLOLOL!!! (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3435727)

Hell yeah man, get the real deal, LINUX! Lunix is for loons and Windows users who are too etarded to know the diff.

Ruby code examples (3, Informative)

EyesWideOpen (198253) | more than 12 years ago | (#3435765)

You can find some code examples of the Ruby language (as well as several other languages) here [codeexamples.org] .

Ruby? (2, Funny)

Anonymous Coward | more than 12 years ago | (#3435770)

"Ruby is a refuge for Perl-morons who finally realize that the hideous hairball a dead-end, but whose ego refuses them to submit to Python."

Re:Ruby? (1)

beme (85862) | more than 12 years ago | (#3436514)

"Why did the language designers bother doing this? So far I keep coming to the conclusion that Ruby is just a bad ripoff of Python"...

http://www.mindview.net/Etc/FAQ.html#Ruby

Re:Ruby? (2)

King Babar (19862) | more than 12 years ago | (#3436767)

"Why did the language designers bother doing this? So far I keep coming to the conclusion that Ruby is just a bad ripoff of Python"...

http://www.mindview.net/Etc/FAQ.html#Ruby

Yes, people in what you could call the Ruby Community did in fact wonder what Bruce Eckel was thinking when he wrote that. This quote is particularly weird given that he goes on to point out that the syntax is more Perlish. I think what is really going on here is that Ruby did fairly self-consciously tried to implement some features of particular languages that the author thought would be especially useful. But a lot of the similarities with various scripting languages are almost certainly less "rip-off" than the inevitable consequence of working in a constrained design space. It is actually quite reminiscent of a situation you see in plagiarism lawsuits against screenwriters who are accused of "clearly copying" some part of their work from that of some amateur they may or may not have barely seen once upon a time. But it turns out that the courts recognize that once you have the nucleus of a specific idea, a lot of plot and character similarities basically come along for the ride.

The real reason Ruby got written was that the author thought it was a better language for his uses than the alternatives available to him. Obviously, you won't get universal agreement on something like this, but to assume that something like Ruby would be an ignorant rip-off of your favorite language strikes me as a bit weird.

Re:Ruby? (1)

beme (85862) | more than 12 years ago | (#3436903)

Imitation is the sincerest form of flattery, right?
I don't think ripoff is the right word, either. I posted the link to the Eckel's comment because I hoped to see some reaction from Ruby fans. I admire Eckel, but everyone is wrong sometimes, and Ruby folks should be the first to have valid arguments with Eckel's points.
And even if it's valid to describe Ruby as a ripoff, that doesn't make it a bad thing, in my mind. More the merrier. I have to admit I haven't looked into Ruby too deeply, primarily because my initial glance led me to believe it was harder to type ('self.' is a lot easier for me to type than '@' believe it or don't--my hands start to hurt if I have to type too many shifted chars away from the home row). Silly way to judge a language, but there you have it. :)
It's just a different way to do things, I guess. To each his own (and thank goodness there are choices!).

Re:Ruby? (2)

King Babar (19862) | more than 12 years ago | (#3436991)

Imitation is the sincerest form of flattery, right? I don't think ripoff is the right word, either. I posted the link to the Eckel's comment because I hoped to see some reaction from Ruby fans. I admire Eckel, but everyone is wrong sometimes, and Ruby folks should be the first to have valid arguments with Eckel's points.

Indeed. I think a lot of Ruby users don't find themselves very interested in this issue any more. For a wide sampling of opinion on this and related issues, back in the day, you might be interested in this 138-post thread [google.com]

Or maybe not. :-) More seriously, the best response in this thread is, I think, the second one, by the author of the book involved.

Re:Ruby? (0)

Anonymous Coward | more than 12 years ago | (#3439933)

start using the dvorak keyboard.

Re:Ruby? (0)

Anonymous Coward | more than 12 years ago | (#3440534)

already use dvorak.. switched a few years ago.. that's probably why i don't like the shifted chars as much.. so easy to type most words without moving the fingers.. i don't get enough exercise...

Don't miss ... (1, Redundant)

anpe (217106) | more than 12 years ago | (#3435833)

... the excellent Programming Ruby [rubycentral.com] .
Ruby is a great language with a lovely syntax, try it !

Programming Ruby Online Edition (5, Informative)

Skip (516) | more than 12 years ago | (#3435847)

Programming Ruby by David Thomas and Andre Hunt [pragmaticprogrammer.com] is available online and for free at www.rubycentral.com/book/ [rubycentral.com]

Other books (5, Informative)

Fellgus (16870) | more than 12 years ago | (#3435920)

Check out these other books about Ruby:

And some in german:

Re:Other books (3, Informative)

King Babar (19862) | more than 12 years ago | (#3436158)

Among a list of books on Ruby, we see:
The Ruby Programming Language, Matsumoto Yukihiro, ISBN:020171096X

I would love to see this book get published, but the last I heard, as suggested by this message from the author himself, [google.com] the book has been cancelled. Does anybody know if they changed their minds on this or found a new publisher (Addison Wesley did the original contract)?

Re:Other books (0)

Anonymous Coward | more than 12 years ago | (#3438774)

Mentioning who the publisher of the respective books would have been much more productive then links to B&N. Hint, AW takes preference over ORA for damn near anything but Perl.

I reccomend going to www.bestbookbuys.com and finding them there. They have a meta-search that has price comparasons, including shipping.

My little (unreleased) intro to Ruby (4, Interesting)

Fweeky (41046) | more than 12 years ago | (#3436027)

http://freak.aagh.net/ruby/intro/ [aagh.net]

It's only a first draft, but it should give a reasonable overview to the curious.

Here's what it's going for (0)

Anonymous Coward | more than 12 years ago | (#3436610)

http://www.bestwebbuys.com/books/compare/isbn/1928 994644

Any thorough, unbiased comparison Ruby v. Python? (2, Interesting)

Anonymous Coward | more than 12 years ago | (#3436625)

I personally found Perl so arcane that the half-life of code was short (after a time it degenerates into an unreadable state even when commented well as one moves on to other projects). But it has one advantage over Python: momentum. CPAN is several orders of magnitude a grater body of useful libraries and modules than anything Python has. The Vaults of Parnassus dim in comparison. Does Ruby have more promise than Python. To the casual observer, it seems even more sketchy that Python. And, honestly, Jython is a great to use: the power of Swing and jarred Java code with the ease of a scripting language. Maybe Jython is why the Vaults are lying fallow: Java code can be jarred and used in Jython. Comments anyone?

Re:Any thorough, unbiased comparison Ruby v. Pytho (1)

jimm (5532) | more than 12 years ago | (#3442030)

For embedding Ruby in Java, see JRuby (http://jruby.sourceforge.net).

I'm not going to respond to the "Python is better than Ruby" troll. Oops, I just did.

Sample Chapter (5, Informative)

ryanr (30917) | more than 12 years ago | (#3436714)

And don't forget that Syngress typically offers a sample chapter for each book:

http://www.syngress.com/book_catalog/183_Ruby/samp le.htm [syngress.com]

If you want to see what the book is like.

(Note: I write books for Syngress, though I have no financial interest in this one. Consider this a plug if you like.)

Nice large fonts, lots of complete examples (2)

Ilan Volow (539597) | more than 12 years ago | (#3437941)

I wish more programming books had these kinds of problems.

ruby's great and all, but... (3, Interesting)

scrytch (9198) | more than 12 years ago | (#3437946)

I don't know that it offers a value proposition enough to knock off perl's "good enough" (CPAN still has tons and tons more libs, dbish with DBD::ODBC is just the neatest thing in the world for a db developer), and the syntax certainly won't really sway the python crowd. I mean it's a good language, but I can't get mod_ruby binaries, last I looked couldn't get mod_ruby at all for win32 (yes, I use apache on win32, it's all about what I can fit on my laptop, and vmware causes too much thrashing on this pitiful thing).

Lack of a CPAN type tool is *still* the reason I haven't mainly switched to python BTW. Download sites like VoP aren't even in the same category.

Ruby is a wonderful language (1, Interesting)

Guib607 (308188) | more than 12 years ago | (#3438168)

I just gave a presentation in my Programming Languages class about Ruby. Coming from a backgroung in mostly emperitive languages, I've found that Ruby is very easy to understand and work with. Also I like Matz's "Principle of Least Surprise," which in my opinion makes it a lot eaiser to work in. The only severe problem that I ran into in my breif tour of the language was without strong typedefs or compling it down to machine code, it's going to have a harder time competeing with languages like Python.

"If you pick up a starving dog and make him prosperous, he will not bite
you. This is the principal difference between a dog and a man." --Mark Twain

Re:Ruby is a wonderful language (1)

JLyle (267134) | more than 12 years ago | (#3439011)

The only severe problem that I ran into in my breif (sic) tour of the language was without strong typedefs or compling (sic) it down to machine code, it's going to have a harder time competeing (sic) with languages like Python.


What kind of "strong typedefs" does Python have that Ruby doesn't?

Oh Ruby (0)

Anonymous Coward | more than 12 years ago | (#3438704)

You've painted up your lips and rolled and curled your tinted hair...

subject (0)

Anonymous Coward | more than 12 years ago | (#3445158)

"google bombing" is funny

Mendelson [mathjmendl.org]
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>