Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Interesting Ruby Tidbits That Don’t Need Separate Posts #21

By Peter Cooper / April 9, 2008

RubyAMP: Amazing Ruby Bundle for TextMate

RubyAMP is a TextMate bundle that goes above and beyond the typical TextMate bundle in usefulness. It adds auto-complete from all open tabs, easy jumping to methods and classes, improved RSpect debugging support, breakpoint support (set and remove from TextMate), Merb / Rails server or console launching, development log tailing, and a lot more. There's a screencast on the project page itself so you can get a direct look at how it all works within a minute or two.

Bicycle Location Visualization with Ruby and RMagick

bikes-in-paris.jpg

Paris has a shared bicycle scheme for those who want to get around downtown called Velib. Ardent Velib fan Thibaut Barrère decided he wanted a better way to see the availability of bikes, and put together a Ruby app that could scrape the raw data and put together a visualization for him. This is a well written article covering how he did it from start to finish.

Engine Yard Invites Ruby Developers To "Hackfests"

When a press release is so concise and well written (a VERY rare event), it seems a shame not to quote it verbatim:

Engine Yard, provider of the leading Ruby and Rails deployment platform, today announced a series of Hackfests, informal community events open to Ruby developers, where sharing, learning, and hacking rule. The inaugural Hackfest was a resounding success with participation from over 100 top Ruby and Rails developers. Two more Engine Yard Hackfests are planned for the coming months.

The first event was held this past weekend alongside MountainWest RubyConf 2008 in Salt Lake City, Ut., where Engine Yard’s Ezra Zygmuntowicz and Evan Phoenix shared the opening keynote. After the conference, folks generally look to talk tech, shoot the breeze, and hack. They split off into small groups, grab dinner, and eventually end up in various hotel rooms, awake into the wee hours.

The Engine Yard Hackfest aimed to draw these small groups together, and facilitate a mid-sized, casual, expert meeting of the minds. As an alterative to having Rubyists chat in the brief windows between conference sessions, the Hackfest offered an open-all-night comfortable workspace, with free wi-fi, dinner and snacks, and expert community leaders for company.

Rubyists are invited to participate in Engine Yard’s upcoming Hackfests, which will be held alongside GoRuCo in New York (April 26) and RubyFringe in Toronto (July 18-20).

I hear that the similar "Ruby Cave" events at the recent Ruby Fools conferences went down well, so this is a great development for those going to GoRuCo and RubyFringe.

ServiceReg - A RESTful API for RESTful APIs

ServiceReg is a new service by Chris Matthieu (of Wuby fame) that acts as an API to other RESTful APIs. Confused? Perhaps this example URL will give you an idea:

http://servicereg.com/verb/{user:password@}domain/noun{/id?params}

Still don't get it? Thankfully Chris has put together a screencast to bring us all up to speed. ServiceReg appears to be useful for accessing third party RESTful APIs entirely through a well crafted URL to ServiceReg (without the need to send XML payloads, etc.)

Ruby's Not Ready! (Or: Why Python Rules and Ruby Sucks)

A Python developer takes Ruby, rips it apart, and explains in 6000+ words why Ruby sucks compared to Python. It's a ballsy essay, and if it were a lot shorter and not as well written, I'd be calling it Troll Of The Month. As it is, I think he's missing the point a lot of the time (he tends to think Python's better because he likes its conventions more than Ruby's - not a compelling argument), but it's an interesting read none the less. Anything that keeps our minds open to the fact that Ruby != perfection is worth a look.

