Live data from Hacker News

Show HN: Search code in GitHub repos using regular expressions

grep.app

121–130 of 165 posts

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

#121
post #57

Next post from danfox - “how to get 3 job offers in 3 hours”. Already has been publicly contacted by: - GitHub CTO - SerpApi CEO - SourceGraph CEO Search is hot right now!

Actually, It would more be like: "How I failed at 3 interviews, despite being directly contacted by execs."

New game show idea:

CTOs from software companies interview at other software companies.

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

#122
post #62

Earlier quoted context omitted.

Sure you built app on multi 20 core machines with functionality to search hundreds of millions of lines of code almost instantaneously, but are you someone I'd drink a beer with?

For some of those companies it would be "drink a La Croix with"

[deleted]

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

#123
thank you so much for doing this! i hope it continues to open more doors of opportunities to you!

primo, this is a crazy snappy proof that shows that github search can be done. next, the UI is amazing. and finally, all my queries worked!

i am now going to remove "github search sucks" from my to-be-published rants because this post demonstrates that 1. people care 2. github was already working on it.

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

#124
post #93
post #83

Earlier quoted context omitted.

It indexes the default branch of each repo.

Cool. Keep up :) definitely gonna share with my co-workers. Can't wait for filename filters which would make this the perfect solution

Thanks :) If you type into the path filter box, that'll match against the full path for each file, so you can use that to filter on a filename.

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

#125

Earlier quoted context omitted.

iirc, Github uses (used?) my old project ( https://github.com/intel/hyperscan ) at Intel. It's probably faster than the alternatives, although if you want to support all types of regex you'll need to use Hyperscan as a prefilter for a richer regex engine like PCRE. This project looks like it pulls literal factors out of the regex that I type in, maybe to an index a la that Russ Cox blog post a while back about Code S…

pattern is, btw: (teakettle\w|abcd) Either pattern in alternation works fine, but even a simple alternation of the two goes back to the behavior that you might expect to get from awful patterns like \d..\d..\w...\s...\d (i.e. reporting only a partial set of matches).

Did you mean either patter in "isolation"?

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

#126

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.

Because it's really powerful, and some people actually like it (I'm one of them).

I can understand that a complex pattern might look scary if you're unfamiliar, but if you work with it long enough, you can put patterns together with relative ease.

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

#127
post #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.

Cool!I love it.

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

#130
post #109

Earlier quoted context omitted.

last time I tried sourcegraph doesn't cover the language I use, so it's useless to me.

For regex?? how's language relevant?

Sorry, maybe I have confused SourceGraph with https://searchcode.com, but last time I tried, it supports only most widely used languages such as Java, Python and so on, but not the language I use (Delphi/Object Pascal)
Post reply on HN