home, index, New :: blogEdit | Delete

Here are the 10 latest blog entries. Enjoy!

#

2008-11-09 17:14:46

Leaving Reevoo

There's an interesting mixture of sadness and excitement whenever you leave a job, but I'm particularly feeling it as I prepare to move on from my current employer Reevoo. I've had the privilege of working with a solid team of truly excellent people:

... in black and white, as well in real life, an impressive collection of smart developers and engineers. Which made my decision all the more difficult, although I take solace in knowing that it won't be the last time I get the chance to work with these people - the Ruby community in London isn't too huge, after all!

Onwards and upwards

So what's next? Good question. I don't have another cosy full-time job to drop into, because I've decided to take the leap into self-employment. That's right - I'm going free range. Am I crazy, what with all the financial doom and gloom going around these days? Maybe. But - there's no time like the present.

Ruby Manor has sold out, and we're looking forward to seeing if our conference experiment has worked. After that we're almost at Christmas, and then the shiny face of 2009 will smile upon us. 2009 - we really are living in the future, aren't we.

In the not-too-distant future I'll have more to say about what I'm going to do next, but for the moment I'd just like to say that it's been an excellent experience working at Reevoo, and when I say 'Au Revoir' to my friends on Webber Street in mid December, I'll be wishing them all the best in the future.

0 comments for leaving-reevoo

#

2008-10-02 10:48:53

Ruby Manor is GO!

We've just make the tickets available for ruby-manor, and folks are already snapping them up. Most conferences offer a variety of different ticket types, giving you optional access to tutorials, expos, or parties. We've tried to fit in with this, by offering our own ticket classifications:

  • Sith tickets - two of these are available sold out! There will be a Master and an Apprentice. No doubt the apprentice will eventually try and STRIKE THE MASTER DOWN.
  • Ruby Manor CORE - Gives you access to unprecidented levels of opinionation. Only one left sold out too, but we added a new Manti-core ticket to balance it out!
  • Enterprise - no learning allowed, as you'll only be given buzzword summaries of the presentations.

... and a bunch more. I suggest you sign up soon, before all the fun tickets are gone and you only get a shiny foil hat to protect you from the thought police.

0 comments for ruby-manor-is-go

#

2008-08-14 21:34:01

Defensio to the rescue

When I come back to interblah.net, I normally have a quick look at the index page to see if any new comments are awaiting my attention. And recently that's revealed a few interesting comments (thanks!), and hundreds of spam comments.

I deliberately didn't do anything clever to combat spam, but I got a bit sick of it today, so I've started sending comments to Defensio to stem the flow. The implementation was very simple (see github for details), and hopefully that'll stem the flow of links to naughty filth on my site.

Except for the links that I add, of course.

3 comments for defensio-to-the-rescue

#

2008-08-01 15:38:33

Ruby Manor

I just posted an initial anouncement for ruby-manor to the ruby/rails/lrug mailing lists.

It's an idea we've been kicking around since a beery campfire talk after RailsConf in Portland - would it be possible to put ona Ruby conference-ish thing, but subtract all of the unfortunately common bullshit problems that conferences I've been to share:

  1. the outlandish expense
  2. the poor relevancy of most of the talks
  3. the roulette you play when incurring 1. without knowing the state of 2.

So we have a few ideas about how to do it differently. Head over to the ruby manor site to let us know if you're interested.

0 comments for ruby-manor

#

2008-07-17 15:47:35

Syntax Highlighting

Working through some of the outstanding issues for vanilla-rb, I've implemented some simple syntax highlighting (Ticket 16):

class Ruby
  def coloured(with='syntax')
    if with =~ /joy/
      puts "Hello, You Coloured World You"
    end
  end
end

It's pretty simple behind the scenes, although there are a few conceptual choices which I may revisit. Here's the scoop.

Blocks of content

I recently fixed code syntax highlighting on the rails-engines site, which is built using the reasonably-excellent radiant-cms system. In Radiant, you markup blocks of content, typically like this:

<r:code lang="ruby">
class Blah
  def something
  end
end
</r:code>

Radiant lets you define tags that wrap around content within the page, making this pretty simple.

However, vanilla doesn't work like that, or at least it doesn't at the moment. The building block of a page is the snip, not a chunk of text wrapped in a tag. There's no tag processing going on here at all, beyond the single, magically snip inclusion that makes it all work. This presents a problem when we want to treat a certain piece of text differently to the rest of the body of a snip.

The Vanilla Way

Since the building block is the snip, the natural thing to do is to move the code snippet into its own snip, and include that via a code dynasnip (see below for the self-syntax-highlighted source!). And so this call

{code ruby,test-code-highlighting}

works nicely for us. After the call to the code dynasnip, the first parameter is the language, and the second is the snip name to include:

class Included
  def from_another_snip
    return "syntax highlighted!"
  end
end

... but it's a pain to have to move every code sample out into its own snip (although that's certainly useful for larger chunks of code.

The solution to this, is to allow rendering of individual parts of snips via syntax highlighting. By adding the snip part to the parameter list

{code ruby,syntax-highlighting-demo,rubycodesample}

we get

class Test
  def initialize(name=nil)
    puts "Hello, World"
  end
end

The code dynasnip is rendering the rubycodesample part of this very blog post!

Next steps

