News for hackers. Stuff that matters.
Re:It's time to get the Posix elephant off our necks by cvccvroomvroom on Wednesday February 22, 2023 @07:29PM (#34905153)
Kids today: want to come along, throw away everything they don't understand, and rebuild what was already there but worse. Accomplishing negative impact.
Re:It's time to get the Posix elephant off our necks by jplona on Wednesday February 22, 2023 @07:34PM (#34905199)
https://fs.blog/chestertons-fence/

I think this is a human thing, not necessarily just kids today.

Re:It's time to get the Posix elephant off our necks by eptcyka on Wednesday February 22, 2023 @07:44PM (#34905289)
Statistically, I think it'll always be more kids doing this, regardless of day of the week or year of millennia.
Re:It's time to get the Posix elephant off our necks by KingOfCoders on Thursday February 23, 2023 @12:47AM (#34907215)
I think it depends on your experience and what you have gone through, in my case how many of the decisions I've made that looked excellent to me back then, turned out to be okish at most.
Re:It's time to get the Posix elephant off our necks by chasil on Thursday February 23, 2023 @01:08AM (#34907344)
Can we actually improve the POSIX shell?

Can we reform it, perhaps into a "D-shell," that is an LR-parsed language?

AWK had a yacc grammar for many years. Why can't this be the language of the shell, at least for the sake of maintainability and comprehension?

https://archive.fosdem.org/2018/schedule/event/code_parsing_...

Re:It's time to get the Posix elephant off our necks by msla on Thursday February 23, 2023 @03:06AM (#34908082)
The problem with making a shell more like a "real" interpreter REPL is the purpose of a shell: Running arbitrary programs not known to the author of the shell, such that any unknown word in a shell script is probably the name of a program as opposed to a misspelled reserved word or variable name. Those programs having arbitrary command-line arguments and having to operate on files with arbitrary names is another complexity.
Re:It's time to get the Posix elephant off our necks by pasc1878 on Thursday February 23, 2023 @04:20AM (#34908522)
It has been done. See xonsh a python shell which manages the distinction you mention.

Also see scsh and rash for scheme

Fish for non posix but sane syntax

Re:It's time to get the Posix elephant off our necks by actionfromafar on Thursday February 23, 2023 @04:42AM (#34908642)
It's interesting to see how so many things grow into each other. A shell is what you say, but there are many efforts to change that. Bash has its magic autocomplete which knows about options of many, many programs. Powershell has an object-model with knowledge of many of its commands.
Re:It's time to get the Posix elephant off our necks by deafpolygon on Thursday February 23, 2023 @08:38AM (#34910401)
> Can we actually improve the POSIX shell?

PowerShell?

Re:It's time to get the Posix elephant off our necks by chasil on Thursday February 23, 2023 @09:56AM (#34911364)
No, that won't work.

  $ ll /bin/dash
  -rwxr-xr-x 1 root root 85368 Jan  5 09:52 /bin/dash
If you can make Powershell in a binary that size, then you have a valid point.
Re:It's time to get the Posix elephant off our necks by shubhamkrm on Thursday February 23, 2023 @12:47PM (#34913867)
But why? Storage is much cheaper today than it was in the 80s. While I myself don’t like huge Electron apps, trying to save every byte of storage is simply not worth it.
Re:It's time to get the Posix elephant off our necks by chasil on Thursday February 23, 2023 @05:01PM (#34917196)
Embedded applications on smaller systems are why.

The POSIX shell is common, from the largest supercomputer down to the smallest ARM.

I don't think that there will be any new developments covering that full scope.

Re:It's time to get the Posix elephant off our necks by deafpolygon on Friday February 24, 2023 @01:22AM (#34921493)
Embedded systems don't exclude PowerShell from being a replacement for POSIX shells. Maybe embedded systems should not strive to be POSIX.
Re:It's time to get the Posix elephant off our necks by pjmlp on Friday February 24, 2023 @01:56AM (#34921696)
Many embedded systems hardly have any shell, and even when they do, it isn't bash (which isn't POSIX anyway), rather a tiny subset with the basic tooling for maintenance.
Re:It's time to get the Posix elephant off our necks by Dalewyn on Thursday February 23, 2023 @03:49AM (#34908353)
Part of the process of erecting your own identity, both individually and as a generation, involves flatly refusing and denying the practices of your immediate predecessors (eg: your parents' and their generation of men, source code written by programmers before your time, etc.).

It's stupid and almost always leads to unintended (and usually negative) consequences, but it's probably something strongly ingrained in our instincts because it rears its ugly head every time there's a generational turnover.

Re:It's time to get the Posix elephant off our necks by incrudible on Thursday February 23, 2023 @05:30AM (#34908880)
If you do not understand why this happens, do not call it stupid. Go away and think. Then, when you can come back and tell me that you do see the use of it, I may allow you to call it stupid.
Re:It's time to get the Posix elephant off our necks by Dalewyn on Thursday February 23, 2023 @05:37AM (#34908918)
It's stupid in the sense that it's a waste of time and resources.

Sooner or later after you've had your fun refusing and denying your predecessors, you realize why they do things the way they do, become wiser, and go back and undo and redo all the fuckery you caused with your refusing and denying.

It would be nice if we could get that realization without first having to fuck everything up, y'know?

Re:It's time to get the Posix elephant off our necks by WJW on Thursday February 23, 2023 @06:21AM (#34909142)
Even in this description you use the words "you realize" and "become wiser" and then describe it as "a waste". It's not a waste, it's just the cost of education.

As the saying goes: "good decisions come from experience, and experience comes from bad decisions". It would be great if we could all come out of the womb with enough education and experience to function as responsible adults in modern society, but we don't. Society (rightfully) allows people some leeway in doing dumb shit so that they can learn firsthand why it's dumb.

Re:It's time to get the Posix elephant off our necks by Dalewyn on Thursday February 23, 2023 @06:25AM (#34909170)
The experience is absolutely not a waste, don't get me wrong. What I'm calling a waste are the time and resources spent undoing and redoing everything.

It's all cute if this just happens during our childhood years, where most actions hold no real consequence. It's when this extends into the real world with very real consequences that it gets really wasteful.

Re:It's time to get the Posix elephant off our necks by WJW on Thursday February 23, 2023 @07:27AM (#34909565)
Well we do this for many situations where it does actually matter. Drivers license requirements force people to "do it right" the first time, you can't (legally) fuck around driving a car on public roads until you eventually figure it out. Airline pilots and nuclear power plant operators have even stricter requirements.

Licensing and training has a very real cost as well of course, and for many topics the cost of forcing everyone to get a license would outstrip the benefits. So you either have to spend on training, or you have to spend to fix the mistakes of untrained people, or a mix of both. There is no way to bring the waste to zero.

Re:It's time to get the Posix elephant off our necks by hoseja on Thursday February 23, 2023 @06:28AM (#34909183)
I'll be glad to pillage your stagnant empire meanwhile :)
Re:It's time to get the Posix elephant off our necks by okaram on Thursday February 23, 2023 @08:50AM (#34910544)
You forget one thing ... You also discover the 20% of manure that isn't true, or doesn't apply to you.
Re:It's time to get the Posix elephant off our necks by benj111 on Thursday February 23, 2023 @06:24AM (#34909163)
Surely if you don't understand why it's stupid, you need to go away and think about why it's stupid, once you do see why it's stupid, I may allow you to challenge people calling it stupid.
Re:It's time to get the Posix elephant off our necks by metadat on Wednesday February 22, 2023 @07:49PM (#34905323)
Great article.

Discussed 13 months ago:

https://news.ycombinator.com/item?id=30070757 (142 comments)

Re:It's time to get the Posix elephant off our necks by ChrisSD on Wednesday February 22, 2023 @11:16PM (#34906696)
Some variation on this has been consistently brought up for going on a decade now. At this point it's a HN meme.

Its opposite is "cargo culting".

Re:It's time to get the Posix elephant off our necks by psychoslave on Thursday February 23, 2023 @03:48AM (#34908349)
I like how Chesterton’s Fence example actually is a huge pro to not letting unquestionably the fence in the middle of the road.

If there is no documentation on it, no-one around to pro-actively explain why it’s there, then the most economical way to see if it had any positive value is to stash it and see what happen.

That doesn’t mean it’s always the most rational thing to do, of course. Throwing POSIX away doesn’t qualify with a situation where there is a lake of provided documentation or a missing obvious purpose.

The fallacy is well confined in these two sentences:

>However, before they decide to remove it, they must figure out why it exists in the first place. If they do not do this, they are likely to do more harm than good with its removal.

Actually, assuming you don’t know consequences of removing the fence, you also have to assume that you don’t know consequences of letting the fence in place, which might just as well turn to a dramatic situation. What is for sure, if nothing around can explain its purpose, is that it was placed here by people to negligent to induce the right clues about it. So, who know to which level their laxity might have reach?

Remove the fence unless someone know why it was put up in the first place, and the rational still hold.

Re:It's time to get the Posix elephant off our necks by WJW on Thursday February 23, 2023 @06:11AM (#34909089)
Story time: at my previous job we had an old server called "the black box" which hosted some old cronjobs and various services from about a decade earlier. There was no documentation and everyone who had worked on it had left years earlier. The ops team dutifully kept it online but otherwise didn't touch it, and no other team owned it. In short, it was the ideal candidate for your "reverse Chestertons fence" strategy. At some point we had to delve into what was actually on it, and it turned out that both company payroll and a service responsible for about 50% of company revenue was on that box. Simply removing it to see what happened would have easily cost a few million in revenue, even if it could be reinstated from backup a day later (and I'm doubtful if we could have restored it at all without serious data loss). Now obviously having such a server is a bad practice in the first case, but if you find yourself in such a position "just kill it and see what happens" is definitely not the most economical option in all cases.

In the case of POSIX it might hold, since probably the worst case is that some volunteers throw away a few years of their life hacking away on yet another OS that will never gain traction. Humanity spends a lot more time on a lot less worthy endeavors.

Re:It's time to get the Posix elephant off our necks by benj111 on Thursday February 23, 2023 @06:20AM (#34909136)
Why are you putting the onus on someone else to provide clues that you understand?

You still don't escape the requirement to understand the problem before fixing the problem. Even if the explanation for the current solution is lacking, you still need to understand enough to articulate why it's lacking.

Re:It's time to get the Posix elephant off our necks by theamk on Thursday February 23, 2023 @12:47PM (#34913873)
It is completely crazy to expect people to "pro-actively explain why it's there" -- how do you see this? A plaque at every fence with explanation? A person standing by fence every day, just in case someone wants to tear it down? Do you expect each shared object to be labeled and documented?

Whomever wants to tear the fence down has to do basic research -- visit city hall for the plans, talk to old-timers, check the old newspapers, etc... If they do it, this qualifies for "understanding". And yes, maybe the fence was put by Crazy Old Bill who was paranoid about neighbour's goats... then yes, tear it down. But make sure it is really him first, and not some better reason.

> assuming you don’t know consequences of removing the fence, you also have to assume that you don’t know consequences of letting the fence in place,

Note that at some moment there were no fence, and yet someone has expended non-trivial effort to put the fence up. This means someone had a reason do to so, so whomever that past person was, they knew more than you did right now. Therefore, unless you believe that you are smarter than most other people, you should defer to their past decision.