Comments

  1. Eric Anderson says:

    I don't think the "Ruby's Not Ready!" is trolling at all. It is well written and most of the points are not about differences in conventions but actual issues that the Ruby community is working on.

  2. Mark Murphy says:

    Regarding "Ruby's Not Ready!", had the author cast his piece as "things I prefer about Python that I don't like about Ruby", I wouldn't have a problem with it at all. However, he comes across as The One True Language Arbiter, and that rankles me whenever I run across it, whether for languages I like or languages I don't like. Pieces written in the mode of The One True Language Arbiter don't quite rise to the level of "troll" for me in most cases, though I can see where some might feel that way.

  3. Bradly says:

    Re: “Ruby’s Not Ready!”

    I don't think he really understands where Ruby is coming from. He sites how update and merge should not be called the same thing because in a wiki update and merge are not analogous, but that is exatly the reason there are two ways to call it; Ruby gives you a way to call the method in a way that fits with your object.

    Re: "RubyAMP: Amazing Ruby Bundle for TextMate"

    The svn instructions are incorrect. It is grabing the entire repo (tags, branches, and trunk). The check out should be
    svn co http://ruby-amp.googlecode.com/svn/trunk RubyAMP.tmbundle

    Also, I would do an export instead of a check out, but that's just me .

  4. Peter Cooper says:

    Just so I have some defense to my implication the anti-Ruby article is a bit trolly.. a few points:

    "The language is inconsistent and needlessly complex."

    He doesn't prove this or even really demonstrate it. Many of his examples are needlessly esoteric. Python is no more consistent than Ruby. Two types of class, for a start. And ambiguity over when to use functions or methods.. len(something) versus something.len (in Ruby, you just use methods all the time - yes, I know about something.__len__ but that's even worse).

    He works with regular expressions in a way even I find confusing. Regexp::MULTILINE? I didn't even know that existed till now because it's not necessary. Infix regex notation is a lot better and doesn't have some of the issues he raises.

    "Either way, it’s a total mystery how difficult it will be to move to Ruby 2.0, or when that move might have to happen. Python, on the other hand, has been in the 2.x series for a long time. "

    Ruby 2.x isn't analogue in featureset to Python 2.x, so making a comparison between how long it's taking Ruby 2.x to manifest versus the existence of Python 2.x seems weird.

    "Ruby is slower than TCL, a language that is twenty years old."

    Python's slower than LISP, a language that's 50 years old.

    "TMTOWTDI is bad"

    Opinion.

    "the behavior of print in Python is exactly what I’ve wanted out of print, or printf, in every programming languge I’ve ever used"

    Stating something is better because it's your opinion. Not a real argument. He moves on to do weird experiments with using puts to display a hash on screen. Who ever does that?

    "Ruby has two ways to handle code in other files require and load. The difference is that require loads the code only once per application, and load loads it each time the interpreter sees load. Yet again, there’s more to remember to be fluent in Ruby. This distinction is of dubious value; if you have code that you want to run more than once, put it in a method and call the method. Don’t make the interpreter re-load, re-parse, and re-run the file."

    Missing a key point of Ruby entirely.

    "Ruby’s while and if statements can optionally have do and then keywords following them. This is just one more extra variation that Ruby programmers have to remember to be able to read other people’s code."

    Sure, if anyone ever used them. Ruby code tends not to be as idiomatic as this guy assumes since Ruby developers tend to stick to a common style.

    I'm sure I could pick out a bunch more odd phrases and sentences to pick on, but I already said he has a well written piece (and I didn't call it a troll) and he does make some good points. I feel, however, that he picks on many of the things that make Ruby good for Rubyists and considers them to be general negatives for programmers, like: "TMTOWTDI is bad." That's just arrogant.

  5. Chris says:

    It's definitely trolling. None of the points (in the cases where they're accurate) raised are new to anyone. And it boils down to "yep, I like what I'm familiar with better." Promises of objectivity from partisans frequently turn out that way. Strange, that.

  6. IL says:

    In his defense, a few of his points are good, particularly those having to do with Unicode and Ruby 1.9 migration. Since he took the time to learn Rails and learn Ruby to some depth, let's not just write him off as a troll. Let's take his best points and incorporate them into future versions of Ruby.

    I love Rails, but I also do work in Django, and I'm also guilty of doing the same type of, "Rails has this, Django doesn't, Django's not ready" type of posting. I don't do it because I hate Django, I do it because Rails does things well. We should separate the good from the bad.

  7. Tim Harper says:

    @bradly: If you install the bundle via "svn export", the handy-dandy "Update RubyAMP bundle" command won't work for you. But hey, that's just me :)

    Thanks for correction on the SVN instructions

  8. Bradly says:

    @Tim Harper: Ahh.. I didn't think about the update using SVN. That's pretty clever. BTW I installed and I am loving. option-g itself make the bundle a must have.

  9. Greg says:

    re: ruby isn't ready
    Lots of his points are off base, BUT the first one, about the lack of effective Unicode support in Ruby, is terrible. In this day when internationalization and multi-language support is a relatively high probability feature, I wish that there was better documentation, discussion, and support for Unicode in Ruby 1.8, and Ruby 1.9, and the lack of this can remove Ruby as a language option immediately for important projects.

  10. Bryan says:

    I've been trying to use the RubyAMP bundle to speed up my coding.
    I'm still trying to figure out how to do something similar to the now
    deprecated Rails debugger which used to allow a console to be opened up
    from the testing environment.

    Anytime I try to use any of the RubyAMP bundle commands I receive the
    following error:
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
    `require__': No such file to load -- appscript (LoadError) from
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
    from /Users/intention/Library/Application
    Support/TextMate/Bundles/RubyAMP.tmbundle/Support/lib/ruby_amp/launcher.rb:2
    from /Users/intention/Library/Application
    Support/TextMate/Bundles/RubyAMP.tmbundle/Support/lib/ruby_amp.rb:19:in
    `require' from /Users/intention/Library/Application
    Support/TextMate/Bundles/RubyAMP.tmbundle/Support/lib/ruby_amp.rb:19:in
    `const_missing' from /tmp/temp_textmate.2nfNou:3

    Both the required gems are installed on the system and I can require
    them from a console.

    It seems to have something to do with the appscript gem.

    Any help is appreciated.

    Bryan

Other Posts to Enjoy

Twitter Mentions