Live data from Hacker News

Show HN: A fast, hopefully accurate, fuzzy matching library written in Go

github.com

11–20 of 32 posts

Re: Show HN: A fast, hopefully accurate, fuzzy matching library written in Go

#11

Made a PR to switch to runes for iteration. Runes are canonical in Go for unicode codepoints and also have no memory allocation, so they're wicked fast! More importantly they make the code compatible with unicode names. You can also save on a ton of allocation if you reuse unleaked position slices on each match. It may also be nice to have a maxMatches argument that lets users set a limit, which would save on unneces…

/xpost from the PR :)

Wow! mind = blown. Please let me digest this code. I will merge later today. I'm probably going to come back and ask a few questions. I wouldn't want to pass up the opportunity to learn from you.

Thank you very much!

Re: Show HN: A fast, hopefully accurate, fuzzy matching library written in Go

#14

Made a PR to switch to runes for iteration. Runes are canonical in Go for unicode codepoints and also have no memory allocation, so they're wicked fast! More importantly they make the code compatible with unicode names. You can also save on a ton of allocation if you reuse unleaked position slices on each match. It may also be nice to have a maxMatches argument that lets users set a limit, which would save on unneces…

/xpost from the PR :) Wow! mind = blown. Please let me digest this code. I will merge later today. I'm probably going to come back and ask a few questions. I wouldn't want to pass up the opportunity to learn from you. Thank you very much!

Thanks for the cool project!

On a side note, working on this made me realize that case-insensitive comparison in Go is pretty inefficient, made a CL to improve it: https://go-review.googlesource.com/c/go/+/110018

Re: Show HN: A fast, hopefully accurate, fuzzy matching library written in Go

#15
post #3

Hopefully accurate? You should probably write some tests to ascertain that.

That sounds to me like a great starting point for others to contribute code. :P Can't we all just be happy that someone decided to write a fun project and made it freely available for others to learn from?

People are supposed to be gentle in Show HN postings, but often they’re a bit mean.
Post reply on HN