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

Author Archives: Peter Cooper

By Peter Cooper / March 31, 2007

Ruby-C

Mark Volkmann has put together a kickass presentation [PDF] that walks through topics relating to C/Ruby integration. If you want to write a library in C that integrates with Ruby, or vice versa, it’s an essential read.

And while we’re at it.. two years ago Garrett Rooney wrote an article called “Extending Ruby with C” that could come in useful too. It’s a little old, but covers a lot. He demonstrates how to take a basic, pre-existing C library and make it accessible from Ruby. Read More

By Peter Cooper / March 31, 2007

Railsconfeu2007

Just a quick newsflash..

Coming up fast, the deadline for submitting proposals for sessions and tutorials at RailsConf Europe 2007 is Monday, 2 April. Co-produced by Ruby Central and O’Reilly Media, this is the largest European conference dedicated to all things Ruby on Rails. The three-day program will include revelatory keynotes, informative sessions, and hands-on tutorials, as well as plenty of opportunity to connect, contribute, and collaborate.

Learn more at the official RailsConf Europe 2007 site.

(Update: Chris Wanstrath writes to say that the deadline has been extended to April 19. Thanks Chris!)
Read More

By Peter Cooper / March 30, 2007

Sexymigrations

Chris Wanstrath takes a look at how to get sexier looking migrations (above) in Rails. If you’re sick of endless lines of “t.column”, check it out. Read More

By Peter Cooper / March 30, 2007

Ilya Grigorik has written a article demonstrating three different ways you can schedule tasks to run using Ruby, including a simple thread based scheduler, a OpwnWFEru based scheduler, and a BackgrounDRB based scheduler. A notable omission is RailsCron, which provides another alternative for Rails users. Read More

By Peter Cooper / March 30, 2007

Radar
Image credited to Dave Thomas

Dave Thomas takes a stroll through the land of REST and looks at how the future of Rails applications could be in having the whole ‘backend’ REST accessible with a HTML presentation filter sitting in front of it for browser access. It’s a very cogent article, and I’m all for popularizing the term “RADAR” to refer to the types of applications Dave talks about. Let’s use it.

Update: Peter James came to some very similar conclusions back in March 2005. Cool! Read More

By Peter Cooper / March 27, 2007

Macesquewindows

Ben Kittrell has written a guide to creating a Mac-esque Rails / Ruby development environment on Windows. As he says:

I like Windows and I love Vista. Mac’s certainly are beautiful; but as of yet “It just works” is not convincing enough for me. However, any Railer will tell you that the holy grail of Rails editors is TextMate, which of course is Mac only.

Ben covers the main bases: installing a Textmate-esque editor, installing Cygwin, putting on a better console application, and getting everything to work seamlessly on Windows. Read More

By Peter Cooper / March 26, 2007

Cover

My book, “Beginning Ruby”, was released today and is ready to buy (and read!) immediately in print and e-book forms.

Beginning Ruby is a complete beginner’s guide to Ruby and ideal for both people who’ve not programmed before or those who’ve done a little programming but don’t understand the finer details (such as OOP, dynamic languages, or scripting). Beginning Ruby is a little like the Pickaxe but for meilleur casino en ligne français people who want more hand-holding and less reference materials (ideal for managers!). Actually, it’s even a bit cooler than the Pickaxe because the rather amazing foreword is by why the lucky stiff! Read More

By Peter Cooper / March 26, 2007

Cruisecontrol

CruiseControl.rb is a continuous integration tool written in, and for, Ruby. It makes it easy to set up automated builds of your software and to find out about tests that break on the fly. The official site has downloads, a 5 minute screencast, and a working demo of the tool.

Alongside this, Bill Eisenhauer – the developer of GeoKit, the Rails geocoding plugin – has written an article talking about CruiseControl.rb and showing how to set up custom tasks to use CruiseControl with Capistrano. Read More

By Peter Cooper / March 26, 2007

Newhobo

Just over two months ago I posted about a new rapid Web application development framework for Rails called Hobo. The team have now let me know they’ve got a brand new, redesigned site, and that Hobo has a major, new release.

Hobo makes it really easy to get a basic Web application up and running in Rails. It’s a little like scaffolding but with a turbocharger under the hood. And if you want to get up and running in just a few minutes, they have a short tutorial along with three screencasts. Read More

By Peter Cooper / March 25, 2007

Reclambda

Hampton Catlin, with a little inspiration from Nathan Weizenbaum, has come up with a few cute ways to create recursive lambdas (that is, anonymous functions that can call themselves). Read More

By Peter Cooper / March 24, 2007

Bobheartror

“Why Ruby On Rails?” was a presentation made by Gregg Pollack at the Orlando Ruby Users Group on March 15, and now you can watch it online. Gregg is a great presenter and moves through a lot of stuff really quickly. The first half of the presentation focuses on agility, agile development, and how agile development changes the way you need to interact with clients, and the second half gets into the technical Rails side of things. A good watch, and especially good to recommend to management types who, perhaps, aren’t too familiar with Rails and agility yet. Read More

By Peter Cooper / March 24, 2007

Slingshot-1

Joyent Slingshot is a new technology developed by Joyent and Magnetk that provides a Windows and OS X client for specially designed Rails applications. The upside of this is not just that your application looks more like a desktop application, but you can also code it in such a way that your application will work both online and offline, syncing data as necessary.

The main downside at the moment is that Slingshot isn’t actually released yet, and a number of other compromises are raised and covered in the comments section of their blog post. Still, this is a technology to keep an eye on in future. Read More

By Peter Cooper / March 23, 2007

Feedreader

Ever thought that parsing feeds was a complex task? Not in Ruby! Using the Feed Normalizer library (a wrapper for other feed processing libraries), Ilya Grigorik demonstrates how you can create a complete RSS / Atom feed aggregator in 26 lines of code, including renderer! Read More

By Peter Cooper / March 23, 2007

I’ve stumbled across several great snippets of Ruby code on the Web in the past few weeks, and rather than bore you with a post on each one, here’s a whole collection at once:

1. RSS Twitter Bot – A short Ruby script that will read an RSS feed and republish it to your Twitter account. This could be useful for livestreaming or getting some sort of commercial presence on there.

2. Check if a number is prime in ONE line of Ruby – A rather mind-boggling technique to detect primes using a regular expression (!)

3. iTunes Database Parser – A short script that reads through your iTunes database and tells you what you like to listen to based on your listening habits. Read More

By Peter Cooper / March 21, 2007

Haml

Back in September 2006, I posted about a new markup language for Rails templates called Haml. For those who missed it, Haml is a high-level, semantic language that makes it rather hard to make HTML markup errors. It relies heavily on indentation, a la Python, for its structure.

Hampton Catlin has now released a significant new version, Haml 1.5. Along with this comes a great new logo (above) and official Web site. A very easy to follow tutorial is also offered to whet your appetite.

Hampton says that a significant improvement in 1.5 is a feature called “Sass”, a new way to define CSS stylesheets in a logical way, along with constants, operations, nesting, and selectors. Read More