Satya's blog - 2009/10/

Oct 14 2009 10:20 Apt and Gem

If you use Ubuntu and Rails, you may have run across this already: the apt system and the gem system will fight like cats, or as someone called ReinH put it, like Kirk and Spock in Amok Time.

To use ruby stuff, install the ruby packages like "ruby", and rubygems only. Then install all other ruby stuff using the gem command. Slight problem, on 9.10 you get these:

rubygems - package management framework for Ruby libraries/applications
rubygems-doc - package management framework for Ruby libraries/applications
rubygems1.8 - package management framework for Ruby libraries/applications
rubygems1.9 - package management framework for Ruby libraries/applications
rubygems1.9.1 - package management framework for Ruby libraries/applications

Old Ubuntu hands will know that the 'rubygems' package should install the "best" rubygems<version> package. Nope.

The main problem is that gems, and the ruby world in general, make it hard to twist into the mind-space of apt-based systems. See http://pkg-ruby-extras.alioth.debian.org/rubygems.html for more than you ever want to know about this stuff. In short, all Rails apps want to be in one directory, and all Debian-based ssytems want you config in /etc, your code in /usr/local (or whatever), etc. and that's just not compatible with what Rails likes. And the Ruby/Rails people don't see the problem.

Tag: ruby rails

Oct 15 2009 10:56 Ruby is a ghetto

Like Zed Shaw, I'm mildly disillusioned by Ruby and Rails. Here's why:

So many things in Ruby and Rails seem half-assed, in a "we're more interested in this cool new thing, so we're not going to bother to implement language features that are well-established and people would be relying on having". Like XML parsing.

To which, Matthew says: what are you doing with libxml? REXML might be enough. Core ruby isn't like that, lots of modules are.

My response is, core Ruby isn't enough to do anything non-toy. That is, to do anything serious (more than "hello world"-level stuff), you need libraries.

More than that, Matthew's comment (mind, I respect his opinion, and this wasn't an an argument, just a discussion) leads me to think, I don't need to be ripping out the guts of my program. That's what I'd have to do to switch parsers. Possibly. Depending on how the parsers work (stream versus ... non-stream, I guess).

(I use libxml-ruby (debian/ubuntu), which gives me XML::Parser, for the record.)

Which is another thing. The ruby/rails community always expects you to be doing stuff from scratch, and really I'm interfacing with existing systems/data and tweaking existing rails projects. (This is where the "ghetto" epithet comes in.)

I don't feel like playing roulette with XML parsers. But whichever I pick, there will be a problem. And when i ask about it, i'll be told use this other one instead. Ruby/rails expects everything to be in a vacuum, and it isn't!! I can't just go swicth out parsers. Yeah, maybe that's what unit tests are for, but does anyone actually use those? (I should be using cucumber or rspec, I know, but there's more pressure to just do the project any half-assed way than to do it right behind the scenes.)

Here's a conversation snippet, following the above discussion on #barcampchs:

LabThug: what's the new hip thing this week?
satyap: lisp
mcg: rails has always been a ghetto
satyap: lisp again, i mean
satyap: next week we'll be doing fortran
LabThug: yeah, but that ghetto has a lot of bling in it
mcg: yup
LabThug: satyap: F#
satyap: forth by november do we will
satyap: Fthat, i say
mcg: #!F
satyap: haaaah, LabThug and mcg, i'd like to quote you guys on my blog
LabThug: Go ahead

Another source of disillusionment: the whole gem/apt thing I posted earlier.

Tag: rant ruby

Oct 31 2009 18:03 Insect through peehole
My picture of an insect through a door peephole is now up in the CHS section of my albums. It was taken in April 2009.

Tag: picture

Nov 03 2009 16:35 Why blog?

Someone I know said recently, "I tweeted once. Maybe twice. Then, I thought... Who in the world cares what I'm doing?". (Hi, Shaun!) I've heard similar comments from others. (Hi, Jason!)

I blog or microblog (tweet/dent) because I've got something to say. I don't care if anyone reads it. Others keep a journal or diary. Some say that a blog is totally public (true), unlike a diary. "Why should the whole world know my personal thoughts?", some say. For me, it's about the transmission -- I don't care if anyone is listening, as long as anyone *can* listen. And then there are some things I want to get out there. My soapbox, or my lectern. Variously.

As for micro-blogging, that's for more ephemeral thoughts, and to direct people to other locations such as my blog or photo album. For stuff that need not be preserved (even though it may be, I'm not the one doing it, so don't care -- stuff I care about, I try to preserve by myself). Sometimes I need to talk, for the sake of talking, for getting the thought out there. If not for microblogging, I'd be yelling over the cube walls. At least this way you can not follow me, and not be bothered.

So to those who don't want to blog, I say that's great for you. Don't stop me. Don't put me down either. (And no, this isn't directed at you, Shaun, or anyone else in particular.)

I've actually posted about this before, in "Why I blog".

Last updated: Nov 03 2009 16:44

Tag: hmm