More articles tagged 'ruby'

2008-04-05
Writing a compiler in Ruby bottom up - step 2/??

My choice of Ruby as my implementation language was pretty arbitrary. The choice doesn't matter all that much at this stage, but I really like Ruby.

At some point, however, there will be a series of steps to bring the language and the compiler closer together. What I mean by that ...

2008-03-29
Latest referrers using Rack and Ruby

As most bloggers I like to keep an eye on where my traffic is coming from, and especially when there are surges in traffic. I'm using both Google Analytics and Feedburner for stats, and it works great for trends, but not see what's happening right now.

This morning I needed a ...

2008-03-29
Why coupling is always bad / Cohesion vs. coupling

In the discussion following my entry "Why Rails is total overkill and why I love Rack" several comments raised the issue of whether high coupling is always bad. My answer was that I believe it is, but at the same time it can be worth it sometimes.

It seems like ...

2008-03-27
Writing a compiler in Ruby bottom up - step 1/??

I've just posted the second part of this series. See part 2

I've been sitting on this for a long time - the oldest entries in the series I'm about to start posting is stuff I started writing back in early 2005 before I even started version 1 of ...

2008-03-25
URLs do not belong in the Views

It's bothered me for some time to hardcode URLs in my views. It means that if I want to revise the linking structure, I may need to modify the views in a huge number of places. At the same time I don't like the thought of putting it in the model ...

2008-03-23
Why Rails is total overkill and why I love Rack

Rails is total overkill. It tries to do "everything" in a massive framework where major components are tightly intervowen. Smaller frameworks like Merb and Camping have already shown you don't NEED this. I argue you don't need a framework at all - you need highly cohesive, loosely coupled components. That is ...

2008-03-22
Rack middleware: Adding cache headers

I'm playing with a small web based RSS reader, and one of the things it does is cache a lot of data to reduce the impact on the sites I follow feeds from. However I realized this a couple of days ago I'd completely forgotten to set cache headers, and I ...

2008-03-22
Rewriting content types with Rack

UPDATE: I have just added another Rack entry: Rack Middleware: Adding cache headers

Rack is a common API between webservers and frameworks for Ruby. It allows all kinds of nice stuff, like chaining filters that each do one small and self-contained part of the processing and are easy ...

2008-03-21
Draw a logo with gradients with Ruby and Cairo

UPDATE: I have posted yet another Cairo tutorial: Web2.0 style logo reflection with Ruby and Cairo

After this entry about drawing with Cairo I decided to play around some more. The following example uses the functions I included my previous entry (you'll need to include the require's and ...