Better HN
topnewbestaskshowjobs
Log inSign up

difflens

73 karma · joined Feb 27, 2022 (4y ago) · 54 submissions

https://github.com/marketplace/difflens

Working on improving diff tools for developers!

Submissions

comment 4y ago · link · parent

> However, we can create serious bottlenecks when it comes to moving memory back and forth between the CPU and GPU. We’d have to learn what kinds of models would take advantage of this, we have little experience with GPUs as a team—but we may be able to utilize lots of existing ND-array implementations used for training neural nets.

Indeed, moving memory back and forth from CPUs to GPUs has an overhead. There are ways to mitigate this though! I vaguely remember that one of the patterns in reducing this movement was to keep the data in the GPU as much as possible. I haven't kept up with the latest tech in GPUs off late. When I first played around with CUDA, ArrayFire (arrayfire.com) (no affiliation) was a promising library, and might be a good fit for your GPU prototypes?

comment 4y ago · link · parent

> What case law, if any, did you rely on in Microsoft & GitHub's public claim, stated by GitHub's (then) CEO, that: “(1) training ML systems on public data is fair use, (2) the output belongs to the operator, just like with a compiler”? In the interest of transparency and respect to the FOSS community, please also provide the community with your full legal analysis on why you believe that these statements are true.

> If it is, as you claim, permissible to train the model (and allow users to generate code based on that model) on any code whatsoever and not be bound by any licensing terms, why did you choose to only train Copilot's model on FOSS? For example, why are your Microsoft Windows and Office codebases not in your training set?

I'm not sure I buy this argument. In the first point, the authors state that Copilot was trained on public data. In the very next point, they slightly tweak it by saying training was done on "any" code which loses the distinction between public and private code. Obviously Windows and Office are not public code.

I also interpreted "public data" to mean they trained on codebases that explicitly specified, say, MIT licenses or other permissible licenses. That seems like fair use to me. Those licenses don't explicitly restrict training AI models on their codebases do they? It's ironic if these licenses started banning AI training now though. That would effectively mean Copilot would be sole trained AI model.

I'm happy to be proven wrong though. In general I have a distrust of Copilot. I fear it would make individuals worse programmers in the end at the cost of productivity

comment 4y ago · link · parent

Across the different teams and orgs I have worked at, there's always been 1 constant during code reviews: Each comment provided an explanation of why some change was being debated. Every engineer knew the review is not a judgement of their coding prowess. Rather each discussion was purely on the merits of that line of code. Sure, there can be disagreements, but it was never judgemental. Usually folks are amenable when there is good justification to the feedback in my experience. It goes both ways too: I personally don't care if some of my nits are not fixed.

Btw, since I think it is relevant to this discussion, we're working on making code reviews deeper than text based diffs. Check out (DiffLens)[https://github.com/marketplace/difflens] if you're code base is primarily TS, JS and/or CSS to get language aware diffs on your GitHub pull requests. We've found that it makes understanding code changes much easier

comment 4y ago · link · parent

Congratulations on the launch. I find reviewing code on GitHub to be a pain too, so we came up with DiffLens (https://github.com/marketplace/difflens). DiffLens is only concerned with showing better diffs though, and doesn't handle comments on GitHub at all. Maybe there's room here for us to combine our approaches :) Our email is support@difflens.com if you want to get in touch.

comment 4y ago · link · parent

Hi! Your comment about managing ad spend on facebook caught my eye. I've worked on AdTech before, especially reducing acquisition cost by using the Conversions API from Facebook. Just wondering if you've already tried that? If not, and you want someone to set it up for you, feel free to email me at support at difflens.com. I have some time and am willing to help out :)

comment 4y ago · link · parent

