fuzzy

Languages and libraries

go library

SHOW HN2018

fuzzy

A fast, hopefully accurate, fuzzy matching library written in Go

github.com

#fuzzy matching#go library#fuzzy search#string matching

186points
30comments
#197of 2,155 in 2018
Top 10%of 2018 by points

How HN took it

CuriousMostly questions and neutral comments

4 positive, 12 neutral or asking, 0 mixed, 2 critical, out of 18 comments about the project. Thread score +0.14.

Idea: 2 for, 0 againstDocs: 0 for, 2 againstPerformance: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful fuzzy matching library and fun project

    From 3 comments
    • I approve of any and all fuzzy matchers. The world would be a better place if every search field was a fuzzy search field. Thanks for the shout out!
      forrestthewoods on HN
    • cool stuff!!
      anirudh83 on HN
    • 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…
      bacongobbler on HN
  • Performance suggestions welcomed, runes and allocation tips

    From 2 comments
    • 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…
      ericpauley on HN
    • If you want to make it really fast you could steal some ideas from: https://wincent.com/blog/optimization (tales of many years of optimizing a fuzzy search implementation).
      wincent on HN

Objections

  • No tests make it hard to trust in real projects

    From 2 comments
    • Hopefully accurate? You should probably write some tests to ascertain that.
      bitwize on HN
    • No tests makes it impossible to add it to real world projects IMO
      yani on HN
  • Match accuracy is subjective and hard to test

    From 1 comment
    • I've found it hard to write tests (though there are a few here - https://github.com/sahilm/fuzzy/blob/master/fuzzy_test.go ). Match quality is often subjective. Tweaking one…
      sahilmuthoo on HN

Requests

  • Rank results by git commit frequency

    From 1 comment
    • Nice! How do you rank the file names when returning the search results? It'd be cool if you could rank them by factoring in git commit frequency for files, because more…
      jokh on HN
  • Integrate into VSCode workspace symbol search

    From 1 comment
    • Now if only this could be baked into VSCode for workspace-global symbol search. I would then finally ditch WebStorm.
      igammarays on HN
  • Use standard distance metrics like Levenshtein or Jaro-Winkler

    From 2 comments
    • Have you tried out one of the standard 'distance' metrics like Hamming distance or Levenstein distance? This would at least give you an objective measure of success. Whether…
      glangdale on HN
    • I made a similar tool and believe that if the author is interested in this route he may prefer the Jaro-Winkler algorithm as it is more highly tailored to names. Likely he rolled…
      purple-again on HN

Questions

  • How does it compare with fzf?

    From 1 comment
    • How does this compare with fzf (https://github.com/junegunn/fzf)?
      _-david-_ on HN
  • How does it compare with fzy?

    From 1 comment
    • The logical follow-up question would be; how does it compare to fzy? :) https://github.com/jhawthorn/fzy
      Rafert on HN
  • Why do Go projects advertise they are written in Go?

    From 1 comment
    • Why do projects written in Go always advertise they are written in Go?
      tdurden on HN

Alternatives named

  • fzf

    From 2 comments
    • How does this compare with fzf (https://github.com/junegunn/fzf)?
      _-david-_ on HN
    • fzf is a tool with a much larger feature set. fuzzy is just a humble library that you can add to your code.
      sahilmuthoo on HN
  • fzy

    From 1 comment
    • The logical follow-up question would be; how does it compare to fzy? :) https://github.com/jhawthorn/fzy
      Rafert on HN
  • Command-T

    From 2 comments
    • If you want to make it really fast you could steal some ideas from: https://wincent.com/blog/optimization (tales of many years of optimizing a fuzzy search implementation).
      wincent on HN
    • I still use and recommend Command-T :-)
      derwiki on HN
  • fuzzyfinder (Python)

    From 1 comment
    • I did a similar library for Python (~3yrs ago). blog: http://blog.amjith.com/fuzzyfinder-in-10-lines-of-python library: https://github.com/amjith/fuzzyfinder I haven't done any…
      amjith on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/16950040)