Live data from Hacker News

GitHub Code Search – Programmers' Goldmine

jakubdziworski.github.io

21–30 of 63 posts

Re: GitHub Code Search – Programmers' Goldmine

#22

If anyone from github is reading this, I would totally pay for a much better search. Like even $20-30/month. If you deduplicate results (it sucks when you are searching for something that's appears In a popular library) and like make it integrated with my ide, I think that it would spike my productivity by like thousand percent.

Have you checked out out https://sourcegraph.com/ ? It has awesome code search and navigation for github.

Re: GitHub Code Search – Programmers' Goldmine

#23
97 results is doable. And that's what you get for a scala search today. Which is maybe why the author picked it in the first place: there's a ton of other real-life scenarios as well, and for me more often than not the number of results ranges from a couple of hundred to half a million. The only sort of sane way to filter that for quality is specifying the number of forks but it's a bit of hit or miss sometimes. Now I know this is a hard problem to solve so Im not really blaming github but maybe they should try to come up with something. Oh and this also illustrates the 'goldmine' term is spot on: yes its gold but you have to dig really hard sometimes.

Re: GitHub Code Search – Programmers' Goldmine

#24
post #21

I've been using GitHub code search to let other Python programmers know about the % string formatter. I search for ".2f}%'.format(100" and then send a push request to simplify the code. See https://github.com/EdwardBetts?tab=overview&from=2016-04-19

And what is the simplification? I can't see it in your git repo

Re: GitHub Code Search – Programmers' Goldmine

#25

If anyone from github is reading this, I would totally pay for a much better search. Like even $20-30/month. If you deduplicate results (it sucks when you are searching for something that's appears In a popular library) and like make it integrated with my ide, I think that it would spike my productivity by like thousand percent.

Have you checked out out https://sourcegraph.com/ ? It has awesome code search and navigation for github.

I am. But they don't support he languages I care about these days. Which is mostly swift I guess.

Re: GitHub Code Search – Programmers' Goldmine

#26
post #21

I've been using GitHub code search to let other Python programmers know about the % string formatter. I search for ".2f}%'.format(100" and then send a push request to simplify the code. See https://github.com/EdwardBetts?tab=overview&from=2016-04-19

And what is the simplification? I can't see it in your git repo

[deleted]

Re: GitHub Code Search – Programmers' Goldmine

#27
post #21

I've been using GitHub code search to let other Python programmers know about the % string formatter. I search for ".2f}%'.format(100" and then send a push request to simplify the code. See https://github.com/EdwardBetts?tab=overview&from=2016-04-19

And what is the simplification? I can't see it in your git repo

"Percentage: {:.2f}%".format(foobar * 100) vs "Percentage: {:.2%}".format(foobar)

Re: GitHub Code Search – Programmers' Goldmine

#28
post #13

as great as it is to be able to search source code in github is, it is equally (if not more) frustrating. I think it works fine for simple searches mentioned in the post, but anything even slightly more advanced doesn't work very well. I also wish there was a way to search in branches other than master

> I also wish there was a way to search in branches other than master This is actually an insanely hard problem to solve, given current technology. Right now, you can either try to index a little bit of everything, which is what GitHub and others (GitLab, Bitbucket, etc.) are doing. Or you can take the approach that I'm taking, which is make it possible for the user to search any branch they want, but limit the numbe…

Interesting Approach, we did similar in RhodeCode. You can pick search refs like Branches, Bookmarks, Tags for each repo individually. With this you can create few forks and set different search setup for them.

It's a workaround to do search in different branches on 1 repo, but works fine

Re: GitHub Code Search – Programmers' Goldmine

#29
post #13

Earlier quoted context omitted.

> I also wish there was a way to search in branches other than master This is actually an insanely hard problem to solve, given current technology. Right now, you can either try to index a little bit of everything, which is what GitHub and others (GitLab, Bitbucket, etc.) are doing. Or you can take the approach that I'm taking, which is make it possible for the user to search any branch they want, but limit the numbe…

Interesting Approach, we did similar in RhodeCode. You can pick search refs like Branches, Bookmarks, Tags for each repo individually. With this you can create few forks and set different search setup for them. It's a workaround to do search in different branches on 1 repo, but works fine

Yeah, my indexers work on an ondemand bases as well. You can see how the ondemand indexing technology works with Bitbucket Server, in the following video:

https://www.youtube.com/watch?v=-VQVmh0UOnU

What may not be obvious from the video is, indexing additional branches is extremely efficient and fast, since most branches usually share 90 - 99% of the same content.

My indexing technology, also introduces a "group" concept, which makes it possible for you to share indices across similar repos, which makes indexing hundreds of forked repos, quite efficient and fast.

Re: GitHub Code Search – Programmers' Goldmine

#30
Shameless plug: there’s also Debian Code Search at https://codesearch.debian.net/. It’s based on the same idea as Google Code Search (using regular expressions sped up by a trigram index) and indexes everything that is available in Debian sid.

If your search on GitHub isn’t fruitful, consider giving Debian Code Search a spin.

Disclaimer: I built it. Happy to answer questions if you have any.

Post reply on HN