dimanche 14 novembre 2010

Unique 0.25 : the froodiest version yet

When I added the 'search for selected pattern' feature to unique's browser, I realized that hidden in the core library was a full search engine. So I thought that it would be fun to add a google-like interface to this engine.

Unlike traditional search engines, this one works on pattern matching. Giving it a few random keywords won't work. So... how could one use it? By feeding it sample code. Give it a few lines of code, a sentence or an algorithm and it will search for something similar.

Here is a scenario where it could shine. Suppose that littered through the code base you have used the same idiom/pattern/copy-pasted code. One day you find a bug in the pattern. Searching for all the instances of the pattern could be difficult with a regex, for many reasons. Variable or function names could be different from module to module, some instances could have changed slightly over time by different maintainers, etc. Unique should be pretty good at finding all those occurrences. Simply feed it one instance of the idiom and launch the search.

What's next? Not quite sure. Emacs integration is on the list. Better performance that would allow the indexing of very large code bases : that's also on the radar. If you think unique could be useful to you, tell me how - I can help.

Get your copy here : https://sourceforge.net/projects/unique/

8 commentaires:

Anonyme a dit...

Good evening

Great share, thanks for your time

Anonyme a dit...

tres interessant, merci

Anonyme a dit...

Merci d'avoir un blog interessant

Anonyme a dit...


This is a inquiry for the webmaster/admin here at foobrac.blogspot.com.

Can I use some of the information from your post right above if I provide a backlink back to this site?


MAD a dit...

Hi Alex. I think you are a robot. There is nothing in the above post that requires my permission to use. Let's have a Turing Test some day. I'll provide the beer and/or a 120V outlet - whatever you prefer.

Anonyme a dit...

Hey - I am really happy to find this. cool job!

Anonyme a dit...

Hey - I am definitely happy to find this. cool job!

Anonyme a dit...

Hey - I am definitely happy to discover this. cool job!