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