(And if you believe that you are smart that most other people, and yet want to tear down the fences you don't understand... I have bad news for you :) )

Re:It's time to get the Posix elephant off our necks by psychoslave on Monday February 27, 2023 @09:07AM (#34956530)
>A plaque at every fence with explanation?

Well, for every fence at the middle of a path that have for example a a commemorative value, that seems a good start. And "warning do not remove" is a rather common thing on places where a danger is expected otherwise.

>Whomever wants to tear the fence down has to do basic research -- visit city hall for the plans, talk to old-timers, check the old newspapers, etc...

I think that qualifies in "someone know why it was put up in the first place, and the rational still hold".

>Therefore, unless you believe that you are smarter than most other people, you should defer to their past decision.

I don’t think smartness matter that much here. It’s all about blindly rel invariably in a cargo cult fashion about everything or keep critical thought vivid when it seems possibly relevant. Someone can be extremely smart and still follow rigorously the cult of the day.

-----------

Some thought experiment now. :)

Say you won a new house, congratulation!

In the middle of the garden, crossed by a path, there is a fence with no door, easy to circumvent, serving no apparent purpose. The planes you where given with the house, duplicate of those from the city hall, don’t mention it. Now, there might many explanation for this situation. One possible rationale would be, the fence used to be larger, possibly even forming a closure some time in the past. But no one know. Will you let let the fence disrupting the path in the middle of the garden? Will you call some expert to diagnose the soils, just in case it might collapse would someone remove the fence?

Also, in the middle of the living room there is a thick wall up to the ceiling, with large space to pass on both side. It’s not mentioned in any plane. Having a unified big living room would be fare more nicer to you. Will you destroy the wall without delay? Or call an expert to determine if this is a bearing wall first, without which the house would collapse?

So this is really largely dependent on context, as usual.

Re:It's time to get the Posix elephant off our necks by everforward on Thursday February 23, 2023 @02:13PM (#34914989)
> Actually, assuming you don’t know consequences of removing the fence, you also have to assume that you don’t know consequences of letting the fence in place, which might just as well turn to a dramatic situation.

That assumption reads as false to me. There should generally be historical data around the costs and consequences of maintaining the fence. E.g. if you're shutting down a server, it's generally easy to figure out how much the hardware costs, how many man-hours you spend on maintaining it, etc. None of that requires knowing why the fence exists.

Those costs and consequences tend to be small, because large costs have to be continually validated as a good use of resources so they have a living memory of sorts.

> What is for sure, if nothing around can explain its purpose, is that it was placed here by people to negligent to induce the right clues about it.

Again, I don't think this is sure. I've seen lots of cases where docs probably did exist at some point, but the writers left and successors lost the knowledge of where the docs are or failed to migrate them to a new system or etc. They're lost to attrition, not to negligence.

> Remove the fence unless someone know why it was put up in the first place, and the rational still hold.

It doesn't, because it's trading known risks for unknown and unbounded risks. That's usually a bad trade, especially when the known costs tend to be small. Nobody wins a promotion for causing a million dollar outage while trying to get rid of a $50/month maintenance cost.

Re:It's time to get the Posix elephant off our necks by psychoslave on Monday February 27, 2023 @07:47AM (#34955764)
Ok, these are all good points, thank you for sharing it. Just as the ones by WJW.

More broadly my underlying point was more as "don’t blindly follow the herd obedience".

If there is a small black box in multi-million generator stream process, no one of course want to be the guy unplugging it just to see what happens.

On the other hand, if really no-one knows the real impact of such a black box, given the resources at play, risk management should induce an audit and possibly a replacement management. To my mind that sounds very different from "no one know why this thing is there, those who dare to ask will be chastised with a burden of proof to carry alone".

Re:It's time to get the Posix elephant off our necks by credit_guy on Thursday February 23, 2023 @05:46PM (#34917797)
I can't upvote you enough.

Around here, on HN, Chesterton's fences pops up so many times as some type of ageless nugget of wisdom.

But another way to look at it is that it's just the lazy guy's excuse to allow bit rot. Because, let's be honest, we only care about Chesterton's fence in the context of software development.

Who among us did not work with software with dark corners, with files with no commits in the last 10 years, with playbooks that people just go through mechanically, because there's no one from the "old guard" who remembers why things are the way they are?

Who would not love to live in an alternate reality, where each Chesterton's fence was removed at the first opportunity, rather than left there to burden future generations of unlucky toilers? Where code is clean, documentation is up to date, tests complete, colleagues who know what's going on? Well, that alternate reality does not exist, of course.

But at least let's stop thinking we are wise whenever we postpone deprecating something we don't understand, just because some semi-famous essayist came up with a nice figure of speech one hundred years ago.

Re:It's time to get the Posix elephant off our necks by loeg on Wednesday February 22, 2023 @07:39PM (#34905243)
It's probably worth noting that the author is in his 50s.
Re:It's time to get the Posix elephant off our necks by PaulDavisThe1st on Wednesday February 22, 2023 @09:24PM (#34905926)
which makes this garbage even more indefensible.
Re:It's time to get the Posix elephant off our necks by drpixie on Thursday February 23, 2023 @02:37AM (#34907895)
(smirk) You've noticed that there are lots of kiddies, getting all hot under the collar, who haven't noticed that a counter-example does not refute the global mindset that is Posix ;)
Re:It's time to get the Posix elephant off our necks by goodpoint on Wednesday February 22, 2023 @07:46PM (#34905306)
That's been the default for the whole software industry for the last 20 years at least.

Reinventing things without learning from the past - and if you point it out people gets so defensive.

Re:It's time to get the Posix elephant off our necks by simplotek on Wednesday February 22, 2023 @07:51PM (#34905336)
> Accomplishing negative impact.

This opinion piece is the epitome of a negative impact work. It's easy to accuse random things of being all wrong, but it's far harder to actually present something you feel is right.

Re:It's time to get the Posix elephant off our necks by thewebcount on Wednesday February 22, 2023 @11:48PM (#34906893)
Not every criticism of something has to be accompanied by a better solution. Pointing out that something has shortcomings is the first step. It’s perfectly fine to say, “That person’s singing is awful,” without also adding, “They need to work on their breath control.” You don’t need to be a great singer to know when someone’s doing a bad job at it. (And many people who are great at what they do are terrible at teaching others to do it, anyway.)
Re:It's time to get the Posix elephant off our necks by jimbokun on Thursday February 23, 2023 @12:18AM (#34907055)
Criticism without suggestions for improvement is almost always useless.
Re:It's time to get the Posix elephant off our necks by Jensson on Thursday February 23, 2023 @01:04AM (#34907319)
Then why do company constantly ask me to "score this phone call", "score this driver", "was this person helpful?", "what did you think of this recommendation?", "could you spend some time to answer this questionnaire what you thought of that widget you bought"?

So to me it seems like criticism without suggestions is very valuable, it is called data. Suggestions from amateurs are usually bad and misleading, just highlighting a problem so that the expert can come up with a solution is the most efficient way to work in most cases.

Re:It's time to get the Posix elephant off our necks by jimbokun on Thursday February 23, 2023 @05:30PM (#34917580)
I suspect a lot of that data provides very little value.

If you don’t know why the customer was unhappy, what do you change? You can fire the customer service rep, but then what do you do when the next one gets reviews just as bad because they are following the same script?

Re:It's time to get the Posix elephant off our necks by Brian_K_White on Thursday February 23, 2023 @01:07AM (#34907332)
"This food is terrible" merely needs to be true, and anyone can say it, even people who aren't chefs. This is a ridiculous barr that only sorta kinda sounds reasonable if you just want an excuse not to like the message or the messenger.
Re:It's time to get the Posix elephant off our necks by simplotek on Thursday February 23, 2023 @03:01AM (#34908054)
> "This food is terrible" merely needs to be true, and anyone can say it, even people who aren't chefs.

