Hacker Newsnew | past | comments | ask | show | jobs | submit | paulirish's commentslogin


Yayquery revival when?

Fish gang represent.

I was a bash => zsh/omz person and had these same complaints. But that was 10 years ago. https://github.com/paulirish/dotfiles/blame/main/fish/config...

The baseline fish experience is just better.


I've been working on something super similar. https://github.com/paulirish/markpaste

There's now a CLI that'll read and update your (Mac) clipboard with the result. For this italic use case you'll have to edit the source but it won't be that bad.


The latter, if any else are curious: https://www.swebench.com/post-250820-mini-roulette.html


https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Det... Chromium browsers have native support for reading many barcode types!


Very impressive to see the primitives of CDP be used for such a different DX than what's in existing devtools. Really well done.


Thanks a lot! It started as a small experiment with parts of CDP to solve some real-life debugging problems I kept running into, and it ended up opening workflows I hadn’t expected.


Amen! The terms "accordion" and "carousel" were really codified by the pattern library. Establishing a common vernacular definitely accelerates things.


I worry that OpenRouter's Apps leaderboard incentivizes tools (e.g. Cline/Kilo) to burn through tokens to climb the ranks, meanwhile penalizing being context-efficient.

https://openrouter.ai/rankings#apps


Makes me think of the Histomap, designed in 1931. It's an attractive design for history over a timeseries: https://www.visualcapitalist.com/wp-content/uploads/2017/11/...

In 1942 he did one for Evolution which is closer to your pitch (log scale Y axis, etc): https://www.davidrumsey.com/luna/servlet/detail/RUMSEY~8~1~2...


Have been using Mergiraf for the past 4 months. It's automatically solved about 70% of my conflicts and, luckily, I've never contested any of them. Pretty pleased.


> luckily, I've never contested any of them.

That's to be expected. The philosophy behind git merges is that it will merge only if it is absolutely and unambiguously sure that the resolution is correct. That's when there is only one solution for the merge. It will just throw it's hands up and leave it to the developer if there is any ambiguity - that's if there's more than one way to do the merge.

Every single chunk of merge is a potential conflict. But have you ever contested the regular merge algorithm (ort by default) when it did work? Like when the merge was fully successful, or the successfully merged chunks within a conflicted merge? You can expect the same experience with any merge algorithm that sticks to the git philosophy of being a git [1]. Problems will happen only if they start using some complex heuristics or LLM or something unpredictable like that for the merge.

> It's automatically solved about 70% of my conflicts

At the risk of explaining the obvious, I'm going to try to explain this. (So please don't get angry at me if you already know this.) Imagine that you're trying to manually merge 2 branches without any sort of merge algorithm. For the first case, just assume that you don't know the programming language (imagine that it's in some foreign script). All you have to go by is the record of when each line was added in each branch. The best 'dumb' strategy you have to go with, is the 3-way merge [2]. The referenced page illustrates this. It clearly shows you the advantage of the 3-way merge algorithm over the traditional 2-way merge that we all are familiar with.

But this method still has a disadvantage. You are looking at the source files simply as a bunch of lines, without the knowledge of its more granular structures like the syntax. (Note: That assumption itself may be wrong. That's why merges and git in general doesn't work well on binary files.) At best, all you can hope for is that the two branches don't contain any edits on the same or the adjacent lines. You won't even know the order in which the lines should be arranged. Now you have a conflict - a merge that you're leaving for someone else to solve.

Now assume a second case. You know the programming language this time. But you have no idea what the program does - it's not your project. Even with that limitation, you'll still be able to do a better job than just comparing the lines blindly. Mergiraf docs has a page full of these examples [3]. You can see how obvious the merges look - there is no way you can go wrong. See if you can resolve them just by looking at the lines. That's why mergiraf gives you much better performance without any errors.

There is of course a deeper level of knowledge - the semantic level. The knowledge of what the program does. You need that knowledge to resolve 100% of the merges. And that ultimate merge algorithm is ... you.

> Pretty pleased.

Understandable. But I see a potential problem here. As you are aware, the files to submit to mergiraf are specified in the gitattributes file. There are two ways this can go wrong. First, someone else with your repo may not have or even know about mergiraf. The second, even bigger problem is that some people have global gitattributes files [4] where you place your default attributes. It's possible to setup mergiraf there. But if you do so, your colleagues may not even get a clue as to why certain merges succeed for you, but fail for all of them.

The above problem becomes a bigger issue because merge and rebase conflicts sometimes reappear in later merges or rebases. If that's something mergiraf can solve and you have it, then everything's fine. But if the conflict reappears for someone without mergiraf, they will have to repeat the manual resolution again and again. This happens because git simply wont commit a merge or rebase until we resolve the conflict manually. Therefore, git has no idea what we did in between to resolve it - that is not recorded anywhere. (Well, git-rerere [5] records it if we ask it to. But that's a local-only solution. Everyone will have to do it once on their system.)

There is actually a known solution to the problem. It's called 'first class conflicts' [6]. The idea is to record the conflicts and its resolution in the repo itself (the same info that rerere stores, but in the shared repo). This means that a conflict once resolved will not come back again, because the structured information to resolve it is available in the repo. This means not everyone needs mergiraf and nobody needs to repeat a completed manual resolution. It has other advantages too. You can just continue working after a conflicted merge and leave the resolution for later. Or you could send the conflicts to someone else more specialized in that area of the code.

I have seen this feature in Jujutsu [6] and Pijul [7]. Git doesn't have it probably because this wasn't around when it was developed. But Jujutsu uses git repository format and they somehow managed to implement first-class conflicts on it. Meanwhile, the concept is already there in git as rerere. So perhaps first-class conflicts are possible in Git too. It would be awesome if we had that in Git too. So if anybody who sees this knows how to do it, please please take it up as a wish!

[1] https://github.com/git/git/blob/e83c5163316f89bfbde7d9ab23ca...

[2] https://blog.git-init.com/the-magic-of-3-way-merge/

[3] https://mergiraf.org/conflicts.html

[4] https://git-scm.com/docs/git-config#Documentation/git-config...

[5] https://git-scm.com/docs/git-rerere

[6] https://jj-vcs.github.io/jj/latest/conflicts/

[7] https://pijul.com/manual/why_pijul.html#modeling-conflicts


> But have you ever contested the regular merge algorithm (ort by default) when it did work?

Depends on what you mean by 'contested', but yes. You can have "merge conflicts", that are even correct as far as the syntax is concerned, but are garbage on a semantic level.


I'm not talking about the conflicts. I'm talking about the hunks that were resolved successfully. Sometimes they're part of successful merges. Sometimes they're part of conflicted merges where some other hunk was in conflict.


Me too. A merge can be entirely without merge conflicts and still wrong, because it has (semantic or architectural) "merge conflicts".


This is my experience as well. Not a gamechanger, but definitely on the positive side.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: