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/
dimanche 14 novembre 2010
mercredi 27 octobre 2010
mardi 26 octobre 2010
twitter on n900
Is there a twitter client that will integrate in the conversations of a Nokia n900 phone and actually work?
lundi 18 octobre 2010
How to properly tag python source files
Situation : emacs + ctags + python source
Problem : import statements are tagged just like definitions, which means that find-tag never jumps to the location I am interested in.
Solution : add "--python-kinds=-i" to the ~/.ctags file. On Windows that would be c:\users\[username]\.ctags
https://bugs.launchpad.net/ubuntu/+source/exuberant-ctags/+bug/618979
Voilà.
Problem : import statements are tagged just like definitions, which means that find-tag never jumps to the location I am interested in.
Solution : add "--python-kinds=-i" to the ~/.ctags file. On Windows that would be c:\users\[username]\.ctags
https://bugs.launchpad.net/ubuntu/+source/exuberant-ctags/+bug/618979
Voilà.
mercredi 9 décembre 2009
unique 0.19 is out
Unique 0.19 is finally out! The new feature is in the browser. You can now select any text in the right pane and search for code similar to your selection. It adds to unique some kind of search engine... maybe I should add a search bar to make it more obvious.
Anyways... enjoy!
Anyways... enjoy!
Libellés :
unique
jeudi 5 novembre 2009
Considering unity
Does anybody here have experience with the unity game engine?
We could use it for one of our projects but we don't know how stable and extensible it is. If you can share horror or love stories, they would be most welcome.
Thanks!
We could use it for one of our projects but we don't know how stable and extensible it is. If you can share horror or love stories, they would be most welcome.
Thanks!
lundi 19 octobre 2009
swig bindings of VTK : a call to arms
I don't know how common our situation is... We use VTK through it's Python interface but we also need to develop some algorithms in C++ and make them accessible to the Python runtime. The problem is that, as far as I know, the VTK bindings are not inter-operable with swig. The result is that we can allocate VTK data structures from Python but we can't give them to our C++ algorithm.
There are multiple solutions to this problem. The one we chose is to use swig to wrap our algorithm *and* VTK, in two different but inter-operable modules.
We will start by wrapping and testing the parts of VTK that we need right now, but if other people out there have a similar need perhaps we could collaborate and come up with better bindings.
So... is there anyone interested in participating in this not-yet-born open source project?
There are multiple solutions to this problem. The one we chose is to use swig to wrap our algorithm *and* VTK, in two different but inter-operable modules.
We will start by wrapping and testing the parts of VTK that we need right now, but if other people out there have a similar need perhaps we could collaborate and come up with better bindings.
So... is there anyone interested in participating in this not-yet-born open source project?
S'abonner à :
Messages (Atom)