![]() |
FRC code search: a great project for someone to start
I personally don't have the time for this -- but I think it would be awesome if someone else did it. :)
It would be really cool if someone could create a simple search engine for FRC code. Think like 'grepcode', but obviously with less functionality -- really, you only need basic full-text search this to be interesting. There are a variety of pieces/challenges I can think of at the moment:
Anyone up for the challenge? |
Re: FRC code search: a great project for someone to start
This sounds like a great project!
|
Re: FRC code search: a great project for someone to start
Here's a basic first pass at it in node.js with mongodb: https://github.com/erikuhlmann/grepfrc
Unfortunately I haven't had the patience to let it finish indexing all the code repos and I'm not sure how big that causes the database to become. |
Re: FRC code search: a great project for someone to start
Since most people use git to manage robot code, there may be an easier way to go about this.
1) Allow people to submit their code. Take the appropriate deets (team #, year, primary lang) if applicable (remember, non-teams can have FRC code too ;) ). 2) Store this on a database, along with a link to the git repo 3) Index it by downloading the latest commit (--depth=1) of this repo somewhere known. Keep a watch on all repos, updating if needed maybe once per day. (You could do a deeper depth but HDD use would skyrocket if you plan on scaling at all) 4) Just pass in your query as a git grep. If anyone is willing to do this project and wants some extra information about the implementation of the above, let me know. GLHF |
Re: FRC code search: a great project for someone to start
More serious suggestion would be to enable teams to link to GitHub projects for specific robots on TBA. That should provide 80% functionality for 20% of the effort and I'm pretty sure it would work the same way the existing social media extensions work for TBA.
|
Re: FRC code search: a great project for someone to start
Quote:
|
Re: FRC code search: a great project for someone to start
Quote:
|
Re: FRC code search: a great project for someone to start
Quote:
Btw, when I tried searching for usages of WPILib classes with my mongo/node implementation, I found more than a few top results being the source for that WPILib class, since it seems many teams like to keep entire copies of WPILib in their repos. I wonder if there's a way to filter those out. |
Re: FRC code search: a great project for someone to start
Quote:
|
Re: FRC code search: a great project for someone to start
Quote:
However, it would be useful to have that information on TBA too. |
Re: FRC code search: a great project for someone to start
Quote:
If you wanted to be super fancy, you could split by subroutine, and hash those (excluding whitespace). |
Re: FRC code search: a great project for someone to start
Quote:
Git grep also has the advantage that you can call it with `git rev-list --all` to search for occurrences of a string over all commits, ever. Likewise, you can grep subdirectories, discounting any directories that resemble that of the wpilib source. |
Re: FRC code search: a great project for someone to start
Quote:
|
| All times are GMT -5. The time now is 01:15 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi