Ringobot log - RingoJS IRC channel: #ringojs on irc.freenode.net
2010-08-12:
[0:47] <oravecz> I'm using ringo's ability to load modules from inside a jar file. The RhinoEngine class is caching all of the js files loaded from the jar file, but none of the js files loaded from the local filesystem.[1:05] <oravecz> Figured it out. I had to copy WebappResource to create a PortletResource. When I did so, I didn't override the "equals" function. The containsKey() function in ConcurrentHashMap locates objects using hashcode, but then calls equals() on the key. This was failing, so the map was never recognizing the key as being present in the map.
[9:44] <emilis_info> I have to check if a text (4k-128k) matches a big number of queries (>1k patterns grouped into logical constructs) fast (<1s). Anyone know a good tool or library for this?
[10:14] <hannesw> emilis_info sounds like a tough problem
[10:14] <hannesw> what do you mean by "grouped into logical constructs"?
[10:14] <emilis_info> (word1 OR word2) AND (word 3 OR word4)
[10:15] <emilis_info> it's not so hard to solve, but I want to see first if I should solve myself or use some lib
[10:15] <emilis_info> not necessarily a Ringo or even Java lib
[10:15] <hannesw> can you compile that to a regular expression?
[10:15] <emilis_info> hmm
[10:15] <hannesw> what's your approach?
[10:16] <emilis_info> didn't think of compiling to regexp
[10:16] <emilis_info> my approach is to compile queries into some syntax tree and run them on an array of words or a string (whichever is faster)
[10:17] <emilis_info> Due to the domain of my problem I can avoid regex and use simple string comparison
[10:18] <hannesw> ok
[10:19] <emilis_info> Kind of [AND, [OR, word1, word2], [OR, word3, word4]] :)
