Live data from Hacker News

Sourcegraph Server 2.4: free, powerful search for private code

about.sourcegraph.com

31–40 of 89 posts

Re: Sourcegraph Server 2.4: free, powerful search for private code

#31
post #29

Why should we use this instead of the github search (for our private repos) ?

GitHub search is pretty useless if you want to rely on it to find all uses of a given word, say during a refactorization https://stackoverflow.com/questions/43891605/search-partial-... So, you end up having to clone all repos locally and grep for the word. Just pointing out that limitation of search in GitHub, not saying that this other tool is actually reliable to do this kind of things (I haven't used it before)

Sourcegraph CEO here.

To compare GitHub to Sourcegraph search, here is that same query on Sourcegraph.com (which is Sourcegraph Server running for all open-source code on GitHub):

https://sourcegraph.com/search?q=repo:Kurento/+DISABLE_LIBRA...

It works as expected (and as the SO poster wanted)! It shows desired results that GitHub search does not.

Regexps are also supported...give it a try!

Re: Sourcegraph Server 2.4: free, powerful search for private code

#32
post #30
post #11

Earlier quoted context omitted.

I mean honestly if you are happy with github search you should stay where you are. Personally, I find it to be absolutely horrendous. It’s so much faster to clone the repo and search it locally.

> Personally, I find it to be absolutely horrendous. Why is that so?

These are the reasons of which I am conscious:

1. There doesn't appear to be any relevancy sorting. It appears only the exact term is returned. If it’s not exact, I am not sure how to control whether or not it looks for an exact match and/or what strategy it uses to fuzzy match. Does it tokenize? Use some kind of levenstein distance algorithm?

2. The query results are hugely wasteful in terms of screen space. This means searching for a minorly common term in a large codebase is prohibitively time consuming compared to cloning + ripgrep or whatever.

3. There's no way to search file names + file content. It took me 7 years after github's creation to realize you could search for filenames if you press 't' on the repository.

4. No regex or globbing support, to my knowledge.

This is before listing all the tooling (like sourcegraph) I would hope would be built into a source code repository to assist browsing but are strangely missing--every IDE and editor out there is much faster at casually browsing code because navigation is so much cheaper and frictionless.

I mean overall it's not broken, it's just way less useful for searching a tree of code files than find/xargs/grep is, let alone ack/thesilversearcher/ripgrep. If the capabilities I'm describing are there, they're well-hidden. Github just isn't a good place to browse code.

Re: Sourcegraph Server 2.4: free, powerful search for private code

#33
post #31
post #29

Earlier quoted context omitted.

GitHub search is pretty useless if you want to rely on it to find all uses of a given word, say during a refactorization https://stackoverflow.com/questions/43891605/search-partial-... So, you end up having to clone all repos locally and grep for the word. Just pointing out that limitation of search in GitHub, not saying that this other tool is actually reliable to do this kind of things (I haven't used it before)

Sourcegraph CEO here. To compare GitHub to Sourcegraph search, here is that same query on Sourcegraph.com (which is Sourcegraph Server running for all open-source code on GitHub): https://sourcegraph.com/search?q=repo:Kurento/+DISABLE_LIBRA... It works as expected (and as the SO poster wanted)! It shows desired results that GitHub search does not. Regexps are also supported...give it a try!

I'm the poster at SO :) Very cool! I'll definitely give it a try

Re: Sourcegraph Server 2.4: free, powerful search for private code

#34
post #31
post #29

Earlier quoted context omitted.

GitHub search is pretty useless if you want to rely on it to find all uses of a given word, say during a refactorization https://stackoverflow.com/questions/43891605/search-partial-... So, you end up having to clone all repos locally and grep for the word. Just pointing out that limitation of search in GitHub, not saying that this other tool is actually reliable to do this kind of things (I haven't used it before)

Sourcegraph CEO here. To compare GitHub to Sourcegraph search, here is that same query on Sourcegraph.com (which is Sourcegraph Server running for all open-source code on GitHub): https://sourcegraph.com/search?q=repo:Kurento/+DISABLE_LIBRA... It works as expected (and as the SO poster wanted)! It shows desired results that GitHub search does not. Regexps are also supported...give it a try!

can you only search a single repo at a time ?

does it parse the code and store the AST, or is it just plain text ?