If you bitch about how "this food is terrible" but you do nothing to make it more palatable or order something else and instead just stand there eating while complaining and reordering and asking for seconds... The food is not terrible, and you just enjoy bitching.

Re:It's time to get the Posix elephant off our necks by Brian_K_White on Thursday February 23, 2023 @04:26PM (#34916703)
I would have warned you about the pot hole that destroyed my car instead of letting you get nailed by it too, but that would have just been bitching about something without fixing it, and I know you don't have any use for that.
Re:It's time to get the Posix elephant off our necks by simplotek on Thursday February 23, 2023 @02:57AM (#34908036)
> Pointing out that something has shortcomings is the first step.

Talk is cheap. If even that same critic feels that his solution to his problem is not worth pursuing, the criticism adds nothing and creates no value. At best it's nitpicking about stuff that falls in Eisenhower's "not important"/"not urgent" box.

Re:It's time to get the Posix elephant off our necks by bombolo on Thursday February 23, 2023 @04:13AM (#34908477)
Do you need to be a chef to realise some food is burnt?
Re:It's time to get the Posix elephant off our necks by rstat1 on Wednesday February 22, 2023 @08:06PM (#34905461)
and the old folk that created all these things, don't bother to explain them, then get uppity when someone new comes along and doesn't think their creations are perfect.

2 sides of the same coin.

Re:It's time to get the Posix elephant off our necks by IgorPartola on Wednesday February 22, 2023 @08:40PM (#34905669)
Do you really have to call out the entire JavaScript ecosystem like that? :)
Re:It's time to get the Posix elephant off our necks by endgame on Wednesday February 22, 2023 @11:41PM (#34906849)
Re:It's time to get the Posix elephant off our necks by DangitBobby on Thursday February 23, 2023 @02:06AM (#34907692)
It's fun to build stuff. It's not nearly as fun to use and maintain what other people have built. Why should all the fun be for the people who just so happen to have been born decades earlier? The point of life is not to maximize efficiency in all respects, and people make emotional choices to achieve personal fulfillment.
Re:It's time to get the Posix elephant off our necks by tlamponi on Thursday February 23, 2023 @03:21AM (#34908176)
There's a difference between (re-)building stuff, for fun, learning purpose or even to use in production in your own projects, and dunning-kruger demanding (exaggerated) that existing solutions that provide stable APIs for multiple OS are thrown out, causing a massive amount of forced work (i.e., not fun) to others while getting a worse end result.

Also, it can be fun to explore existing ideas and build upon those too - nobody forces you to maintain anything existing "for fun".

Re:It's time to get the Posix elephant off our necks by josephg on Thursday February 23, 2023 @03:39AM (#34908287)
My problem with this is that I feel like we (people coming along later) have three options when it comes to designing systems given the existing state of posix / linux / the web / etc:

1. Build inside the ecosystem as it was designed. Eg, make a static webpage using HTML. Make a linux binary using the standard linux tooling + apt (or whatever). This is almost always a good idea when you can, but sometimes the ecosystem is a bit shonky, or misaligned with what you're building. Eg, I want my program to have a fixed execution environment and instead I have debian and macos. I want a react-like API but the browser doesn't provide that. Etc.

2. Build a new thing on top of the ecosystem as it exists. Eg, build docker on top of linux. Build web frameworks. Invent the web browser, or couchdb views, or electron and build your software on top of that. The problem with this approach is that if each generation layers their own rubbish on top of the underlying layers then software will keep getting slower, more complex and more buggy over time.

3. Change the underlying system to work how you want it to work. Instead of using docker on top of ubuntu, replace ubuntu with nixos. Instead of using dpdk for higher storage performance, add io-uring to the linux kernel.

I think I would prefer it if more people did option 3 rather than option 2. I think there's lots of ways modern computing systems could be better. I'd rather if linux gained the ability to run binaries from the web (for example) than we invent a new kind of binary in userland (docker containers) and run those. I don't want people in 100 years to still be using linux (with all the bad decisions it contains), but with 10 more layers of different generations' ideas stacked on top. (Oh, its linux - but with docker, and then most people run this specific container to run languageX, and that lets us run electo2050 apps, which in turn you can use to run IRC. It only uses 50 gigs of ram. So small and light!)

