The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information. — Alan Perlis Here’s a great talk by David Copeland on why and how to avoid making everything a string.
Look, let’s face it: Ruby tools are terrible. If you’ve worked in any Lisp you know what I’m talking about. If you’ve worked in Java or C# anytime recently you know what I’m talking about. If you’ve worked in Haskell you know what I’m talking about. “But Avdi! Lisp is homoiconic, and those other languages are statically […]
Let’s say we’re dispatching events to listener objects. Events look like this: Event = Struct.new(:name, :source, :args) Events should be routed to different handler methods based on the name of the event. For instance, when an object is sent the #call message with an :accepted event: listener.call(Event[:accepted, obj])
Today on Ruby Rogues we spoke to Jeremy Evans, the prolific Open Source maintainer of the Sequel gem and creator of the Roda web framework. (The episode will drop next Wednesday). It was a terrific conversation, and it reminded me that a while back I did a RubyTapas video about on the subject of Sequel. I’d love […]
If you’ve been following Ruby developments for the past couple of years, chances are you’ve heard about refinements. You may have heard that they are controversial, confusing, or even “broken”. It’s true that refinements had some growing pains in their early, experimental versions. But having spent some time exploring the feature as it now exists in […]