For people interested in searching code using an open source solution, you might be interested in Zoekt too, github.com/google/zoekt.
There is a demo site where you can search 30G of source code (including the Linux kernel, Android and Chrome) supporting regular expressions, and file name search:
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.
What benefits does it have over git grep, esp. if I'm using a monorepo? What new patterns/possibilities does it enable? Is it maybe speed somehow? (I assume it could then be more "live search/exploration"/rapid exploration than git grep - but OTOH wouldn't it require some slow reindexing after each change?)
Just tried this out on some of our code bases. It appears to fail to generate snippets/highlights for all files that contain non-Unicode text, e.g. "Müller" in ISO-8859-1. Known issue?
Many queries times out for me although I'm running it on a pretty beefy AWS c5 instance with SSDs. Queries such as "type:diff" doesn't seem to work at all on my code bases. It also does not appear to cache any data from previous runs of "git log", so attempting to do the suggested reload doesn't really workaroudn the issue. Are you working on improving the performance?
unrelated question to the server but related to Sourcegraph: Why did you guys switch away from the VS code style editor on the web to an uneditable one? I loved using it.
Wow, that's a pretty awful UI. The default search form screams "advanced search" from the late 90ies. The compare example looks pretty dated too. I think Kibana and Sourcegraph are on the right track with a single input field that accepts field:value type searches. They're great once you've learned them.
Yes, Sourcegraph supports GitLab repositories! Check out https://about.sourcegraph.com/docs/server/config/repositorie... and the section right below for auth. You'll need to add and authenticate them one-by-one in the config. Soon we'll be add direct GitLab integration like we have for GitHub and GitHub Enterprise, which will sync all (or selected) repositories using the GitLab API.
The source code is not public for this version. I think that source-available but non-open-source licenses are an idea ahead of their time when applied to user-facing software like Sourcegraph. I hope that changes, and we'd love to make Sourcegraph source-available again, but it actually introduced (rather than eliminated) questions in the process of companies adopting Sourcegraph. I'll probably blog about this soon because it's something I care about a lot.
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)
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....
I note with some distaste that it includes an Oracle-esque prohibition on benchmarking.
> 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.
hanwenn|8 years ago
There is a demo site where you can search 30G of source code (including the Linux kernel, Android and Chrome) supporting regular expressions, and file name search:
https://cs.bazel.build/?q=%20
For example, https://cs.bazel.build/search?q=+r%3Atorvalds+craz%5Byi%5D&n... looks for craz[iy] across the Linux kernel.
sytse|8 years ago
BTW I know you're in Munich now but I wanted to say hi from your hometown Utrecht.
sqs|8 years ago
It’s now free on a single server for any number of users and repositories.
Happy to answer questions here.
akavel|8 years ago
sslalready|8 years ago
Many queries times out for me although I'm running it on a pretty beefy AWS c5 instance with SSDs. Queries such as "type:diff" doesn't seem to work at all on my code bases. It also does not appear to cache any data from previous runs of "git log", so attempting to do the suggested reload doesn't really workaroudn the issue. Are you working on improving the performance?
unknown|8 years ago
[deleted]
oxplot|8 years ago
I expected email notifications but all I managed to do was to add the saved queries on the home page. Am I missing something?
demarq|8 years ago
pathartl|8 years ago
pvg|8 years ago
rswail|8 years ago
Particularly for things like postgres configuration etc.
ohstopitu|8 years ago
on an unrelated note: did you work on AWS SQS?
jitl|8 years ago
egeozcan|8 years ago
senatorobama|8 years ago
dvirsky|8 years ago
mikevm|8 years ago
sslalready|8 years ago
attfarhan|8 years ago
Let us know if you have any other questions or feedback!
dman|8 years ago
exikyut|8 years ago
- https://github.com/sourcegraph/sourcegraph-classic
- https://github.com/sourcegraph/sourcegraph-archive-private-2...
- https://github.com/sourcegraph/infrastructure
- https://github.com/sourcegraph/sourcegraph
- https://github.com/sourcegraph/definfo-prototype
- https://github.com/sourcegraph/sourcegraph-desktop
- https://github.com/sourcegraph/sourcegraph-emacs-beta
- https://github.com/sourcegraph/splunk-promethus-alerts
- https://github.com/sourcegraph/ZARCHIVED-corporate
- https://github.com/sourcegraph/css-langserver
Listed as they showed up in the GIF. That was fun!
the_common_man|8 years ago
Also, I cannot find the code for sourcegraph on github. It used to be available under a fair source license. Anyone have a link to the code?
sqs|8 years ago
The source code is not public for this version. I think that source-available but non-open-source licenses are an idea ahead of their time when applied to user-facing software like Sourcegraph. I hope that changes, and we'd love to make Sourcegraph source-available again, but it actually introduced (rather than eliminated) questions in the process of companies adopting Sourcegraph. I'll probably blog about this soon because it's something I care about a lot.
ausjke|8 years ago
wut42|8 years ago
tomalpha|8 years ago
orsenthil|8 years ago
drb91|8 years ago
Personally, I find it to be absolutely horrendous. It’s so much faster to clone the repo and search it locally.
j1elo|8 years ago
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)
sqs|8 years ago
- 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....
karmakaze|8 years ago
unknown|8 years ago
[deleted]
hetoh|8 years ago
teraflop|8 years ago
I note with some distaste that it includes an Oracle-esque prohibition on benchmarking.
> 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.
benatkin|8 years ago
alkonaut|8 years ago
garjana|8 years ago
[deleted]