Curb FFI – FFI port of Curb

I believe I mentioned that I’m back at work on the Curb project. In case you missed that, Curb is a ruby extension that provides bindings to the libcurl library. I started it way back, left to concentrate on other things (having kids, making money, etc) and now I’m involved again, working with Todd Fisher who took over maintaining the project when I bowed out. I’ll be fixing bugs, answering questions and generally helping out.

In the meantime, I’ve also started work on porting (if that’s the right word) Curb to FFI, with a view to moving away from the existing C code. The motivations are manifold:

  • As it stands, Curb is pretty much tied to MRI. In the modern Ruby world, where you’ve got JRuby and Rubinius and who-knows-what-next, this is recognised as a bad thing.
  • It’s a nightmare to get it working on Windows. This is because, and I can speak with some authority here as someone who develops on Windows every day, Windows sucks for development. Unless you’re using all-Microsoft tooling, in which case it’s pretty awesome. But for interoperability with portable code, and libraries targeted primarily at other platforms, it sucks.
  • FFI is probably the right way to do these things these days. 10+ years ago, when Curb was first hacked together in about six hours, C extensions were the shizz. Now, not so much. Unless you really need the level of hardware hackery and performance you can get with C, things are better off in Ruby code.

So to sum up, this port is about future-proofing Curb, making it easier to develop, easier to use cross-platform, and (in the long run) safer, probably more performant, and ensuring it can run on all Rubies, including whatever whizz-bang next-gen thing comes out next week (my bet is it’ll be written in Rust. Or Go. Or something…).

Check it out (or clone it, as the cool kids say nowadays) at

I’m back on the Curb team!

curl / libcurl
curl lives at

Way back in 2006, after reading on ruby-talk about people’s problems using libcurl with Ruby, I put together a basic C extension to replace the (by-then-unmaintained) bindings that already existed. Little did I know then that it would end up being some of the most popular open-source code I’ve written.

In time, pressures of family, work, and life in general meant I didn’t have a lot of time to devote to my open-source works, and so Todd Fisher took over as maintainer of the project, and did some awesome work improving it, building the multi interface code, and generally making Curb more and more useful. The project is still going strong over ten years later.

I came back to Curb via some work I was doing on a Windows-based system, and after a few hiccups building the library I found myself patching things up a bit to make them work on Windows (which isn’t officially a supported platform for Curb), and a couple of pull requests later Todd got in touch and asked if I’d like to be added to the project on Github. I thought this over for, oh, about ten seconds, and then said yes. I have more time these days for Open Source work, and I don’t have anything currently on the front-burner, so I’m now back on Curb. Todd’s still the boss (after all, he has more code in there than I do!) but I’ll be happily working away, fixing bugs where I can, and trying to make life easier for people out there wanting to use Curb on Windows.

Here’s the original announcement of Curb, from November of 2006.

From: Ross Bamford
Date: November 17, 2006 1:25:05 PM CST
To: (ruby-talk ML)
Subject: [ANN] Curb 0.0.1 – New ruby libcurl bindings

Curb 0.0.1 is now available from Curb
provides nice, easy to use bindings to the libcurl URL transfer

This is the first release, and Curb is still a work-in-progress.
Currently, it supports the curl_easy interface, and can handle the
most common usages for libcurl.

The project is now seeking user feedback, testers on various
platforms, and requests for the features you need the most.

Blog Reboot

Just a quick note to say that the blog is now back online, but sadly missing quite a few posts that were lost by my old webhost.

The last post I’ve been able to restore is from almost two years ago, when I was just starting out on the drone project. Here’s a quick summary of what’s been happening since then:

  • The drone project is still unfinished, and has fallen by the wayside a bit if I’m honest. I still plan to get it going, someday.
  • I’ve recently found time to resume work on my minimal experimental kernel, Mink. (Find it on github if you’re interested).
  • I have a new day-job – I’m now working for a small non-IT company, putting together a brand new bespoke MRP system for them using Java EE, with a Vaadin front end. In between times, I’m also the entire IT department, which is kinda stressful but also fun.

So all in all you’ve not missed a great deal, and now the blog has a new home, I’ll be regularly updating here with new posts.

Reasons why my code is late #173: The Weather

For the UK, this is damn fine weather...
For the UK, this is damn fine weather. And the “Partly cloudy” just isn’t true – clear blue skies!

I currently have quite a lot of work outstanding on various Open Source projects, and I’ve been really busy lately what with one thing and another, but I’ve deliberately kept today free so I could catch up with things a bit. There’s a lot of (long overdue) work on Deelang (the current milestone is at least a couple of months overdue), and ORMDroid has had some great patches this week including private field mapping (thanks to Germán Valencia and Machinarius), some fixes to the SQL generation, and fixes for some spurious exceptions with unknown types (this one also adds a mapping for java.util.Date, and removes the old default mapping functionality – I’ll post more about the API changes soon). All this is in Git, but needs packaging up into a release.

There’s also some stuff I wanted to clean up in Rote, and I’ve lately been working on an operating system kernel (for learning purposes of course – I think at some point every programmer decides it’s time to write one) and was quite excited about getting some time to work on the scheduler this weekend.

But sadly, all of this is going to have to wait. It’ll be late. The reason? Well, here in the UK, we have a heatwave – and that’s a rare-enough thing that when it does happen, you just have to take advantage of it!

I guess it’s a British thing. Some would say we’re lucky – we don’t get any kind of extreme weather. Hurricanes, cyclones, all that stuff is something you see on TV. But what we do get lots of is mediocre weather. We spend much of our time keeping out of the rain. For the last two or three years, summer has been a washout. Most of the time, in the UK, the Sun is a (sort-of) newspaper, not something that makes the outdoors hot.

So I’m sorry guys, but all those updates are going to be a little while longer. This weather won’t last, so I have to make the most of it while I can. Yesterday I sat in the garden, drank a few beers, fell asleep and got sunburned. I’ve been out there all morning and guess what? That’s right – as soon as I hit “post” – I’m going back for more of the same.

As for the updates – we’ll have to take a raincheck.

It’s been a while!

Wow, looks like I’ve not blogged since February! Doesn’t seem that long, but there you go…

I’ve actually been really busy lately, with work and other things. Mostly I’ve been spending some time getting our new app into beta (check it out at It’s been a bit of a learning curve for me (it’s the first time I’ve really used Javascript in anger, and the first FB platform integration I’ve done for anything commercial) but it’s been (and continues to be) lots of fun.

This has also meant that things have fallen behind a bit on Deelang and ORMDroid, but I’ve got plans to get back on track with both projects very soon.

Anyway, I’ll just leave this here for now, with a promise that now the main development of the app is over, normal blogging services will be resumed in the near future 🙂

Tech Filled Fantasy

So, Nokia have advertised the life out of the new Lumia range and the Windows software it will be running, but now the guys over at HTC have released some specs and pictures of their new HTC 8 range.

Im not going to spend all of this article talking about Windows Phone as I’ve already shown my excitement for it previously and wrote a few articles that concern it, as well as the Lumia 920 article, each of these can be found here ..

These articles will give you a bit of an overview of Windows Phone 8, and what you can expect from it.

The HTC 8X and HTC 8S will both run the Windows OS. Just like the HTC One X & S, you know more or less what to expect from each of these models that each will have its own selling points.

Taking the…

View original post 569 more words