News for hackers. Stuff that matters.
Re:Show HN: GitPlex – A new Git repo management server with ... by TeMPOraL on Wednesday November 23, 2016 @02:34AM (#13020845)
I don't care much about code review, but it's a close enough attractor to the space of code reading that it seems to be draining attention. So let me hijack this topic and post a request for product (I'd write it myself, but priorities... adult life sucks hard).

--

I dream of a tool that facilitates code reading and exploration. It has some similar features with code review tools, namely:

- integration with version control systems

- basic semantic search/navigation

- looks clean

- not meant to be for writing code

But my dream tool also has following features I haven't seen implemented in any code review tool (or anywhere):

- annotations - not just "comments", but the ability to tag lines, to strike them out, highlight, color, scribble on them, etc. - basically anything you'd do with a printout of a code

- easy way to review history of a single file (with annotations)

- ability to easily bookmark areas / pieces of code and use those bookmarks in comments / annotations

- ability for viewing structural diagrams of the codebase

- full blown semantic search - who calls, calls who, etc.

- project-structure-oriented, not repository-history/commit-oriented

Basically, I'd love a tool not for collaboration, but for individual work - a tool that would facilitate exploring and familiarizing yourself with big codebases, as well as empower one when the time comes to do bigger refactorings.

Would be doubly useful if I could use it on a tablet, so that I could get up from in front of my computer to go and think about the changes I'm about to make (right now, I end up actually printing code if I have to refactor something very messy).

Re:Show HN: GitPlex – A new Git repo management server with ... by sqs on Wednesday November 23, 2016 @05:11AM (#13021469)
Sourcegraph CEO here. We 100% agree, and that's why we built Sourcegraph. Check out our roadmap at https://sourcegraph.com/plan.

And try browsing code on Sourcegraph: https://sourcegraph.com/github.com/gorilla/websocket/-/blob/... (we support other languages as well). Right-click on "parseURL" and choose "Find All References". If you click on "HasPrefix" a few lines below, you'll see a cross-repo jump (and the right-click menu lets you see global/cross-repo references).

Sign up at https://sourcegraph.com to get it on your own GitHub repos.

Re:Show HN: GitPlex – A new Git repo management server with ... by TeMPOraL on Wednesday November 23, 2016 @05:20AM (#13021502)
Very interesting demo. So it has at least one feature I'm looking for :). Basically, I'd like something like that, but with annotations like in Acrobat Reader (but more), on a tablet, and off-line at least for my own codebase.

I found a small issue with "peek definition" window: http://imgur.com/TT2KmpR.

Re:Show HN: GitPlex – A new Git repo management server with ... by sqs on Wednesday November 23, 2016 @05:26AM (#13021527)
Shoot me an email at [email protected] if you want to get early access to some of the upcoming things (or sign up at https://sourcegraph.com/beta). I think you'll like what's coming. Thanks for the bug report. :)
Re:Show HN: GitPlex – A new Git repo management server with ... by emirozer on Wednesday November 23, 2016 @05:40AM (#13021579)
This is very impressive, well done!
Re:Show HN: GitPlex – A new Git repo management server with ... by sarnowski on Wednesday November 23, 2016 @02:55AM (#13020933)
Sounds like you described https://www.jetbrains.com/upsource/

(I am not affiliated with Jetbrains in any way)

Re:Show HN: GitPlex – A new Git repo management server with ... by theptip on Wednesday November 23, 2016 @11:38AM (#13023750)
I've seen a couple brief comments about Upsource in this thread. Can anyone give a deeper dive on their experiences? I tried it very briefly but didn't have time to configure integration with my IDE, just played in the web browser. I suspect that means I didn't try the best feature.

Pros/cons of this tool?

Re:Show HN: GitPlex – A new Git repo management server with ... by leonya2 on Wednesday November 23, 2016 @12:11PM (#13023983)
Upsource team member here. Since Upsource indexes your code just like any JetBrains IDE does, it gives you code navigation, inspections, etc. in the browser, which means its "best features" don't require using it as an IDE plugin.

Pros: I'm obviously biased so I won't go into those.

Cons: it's not a lightweight tool that's happy with 1 gig of memory. Configuring and waiting for code indexes takes a bit of time, especially if you're trying it out on large legacy codebases. It also won't manage a Git repository for you.

Re:Show HN: GitPlex – A new Git repo management server with ... by oneeyedpigeon on Wednesday November 23, 2016 @04:59AM (#13021426)
Right now, I would take a button to go to the previous revision of a file, showing the full file with the diff underneath. That way I could very easily 'browse' through the history of a file to find out things like when a particular change got introduced or just get a feel for its history. Why on earth don't github/bitbucket provide this? Surely it's a reasonable and common requirement? Or is there something inherent to git that makes it too awkward?
Re:Show HN: GitPlex – A new Git repo management server with ... by sdesol on Wednesday November 23, 2016 @06:13AM (#13021716)
My product for GitLab and GitHub does this. This is an example of browsing diffs one by one:

https://gitsense.com/rapid-browsing-1.mp4

And this is an example of bulk diffs browsing:

https://gitsense.com/rapid-browsing-2.mp4

You can find the source for the chrome extension at

http://github.com/gitsense/insight

And the Git indexing engine at

http://gitsense.com/download

Edit:

It may not be obvious, but for the second example, I'm clicking the right arrow to quickly iterate through the diffs.

Re:Show HN: GitPlex – A new Git repo management server with ... by oneeyedpigeon on Wednesday November 23, 2016 @06:23AM (#13021755)
Yes, that second video is pretty much exactly what I'm looking for. I've been considering implementing it myself as a general-purpose git tool (i.e. not github etc. dependant) - were there any major gotchas? Do you need to pre-cache commit or diff info. or is it efficient enough to do everything in real-time?
Re:Show HN: GitPlex – A new Git repo management server with ... by sdesol on Wednesday November 23, 2016 @06:33AM (#13021797)
The major gotchas is building the indexing engine. Once you have that in place, getting the commit information takes milliseconds. The only time consuming thing is extracting the from and to blobs from the repo. However, that is a one time hit, since you can cache the blobs.

For the diff, this is done in realtime with https://github.com/Microsoft/monaco-editor

Also my product isn't really dependent on GitLab or GitHub. It works in standalone mode as well.

Re:Show HN: GitPlex – A new Git repo management server with ... by robinshen on Wednesday November 23, 2016 @05:26AM (#13021531)
GitPlex can show history of any path (a file or directory) quickly via history button, and from there you can even refine the history (search for certain tags, commits made by certain people, etc) of the file, and once you get to the point, you can either view content of the file, or hit the compare button to compare with your previous browsed copy. An example here: http://gitplex.pmease.com/demo/android-framework-base/commit...
Re:Show HN: GitPlex – A new Git repo management server with ... by Livven on Wednesday November 23, 2016 @06:37AM (#13021817)
Some (if not most) GUI Git tools should do this, e.g. I personally use Git Extensions[1] which shows history and diff side-by-side.

For what it's worth, features like that (along with, say, line-by-line staging) are the reason why I usually use a GUI client and only drop down to the command line when necessary.

[1] https://github.com/gitextensions/gitextensions

Re:Show HN: GitPlex – A new Git repo management server with ... by pricechild on Wednesday November 23, 2016 @05:12AM (#13021477)
Are you looking for something akin to `git blame`? Github & Bitbucket both provide a gui for this.

Something even closer to what you're asking for... in github hit the 'history' button on a file (next to blame) and you'll get the commits which affected it. Hit the 7 character commit-id and you'll be taken to the diff of that change, jumped specifically to the file in question.

Re:Show HN: GitPlex – A new Git repo management server with ... by oneeyedpigeon on Wednesday November 23, 2016 @05:25AM (#13021521)
I never really use `git blame` - my primary git use case is as a single user.

The history button in github is close to what I'd like, but it's not quite as friendly as single next/previous buttons that just paginate the changes to a file. That makes cycling through the history very easy, whilst 'click commit id, back, remember which commit we just viewed, click following commit id, repeate' all sounds a bit painful.

Re:Show HN: GitPlex – A new Git repo management server with ... by taspeotis on Wednesday November 23, 2016 @03:22AM (#13021042)
I get the feeling that Microsoft has a lot of these things, but they're disparate.

e.g. code navigation [1], search [2] and CodeLens [3].

[1] https://referencesource.microsoft.com/#mscorlib/system/strin...

[2] https://www.visualstudio.com/en-us/docs/search/code/advanced...

[3] https://msdn.microsoft.com/en-us/library/dn269218.aspx

Re:Show HN: GitPlex – A new Git repo management server with ... by robinshen on Wednesday November 23, 2016 @03:10AM (#13020992)
I think GitPlex meets most of the requirement here if you are writing Java code (and more languages are being added). Unlike other tooks, it does not place any requirements on project build system (Maven, Gradle, etc) and can work on any project containing supported languages.

Checkout android code base for instance: http://gitplex.pmease.com/demo/android-framework-base/files?...

I actually created this tool to suffice my own needs when browsing history of QuickBuild source code.

Re:Show HN: GitPlex – A new Git repo management server with ... by dugmartin on Wednesday November 23, 2016 @07:43AM (#13022187)
I'm building something like that now but instead of annotations in the code it captures your browse through the codebase as a tree that you can then annotate, save and share. It is going to run both in the browser to explore code hosted on GitHub, BitBucket, GitLab, etc and locally as an Electron app.

Very vague landing page with signup here:

http://www.browsethesource.com/

Re:Show HN: GitPlex – A new Git repo management server with ... by Dangeranger on Wednesday November 23, 2016 @08:48AM (#13022584)
For quick browsing of a files commits I use Emacs with Magit and utilize the time travel feature of Git-Timemachine https://github.com/pidu/git-timemachine You don't get the annotations you want, but you could make a comment with a common starting word like NOTE: then remove them before you merge the refactorings.
Re:Show HN: GitPlex – A new Git repo management server with ... by hkailahi on Wednesday November 23, 2016 @10:36AM (#13023296)
Yes! This is this tool I've been dreaming of too! I would pay a lot of money for something like this.
Re:Show HN: GitPlex – A new Git repo management server with ... by qznc on Wednesday November 23, 2016 @03:40AM (#13021119)
> annotations - not just "comments"

What kind of annotations would not make sense as comments?

Re:Show HN: GitPlex – A new Git repo management server with ... by Juliate on Wednesday November 23, 2016 @03:47AM (#13021154)
Annotations as what you scribble in the margin of an article or on a page in a book.

Comments are inline with the code. Annotations are aside, and serve both as visual anchors and as "aside" notes.

Re:Show HN: GitPlex – A new Git repo management server with ... by robinshen on Wednesday November 23, 2016 @03:51AM (#13021169)
Re:Show HN: GitPlex – A new Git repo management server with ... by TeMPOraL on Wednesday November 23, 2016 @04:00AM (#13021201)
I'm thinking in terms of what I'd do if the code was printed out on paper.

http://imgur.com/KMCBMjA

Re:Show HN: GitPlex – A new Git repo management server with ... by oneeyedpigeon on Wednesday November 23, 2016 @04:56AM (#13021418)
The trouble with that is, how on earth do you get the annotations to apply across revisions? Or would you be OK with them only applying to a given revision and then ... what, disappearing? Or going into a 'floating bucket' of annotations for the entire file?
Re:Show HN: GitPlex – A new Git repo management server with ... by TeMPOraL on Wednesday November 23, 2016 @05:07AM (#13021458)
I'd be fine with them sticking to particular lines of code[0] and disappearing if those lines were changed. This is not something I'd like to commit into codebase, it's for exploration / preparing work.

--

[0] - "smart stick" can be implemented by remembering not just the line in file, but also the contents of that line and a (fuzzy) context.

Re:Show HN: GitPlex – A new Git repo management server with ... by oneeyedpigeon on Wednesday November 23, 2016 @05:27AM (#13021535)
Interesting. In these terms, it could probably just be a totally separate, general-purpose 'text file annotation' tool with git support (but not a requirement).
Re:Show HN: GitPlex – A new Git repo management server with ... by robinshen on Wednesday November 23, 2016 @06:39AM (#13021826)
Sticky comment is actually another form of git blame, and will be available in future versions of GitPlex.
Re:Show HN: GitPlex – A new Git repo management server with ... by leonya2 on Wednesday November 23, 2016 @06:31AM (#13021784)
Upsource has sticky comments that survive code changes well.
Re:Show HN: GitPlex – A new Git repo management server with ... by wingerlang on Wednesday November 23, 2016 @03:47AM (#13021152)
Discussions about the code perhaps.
Re:Show HN: GitPlex – A new Git repo management server with ... by seanpackham on Thursday November 24, 2016 @12:25PM (#13031445)
That is a great list of features! I will create feature requests for them in GitLab (I work at GitLab).

I'm curious what you think of the single file history in current systems, are they OK but just missing annotations?

Re:Show HN: GitPlex – A new Git repo management server with ... by _pmf_ on Wednesday November 23, 2016 @04:54AM (#13021400)
> Would be doubly useful if I could use it on a tablet

That's something that baffles me: the complete lack of a comfortable (or at least not painful) way to read and annotate source code on Android.

Re:Show HN: GitPlex – A new Git repo management server with ... by TeMPOraL on Wednesday November 23, 2016 @05:11AM (#13021466)
Indeed. The closest I came to what I need was a proof-of-concept I did - printing source code to PDF and using Adobe Reader's annotation tools. Wasn't exactly convenient without a good ability to switch between multiple source files, but could be made to work. I'd love to have such browsing/annotation tool I could take with me to a park, to browse code and think about it while on a walk, without continuous distractions of the office / Internet connection.
Re:Show HN: GitPlex – A new Git repo management server with ... by miguelrochefort on Wednesday November 23, 2016 @05:28AM (#13021537)
I recommend you watch this:

https://youtu.be/dSqLt8BgbRQ

Re:Show HN: GitPlex – A new Git repo management server with ... by robinshen on Wednesday November 23, 2016 @05:48AM (#13021595)
Thanks for the link, bookmarked it for studying, :)
Re:Show HN: GitPlex – A new Git repo management server with ... by pjmlp on Wednesday November 23, 2016 @04:59AM (#13021427)
You mean an IDE?
Re:Show HN: GitPlex – A new Git repo management server with ... by TeMPOraL on Wednesday November 23, 2016 @05:05AM (#13021452)
After a fashion. A reading/exploration-oriented lightweight IDE. No IDE that I know of support scribbling over code, for example. Also, for the mode of work I'm thinking about, having no ability to actually write code would be a feature.
Re:Show HN: GitPlex – A new Git repo management server with ... by 91bananas on Wednesday November 23, 2016 @08:49AM (#13022591)
Truly you've described this: https://www.jetbrains.com/upsource/