News for hackers. Stuff that matters.
Re:What's New in POSIX 2024 by blueflow on Tuesday October 29, 2024 @04:15AM (#41980798)
Someone needs to come up with a interactive shell first, one that is comparable in usability. Then we can think about replacing the unix shell.

I tried both python and lua interactively, but they are a pain when it comes to handling files. You have to type much more to get the same things done.

Re:What's New in POSIX 2024 by anal_reactor on Tuesday October 29, 2024 @04:38AM (#41980952)
The bigger issue is the sheer momentum of Unix shell. Even if you come up with an alternative that is better by every objectively measurable metric, it's still going to be a monumental task to have it packages with commonly used distros. Kinda like the "why can't the US switch to the metric system" problem.
Re:What's New in POSIX 2024 by azalemeth on Tuesday October 29, 2024 @05:53AM (#41981740)
There's a direct cost in money, time and lives that has come from the US's adherence to their US Customary Units (which are often different to the old imperial units). People have literally died because of the confusion caused by having multiple systems of units in common use with ambiguous names (degrees, gallons, etc). Each year industry worldwide spends an enormous amount of money indirectly precisely because of this problem and it's still incredibly unlikely to be fixed within my lifetime.

Bash-alternatives that are not completely compatible frankly just don't have a chance.

Re:What's New in POSIX 2024 by blueflow on Tuesday October 29, 2024 @04:44AM (#41980987)
People already use different shells, mksh, fish, and so on. With fish there is a non-posix shell in wide use.
Re:What's New in POSIX 2024 by oguz-ismail on Tuesday October 29, 2024 @04:47AM (#41980999)
>wide use

Five people around the globe isn't wide use.

Re:What's New in POSIX 2024 by blueflow on Tuesday October 29, 2024 @04:51AM (#41981016)
I'm sure you might get more than 5 people on HN replying to you that they are using fish right now. Say something discrediting about fish and they show up.
Re:What's New in POSIX 2024 by fragmede on Tuesday October 29, 2024 @06:07AM (#41981905)
Heh, reminds me of how to get help with Linux back in the day. If you directly asked for help, you'd be told to RTFM. If you stayed confidently that Windows could do something and that Linux sucks because it can't, you'd get users tripping over themselves with details and instructions,'just to prove you wrong.

Human psychology is fascinating!

Re:What's New in POSIX 2024 by stephenr on Tuesday October 29, 2024 @07:25AM (#41982740)
If it isn't distributed out of the box with every nix-like OS, it inherently isn't* “better by every objectively measurable metric" - distribution of a common, stable standard is a huge benefit in and of itself.
Re:What's New in POSIX 2024 by blueflow on Tuesday October 29, 2024 @08:09AM (#41983054)
> distributed out of the box with every nix-like OS,

Python and lua are pretty close to that.

Re:What's New in POSIX 2024 by stephenr on Tuesday October 29, 2024 @08:51AM (#41983335)
> Python and lua are pretty close to that.

Python maybe often installed by default but it's definitely not an essential/required package "out of the box" on every install. Also, in a thread where one topic is how POSIX shell handles whitespace in filenames, it's hilarious (not in a good way) that someone suggests a language that handles whitespace the wrong way in it's own code. Yes, significant whitespace is objectively wrong.

What OS/distro is Lua included on out of the box? That doesn't mean "available in a package". I mean literally included in every single install and cannot reasonably be omitted?

Regardless of the availability, the parent comment says

> better by every objectively measurable metric

Neither Python nor Lua are "better" than shell, at the types of things shell is commonly used for - they're objectively worse.

Re:What's New in POSIX 2024 by blueflow on Tuesday October 29, 2024 @09:13AM (#41983523)
Lua gets onto every other Linux distro as dependency of some base system component. For example, rpm or pipewire depend on lua. Ubuntu and Debian ship with pipewire per default.

You should use the word "objectively" less.

Re:What's New in POSIX 2024 by stephenr on Wednesday October 30, 2024 @04:50AM (#41993017)
> Lua gets onto every other Linux distro

Just FYI, there are UNIX-like, POSIX compatible systems that are not a Linux distro.

> rpm or pipewire depend on lua. Ubuntu and Debian ship with pipewire per default.

