
Sourcegraph Server 2.4: free, powerful search for private code - azmenak
https://about.sourcegraph.com/blog/introducing-sourcegraph-server-2-4/
======
hanwenn
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:

[https://cs.bazel.build/?q=%20](https://cs.bazel.build/?q=%20)

For example,
[https://cs.bazel.build/search?q=+r%3Atorvalds+craz%5Byi%5D&n...](https://cs.bazel.build/search?q=+r%3Atorvalds+craz%5Byi%5D&num=50)
looks for craz[iy] across the Linux kernel.

~~~
sytse
Zoekt looks very interesting. We'll consider adding it to GitLab in
[https://gitlab.com/gitlab-org/gitlab-
ce/issues/41925](https://gitlab.com/gitlab-org/gitlab-ce/issues/41925) and
[https://gitlab.com/gitlab-org/gitlab-
ce/issues/41450](https://gitlab.com/gitlab-org/gitlab-ce/issues/41450) Please
comment in those issues if you have thoughts about if we can use it.

BTW I know you're in Munich now but I wanted to say hi from your hometown
Utrecht.

~~~
sytse
Thanks for commenting in [https://gitlab.com/gitlab-org/gitlab-
ce/issues/41450#note_54...](https://gitlab.com/gitlab-org/gitlab-
ce/issues/41450#note_54181315)

------
sqs
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.

~~~
senatorobama
Do you accept REMOTE jobs?

~~~
sqs
Yes, we have some fantastic international and non-SF-based teammates at
Sourcegraph, and we'd love to have more.

~~~
senatorobama
non US?

~~~
virgilp
Yes. I was wrong in my previous answer - after sqs's response, I looked them
up on linkedin, they have at least a german developer in Berlin.

(FWIW - and I'm only saying this in case you were in a similar situation: I
applied to them for a job not because I was looking for one, but because I
accidentally saw it on HN and the match between my skills and their apparent
need was simply "too good to be true" territory. I wasn't necessarily
expecting an offer, but I expected to talk to someone - was curious to learn
more about what they're doing. However, I got rejected straight away - so I
just assumed that they said "REMOTE" for the heck of it... I know it sounds
arrogant, but I have a hell of a hard time believing their other applications
outclass me so obviously that it was not even worth talking to me, so I
assumed it must be something else)

------
mikevm
How does this differ from OpenGrok
[https://oracle.github.io/opengrok/](https://oracle.github.io/opengrok/) ?

~~~
dman
Opengrok supports C/C++.

~~~
attfarhan
Code search on Sourcegraph Server is actually language agnostic.

Here's an example of a C++ search query:
[https://sourcegraph.com/search?q=repo:google/leveldb+FilterB...](https://sourcegraph.com/search?q=repo:google/leveldb+FilterBlockBuilder)

~~~
dman
Opengrok implements hyperlinking for C/C++ code which is the primary
productivity multiplier since it allows you to easily jump around callgraphs.
That functionality is sorely missing here (unless i am missing this feature
somehow).

------
exikyut
I couldn't help but notice some interesting items get cloned in the onboarding
GIF (which was 16MB, yikes)

\- [https://github.com/sourcegraph/sourcegraph-
classic](https://github.com/sourcegraph/sourcegraph-classic)

\- [https://github.com/sourcegraph/sourcegraph-archive-
private-2...](https://github.com/sourcegraph/sourcegraph-archive-
private-20160601)

\-
[https://github.com/sourcegraph/infrastructure](https://github.com/sourcegraph/infrastructure)

\-
[https://github.com/sourcegraph/sourcegraph](https://github.com/sourcegraph/sourcegraph)

\- [https://github.com/sourcegraph/definfo-
prototype](https://github.com/sourcegraph/definfo-prototype)

\- [https://github.com/sourcegraph/sourcegraph-
desktop](https://github.com/sourcegraph/sourcegraph-desktop)

\- [https://github.com/sourcegraph/sourcegraph-emacs-
beta](https://github.com/sourcegraph/sourcegraph-emacs-beta)

\- [https://github.com/sourcegraph/splunk-promethus-
alerts](https://github.com/sourcegraph/splunk-promethus-alerts)

\- [https://github.com/sourcegraph/ZARCHIVED-
corporate](https://github.com/sourcegraph/ZARCHIVED-corporate)

\- [https://github.com/sourcegraph/css-
langserver](https://github.com/sourcegraph/css-langserver)

Listed as they showed up in the GIF. That was fun!

------
the_common_man
Very cool, will give it a try later for our gitlab repos. Is gitlab supported?

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
Yes, Sourcegraph supports GitLab repositories! Check out
[https://about.sourcegraph.com/docs/server/config/repositorie...](https://about.sourcegraph.com/docs/server/config/repositories#sync-
repositories-from-any-code-host) 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.

~~~
the_common_man
> I'll probably blog about this soon because it's something I care about a
> lot.

Yes, please! I have seen your videos and read a lot about your thoughts on
this subject.

Another question, if you don't mind: does sourcegraph have a forum or
irc/slack? A quick search for sourcegraph+slack ends up finding many hits..
for your name, lol.

~~~
sqs
Cool! We don't have a public Slack/IRC yet, but it seems like something we
might do in the future. In the meantime, we're all pretty responsive on
Twitter and on email.

And yeah, my last name being Slack does create some confusing moments
sometimes. :)

------
ausjke
does it support gitea? gitea has become my sole self-hosted git repository
portal, lightweight comparing to gitlab and get the job done super well.

~~~
wut42
it does:
[https://about.sourcegraph.com/docs/server/config/repositorie...](https://about.sourcegraph.com/docs/server/config/repositories#sync-
repositories-from-any-code-host) :)

------
tomalpha
Do you have any plans to add more languages to code intelligence?
(Particularly C and C++)

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

~~~
sqs
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...](https://about.sourcegraph.com/blog/introducing-sourcegraph-
server-2-4#diff-search))

\- 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...](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43835.pdf)
and
[https://docs.google.com/document/d/1LQxLk4E3lrb3fIsVKlANu_pU...](https://docs.google.com/document/d/1LQxLk4E3lrb3fIsVKlANu_pUjnILteoWMMNiJQmqNVU/edit#heading=h.xxziwxixfqq3)
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...](https://chrome.google.com/webstore/detail/sourcegraph-for-
github/dgjhfomjieaadpoljlnidmbgkdffpack?hl=en).

~~~
teraflop
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/](https://about.sourcegraph.com/terms/)

~~~
sqs
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.

------
hetoh
What is the License for the free install ? MIT/BSD/Apache ?

~~~
teraflop
Here are the terms:
[https://about.sourcegraph.com/terms/](https://about.sourcegraph.com/terms/)

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.

~~~
sqs
Sourcegraph CEO here. That shouldn’t be in there, I agree—we meant to remove
that section. It will be removed in a couple of minutes. Please try it, use
it, and post lots of evaluations about our product. :)

------
alkonaut
Which version control systems are supported?

