Live data from Hacker News

Diff Algorithms

flo.znkr.io

51–60 of 64 posts

Re: Diff Algorithms

#51
post #42

See also Nugroho (2019): How Different Are Different diff Algorithms in Git? https://arxiv.org/abs/1902.02467

I actually used the examples from that paper for testing. The results that they are showing in the paper are different from mine and I think that git changed as well. I believe the conclusions from that paper no longer hold.

Re: Diff Algorithms

#52
I recently learned that diff algorithms (beyond just code comparison) are used to detect database schema and configuration drift. I thought that was a pretty intriguing application!

Re: Diff Algorithms

#53
post #43

Not to critique on the article, but as a general suggestion, it would be great if people don't use emojis as a scale. Unless it shows a specific character like number emojis, they are sometimes read differently by people from different language backgrounds. So what the author might be trying to say might lead to misunderstandings.

But ai loves them, so we will be stuck with them for a few years at least. > they are sometimes read differently by people from different language backgrounds I'm really curious of some examples you have actually how an image is influenced by language ?

The term to search up is Linguistic Relativity

There's decent empirical evidence to show that peoples' language influences their perception of colour:

Language and Color Perception: Evidence From Mongolian and Chinese Speakers https://pmc.ncbi.nlm.nih.gov/articles/PMC6426779/

Tom Scott, All The Colours, Including Grue: How Languages See Colours Differently https://www.youtube.com/watch?v=2TtnD4jmCDQ

Similar effects for perception of time.

It's very plausible that emojis are perceived differently too, although I'm not aware of any studies on it at the moment.

Naturally it's quite hard to talk about, because people don't necessarily have the words to describe the differences between what they experience, or are even aware of a difference in the first place.

Re: Diff Algorithms

#54
post #37
post #2

Mildly related: my favorite tool for viewing .git diffs diff2html - a CLI that with one command opens the diff in your browser https://diff2html.xyz/ -- https://github.com/rtfpessoa/diff2html

Mine is meld. (One my phone now, so cannot compare which one seems superior)

Meld is good but sadly it doesn’t have an official build on Mac, which I use.

Re: Diff Algorithms

#55
For source code diffs where a tree sitter grammar exists, difftastic is the best choice by far. It's better than you think it is.

https://github.com/Wilfred/difftastic

No really, if you haven't tried it, it's better than you think it is.

https://www.scannedinavian.com/tools-built-on-tree-sitters-c...

(I know, already mentioned later in comments by leeoniya, still deserves a top level comment!)

Re: Diff Algorithms

#56
post #14

The creator of the Myers algorithm is Gene Myers. He also helped create the BLAST algorithm, one of the fastest and most important DNA and protein search algorithms, and also implemented most of the original human genome assembly done by Celera. he also helped invent and publish the suffix array.

Out of curiosity, are there any algorithms faster than BLAST? (For DNA search).

There have been countless specializations and improvements on the original BLAST (which itself evolved).

When I left the field, the latest hottest thing was diamond (https://github.com/bbuchfink/diamond).

Re: Diff Algorithms

#57
post #6

There are at least 3 fundamentally different kinds of diff: * Single-dimensional. Diffs of text lines are just this. * Multi-dimensional. Diffs of words or characters are usually going to be this since lines still matter, but there are multiple approaches (line-first? weighted tokens?). * Tree-based. Unfortunately, these are woefully scarce and poorly documented. For text diffs, it's nontrivial to get the "missing ne…

Regarding your comment about the notion of semantic HTML - I think HTML lacks an easily found ground-up course or series or articles or whatnot about how you get there.

MDN talks about when a specific element is appropriate, but it doesn’t really help you discover those elements that might be relevant.

Re: Diff Algorithms

#60

My favorite differ in more than trivial cases is "vimdiff". Just hit a case where I wished I had "git vimdiff".

> Git Diff with Vimdiff https://technotales.wordpress.com/2009/05/17/git-diff-with-v...

I'll have to come up with a way to make it so that I can optionally use that, I don't always want it, and I've already got a differ that I sometimes regret having plumbed in there. I need to see if there's an easy way to switch them out.
Post reply on HN