4 ms·
I am not sure if this helps or not, but if you want a bash-compatible shell on Windows, translating Oils to Ada, or porting it to Windows could be easier than a
by chubot 1y ago
I am not sure if this helps or not, but if you want a bash-compatible shell on Windows, translating Oils to Ada, or porting it to Windows could be easier than adding bash arrays
https://news.ycombinator.com/item?id=43910883 https://news.ycombinator.com/item?id=43910883 (similar comment about Rust)
Bash arrays are extremely hairy, with many corner cases, and differ from bash version to version.
And in particular, the shell code in Nix DOES RELY on these corners (e.g. https://www.oilshell.org/blog/2024/06/release-0.22.0.html https://www.oilshell.org/blog/2024/06/release-0.22.0.html)
---
I mentioned in another comment that Koichi Murase, who is a bash contributor, and wrote the largest shell program in the world, just overhauled the bash array support in OSH
A few relevant test files -- Koichi added a huge number recently:
https://oils.pub/release/0.29.0/test/spec.wwz/osh-py/array-sparse.html https://oils.pub/release/0.29.0/test/spec.wwz/osh-py/array-s...
https://oils.pub/release/0.29.0/test/spec.wwz/osh-py/array-assoc.html https://oils.pub/release/0.29.0/test/spec.wwz/osh-py/array-a...
https://oils.pub/release/0.29.0/test/spec.wwz/osh-py/ble-idioms.html https://oils.pub/release/0.29.0/test/spec.wwz/osh-py/ble-idi...
Our tests are thorough enough that we ROUTINELY find bugs in bash, like integer overflow bugs.
Koichi also knows about the differences between say bash 4.3, 4.4, 5.0, 5.1, etc. Because he wrote a very large program that uses bash arrays all over the place.
---
Feel free to use our tests in any case (other shells like the Scheme shell used to bootstrap Guix have)
And feel free to post a message to https://github.com/oils-for-unix/oils https://github.com/oils-for-unix/oils if you're interested or have questions
- Ericson2314 1y agoDoes YSH work on Windows?
- chubot 1y agoIt doesn't, but in the last ~3 months I've come around to the idea that it should And I did a bunch of research on it (e.g. https://lobste.rs/s/qjzd9y/everyone_quotes_command_line_arguments https://lobste.rs/s/qjzd9y/everyone_quotes_command_line_argu... ) I did notice that git for windows uses a bash built with MSYS. And I noticed that Python's subprocess module implements pipelines with native Win32, not with MSYS. So that is something we can do in Oils, in theory I won't say it's high priority, but of course it's an open source project, and users often change the priorities Two things that would really help are (1) finding a skilled Win32 programmer and (2) getting another grant (we've gotten 3 in the past)
- Ericson2314 1y agoOK thanks for the status update. I'll keep on eye on this.