
Sourcegraph: Search code, jump around source, see real usage examples - joe2010xtmf
https://sourcegraph.com
======
coolsunglasses
Hope you have Haskell soon, I've wanted to do some analysis of occurrence of
certain patterns.

~~~
sqs
None of us at Sourcegraph write Haskell, but if you know of anybody who would
be interested in helping us add it (on a contract basis), please let me know!
sqs at sourcegraph.com

~~~
theoretick
Any plans on Clojure support?

~~~
sqs
Same deal...we would _love_ to add it but none of us use Clojure. Anyone who's
interested in helping us add it (on a contract basis) should email me at sqs
at sourcegraph.com. Or follow the issue at
[https://github.com/sourcegraph/sourcegraph.com/issues/154](https://github.com/sourcegraph/sourcegraph.com/issues/154).

~~~
voltagex_
I'd love to see C# support. I suspect you could achieve this via Rosyln [0],
but I don't think I'd be able to accomplish this myself. I'd be happy to chat
about it, though.

[0]: [http://msdn.microsoft.com/en-
us/vstudio/roslyn.aspx](http://msdn.microsoft.com/en-us/vstudio/roslyn.aspx)

------
SanderMak
Love the idea! I tried it by searching for Node's require. It did point me to
the right source [1], but the usage examples are all minified and unreadable.
Might want to check for a maximum size on the usage examples that are
presented.

[1]
[https://sourcegraph.com/github.com/joyent/node/.CommonJSPack...](https://sourcegraph.com/github.com/joyent/node/.CommonJSPackage/node/.def/commonjs/lib/module.js/-/prototype/require)

~~~
sqs
Ahh, thanks for pointing that out. I just filed that at
[https://github.com/sourcegraph/sourcegraph.com/issues/151](https://github.com/sourcegraph/sourcegraph.com/issues/151)
and we will fix it soon.

~~~
sqs
I fixed this issue, but it'll take a while to propagate as Sourcegraph
rebuilds all libraries that contain minified JS files. Thanks for reporting
it.

------
wasd
One of the co-founders of Sourcegraph came to UC Berkeley and spoke at
entrepreneurship event. He was very engaged and gave lots of real practical
advice.

I've tried Sourcegraph and think it solves a real pain point but I have had
problems integrating it into my workflow. I'm not sure when I should be using
it. I've been meaning to use it to read more open source code code but it
seems like they recently disabled support for Ruby.

~~~
timr
We've got all of the documentation (and source code) for all versions of Ruby,
and all versions of all Ruby gems over at Omniref:
[http://www.omniref.com](http://www.omniref.com)

Some examples:

[https://www.omniref.com/ruby/2.1.2/symbols/Enumerable/sort_b...](https://www.omniref.com/ruby/2.1.2/symbols/Enumerable/sort_by)

[https://www.omniref.com/ruby/gems/sass/3.3.8](https://www.omniref.com/ruby/gems/sass/3.3.8)

[https://www.omniref.com/ruby/2.1.2/symbols/MiniTest](https://www.omniref.com/ruby/2.1.2/symbols/MiniTest)

[https://www.omniref.com/ruby/gems/activerecord/4.1.1/symbols...](https://www.omniref.com/ruby/gems/activerecord/4.1.1/symbols/ActiveRecord::Base)

You can even build custom search engines for your project by uploading your
project's Gemfile.

~~~
sqs
Yeah, Omniref is really cool. We're going to release our Ruby analyzer soon as
a standalone open-source tool. If you are interested in using it to get
semantically annotated code on Omniref, let me know (we'd prioritize Ruby over
some of the other language analyzers we are also going to release).

------
SchizoDuckie
I've just been able to add my repository but there's nothing happening even
though it says it's indexed the code completely. No annotation happening
anywhere. Does it support angular.js's development style?

[https://sourcegraph.com/github.com/SchizoDuckie/DuckieTV](https://sourcegraph.com/github.com/SchizoDuckie/DuckieTV)

~~~
sqs
No, we don't support AngularJS yet. Sourcegraph really only supports node.js
(anything with package.json). It's on our todo list, though!

~~~
SchizoDuckie
Then you should really update the frontpage to say 'node.js' instead of
'javascript' imo, it would have saved me the time of importing my repostitory.

Other than that: cool tool! :-)

~~~
sqs
Good call. I just pushed that change. It should be up in a few minutes. I hope
you find Sourcegraph useful once we support AngularJS! :)

~~~
SchizoDuckie
As a matter of fact, I hope you get bought by github because this would be the
most brilliant addition to it since the invention of github itself. Turning it
into a code intelligence tool makes it 100^99 times more powerful.

------
ChuckMcM
This is very cool, it is very close to a product I would spend money for. The
product I would spend money for is an e-reader for code. I would copy a 'blob'
to my tablet (ipad preferred by Android is ok too) which has all of the code
in my example (could be small like an application, could be large like the
entire 3.13 kernel source) There would be an ever present search bar or hot-
gesture that would let me search for function, definition, callers, or
callees. Think cscope on steroids for the language of my choice. Browsing
around the source code would bring up source in syntax colored glory (either
dark motif or light). It would use high resolution fonts on my retina display
for crisp clear text. The typography would be optimized for reading code. It
would remember my walks through the code, it would be able to recreate them on
request, it would have a swipe-able interface to get to a notes pad "behind"
the code where I could at notes about what does what. I would have the ability
to fold entire functions, clauses, or loops, and unfold them as needed. It
could bring up doxygen comments, when I gave a long press on a function name,
it could jump between call graph and code mode. In short I could read code of
arbitrary complexity while I rode the train home from work, or sat on the
tarmac at JFK. I would pay $100 for an App that could do that for me.

~~~
ChuckMcM
As I write this the parent comment is sitting at 0 points (downvoted by 1).
Given that everyone here is looking for the "next big thing" and given that I
expressed a potential market for a product which doesn't exist, I would think
people might say "impractical" or "too limited a market" But I don't get the
person with enough karma to down vote, doing so without a comment. I would
love to know what they were thinking.

------
coldnebo
This is cool, but I'm not sure what's going on here. Is this full static (i.e.
AST) analysis of these languages or simple full-text search, or some middle-
ground constraint on full-text search driven by common usage patterns?

For example, "d3.timer" doesn't show meaningful results?

~~~
sqs
This is full static analysis, with AST and type inference.

However, type inference on JavaScript is quite hard, and as you've seen, our
analyzer fails on many complex libraries like d3. We have an open issue about
fixing d3 support at
[https://github.com/sourcegraph/sourcegraph.com/issues/13](https://github.com/sourcegraph/sourcegraph.com/issues/13),
which you can +1 if you want to stay updated on. And we're releasing the
analysis toolkit we use as open source soon so it's not bottlenecked on us.

------
boyter
What I love about sourcegraph is that between it and github search/searchcode
you can find pretty much every bit of code you need without resorting to
Google. Big improvement to my workflow personally as I always have preferred
to find an example first and the documentation second.

~~~
beliu
Searchcode is awesome and super snappy. It's great to see more tools being
created to make open source code more accessible and useful.

------
chronial
I must be stupid, but can someone please tell me how I navigate to the list of
examples? When I click on search result, I get to the relevant source code. I
just can’t seem to find a way to get to the examples.

------
mode80
I'm 2 weeks into building the thing I just watched you demo. Cue sinking
feeling.

It looks awesome. Bravo.

~~~
sqs
Sorry! I would love to get in touch with you but I don't see your email in
your profile. Can you send me an email at sqs at sourcegraph.com?

(I'm the co-creator of Sourcegraph.)

------
diwu1989
I've been using it to study good open source code.

------
ctb_mg
Is it possible to filter search results by language?

------
mc100
Sourcegraph looks beautiful. Good job guys!

------
biobot
Congratulation Beyang and Quinn. Looks really slick!

