Hacker News new | ask | show | jobs
by sqs 3084 days ago
Our users prefer Sourcegraph over GitHub for code search for multiple reasons:

- Regular expression searches

- Exact searches (no ignoring punctuation, for example)

- Searches on any commit or branch, not just recently indexed master

- Diff searches (see https://about.sourcegraph.com/blog/introducing-sourcegraph-s...)

- Overall faster, more powerful searches and filtering capabilities

- Code intelligence (go-to-definition, find-references, hovers, etc.)

Not everyone needs these things. But users who do need them say that they save a lot of time and make them more productive.

At Google, for example, they have a similarly advanced internal code search system that developers love (see https://static.googleusercontent.com/media/research.google.c... and https://docs.google.com/document/d/1LQxLk4E3lrb3fIsVKlANu_pU... for research/numbers).

If your needs are met by GitHub's search, then I would still suggest using the Sourcegraph Chrome extension (also available for Firefox), which adds code intelligence to code you view on GitHub: https://chrome.google.com/webstore/detail/sourcegraph-for-gi....

3 comments

Did you get permission from SourceGraph to post this comment to HN?

> You may not release the results of any performance or functional evaluation of any of the Software to any third party without prior written approval of Sourcegraph for each such release.

-- https://about.sourcegraph.com/terms/

We just removed that clause (also replied to your other comment about it). Didn’t intend for it to be in there; I agree it’s silly. Thanks for pointing it out.
Google also has this:

https://source.bazel.build

That's not an open source product and not available otherwise, though it is backed by kythe.
If you want to have an open source index search, you can try out github.com/google/zoekt/ . See here for a demo site: https://cs.bazel.build/

For example: https://cs.bazel.build/search?q=r%3Atorvalds+meltdown&num=50 searches the Linux kernel for "meltdown"

Is code intelligence a paid upgrade for all languages?
Yes, code intelligence (go-to-definition, find references, hovers, etc.) on Sourcegraph Server is a paid upgrade for all languages.

But you can try/use it for free on open-source projects using our Chrome extension (to get it on code you view on GitHub) at https://chrome.google.com/webstore/detail/sourcegraph-for-gi... or on our public site directly at https://sourcegraph.com/github.com/gorilla/websocket/-/blob/... (for example).

Chrome extension is marvellous for anyone who hasn't used it. Particularly useful for looking up docs of calls to external packages in Python repos.
I don't really get the pricing on code intelligence. So if I have 50 users and want Javascript, Python, and PHP, that's $750/month, even if 25 users only ever use Python?
If you want 3 or more languages, then contact us (at https://about.sourcegraph.com/pricing) and we can give you a package discount. Overall, if pricing is a concern, I'd love to learn more. I'll email you.
I think it really boils down to a perception issue. I think more people would be happy paying a flat fee for a language package then deal with the angst of "wasted" money paying for languages that some users don't leverage. The package as it currently stands would "work" if I could assign languages to users and have that reflect back up to pricing, but that's cumbersome to manage from a customer perspective and sounds pretty painful to implement from the provider perspective.

It may be useful to consider a baseline two-language deal, as Javascript + one server side language covers a huge amount of use cases.

That said, you cover 2 out of 3 of the following scenarios pretty well with the existing model, I just happen to fall into the third, which is probably the smallest sector for you guys anyway:

1 - Small startups, probably standardized on one or two languages, 8-10 people 2 - Larger orgs (200+) where the cost is negligible compared to revenue. 3 - Medium-sized, microservice/squad based orgs, with heterogenous language support but focused within teams.