Live data from Hacker News

Show HN: Search code in GitHub repos using regular expressions

grep.app

11–20 of 165 posts

Re: Show HN: Search code in GitHub repos using regular expressions

#11
post #2

Impressive! Really fast, full featured code search across a huge corpus. 1. How did you build the index? Did you use a GitHub dump of some sort? How often do you refresh it? 2. Is it Elasticsearch or similar or a completely custom engine? 3. What kind of RAM/CPU are you using to power it? 4. Any plans to open source the code or commercialize the technology? I could absolutely imagine paying for a private code search…

Thanks! It's built on top of Solr. It fetches the repos from GitHub - it should pick up any updates to repos within a few days. It's running on a couple servers with 20 cores each, which is not really enough for the traffic it's getting right now.

Re: Show HN: Search code in GitHub repos using regular expressions

#14

Earlier quoted context omitted.

Can you elaborate how you found them?

I looked for strings that I am sure only appear in my code, and I found several copies of them, but not mine.

Can you provide detailed steps to reproduce? What strings did you search? Two examples of repos that appeared in the results? What is the link to your repo that did not appear in the results?

Details like this would help the OP to track down the exact cause of why it has indexed the forks but not the original repo.

Re: Show HN: Search code in GitHub repos using regular expressions

#17
Why regex still exists? It is unintuitive, requires mastering an obscure syntax, it is very hard to debug, and very difficult to explain to others how it works. It feels like we are trying to write intermediate code by ourselves, while we should have a human readable language that generates regex.

Re: Show HN: Search code in GitHub repos using regular expressions

#18

Why regex still exists? It is unintuitive, requires mastering an obscure syntax, it is very hard to debug, and very difficult to explain to others how it works. It feels like we are trying to write intermediate code by ourselves, while we should have a human readable language that generates regex.

Do it! You will find that it's very easy, but the result will either be extermely verbose or just like regex. Since most regexes (at least for me) are meant as one-time-use, the extra verboseness has no added benefit. If you have complex needs, you should probably be using something other that regex, anyways.

Re: Show HN: Search code in GitHub repos using regular expressions

#19
Typical HN comment. I could swear, if someone came here to share a breakthrough cure to HIV, some random nobody would still find a way to say something like "Hey, how come you haven't tested it against a population of female midgets suffering from cancer?".

Re: Show HN: Search code in GitHub repos using regular expressions

#20
Hey Dan, if you ever wanted to come on my podcast to talk about your tech stack (how your site is developed / deployed, lessons learned, etc.), I'd love to have you on.

That podcast is at: https://runninginproduction.com/, drop me a line at nick.janetakis@gmail.com if you're interested.

Post reply on HN