Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

By Peter Cooper / March 4, 2008

ebb-concurrency.png

Ebb is a small, extremely high performance Web / HTTP server designed specifically for hosting applications built upon Web frameworks such as Rails and Merb (and, in future, apps on other non-Ruby frameworks.) The design is event based (similar to that used by Ruby daemons that use EventMachine) but Ebb itself is written in C and dispatches requests to Rack adapters. This is a real leapfrog over the popular Mongrel and Thin daemons which are primarily written in Ruby, and results in scary levels of performance.

Since the start of 2008, it seems as if the Ruby and Rails deployment sectors have been on fire! Read More

By Peter Cooper / March 1, 2008

MacRuby: Ruby Running On Top of Objective-C

Most Mac-based Ruby developers are already familiar with RubyCocoa, a bridge that enables regular Ruby apps to talk to OS X’s various frameworks. MacRuby, however, takes a rather different approach and is a port of Ruby 1.9 that runs directly on the Objective-C runtime and garbage collector. It’s still in its early stages, but for anyone interested in Ruby implementations, this is worth a look.

Try: Stop Using “@person ? @person.name : nil” And Start Using “@person.try(:name)”

try() is a ridiculously simple, but incredibly useful, bit of sugar Chris Wanstrath has come up with for making it easy to “try” and call methods on objects, but without Ruby getting upset if that method doesn’t exist. Read More

By Peter Cooper / February 29, 2008

waves.png

Ruby Waves is a new Web application framework for Ruby, developed by Dan Yoder. On the surface, this makes it seem “Rails-like” but Waves is billing itself as a “next-generation” framework, a cutting edge Rails-inspired framework, if you will. Dan says that Waves is “not a better Rails” but the realization of an evolution of the ideas behind frameworks like Rails. For example, Waves supports request lambdas (mapping a request to a block, rather than a URL pattern to a controller and action), just-in-time resources, nested layouts, and hot-patching. Waves is also thread-safe.

Dan has done a great job at documenting Waves, with a screencast, tutorial, and a bumper-packed official site all ready to go. Read More

By Peter Cooper / February 29, 2008

processing-ruby.png

Processing is a popular, open source graphics framework and programming language. It’s used by thousands of artists, researchers, and students to put together graphics-focused applications, art, and other visual experiments. It’s like a more powerful NodeBox, if you’re familiar with that project.

Processing typically relies on scripts written in Java, but now, thanks to JRuby, it’s possible to interact with the Processing framework directly from regular Ruby code. You’re going to need a fully working JRuby installation for this, and it seems to have only been tested on OS X (which I’ve also tested it on – it works well!), but the interface code, along with two examples, are available at The Shoebox. Read More

By Peter Cooper / February 26, 2008

hummingbird-book-the-ruby-programming-language.png

Originally planned as a second edition to Ruby classic, Ruby In A Nutshell, The Ruby Programming Language is a new book by David Flanagan and Yukihiro Matsumoto (a.k.a. Matz – creator of Ruby) and published by O’Reilly. The book covers Ruby 1.8 and 1.9 and with its esteemed authors and technical approach, is sure to become a new “Bible” for Ruby developers. In programming book style, I’m going to refer to it as the “Hummingbird” book in future, due to the woodcut pictures of hummingbirds on the front.

It’s excellent..

Only coming into stock two weeks ago, this book is fresh and up to date. Read More

By Peter Cooper / February 25, 2008

castanaut.png

Castanaut is a Ruby-backed screencasting domain-specific language that allows you to script screencasts in code. When these scripts are run, Castanaut takes control of your Mac and produces the desired effect. It’s simply automated, scripted screencasting.

The Origin

Two weeks ago I was reading a post on 37signals’ blog about producing screencasts. Joseph Pearson’s comment got me all excited:

At Inventive Labs, we’re experimenting with scripted screencasts. That is, you run a script, and at the end of it you have a screencast.

For example, this movie was generated by this Ruby script. No human was involved at all.

Obviously we would replace the text-to-speech narrative with a real voice actor for any screencast we put out, not least because the robot suffers from the Uncanny Valley effect. Read More

By Peter Cooper / February 25, 2008

How To Avoid Hanging Yourself With Rails

deathbyrails.png

Rowan Hick put together a great presentation called How To Avoid Hanging Yourself With Rails for a recent meeting in Toronto, Canada. A PDF is available. In the presentation Rowan focuses on ActiveRecord performance and the best way to frame queries. He tests different techniques by loading a database up with thousands of rows of fake data and then compares different approaches.

Create a FaceBook App Using Rails in 7 Easy Steps

In “10 Minute Quick Start Guide for Facebooker,” Gerald Bauer walks through seven steps involved in creating a Facebook app using Ruby on Rails. Read More

By Peter Cooper / February 23, 2008

Google has a series of “tech talks” on YouTube where, presumably, Google gets technological luminaries to come in and give a talk about their work. The latest is by Ruby’s creator, Yukihiro “Matz” Matsumoto, and was given just a few days ago on February 20, 2008. In the video, Matz quips at Google’s reticence to use Ruby but spends most of the time talking about Ruby 1.9, YARV, JRuby, and other new developments, and fielding questions from the audience. Read More

By Peter Cooper / February 22, 2008

fiveruns.png

The Take Five series on the FiveRuns blog is a set of generally interesting interviews with people involved in the Ruby on Rails community: Chad Fowler, Michael Coté, Peter Cooper, Jeffrey Krause, Robert Dempsey, Todd Barr, and Pat Eyler. Each is asked five questions (selected from a set of about fifteen) with many answering the same questions with radically differing answers. There’s a focus on questions involving Rails’ position in the “enterprise,” so if that topic interests you, take a closer look.

The series is on-going, and I believe FiveRuns are keeping their eyes peeled for more people to interview, so if you’re interested, get in touch with them or leave a comment here and I’ll let them know. Read More

By Peter Cooper / February 22, 2008

Rush, by Adam Wiggins, is an interesting development. It’s a shell and remote login (as with SSH) replacement written in Ruby that accepts Ruby syntax to perform system operations. Consider these operations:

processes.each { |p| p.kill if p.command == “mongrel_rails” }

Or..

local = Rush::Box.new(‘localhost’)
remote = Rush::Box.new(‘my.remote.server.com’)
local_dir = local['/Users/adam/myproj/']
remote_dir = remote['/home/myproj/app/']
local_dir.copy_to remote_dir
remote_dir['**/.svn/'].each { |d| d.destroy }

Instead of making you use the usual UNIX commands, Rush abstracts a collection of system related tasks and allows you to perform operations using the Ruby you know and love. I can’t say I’m rushing to install this just yet, because I think there might be some security aspects that need to be figured out, but it’s definitely a bold, interesting development and I’m keen to see where it goes next. Read More

By Peter Cooper / February 18, 2008

JRuby 1.1 Release Candidate 2 Released

The latest release candidate of JRuby 1.1 has been released. 260 issues have been fixed since RC1 and a number of memory and IO improvements have been made. JRuby developer Charles Nutter gives some interesting background to JRuby’s current state. Nutter explains that JRuby’s performance now regularly exceeds that of Ruby 1.8.6 and even Ruby 1.9 in places. Meanwhile, other developers have been doing benchmarks.

A Single File Rails Application

Pratik Naik has done the unthinkable and made… a single file Rails application. Clever stuff. He then created a tiny wrapper for this nugget of joy called tinyrails which makes things even easier. Read More

By Peter Cooper / February 18, 2008

rubyfringe.png

The registration process for the Ruby Fringe conference, in Toronto, Canada from July 18 to July 20, has just gone live. The quoted $650 rate (for the first 75 signups only) is in Canadian dollars, but that works out to $650.58 US, so it’s all one and the same. Only 150 attendees (plus speakers) will be there in all, so sign up quick. Out of all the people I’ve been speaking to in the last week, there’s been a big interest in Ruby Fringe, so get in now or be disappointed!

If you missed Ruby Inside’s previous mention of Ruby Fringe, it’s an “avant garde” Ruby conference focusing on the attendees, rather than high profile keynotes or sponsors’ interests. Read More

By Peter Cooper / February 17, 2008

twitteragentarchitecture.png

Dominiek ter Heide has put together a great tutorial that walks you through building a “Twitter agent” using Ruby, Rails and XMPP. For those who aren’t on Twitter yet, it’s a free micro-blogging cum “presence” information service that allows users to write 140 character messages that are supposed to represent their current state / feelings / location / etc. A Twitter agent, therefore, is essentially an automated Twitter user that can deliver information to other Twitter users.

The tutorial is quite in-depth with lots of code examples and helpful diagrams. Dominiek explains it all very directly, and even has the developed service running for real, so you know you’re seeing something that actually works. Read More

By Peter Cooper / February 17, 2008

scotonrails.png

The registration process for Scotland on Rails, the UK’s first Rails-dedicated conference, has gone live. The event takes place in Edinburgh, Scotland on Friday 4th and Saturday 5th April, and comes just days after both Euruko 2008 (Czech Republic) and Ruby Fools (Denmark & Norway), so might help you form the perfect trifecta! Registration is £180 (€241 or $350).

For a regional conference, Scotland on Rails has done extremely well on the speaker front, with Michael Koziarski, David Black, Giles Bowkett, Martin Sadler, Tammer Saleh, Jim Weirich and Bruce Williams speaking amongst others. A list of talks is available for your perusal. Read More

By Peter Cooper / February 13, 2008

1018557535_e3a580b2c9.jpg
License: CC Attribution Credit: conner395 @ Flickr

Bus Scheme is an implementation of the Scheme programming language (a dialect of Lisp) in Ruby being developed by Phil Hagelberg. It’s called “Bus” Scheme because it’s being developed while Phil travels on the bus, but Ryan Davis called Phil out on that sly fabrication! Curiously, Phil claims to have never used any existing Scheme implementations, relying instead on knowledge gleaned from SICP and these incredible computer science lectures (if you have not seen the Abelson / Sussman lectures yet, you are missing a major programming treat.)

Bus Scheme runs on Ruby 1.8, 1.9 and Rubinius, and the repository (where you can view the source without downloading it) is available here at GitHub, although as noted in the documentation, you can also use gem install bus-scheme

Meanwhile, in a land far, far, away Jim Weirich is working on an implementation of Lisp within Ruby too, although Jim’s clever attempt uses Ruby pre-existing data structures and not a typical parsing and interpretation system. Read More

Recently Popular Posts