We're hoping we'll be part of future threads like this one with DiffLens (https://github.com/marketplace/difflens) for language aware diffs on GitHub :) The next step for DiffLens is potentially a VSCode extension to make it easier for developers to use

comment 4y ago · link · parent

Ah yea we had the same thought a while back so, yes, that's in the works :) The biggest drawback here is that there are rate limits to the GitHub API. It should work for just trying out some diffs though. Thanks for the feedback!

comment 4y ago · link · parent

Great post. I'm in the early days of trying to get DiffLens (https://github.com/marketplace/difflens) off the ground and saw myself nodding along to so many points! Having a boring backend service that pays is a gold mine.

comment 4y ago · link · parent

Done. Thanks for the feedback about the screenshots. That makes sense! I'll update the text to include the demo :) Let me know if you have thoughts on the app itself!

40.

DiffLens: Language Aware Diffs on GitHub Pull Requests

10 points · by difflens · 4y ago · 4 comments

comment 4y ago · link · parent

Hi HN! We were frustrated with text diffs on GitHub PRs, so we made DiffLens (https://github.com/marketplace/difflens) to produce language aware diffs on PRs. DiffLens constructs an Abstract Syntax Tree for each file, and uses that semantic information to intelligently diff changes. Checkout the demo on our website (https://www.difflens.com). If you review code, especially TypeScript, JavaScript or CSS, give DiffLens a try, it's free!

We're looking for feedback from developers. If you share our frustrations with reviewing code changes, we'd love to talk to you. Most developers already have a favourite diff tool installed locally but there exists very little for reviewing code changes online, so we worked on DiffLens slowly over a number of years. We use it to review our own code changes, and we love it. We'd really appreciate thoughts and insights about the idea and its execution from developers and will answer any questions that come up. Thanks for reading!

42.

Ask HN: Language Aware Diffs on GitHub Pull Requests(github.com ↗)

1 points · by difflens · 4y ago · 1 comment

comment 4y ago · link · parent

DiffLens developers here! (https://github.com/marketplace/difflens) We current use ACE for our editors, but we've always been interested in checking out CodeMirror too. When we initially started work on DiffLens, CodeMirror 6.0 wasn't "ready" yet, so we chose ACE. Congrats on the release! CodeMirror is so full of features.

comment 4y ago · link · parent

FWIW, here's a repo of ANTLR grammars: https://github.com/antlr/grammars-v4

Many of them are incomplete, but it gives a good idea of how the grammar looks for ANTLR.

I used the ANTLR grammar for parsing CSS in DiffLens (https://github.com/marketplace/difflens). DiffLens uses the typescript compiler itself to parse TS and JS.

I've also used Roslyn to parse C# (and F#). I wonder if the ruby compiler itself exposes a parser.

comment 4y ago · link · parent

I'm most familiar with specifying grammar for the ANTLR tool. Just out of curiosity, is the antlr grammar a parsing expression grammar? Does anyone know?

Separately, I'm curious about how a parser generated out of ANTLR/yacc etc compares to this hand written one? If you've done some benchmarking, it'd be great to see numbers!

comment 4y ago · link · parent

I wouldn't consider this cheating, I would rather call this preparation. Is looking at question banks before an exam considered cheating? I think this is in the same vein. Interviewers are people too, everyone knows there is a finite, albeit large, pool of questions to ask. If I ever see a candidate that has prepared to the point that he/she can code up the answer to the majority of leetcode style questions, I'd hire them without hesitation.

comment 4y ago · link · parent

Perhaps I don't understand their use case fully, but it seems to me that every schema can be defined as a child protobuf message, and each child can then be added to a oneof field of a parent protobuf message. This way, you get the strict/optional type checks that are required, and the efficiency and ecosystem around protobufs.

comment 4y ago · link · parent

Just plugging difflens here: https://github.com/marketplace/difflens

If you work primarily with frontend technologies and want a syntax aware diff on GitHub PRs, difflens might be right up your alley! Standalone Mac and Windows apps are coming out soon.

comment 4y ago · link · parent

Can I just say that I appreciate the transparency about your numbers here! As a bootstrapped SAAS builder here, this gives me perspective

comment 4y ago · link · parent

If you have a few minutes, can you list a few of these problems? Just curious here!

comment 4y ago · link · parent

Difflens (https://github.com/marketplace/difflens) is a step in this direction. It produces syntax aware diffs for TS/JS and CSS at the moment.

comment 4y ago · link · parent

I have! I've always found GitHub's default diff to be annoying to track changes. I needed a way to align the left and right editors right next to each other so I could get context. So I wrote an app and published it on the GitHub marketplace: https://github.com/marketplace/difflens. I use it everyday and have other (regular) users too. It's free to try

53.

Show HN: An improvement to reviewing code changes(github.com ↗)

2 points · by difflens · 4y ago · discuss

54.

Show HN: Language aware diff on GitHub PRs(github.com ↗)

8 points · by difflens · 4y ago · discuss

12