SWX Ruby made it to github and gained symbol support

2 views
Skip to first unread message

Matt Aimonetti

unread,
Mar 11, 2008, 8:14:40 PM3/11/08
to SWX Ruby, jed...@cableone.net
FYI I imported SWX Ruby trunk into github to patch it and I added
support for symbols and symbolized hashes.

http://github.com/matta/swx-ruby/tree/master/

My new features are rspec covered, unfortunately, few other tests are
still failing.

-Matt

Jed Hurt

unread,
Mar 11, 2008, 8:32:11 PM3/11/08
to swx...@googlegroups.com
Exciting. Github touches every one of us in a very personal way :)

I've just put SWX Ruby up on my Github account (something I've been meaning to do; thanks for being the catalyst). http://github.com/meekish/swx-ruby

I've been working on some major refactoring to make SWX Ruby into a Gem and completely decouple it from Rails (you'll find a standalone merb app in /examples). The library is in a state of flux at the moment and quite likely broken. I'll pull your changes and see if I can get the failing specs to pass, then make a new release as a Gem.

Thanks for getting in touch!

—Jed (meekish)

Matt Aimonetti

unread,
Mar 11, 2008, 8:42:55 PM3/11/08
to swx...@googlegroups.com
Awesome, I should probably fork your repo, create a new branch in my repo and merge my stuff.
I'll check the merb example too!

Btw, I heard that your plugin was used by NYTimes ;)

-Matt

On 3/11/08, Jed Hurt <jed....@gmail.com> wrote:
Exciting. Github touches every one of us in a very personal way :)

I've just put SWX Ruby up on my Github account (something I've been meaning to do; thanks for being the catalyst). http://github.com/meekish/swx-ruby

I've been working on some major refactoring to make SWX Ruby into a Gem and completely decouple it from Rails (you'll find a standalone merb app in /examples). The library is in a state of flux at the moment and quite likely broken. I'll pull your changes and see if I can get the failing specs to pass, then make a new release as a Gem.

Thanks for getting in touch!

--Jed (meekish)

Jed Hurt

unread,
Mar 11, 2008, 8:49:30 PM3/11/08
to swx...@googlegroups.com
On Tue, Mar 11, 2008 at 6:42 PM, Matt Aimonetti <mattai...@gmail.com> wrote:
Awesome, I should probably fork your repo, create a new branch in my repo and merge my stuff.

Cool. I was going to apply your changes by hand, but if you're feeling spry, you're more than welcome to do it. I refactored the BytecodeConverter#convert method to use explicitly defined methods instead of a case statement (you'll know what I mean when you see it). I know that invoking a method instead of using a case statement will be more expensive, but I thought it might make the class a little more readable to keep all of the conversion methods in one place (at the bottom of the class). Unfortunately this forced me to alias the conversion methods. Making for stuff like:

def integer_to_bytecode(integer) #:nodoc#
DataTypeCodes::INTEGER + integer_to_hexadecimal(integer, 4)
end
alias bignum_to_bytecode integer_to_bytecode
alias fixnum_to_bytecode integer_to_bytecode

I'm interested to get your opinion on the refactoring. Is it worth it? Is it easier to understand this way?
 

I'll check the merb example too!

Btw, I heard that your plugin was used by NYTimes ;)

Are you serious!? Where did you hear that?
Reply all
Reply to author
Forward
0 new messages