Replies: 6 comments 3 replies
|
This is great, @andychu! Thanks for putting together the report. I'll need some time to review it in greater detail 🙂. Having this sort of objective assessment of bash compatibility is awesome. And I do generally agree with your sentiments on finding the right sort of complement. I'm also not sure where exactly that is right now but I'm eager to continue the conversation. |
|
OK great, yes we should think of some ways to collaborate ... It's been hard to find contributors, and I probably made the mistake of trying to do too much myself at the beginning. NLnet really helped with that though -- we've had grants since 2022, and will probably have another one in the very near future. NLnet is interested in a better foundation for Nix (which uses a TON of bash -- more bash features than other distros!) I suppose the tests are supposed to give a feeling for "How much work on bash compatibility is left?" And I was surprised that Brush passed so many tests! When I first looked, I saw 34K lines of code, and <600 commits, so I didn't think it would pass that many tests. And it passes more than ksh and mksh, which are very old and mature codebases, so that is impressive! I poked around manually and it works well (although I have the classic low contrast issue on my Debian machine) On the other hand, my experience in this area is that "once you do the first 90%, then you have to do the other 90%" :-) I'll be interested in what you think after looking at some of the failures. I actually did a ton of work on the interactive shell all the way back in 2019, and made OSH run But that was a bit painful, so I haven't pushed as hard on OSH in awhile. I worked on YSH and the translation to C++, which was also hard ("three languages takes longer than one" :-) ) There were plenty of OSH bug reports from users to keep busy. i.e. they isolated test cases for us, so I haven't done "app-driven" work as much Some contributors are now doing app-driven work, and that has been really helpful. I watched this video on the Ladybird browser and realized that this is a fundamental difference: https://youtu.be/9YM7pDMLvr4?t=1767 i.e. some people like doing app-driven improvement, and some people like doing spec-driven improvement (e.g. making all those spec tests pass) Also another thing from that video I liked is the focus on tools to help contributors. Basically I think we have to be a bit "meta", and make it clear:
I still think the I can imagine allocating 10% of a grant to it though But I also think there are some advantages to the way Oils works now, aside from liboils:
For Python, it's ~50ms. For brush I did an incremental debug build in about 4 seconds? That is fast enough for most projects, but personally I get value out of the sub-second response, for fixing all these compatibility bugs.
I had a discussion with a nushell contributor about the tradeoffs of reuse ... e.g. reusing Rust's portability to Windows can cause some issues for shells After reviewing the test results, I'd be curious if you have any interest in dipping your toes into OSH development ... I think a lot of stuff on https://brush.sh/ is possible, or should be possible, within OSH. So maybe OSH is something you can personally use (?) I always find it more motivating to work on things I'm going to use. That is one reason the interactive shell is less fancy -- because I like a minimalist UI. (I'd like it to be closer to zsh than bash though, and not as fancy as fish) There is also more low-level compiler- and runtime work to do, if that is more interesting to you I'd also be interested in a report on OSH compatibility from your perspective. I think our tests are pretty good, but other test suites may improve our picture of what's left! OSH is definitely "converging", and I want to use this next NLnet grant to be more precise about that. These spec tests and the Alpine Linux app tests should give everyone a good picture. We're also going to write about Oils more -- here's a recent post from a contributor Melvin, who is awesome - https://melvinw.com/posts/2025-06-11-oils-for-unix-overview.html I have this |
Indeed. I'd love to find a way for our CI processes to run the oils compat tests. Do you have a recommended way to do that? We already have some precedent with running the
That's a great insight! I definitely find it motivating to see a new popular tool / script / completion start working once a compatibility issue is resolved :) I've started labeling bugs with some indication of what popular tool may get (partially) unblocked by it, but I haven't been very systematic about it.
I do wish the binary size of
Ditto!
I'd certainly be interested to read a "bug-of-the-month" (or release) post, particularly if it shines light on an otherwise under-illuminated part of the shell world. |
|
Yes I think we should turn the spec tests into something more cross-project.... I actually had that discussion back in 2019 with the author of Smoosh (https://github.com/mgree/smoosh) , but at that time it wasn't worth the effort (i.e. OSH was immature) I looked, and there is probably a way to do it with Github Actions, although I'm trying to minimize dependencies on clouds and proprietary APIs. Our CI runs on multiple clouds now The CI set up is basically the same as the contributor setup, except it's baked into a Docker image. You compile a bunch of shells from scratch - https://github.com/oils-for-unix/oils/wiki/Contributing Right now the expanded A primary goal of Oils was always to produce better POSIX spec that is updated with things that many shells agree on
So really I think the goal should be agreement on semantics, so that users have a stable languages to write! Not just "whatever bash does" e.g. I find it hard to believe that the difference between https://www.oilshell.org/blog/2024/11/release-0.23.0.html#more-osh-compatibility-slicing I also tried to revive Historically there have been many Rust users interested in Oils, e.g. the Ion shell was influenced by Oils way back in 2017 I definitely see that if you got this far, it is probably not going to be fun to change directions ... If we have the common spec tests, we can assess how much work there is, and how much is duplicated. That takes awhile -- I actually went back and marked some tests failing for OSH, since there were assertions from 2016-2018 that were a bit biased So yeah I think it will be good to iron out all these differences ... I will also contact the authors of (some of our tests are from toybox, and they had some very good corner cases!) A funny thing is that I started in 2016 contributing to But memory safety was a big reason I stopped contributing to that project! e.g. http://lists.landley.net/pipermail/toybox-landley.net/2016-March/016106.html http://lists.landley.net/pipermail/toybox-landley.net/2016-March/016179.html Also, I really think we have to move past bash! |
|
Oh also as mentioned, I can think of 2 ways to make the reports more neutral
There are some possible problems with But I am not sure how much bias there is ... as mentioned, I removed one file, and then I also just marked a few more OSH as failing (but I haven't re-published the report) |
|
The author of toysh was also interested in running Oils spec tests So I went ahead and created the "Bashix" repo with discussions and a wiki: https://github.com/bashix-spec/bashix?tab=readme-ov-file https://github.com/bashix-spec/bashix/discussions I look forward to hearing your thoughts! I contacted the author of sush too, but haven't heard back yet |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thank you for fixing issue #538 !
I created a compatibility report, with several shells including Brush:
Summary:
Let me know what you think!
I'd like to get some feedback, and then I'll probably reach out to the authors of other active shells (e.g. I just found out that ksh93 is still being developed!)
For some context, the Oils project is swinging back to OSH, from YSH, probably for the next year or so. We're making a push for compatibility with distro builds, e.g. Alpine Linux and Nix ...
As mentioned, I think Brush's goals are somewhat complementary to that, i.e. if you are more interested in the interactive shell than scripting. I think it would be nice to reduce duplication somehow, although certainly it's not straightforward to do that!
All reactions