wonko.com

The eclectic musings of a bitter software engineer.

Love, thy name is Ruby

Monday March 07, 2005 @ 11:59 PM (PST)

I taught myself Ruby over the weekend. Actually, it started with an idle visit to Why’s (Poignant) Guide to Ruby, which is such a beautiful work of genius that you can’t avoid learning Ruby once you start to read it.

To take my new knowledge for a test drive, I rewrote MusicSync in Ruby, taking full advantage of its elegance and rich standard library and fixing a few bugs in the process.

The Rubyfied MusicSync has fewer lines of code and is more than twice as fast as the PHP version. It was also a hell of a lot more fun to write. Plus, thanks to Exerb, I can now distribute MusicSync as a standalone Windows binary for those of you who don’t feel like installing a scripting language just to use a small utility.

I predict a long and rewarding relationship. I predict happiness, joy, long walks on the beach and, yes, perhaps even children.

Comments

not that this is even marginally related, but while we're all in the mood for advocating scripting languages, have you heard of laszlo (1, 2)?

it's like XUL, except everything compiles into flash and javascript. regularly, i wouldn't ever write something that relied on flash, but laszlo is just so beautiful.

/me wipes a tear from my eye.

by the way, wonko, i like this new feature where input boxes and buttons highlight when i move my mouse over them. very stylish.
Tuesday March 08, 2005 @ 03:23 AM (PST) Posted by rdude
Laszlo looks really nice. My only complaint (aside from the obligatory "Ack, Flash!") is the need for a J2EE server or Java servlet container.

Me and Java, we have a very unstable relationship. We occasionally don't mind spending time together, but the prospect of any kind of long-term commitment, much less a commitment involving the Java's web technologies, makes me cringe.

As for the input/button highlighting: thanks, but it's been there since (I think) Poseidon 0.1. Something tells me you've been using a browser with lousy CSS support...
Tuesday March 08, 2005 @ 10:43 AM (PST) Posted by Ryan Grove
I just finished why's guide last night. I also read Four Days on Rails, and of course the now infamous ONLamp Rolling with Ruby on Rails 1 and 2.

I also just purchased The Pickaxe book, but I haven't started it yet.

Because it is close to the end of the term I haven't had time to actually do anything with it yet, but I look forward to spring break.

PS- Rails made me want to learn Ruby, how about you?
Tuesday March 08, 2005 @ 11:07 AM (PST) Posted by tabor

The exe needs this dll: msvcr71.dll.

Wednesday March 09, 2005 @ 08:14 PM (PST) Posted by roach
this on XP pro SP2, even with the dll:

--

C:\Temp>musicsync -help
Getopt/Declare.rb:1193:in `parse': Getopt/Declare.rb:1221:in `stat'No such file
or directory - musicsync.rb (Errno::ENOENT)
from Getopt/Declare.rb:1221:in `version'
from Getopt/Declare.rb:1347:in `usage'
from (eval):63:in `parse'
from (eval):40:in `catch'
from (eval):40:in `parse'
from (eval):37:in `catch'
from (eval):37:in `parse'
from Getopt/Declare.rb:1120:in `eval'
from Getopt/Declare.rb:1193:in `parse'
from Getopt/Declare.rb:1120:in `initialize'
from musicsync.rb:187:in `new'
from musicsync.rb:187
Wednesday March 09, 2005 @ 08:16 PM (PST) Posted by roach

Guess I've got some more testing to do. Thanks for reporting this.

Thursday March 10, 2005 @ 12:10 PM (PST) Posted by Ryan Grove

Wonko, you drive me nuts. All this programming passion w/o a care. Thanks to you, I was pushed over the edge and bought Programming Ruby. Now I gotta rewrite all my code in it including that 250 line perl bot. (It needs it any who. Oh! No! I'm not enjoying the thought of rewriting am I!!!)

Monday March 14, 2005 @ 04:27 AM (PST) Posted by professor

Ha!

Monday March 14, 2005 @ 01:41 PM (PST) Posted by Ryan Grove

Someone has the same name taken. It's a ruby app. Poseidon. Though it's probably unrelated to you.

Tuesday March 15, 2005 @ 05:20 PM (PST) Posted by professor

PickAxe II is awesome! Im still learning, but I can't wait to get rolling with rails.

Sunday March 20, 2005 @ 11:13 AM (PST) Posted by professor
You don't need to have Tomcat or J2EE server running. In the SOLO deployment mode it is possible to generate standalone SWFs which contain the whole application.

Best,

Raju Bitter
Wednesday June 08, 2005 @ 08:21 AM (PDT) Posted by raju
Post a comment

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile or Markdown.

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Copyright © 2002-2008 Ryan Grove. All rights reserved.
Powered by Thoth.