assertTrue is the professional blog of Luke Bayes and Ali Mills

Is RubyGems running really, really slow on OSX? How about 60 second delays for HTTP requests?

Posted by: Luke Bayes Sun, 04 May 2008 21:36:00 GMT

Updated on June 23, 2008: There was just a release to RubyGems 1.2 yesterday and RubyGems is now blazing fast, no more index updates and who-knows-what-else every time you install a gem.

Ali and I ran into an interesting Ruby bug on OSX Leopard last week and I thought I’d share the result of our finding….

Basically, we were requesting a 2k RSS feed from a url that had two sub-domains as in:

http://sub1.sub2.example.com

The request worked fine if we hit the server with only one sub-domain as in:

http://sub2.example.com

In the first example, the request would hang for exactly 60 seconds and then return the result. When we tried with a third sub-domain, we got a 120 second hang and then an error.

After digging through the Ruby sources, it looked like the problem was in the TCPSocket C implementation so I threw an email up on the Ruby list.

Turns out the fix is that if you’re trying to use Ruby networking features that sit on top of TCP on OS X Leopard, you may need to add the following to your code:

require 'resolv-replace'

Found the fix in this thread.

I also added this line to /usr/lib/ruby/1.8/rubygems.rb (around line 11) and RubyGems is suddenly much, much faster.

Tags ,  | no comments

Will he finally start wearing Shoes?

Posted by: Luke Bayes Tue, 08 Apr 2008 23:33:00 GMT

Those of you that know me know – I wear flip flops.

I wear flip flops all the time.

I wear flip flops to business meetings, interviews, first dates, fancy clubs, I mean everywhere.

I wear flip flops even when it’s a rainy, windy, San Francisco, 40-degree, summer day!

I suppose you can take the boy out of Florida, but, well, youknowhowitgoes….

In addition to the cold toes, it now looks like there might be another good reason to wear Shoes.

Why the Lucky Stiff of Ruby fame has come out with a new (and not-quite-ready) cross-platform, native component, open-source, GUI toolkit called Shoes.

I’ve been spending an awful lot of time lately thinking about this problem. By lately, I mean something like the past 10 years. I’m definitely excited to look more closely at this project as he’s claiming support for all kinds of media, drawing apis and even native components.

I’ll be looking into this Shoes-thing more in the coming weeks and I’ll be sure to let you know what I find.

In unrelated non-technical, but still somehow nerdy news, I may have found a new favorite musician and music site today.

Check out muxtape which is a fantastic exercise in clean, semantic, UI for media (I dare you to view source).

Be sure to listen to the Kimya Dawson track at the bottom of the link above.

Nice.

Tags , ,  | no comments | no trackbacks

Announcing Sprouts! (was AsProject)

Posted by: Luke Bayes Wed, 13 Jun 2007 17:17:00 GMT

I just wanted to get out a quick announcement before too much more time went by….

I introduced AsProject in April and have since been redesigning it under a new, much more manageable project called Sprouts. Just yesterday it reached a point where it’s at least testable on both OS X and Windows (with Cygwin).

I’m looking for some help getting it production ready (check out the issues list) and feature feedback from the community before I go much further.

Please check it out and let me know what you think, what it needs, and what doesn’t work the way you expect.

Read more...

Tags , , , ,  | no comments | no trackbacks

MAXUP :: Mobile iCalendar Reader is Going to MAX

Posted by: Ali Mills Fri, 06 Oct 2006 19:07:00 GMT

MAXUP is an unconference that will be running parallel to the MAX conference from October 24rd – October 26th at the The Venetian Hotel in Las Vegas, Nevada. I’ve been hearing about these unconference Foo Camp style spin-offs for a little while and like the idea. Since I’ll already be in Vegas presenting at MAX on design patterns in ActionScript 3, I’m going to join all these attendees and participate in MAXUP, too.

At MAXUP I’m going to give a demo of a mobile calendar project I’m working on that reads and presents remote calendar files (specifically iCalendar formatted files) on Flash Lite devices. Like most projects, this one has both a server and client component. The server is written in Ruby and the client in Flash Lite 1.1. I’ll be demonstrating the project running on my Nokia 6600 and Nokia N70 phones, and discuss how it was built. I’ll do my best to follow Scott Berkin’s advice on how to run a great unconference session.

Here are some recent pictures of the calendar running on my N70:

Read more...

Tags , , , , , ,  | 1 comment

Invest Regulary in Your Knowledge Portfolio

Posted by: Ali Mills Wed, 26 Jul 2006 06:30:00 GMT

I must have learned something from the first chapter of The Pragmatic Programmer by Dave Thomas (who’s probably better known these days for his contributions to the Ruby community through his publishing company and must-have book Programming Ruby) when I read it long ago. In that chapter, Dave’s 8th tip is to, “Invest Regulary in Your Knowledge Portfolio”. One of the ways he suggests doing so is to learn one new language a year. Well, this year I seem to be making up for years gone by, because I’ve been spending a lot of my extra time working with several different languages and their frameworks. This year, I’ve been working with – in order as of today – haXe, Flash Lite 1.1, Ruby, ActionScript 3.0, XUL, and the Nullsoft Scriptable Install System. I’ve been working with their frameworks Ruby on Rails, Flex, and XULRunner.

All of these languages are tools to build the kind of software that I’m interested in building: software that’s fun to write, easy to distribute, a pleasure to use, useful, and affordable. For software to be distributed easily and a pleasure to use has to be universally available. And, to be universally available it needs to be truely cross-platform – cross-software and cross-hardware. It needs to work on win, mac, and nix and also in a browser, on a desktop, and on a palmtop. Today, the best format to make software universally available is the SWF format. It’s undeniable, more people have the Flash Player than any other piece of software .

It is, granted, worth noting that some feel like traditional Java, non-traditional Java, Python, Ruby, .NET, and the Mozilla Foundation’s XUL are also acceptable tools to make available software, and depending on the goal, they’re correct. In many cases, these technologies can even enhance a SWF’s funcionality. For example, it’s possible to use Mozilla’s XULRunner as a desktop wrapper for SWFs, or if you’re really smart, to do what Rich Kilmer did and write a SWF view to a Ruby controller and Berkeley DB model. Rich gave me and Luke a sneak peak at his indi product at RailsConf, and we were blown away. The product is a great idea, and it’s built on an extremely smart and interesting architecture. Get indi when it’s available.

Invest regularly in your knowledge portfolio.

Tags , , , , , , , , ,  | no comments