The Case gem (some information here: http://blog.objectmentor.com/articles/2009/03/16/tighter-rub... ) for pattern matching is also great, especially if you're dealing with large S-exp structures for compilation. After discovering a few of these libraries, Ruby has become my de facto compiler language.
Re:A Recap of Cool Libraries for Ruby
by JangoSteve on Monday December 28, 2009 @05:52PM
(#1019564)
I've seen Treetop before but had completely forgotten about it, thanks! I might have to include that in the next edition ;-) Polygot and the Case gem are new to me.
Re:A Recap of Cool Libraries for Ruby
by JangoSteve on Monday December 28, 2009 @05:54PM
(#1019567)
From what I understand (and I may be wrong since I haven't actually used it), it would simplify the process of creating something like the ubiquitus search box Google uses in Google Maps. Where it sends the string you type through a tree-type process parsing it into structured meaningful data. Of course, that's just the first example of a use-case I thought of when I saw it. I'm sure it's a lot more powerful than that.
Re:A Recap of Cool Libraries for Ruby
by daeken on Monday December 28, 2009 @05:43PM
(#1019557)
It's a very simple parser generator. You can quickly create a grammar to parse whatever code you want to compile (or otherwise transform) and then manipulate it from Ruby. It simplifies compiler creation considerably.
Re:A Recap of Cool Libraries for Ruby
by Tagith on Monday December 28, 2009 @06:59PM
(#1019707)
As the site itself says, there are a few other libraries similar to nanoc, notably http://webby.rubyforge.org/ . However, nanoc looks to be a little easier to use, I'll have to check it out. Anyone else have any experience with static site generation?
The Case gem (some information here: http://blog.objectmentor.com/articles/2009/03/16/tighter-rub... ) for pattern matching is also great, especially if you're dealing with large S-exp structures for compilation. After discovering a few of these libraries, Ruby has become my de facto compiler language.
A Ruby shell that allows you to do things like,