While this certainly works, it's a pain to have to reference the current snip in order to get to the snip part. I have to do this with the comments dynasnip too, in order to find all the snips that are related to it. We could solve this if:

  1. Each renderer knew which snip it was rendering - currently true :)
  2. Each renderer knew which renderer called it - not currently possible :(

Ideally, the code dynasnip would be able to ask it's renderer (the Ruby renderer) to ask the renderer that is invoking it (in the case of this post, the Markdown renderer) which snip is doing the including. With me?

Code dyna 
    --> rendered by Ruby Renderer 
        --> invoked by Markdown Render while rendering this blog post

Yeah, it's a bit complicated, but it's probably worth it; it could help avoid circular rendering problems at the same time.

Anyway - syntax highlighting. Woot!

Super Bonus Appendix

Here's the code from the code dynasnip, highlighting itself, like an eternal self-consuming snake. Don't say I didn't warn you!

require 'syntax/convertors/html'
class CodeHighlighter < Dynasnip
  def handle(language, snip_to_render, part_to_render='content')
    snip = Vanilla.snip(snip_to_render)
    text = snip.__send__(part_to_render.to_sym)
    convertor = Syntax::Convertors::HTML.for_syntax(language)
    code = convertor.convert(text, false)
    %(<pre class="code ) + language + %("><code>) + code + %(</code></pre>)
  end

  self
end

2 comments for syntax-highlighting-demo

#

2008-07-04 09:32:26

Reevoo Labs Lives!

At reevoo, we rely heavily on open source software. As a part of this, we're all very keen on contributing back to the community, both in terms of cold, hard source code, and in sharing our experiences developing software

My colleague luke-redpath has just pushed our new reevoo-labs site live:

I'm looking forward to posting there about some of the issues we're grappling with at reevoo: how to test well, how testing affects refactoring, and trying to innovate on the web whilst still remaining commercially viable. Check it out.

#

2008-07-02 21:48:36

Wham, Bam, Thank You Spam!

My ultra-secure commenting system has finally fallen foul of the malicious robots of spammers. They're probably terrorists, hijacking the precious interblah.net-page-rank fluids to build some kind of net-bomb. Unthinkable!

Anyway, this is good for me, because it forces me to develop some new stuff to counter the spam. And the first step is being able to delete snips. Here's my quick-n-dirty dynasnip for the moment:

delete

Usage: (no details)

require 'vanilla/dynasnip'
require 'vanilla/dynasnips/login'

class Delete < Dynasnip
  include Login::Helper

  def handle
    return login_required unless logged_in?
    name = app.request.params[:snip_to_delete]
    snip_to_delete = Vanilla.snip(name)
    snip_to_delete.destroy if snip_to_delete
    "Snip #[snip 'name' cannot be found] has been deleted."
  end
  self
end

(If the dynasnip only contains a class name, it's probably loaded from the Vanilla application directly. This is typical of the basic dynasnips like link_to, etc)

I've also added the link to the template, but this in turn raises some interesting, unanswered questions about how to take Vanilla.rb from an interesting toy into a proper web platform.

0 comments for wham-bam-thank-you-spam

#

2008-06-22 14:37:57

Mashed 2008

Well, I'm just back from Mashed 2008, but before my brain shuts down due to lack of sleep (thanks, people playing RockBand all night, you are awesome), I just wanted to post a video of our (prize-winning!) hack.

We took some of the (somewhat odd) XML subtitle feeds that the BBC generate, and extracted interesting words at specific points in time. We then hooked this up to some flash (originally developed by TEN4 Design), stolen from Sony BMG, and quite thoroughly hacked, presenting it alongside content from the BBC Redux corresponding to the subtitles, to produce this.

I like to call it Subterranean Homesick News:

I'll post a link to the full video once it's ready Here's the longer video - I particularlly like the Hissy fit. I think there are some great moments in it (as well, as some not so great bits, but that's what you get after 24 hours of sleepless hackery).

Anyway, I hope you enjoy it.

Behind the Scenes

The hack involves some Ruby, some Javascript, some Flash, and some magic. The animated Bob Dylan isn't pre-rendered with the subtitles - that's all live thanks to Ben Griffiths flash deconstruction skills (learned on the spot, no less). The interesting terms are the result of a collaboration between myself and James Andrews (although whereever you see good words, it's his work - all the not-so-good words are my fault).

Anyway - great fun. I'll amend this post with the timestamps of some of my favourite moments in the movie. (#mashed tag for robotic things.)

Epilogue

4 comments for mashed-2008

#

2008-06-04 22:46:14

More Vanilla Tweaks

So thanks for your patience thus far. My grand vanilla experiment is going relatively well. Lessons learned so far:

  • Links in atom feeds need to be absolute, not relative;
  • Folks like to post empty comments.

I've updated some of the documentation so it should be a bit clearer how you can play with your own vanilla-rb clones:

$ gem install gem install soup sqlite3-ruby rack ratom RedCloth BlueCloth
$ git clone git://github.com/lazyatom/vanilla-rb.git
$ cd vanilla-rb
$ rake setup
$ rackup lib/vanilla.ru

Let me know how it goes...

2 comments for more-vanilla-tweaks

#

2008-06-03 22:32:43

Comments Are Alive!

I just pushed a first attempt at a super simple commenting dyna - you can see it in operation on this (view raw) and the previous blog post. It operates very simply, is almost certainly ripe for abuse and spamming, but lets walk before we run, yeah?

Next up, some proper instructions about how to get vanilla running.

2 comments for comments-are-alive