Option 3 may require us to throw out or deprecate parts of the POSIX API. That may be overdue.

Re:It's time to get the Posix elephant off our necks by benj111 on Thursday February 23, 2023 @06:33AM (#34909220)
You present 3 independent Choices, but surely these are stages.

1. Can you do X with existing tooling?

If not

2. Can you add a tool to your set to do X?

If not

3. Get a new tool set.

2 should also serve as testing to show the utility and iron out the links of things that make it to 3. Jumping straight to 3 likely means you end up with an ill thought out solution that soon needs another 3.

Re:It's time to get the Posix elephant off our necks by josephg on Thursday February 23, 2023 @03:39PM (#34916173)
Sorry; that’s not quite the point I’m making. The difference I want to emphasise between 2 and 3 is whether the new tool is layered on top of the existing tool, or made by modifying the existing tool. If you want a new approach to storing data, do you make it by writing a new kernel module, or by doing some new thing in userland on top of the filesystem?

All of docker’s features could be built into the Linux kernel. And it would probably be better as a result, and have ancillary benefits to existing Linux programs. But docker was built as a separate userland tool instead.

Building a new thing is usually easier, since you don’t need to dive into the politics of an existing community. But if each new generation of software engineers builds new software by layering on top of the old stuff, then we end up with layers on layers of cruft and our computers run slower and are more buggy as a result.

The POSIX apis aren’t very good in lots of ways. With a lot of complex effort in userland I can make a database with atomic write semantics. But maybe we should just add atomic file operations to Linux instead. In the long run I think it would be safer and result in faster programs in most cases.

Re:It's time to get the Posix elephant off our necks by benj111 on Friday February 24, 2023 @02:45AM (#34922043)
Yes. Docker has proved there's utility in what it does. Assuming kinks in the implementation have been ironed out, now is the time to start thinking about making it a kernel module.

If you just put every half thought out, poorly implemented idea straight in the kernel, you'd have a 5 petabyte kernel.

Re:It's time to get the Posix elephant off our necks by thefz on Thursday February 23, 2023 @02:24AM (#34907817)
While complaining that Git is haaaard.
Re:It's time to get the Posix elephant off our necks by adastra22 on Thursday February 23, 2023 @02:44AM (#34907961)
Well git is hard tho
Re:It's time to get the Posix elephant off our necks by marginalia_nu on Thursday February 23, 2023 @02:53AM (#34908013)
It's easy if you always do exactly the right thing in the right order and never make mistakes, but if you for example want to undo a git merge[1], god have mercy.

[1] https://opensource.apple.com/source/Git/Git-26/src/git-htmld...

Re:It's time to get the Posix elephant off our necks by psychoslave on Thursday February 23, 2023 @04:02AM (#34908423)
In doubt, I create a new branch from the main one, and test it goes when merging the one holding changes. It something goes wrong, at least the main branch is unaffected.

Of course, you must already have some intuition that something could go wrong. :D

Re:It's time to get the Posix elephant off our necks by imetatroll on Thursday February 23, 2023 @07:22AM (#34909524)
Reflog lets you see where HEAD has traveled from. Just go back in time. This isn't actually a hard problem to solve.

If that sounds difficult just create a branch prior to merging so that you know where to reset your failed branch to.

Re:It's time to get the Posix elephant off our necks by BeeOnRope on Thursday February 23, 2023 @08:06AM (#34910004)
They are trying to solve this problem without rewriting the branch.
Re:It's time to get the Posix elephant off our necks by speed_spread on Thursday February 23, 2023 @08:24AM (#34910215)
It's not that hard, it's actually easy. Very Easy to get into a devolved state where the shortest path back to sanity is to clone the whole repo from scratch.