Pipewire? Do you mean this? https://packages.debian.org/bookworm/pipewire

That isn't even close to "installed on every system". Best I can tell from the reverse dependencies, it's required for some Gnome Remote Desktop tool, and best I can tell, it doesn't rely on Lua anyway (at least on Debian).

> You should use the word "objectively" less.

I specifically used the word objectively, because the original comment that I replied to, said this:

> better by every objectively measurable metric

Re:What's New in POSIX 2024 by blueflow on Wednesday October 30, 2024 @05:25AM (#41993184)
pipewire -> wireplumber -> libwireplumber -> liblua

Pipewire being the Pulseaudio replacement from Redhat.

Bookworm is probably the last Debian without :P

Re:What's New in POSIX 2024 by stephenr on Wednesday October 30, 2024 @06:27AM (#41993465)
> Pipewire being the Pulseaudio replacement from Redhat.

Right, so it's a desktop package that ultimately will be installed on about 1% of all Linux machines because the vast majority are servers without a desktop environment.

Also worth pointing out: liblua on Debian at least, is the shared library. It's not the binary to execute standalone Lua scripts.

Re:What's New in POSIX 2024 by blueflow on Wednesday October 30, 2024 @08:02AM (#41993950)
This this like a game where you come up with bullshit and i have to come up with the facts to rectify it? RHEL/centOS have more than 1% market share alone.

Check your own installs and tell me if you find some that dont have liblua or libluajit.

For the library thing: I said "Python and lua are pretty close to that." earlier. I did not say that they have interpreters ready everywhere. But if the language core is already installed on a large fraction of machines, then adding the interpreter is not a big cost.

Re:What's New in POSIX 2024 by stephenr on Wednesday October 30, 2024 @09:16AM (#41994451)
> already installed on a large fraction of machines

So far you've presented no evidence of this though, just that it's used by a new desktop-focused package.

All linux desktops over the last 30 years is not even a "large fraction" of total Linux installs, much less the ones that have already migrated to this new audio system.

> adding the interpreter is not a big cost

It's nothing to do with cost. It's about "how do I know this will absolutely 100% run on any POSIX machine I throw it on without any extra steps".

Remember the argument here is about something that is claimed to be "objectively better" than Shell. The ubiquitous nature of POSIX shell is a huge barrier for any possible competitor, and saying "well you just need to install it" just defeats the purpose. You might as well write it in fucking java and say "well you just need to install a JVM".

Edit to Add: a good number of systems I manage do have liblua installed... because HAProxy requires it, and those systems have HAProxy installed. Not because it was installed as part of the base OS or even a default group of packages.

Incidentally, HAProxy and thus liblua were installed on those systems by infrastructure management that's implemented as shell script. So what kind of chicken and egg argument do we need to have here about how exactly I can run a Lua script to install Lua?

Re:What's New in POSIX 2024 by blueflow on Wednesday October 30, 2024 @01:09PM (#41997632)
> a good number of systems I manage do have liblua installed

/thread

Re:What's New in POSIX 2024 by consteval on Tuesday October 29, 2024 @09:41AM (#41983752)
Even outside of distribution, python and lua aren't objectively better. For starters, they're much more verbose.
Re:What's New in POSIX 2024 by blueflow on Tuesday October 29, 2024 @09:58AM (#41983895)
I just said that, scroll up.
Re:What's New in POSIX 2024 by Netch on Saturday November 02, 2024 @07:40AM (#42025749)
OK let them add an explicit check to standard tools, and/or to open(), mkdir(), etc. with O_PORTABLECHARS. And an environment option to disable this check.

Why they force the restriction at syscall level?

Re:What's New in POSIX 2024 by nly on Tuesday October 29, 2024 @05:35AM (#41981452)
Oil shell?

https://www.oilshell.org/

Compatible with most bash scripts

Re:What's New in POSIX 2024 by throw16180339 on Tuesday October 29, 2024 @09:57AM (#41983884)
I certainly have my complaints about Powershell, but it's got pretty good coverage, decent documentation, and cross platform support.
Re:What's New in POSIX 2024 by felixgallo on Tuesday October 29, 2024 @10:14AM (#41984040)
if it weren't so irregular, inconsistent, spotty and tasteless, it'd be a great option.