jump to navigation

TRUGhat 2006:1
Tuesday, 18 April 2006

Posted by austin in: Archive, Ruby, TRUG, comments closed

TRUGhat: Toronto Ruby Users Group hackathon

TRUGhat is TRUG’s hackathon or codefest. In a hackathon, a group of people get together and will either work toward a common goal, or simply work in a common area on code that interests them. For our first TRUGhat, we have agreed upon a common goal.

During a codefest or hackathon, there’s always lots of snacks available, and it’s common for the perfect developer’s food—pizza, of course—to be delivered.

The goal is for TRUG to have two TRUGhat events a year. Ruby developers of all skill levels will be welcomed.

TRUGhat 2006:1

When?

TRUGhat 2006:1 will be held on 6 May 2006, from 10:00 A.M. to 7:00 P.M.

Since we’re all learning something on this first TRUGhat, we probably won’t get started programming until 11:00 A.M.

Where?

Tucows has generously provided the space and network availability for this event at its offices in Toronto, at 96 Mowat Avenue, one block west of Dufferin, south of King. Transit accessibility is good, with both the King West streetcar and the Dufferin bus passing near the office. Parking is plentiful for those who will be driving. Map

Who?

The Tucows space can handle a total of fifteen people, with thirteen places available. If you’re interested in joining us, please put your name below and join the mailing list. UPDATE: This list is wrong. Visit the TRUG wiki and use the sewm list to join.

What?

The current plan is to implement the functionality of libarchive and possibly libtar for Ruby. The primary goal is pure Ruby support with a secondary goal of Ruby/C bindings so that those who have the requisite libraries can take advantage of the C code for performance reasons.

More?

Some of the details are still being worked out, but Austin Ziegler has already committed to buying pizza for whomever does show up. Check out the mailing list or the TRUGhat wiki page for more information.

Minitar, Ruwiki, and Commands
Tuesday, 7 September 2004

Posted by austin in: Archive, Ruby, Ruwiki, comments closed

I mentioned last week that I had detoured into Mauricio’s rpa-base code for packaging code. I was all set to finish the work on a deployable Ruwiki, complete with this code included in the release, when I realised: “that’s dumb.” Why was I going to release something that could and should be an independent library embedded in Ruwiki, when the whole point of the exercise is to make Ruwiki a good RubyGem and RPA package that doesn’t include things which are logically separate.

It wasn’t as if I weren’t going to release Minitar as a separate package; I said that I would, last week. I just realised that doing it earlier was more important than doing it later and getting Ruwiki out quickly. Doing this also helped me find an answer to the next phase of Ruwiki development, too (following the deployment release).

While looking around at options for how to present the UI for the Ruwiki deployment utility and the minitar utility, I looked at the RubyGems code that emulates the cvs command-line in many ways. This made a lot
of sense, to me, so I created CommandPattern:

class CommandPattern
  class AbstractCommandError < Exception; end
  class UnknownCommandError < RuntimeError; end
  class CommandAlreadyExists < RuntimeError; end

  class << self
    def add(command); ...; end
    def <<(command); ...; end
    attr_accessor :default
    def command?(command); ...; end
    def command(command); ...; end
    def [](cmd); ...; end
    def default_ioe; ...; end
  end

  def [](args, opts = {}, ioe = {}); ...; end
  def name; ...; end
  def call(args, opts = {}, ioe = {}); ...; end
  def help; ...; end
end

It seems to me that this is exactly the same pattern as I need to deal with for Actions in Ruwiki. Okay, so there are differences -- but not as many as I had initially thought. The amount of code to be reused, to be quite honest, is low, but the concept reuse is high. It's very cool, to say the least.

Follow-up

With the release of minitar, the examples originally given for deployment could become:

% minitar extract ruwiki-0.8.0.tar.gz
% cd ruwiki-0.8.0
% ruwiki_servlet