Live data from Hacker News

Show HN: Sourcetrail – Get productive on unfamiliar source code

sourcetrail.com

61–70 of 119 posts

Re: Show HN: Sourcetrail – Get productive on unfamiliar source code

#61
This looks like an exceptionally useful tool! Thanks for making and sharing it. The video is excellent.

It reminds me of a feature I've always wanted, which would be a code unravel-er. Basically I'd like to be able to select a line anywhere in a codebase, and have said codebase expand to show me the entire execution path as if it were in one single scope, with the ability to re-collapse sections back into loops and functions while reading.

I think it would help to better understand the codepaths that can start to get fuzzy when jumping between abstractions. It would be great - not only for understanding unfamiliar code - but also for double-checking logic across longer code paths.

At any rate - great idea, great implementation, and beautiful website.

Re: Show HN: Sourcetrail – Get productive on unfamiliar source code

#62
post #40

Earlier quoted context omitted.

Sourcetrail developer here: Pretty solid. We use clang libTooling.

Compile commands ? Please Yes?

There is also a tool called Bear which will generate compile commands from Make-based builds, in case you were wondering. I've used it with some success.

https://github.com/rizsotto/Bear

Re: Show HN: Sourcetrail – Get productive on unfamiliar source code

#63
post #57

Website feedback: Supported languages is the #1 most important piece of info about this software. It should be front and center and probably repeated a few times already on the landing page.

This may be a result of your feedback, but for me looking just now it it front and center: "Sourcetrail - A cross platform source explorer for C/C++ and Java"

Although physically front and center, the fact that that line is nearly the smallest thing on the page caused me to gloss over it entirely my first time through.

Re: Show HN: Sourcetrail – Get productive on unfamiliar source code

#65
post #60
post #46

Hm does anyone know of a web-based tool like this that uses Clang as a back end? I want to put open source code like the bash and Python interpreters in it and be able to navigate symbolically. And I want nice permalinks. EDIT: It looks like https://woboq.com/codebrowser.html is what I want. The code available but not under and open source license. https://github.com/woboq/woboq_codebrowser/ I will probably try this,…

We built Sourcegraph, which is a web-based code search and navigation tool. Our Python support is in beta, and you can try it out at https://sourcegraph.com/github.com/plotly/dash/-/blob/dash/d... . (And hit Alt+D/Opt+D to search by symbol.) Sourcegraph also supports a bunch of other languages: https://sourcegraph.com/help/languages . It gives you nice URLs (hit Alt+Y/Opt+Y to get the full commit ID in the URL to mak…

I just spent a few minutes clicking around but had a bit of trouble.

EDIT: nevermind, most of this is due to the fact that you have to keep "repo" in the search box, which I found confusing.

I quickly found the repo I wanted, but discovered that C/C++ isn't supported, so Woboq is more useful to me at the moment.

I tried to build something like this once myself, and made the mistake of going "wide" rather than "deep". That is, trying to support all languages. I think it does make sense to try to get the absolute best experience for one language. But yeah for now since C/C++ aren't supported, it's not useful for me.

------

I typed "cpython" in the search box on https://sourcegraph.com/ and got no results. (I also typed "python" and got no results, which seems pretty odd.)

I would have liked to browse this repo:

https://github.com/python/cpython

I guess you have to import repositories yourself? There seem to be sample repositories, but they are in Go, and I'm interested in C/C++ (the Python interpreter, not Python source code).

I'm looking for something that uses Clang as a back end for intelligent navigation of C/C++ projects.

Also, I would like to browse the bash source code, but as far as I know it isn't available on Github. Can SourceGraph import from an arbitrary git repo?

https://savannah.gnu.org/git/?group=bash

That said I'm glad somebody is working on this problem! I like your mission statement.

Re: Show HN: Sourcetrail – Get productive on unfamiliar source code

#66

Website feedback: Supported languages is the #1 most important piece of info about this software. It should be front and center and probably repeated a few times already on the landing page.

I'd suggest second most important piece of info is probably supported editors.

Re: Show HN: Sourcetrail – Get productive on unfamiliar source code

#67
post #64

Has anyone run a large codebase like chromium with this tool? Is the indexing looking at what's compiled like libclang or is it static like gtags?

I'd imagine it's going to violently shit itself. Chromium has pretty good online code search btw.

Re: Show HN: Sourcetrail – Get productive on unfamiliar source code

#70
post #65
post #60

Earlier quoted context omitted.

We built Sourcegraph, which is a web-based code search and navigation tool. Our Python support is in beta, and you can try it out at https://sourcegraph.com/github.com/plotly/dash/-/blob/dash/d... . (And hit Alt+D/Opt+D to search by symbol.) Sourcegraph also supports a bunch of other languages: https://sourcegraph.com/help/languages . It gives you nice URLs (hit Alt+Y/Opt+Y to get the full commit ID in the URL to mak…

I just spent a few minutes clicking around but had a bit of trouble. EDIT: nevermind, most of this is due to the fact that you have to keep "repo" in the search box, which I found confusing. I quickly found the repo I wanted, but discovered that C/C++ isn't supported, so Woboq is more useful to me at the moment. I tried to build something like this once myself, and made the mistake of going "wide" rather than "deep".…

Thanks for posting this. We'll think about how we can make that search UX clearer. And when we have C/C++ support, I hope you'll find it super useful.
Post reply on HN