Re: Sourcegraph Server 2.4: free, powerful search for private code

#35
post #32
post #30

Earlier quoted context omitted.

> Personally, I find it to be absolutely horrendous. Why is that so?

These are the reasons of which I am conscious: 1. There doesn't appear to be any relevancy sorting. It appears only the exact term is returned. If it’s not exact, I am not sure how to control whether or not it looks for an exact match and/or what strategy it uses to fuzzy match. Does it tokenize? Use some kind of levenstein distance algorithm? 2. The query results are hugely wasteful in terms of screen space. This me…

1. I never really noticed that because I mainly use Sourcegraph's code-intelligence on open source projects and as a result search is something that I have to rarely rely on.

2. You can stylize any page using something like stylebot or a homebrew browser extension.

3. Although not something that I do often, I find the filename search on google (for OSS projects) quite accurate and then the chrome extension allows you to open that file on sourcegraph.com or inject code intelligence within the github page as well.

4. Github sort of supports regex like search, you can learn more @ https://help.github.com/articles/searching-code/

Re: Sourcegraph Server 2.4: free, powerful search for private code

#36
post #34
post #31

Earlier quoted context omitted.

Sourcegraph CEO here. To compare GitHub to Sourcegraph search, here is that same query on Sourcegraph.com (which is Sourcegraph Server running for all open-source code on GitHub): https://sourcegraph.com/search?q=repo:Kurento/+DISABLE_LIBRA... It works as expected (and as the SO poster wanted)! It shows desired results that GitHub search does not. Regexps are also supported...give it a try!

can you only search a single repo at a time ? does it parse the code and store the AST, or is it just plain text ?

It searches multiple repositories at a time. That query above searches all repositories in the given organization.

It does have code intelligence (parsing, semantic references and go-to-def, etc.) but that search is just a text search.

Re: Sourcegraph Server 2.4: free, powerful search for private code

#38
post #35
post #32

Earlier quoted context omitted.

These are the reasons of which I am conscious: 1. There doesn't appear to be any relevancy sorting. It appears only the exact term is returned. If it’s not exact, I am not sure how to control whether or not it looks for an exact match and/or what strategy it uses to fuzzy match. Does it tokenize? Use some kind of levenstein distance algorithm? 2. The query results are hugely wasteful in terms of screen space. This me…

1. I never really noticed that because I mainly use Sourcegraph's code-intelligence on open source projects and as a result search is something that I have to rarely rely on. 2. You can stylize any page using something like stylebot or a homebrew browser extension. 3. Although not something that I do often, I find the filename search on google (for OSS projects) quite accurate and then the chrome extension allows you…

2) isn’t about style, it’s about the fact that the results are paginated. You end up needing to search the damn search results, which is super slow when you’re paginated and it could have been a screen scan if you could fill the screen with results and scroll rapidly through the rest.

this is just honest feedback, not a value judgement.

Re: Sourcegraph Server 2.4: free, powerful search for private code

#39
post #35
post #32

Earlier quoted context omitted.

These are the reasons of which I am conscious: 1. There doesn't appear to be any relevancy sorting. It appears only the exact term is returned. If it’s not exact, I am not sure how to control whether or not it looks for an exact match and/or what strategy it uses to fuzzy match. Does it tokenize? Use some kind of levenstein distance algorithm? 2. The query results are hugely wasteful in terms of screen space. This me…

1. I never really noticed that because I mainly use Sourcegraph's code-intelligence on open source projects and as a result search is something that I have to rarely rely on. 2. You can stylize any page using something like stylebot or a homebrew browser extension. 3. Although not something that I do often, I find the filename search on google (for OSS projects) quite accurate and then the chrome extension allows you…

I don’t think the person you replied to is complaining about Sourcegraph. He is talking about how he dislikes GitHub code search, and it seems that he likes Sourcegraph.

Re: Sourcegraph Server 2.4: free, powerful search for private code

#40
post #3

Sourcegraph CEO here. Thanks for this post. We packed a lot of stuff into 2.4: faster, more powerful code search, Google Alerts-style search monitoring, diff searches, and more. It’s now free on a single server for any number of users and repositories. Happy to answer questions here.

Can this be run without docker, somehow? It's nigh-unusable on OS X with it.
Post reply on HN