<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Try this:<div><a href="https://github.com/okeuday/trie">https://github.com/okeuday/trie</a></div><div><br></div><div>See bench:</div><div><a href="http://okeuday.livejournal.com/16941.html">http://okeuday.livejournal.com/16941.html</a></div><div><br></div><div><div apple-content-edited="true"><div>Regards,</div><div>Zabrane</div><div><br></div><div><br></div></div><div><div>On Feb 6, 2012, at 9:37 PM, Jon Watte wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Why does it have to be NIF? On the surface, that looks like a data<br>structure that might actually work reasonably well as an Erlang native<br>library. (Modification generates log-N garbage)<br><br>Sincerely,<br><br>jw<br><br><br>--<br>Americans might object: there is no way we would sacrifice our living<br>standards for the benefit of people in the rest of the world.<br>Nevertheless, whether we get there willingly or not, we shall soon<br>have lower consumption rates, because our present rates are<br>unsustainable.<br><br><br><br>On Mon, Feb 6, 2012 at 8:43 AM, ori brost <<a href="mailto:oribrost@gmail.com">oribrost@gmail.com</a>> wrote:<br><blockquote type="cite">I'm looking for a trie NIF library that can support strings as trie<br></blockquote><blockquote type="cite">tokens, and basic pattern matching with a '.' like wildcard (i.e. If /<br></blockquote><blockquote type="cite">is the trie separator and the tree contains 3 entries: /usr/bin,<br></blockquote><blockquote type="cite">/usr/include/X12/XTrans, /usr/include/X11/Xtrans, then I can do<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">trie:get_all(["usr", "include", '.', "XTrans"])<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">and it will return<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[["usr","include","X11","Xtrans"],<br></blockquote><blockquote type="cite"> ["usr","include","X12","Xtrans"]]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It would also be nice to have a<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">trie:get_single(["usr","include", '.', "XTrans"])<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">that returns only one of the matching entries<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Does anyone know of such a NIF library? Or something similar enough<br></blockquote><blockquote type="cite">that I can modify it for these needs?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Regards, OriB.<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">erlang-questions mailing list<br></blockquote><blockquote type="cite"><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br></blockquote><blockquote type="cite"><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></div></blockquote></div><br><div apple-content-edited="true">
<div><br></div></div></div></body></html>