See this Pastie, which makes use of File.socket?, Enumerable‘s amazing detect and an ERb variable. On the #rubyonrails.se IRC channel, simmel made the recipe better by adding the check for File.socket?, instead of File.exists?. (File.socket? will follow symbolic links, as you can see in the pasted code.) A recipe variation, you might call it.
Author Archives: olleolleolle
Speaking at RuPy conference in Poland
Hey! Even more Ruby crap. They said yes. The RuPy conference (at Adam M University, in Poznan, Poland) wants me to run a RubyGems tutorial. To make it a pleasant event, I’ve started thinking about how to make Win32 users comfortable. Anyone of my readers using Ruby on Windows? What I want my co-tutorialists (tutees?) …
readrails alias to open Textmate with the Rails gems source code
Now that Rails 1.2 is out, and you switched to using the gems instead of Edge, you might find yourself having “a hard time” searching the Rails source code. Enter: a Bash alias to opening the Rails source in Textmate. # readrails – an alias to open Textmate with the Rails source from Gems # …
Continue reading “readrails alias to open Textmate with the Rails gems source code”
Heard a podcast with me in it
OK, this is about me trying to learn liking the recorded sound of my own voice. “An unnamed person” recorded a for-fun podcast, and I heard the thing later. Not perfect. I think I came out as stilted, unnatural, and dumb. My voice still sounds a bit weird on tape, but I can tell it …
The adventure continues: New job, with Ruby
Kumputunturi Originally uploaded by sushipumpum. And Javascript. And all the rest a web developer does. Now I commute to Malmoe, Sweden, to do this. I love it. A great team, here at Polar Rose. I’ll post more on my progress and that when I get around to it. This is just the post which says …
Continue reading “The adventure continues: New job, with Ruby”
Ruby and libxml: Collect your XML::Node::Set
Use collect and map in Ruby says Lucas Carlson. Thanks for pointing out that code arthritis, Lucas. So, I was working with the libxml-ruby library (fast XML parsing) and found some loops in my code which could be converted. But, XML::Node::Set did not support collect. I mumbled something inaudible, grabbed the Pickaxe book, found the …
Continue reading “Ruby and libxml: Collect your XML::Node::Set”
Go snippet away, Rubyboy
Just started my morning with fixing a personal annoyance with the current Rails distribution I am using with Ruby 1.8.5: warning messages about deprecated syntax. All I did was heed the advice in the warnings and edit all the when and else control structures that were using colons to using semi-colons. After that, my Rails …
Go read this Intro to Io
If you are interested in the Io language, go read Getting to know Io, by Bruce. He is a Rails programmer who’s also an “Io tourist”, and this gentle intro to how Io works is fine for whetting your appetite. Go!
Delicious integrates with many services
IMG_1224 Originally uploaded by joshua. The bookmarking service Del.icio.us has done quite a few “incremental changes” since I started using it. As has photo service Flickr. Here are two very small, but context-adding betterments that I like a lot. Flickr’s small context-enhancers: more functional tags. Now Flickr sports a few tags that behave in a …
Ruby rockstars in Copenhagen, again
Cph.rb had one more visiting rockstar. Thanks for coming, folks, and thanks for presenting, Obie! Update: Jesper‘s photos. We did the most of Kassen as an impromptu conference space. There were a large table of guys from Cph.rb, and I got to meet well-known faces, hear some rumours, yammer on about Erlang (my programming language …