oilshell / oil

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
http://www.oilshell.org/
Other
2.78k stars 150 forks source link

Is Oils in any official distributions, or plannd to be so? #1966

Closed the-moog closed 6 hours ago

the-moog commented 1 month ago

I've been looking for a 'better bash' for ages, and just stumbled across Oils. As a person using both a lot in home and work life it seems a no-brainer to take a look. And with 'only' ~500 bugs it seems almost ready for primetime?

So, I searched Debian and Fedora and can find no mention. Though Fedora does have "orc: An Oil jit compiler". Being a SIMD library I am fairly sure this is just a coincidence and upshot of packages with short names.

Is Oils part of any official distributions or if desired/planned/WIP to be so?

There are so many shells, but most cause real problems as are either subtly different or not even POSIX. As shells have a long life the need wide adoption and very 'fixed' script behaviour. e.g. My work involves maintaining stuff written my many over 20 years with another 10+ years in a rolling plan. It has always frustrated me that GNU rarely fix bugs (I.m looking at you, co-processes) never mind bring stuff into the 21st century, though I do understand there are valid reasons for this. I expect bash v6 will appear way after I am pushing up daisies.

I would say the most 'modern' shell is zsh, but sadly they chose csh as its basis and IMO csh/tcsh sucks.

I am very familiar with Linux, Python and bash and at first glance it seems Oils may be the way to go, so I am looking forward and very excited to try it out. Though sadly I can't use it in scripts, at least at work, due to it being not part of, Debian/RHEL.

footnote... Perhaps useful, and likely well known? (but not to myself) I found this info while I was searching ref: https://wiki.debian.org/DebianMaintainer/Tutorial

greggyb commented 1 month ago

Not an answer for you, but I am daily driving it on Ubuntu, compiled from source (installation is quick and easy with README instructions). I am trying to get it building with readline support on FreeBSD (build works, but readline is not included with the current release build process).

For interactive use, I haven't hit any bugs yet, but I've also not been in a shell-heavy mode for a couple weeks. My goal is to start incorporating it as the shell target for a product I work on (replacing POSIX sh).

It's not in any package ecosystems I use, but I do not consider that a dealbreaker. I imagine packaging will come after some amount of adoption. But kudos to Andy et al for keeping the build fast and easy. Packaging is not super necessary for something as self-contained as this.

the-moog commented 1 month ago

I believe the reason for Readline missing in BSD is it's licence is that it is full GPL, meaning any staically linked program must also be GPL. Though Python has readline, it's often really libedit under the hood. libedit being a readline compatible library.

Actually this raises an issue! (see #1969) Oils is under the more permissive Apache2 license so can't be linked with readline in a binary distribution without conflicting with GPL.

But as always there are alternatives. For example https://github.com/reeflective/readline - which perhaps should have a different name to prevent any ip claims, e.g. 'freedline' or 'libreline' could be good spellings, both of which convey it's function more open license. The project in the example link would also bring an extended set of edit capabilities, which the project may find useful. Saying that I've never used it so I've no idea if it's any good.

greggyb commented 1 month ago

Readline is available in the various BSDs, along with much other GPL-licensed software. FreeBSD can even run Linux binaries from arbitrary Linux distributions.

The problem with readline support on non-Linux is just missing build configuration in oils. I have the readline library (and libedit, separately) installed on a FreeBSD box and on an OpenBSD box. I can compile POC programs on those which statically link readline.

I've got some to-dos to provide sample compilations on BSDs for readline, to help improve the Oils build process; and to provide Sourcehut build specifications for the same. Efforts such as this are soft prerequisites to get Oils packaged on various platforms.

Specifically, Oils is under Apache 2.0, which GNU explicitly lists as compatible with GPL3.

andychu commented 1 month ago

Sorry for the delayed response, I just updated this page

https://github.com/oilshell/oil/wiki/Oil-Deployments

There is some awkwardness now because we just got the C++ tarball passing 100% of the tests, like a month or two ago.

So right now "Oil" is packaged in several places like Arch Linux, and Nix

But that is not what we want long term.


Long term we should have oils-for-unix packaged everywhere.

I purposely used two different names so there is no conflict. oils-for-unix can be added, and oil should not be deleted or replaced. (The project is no longer called oil)


So basically right now the focus is for users to "pull" Oils into their distros

I don't really "push" anyone, I think there is enough interest that it will happen over time. Feel free to tell people about it if you like it :)