News for hackers. Stuff that matters.
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.