Monday, November 19, 2007

My first Ruby gem

This past weekend has a special importance for me. I am finally able to stand by my favorite language, Ruby, with more than just words.

To cut a long story short, I'm playing with smart cards for my research. I didn't find any good library for accessing cards from Ruby, so I was faced with either writing my own extension, or leaving my favorite language for something else. My desire for beauty triumphed over my laziness, and my first Ruby extension was born.

It wasn't as bad as I expected. It took me 4 half-days to figure out PC/SC, ruby's extension mechanism, gems, and Rubyforge. And in the fifth day I rested got it to work under Linux/Windows.

So, yay, I've made my small contribution to the Ruby community. If you're curious to check it out, go to its Rubyforge page.

1 comment:

  1. hi victor,
    good job man...anyway, im curious can i make a clone of the smartcard using your gems?
    like diskcopy method, i want to copy not just the content, but include the system.

    ReplyDelete