LA Ruby

3rd Meetup

Last night was the third meetup. Alf Mikula showed off Keyword Prospector, a really excellent library which builds precomputed Aho-Corasick state machines to find arbitrary keywords within arbitrary text. Alf showed us a detailed graph explaining the algorithm and demonstrated its usefulness first by having it outperform a regex search by orders of magnitude, and then having it easily and quickly handle searches simply too big for a naive regex implementation (and which caused a RegexpError: regex too big I’d never even seen before). Keyword Prospector’s written in pure Ruby. Alf also cautioned us to use the Queue objects inside the standard library’s Threads rather than using Arrays as queues, for performance reasons.

Not to be outdone, Dan Yoder presented his Waves framework, which approaches the same problem space as Rails routes from a functional programming perspective, and sees HTTP verbs as functions as well. Dan also showed us Functor, which allows you to do Haskell-style pattern-matching function definitions in Ruby. Then we played ping-pong, hacked, chatted, and ate pizza. All in all a pretty good meetup.