Ruby-Tricks

RDDB: RESTful Ruby Document-Oriented Database

RDDB is a Ruby document-oriented database system inspired by CouchDB and developed by Anthony Eden. If you're familiar with CouchDB, the whole system should make sense from the start, but if not, read on. You can create a database and insert documents in a simple enough way:

Read more →

Metaprogramming in Ruby Presentation

Mpruby
A few weeks ago, Peter Vanbroekhoven of the newly formed Belgian Ruby User Group gave a presentation called Metaprogramming in Ruby (video and slides available). Peter looks at some of the metaprogramming voodoo used by libraries like ActiveRecord and looks at how to create domain specific languages of your own.

Read more →

CplusRuby: Fast custom C structures within Ruby

CplusRuby is a new library by Michael Neumann that makes it really easy (as in, even easier than RubyInline, although CplusRuby is of a smaller scope) to define custom C structures from within Ruby. The major goal of CplusRuby is performance, and the ability to easily define small methods within a class that compile to C and which can call each other directly. An example is always better than an explanation, so check out this code.

Read more →

DeepTest – Run Tests Faster With Multiple Processes Simultaneously

DeepTest is a new library that allows you to run test suites in separate processes simultaneously. The obvious benefit is that on multiple core machines, as are becoming hip with the kids nowadays, test performance can be increased significantly. Initial tests by the developers showed that a test suite ran in half the time on a dual core machine, although real life performance is bound to vary.

Read more →

Anvil: Another Framework for Developing GUI Applications

Anvil1
Anvil is a new Ruby framework for developing GUI applications by Lance Carlson. It's a framework around Wx::Ruby (WxWidgets is a popular cross-platform widget toolkit) and offers its own DSL to make developing GUI applications easy. The release blog post has more information, including a great example of the code required to make a basic Anvil app. Interestingly it supports an MVC style of development where the view and control elements of your applications can be separated cleanly.

Read more →

Interesting Ruby Tidbits That Don’t Warrant Separate Posts #1

Welcome to the first "Interesting Ruby Tidbits That Don't Warrant Separate Posts"! This is going to be a somewhat regular feature of all the reasonably interesting things I'm e-mailed about or discover that aren't getting as much attention as they should, but which aren't captivating enough to warrant an entire post on their own. So without further ado..thread-dump librarythread-dump is an interesting library that lets you to get a dump of thread activity when a Ruby process quits by Greg Fodor. In his own words:

Read more →

Superators: Add new operators to Ruby

Superators

I know there's going to be some controversy around this clever piece of code by Jay Phillips. He's developed "Superators", a library that finally makes it easy to create new operators within Ruby that look like line noise. Always wanted a "-~+~-" or "===~-+~++" operator? Now it's within your grasp! As Aleks Clark says: "Job security and spiffy DSL construction in one neat package."

Read more →

Playing Catchup: 5 Great Links From This Week

Ruby Inside hasn't had any new items for the last several days as I've just bought a house, and have had to enjoy the various work that brings. So, to get things back on track with Ruby Inside, here's a roundup of some of the key news and articles I've seen over the past week instead:
Shoes

Why Releases His Shoes To The World

Despite the finest Ruby blog in the land, Why's RedHanded, slipping into a coma earlier this year, Why continues to wow the Ruby community with his contributions. This time around, he's built a cross-platform toolkit for making "Web-like Desktop Apps" using Ruby called Shoes. Drool over this sample code:

Read more →

Sake: System-wide Rake Tasks

Sake is a RubyGem by Chris Wanstrath which executes and manages system-wide Rake tasks. Whereas Rake is project-specific, Sake allows the developer to examine, install, run, and uninstall Rake files and tasks globally, much like the way Rubygems does this for Ruby libraries.

Read more →

How to Build Simple Console Apps with Ruby and ActiveRecord

Gregory Brown has put together a great four-page tutorial on how to build a database driven console application using Ruby and ActiveRecord (no Rails needed!). As well as delivering what the title suggests, Brown also looks at some neat Ruby techniques for structuring applications in general (such as using modules and module_function). The end result is an app called "EarGTD," a basic time / task management tool.

Read more →