redox-os issueshttps://gitlab.redox-os.org/groups/redox-os/-/issues2023-06-13T03:07:48Zhttps://gitlab.redox-os.org/redox-os/redox/-/issues/1313Compilation of "xz" recipe in cookbook fails for linux build2023-06-13T03:07:48ZMatt MillerCompilation of "xz" recipe in cookbook fails for linux buildDuring the compilation process on an x86_64 machine it fails to find the 'configure' script during the building of 'redox/cookbook/recipes/xz'. I changed into the folder to look around and noticed an 'autogen.sh' file after running this ...During the compilation process on an x86_64 machine it fails to find the 'configure' script during the building of 'redox/cookbook/recipes/xz'. I changed into the folder to look around and noticed an 'autogen.sh' file after running this the 'configure' file was available and all was well.https://gitlab.redox-os.org/redox-os/ion/-/issues/988Array slicing is broken2021-01-03T07:28:42Zmatu3baArray slicing is brokenbug: The manual claims array slicing is possible, whereas this is not true.
expect: outcome description
related: #973
code: input
```
let array = [{0...5}]
echo @array[0,3..]
```
expect: output
```
0 3 4 5
```bug: The manual claims array slicing is possible, whereas this is not true.
expect: outcome description
related: #973
code: input
```
let array = [{0...5}]
echo @array[0,3..]
```
expect: output
```
0 3 4 5
```Ion Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/redox/-/issues/1314Package 'bison' not installed, linux build2023-06-13T03:11:09ZMatt MillerPackage 'bison' not installed, linux buildFollowing the installation instructions compilation bombed because bison was missing. Indeed after re-checking this URL 'https://doc.redox-os.org/book/ch02-04-preparing-the-build.html' for the 'Linux Users:' portion it is indeed missing ...Following the installation instructions compilation bombed because bison was missing. Indeed after re-checking this URL 'https://doc.redox-os.org/book/ch02-04-preparing-the-build.html' for the 'Linux Users:' portion it is indeed missing 'bison' in the install line.https://gitlab.redox-os.org/redox-os/redox/-/issues/1315Red Hat Enterprise Linux 7.8 VM2023-06-13T03:09:13ZAdrian LewisRed Hat Enterprise Linux 7.8 VMOS
```
Virtualization: vmware
Operating System: Red Hat Enterprise Linux
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.8:GA:server
Kernel: Linux 3.10.0-1127.el7.x86_64
Architecture: x86-64
```
I run the bootstrap, which (nearly) immediat...OS
```
Virtualization: vmware
Operating System: Red Hat Enterprise Linux
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.8:GA:server
Kernel: Linux 3.10.0-1127.el7.x86_64
Architecture: x86-64
```
I run the bootstrap, which (nearly) immediately tells me it is an usupported platform and then continues to clone.
```
$ curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh && bash -e bootstrap.sh
|------------------------------------------|
|----- Welcome to the redox bootstrap -----|
|------------------------------------------|
Fatal error: Unsupported platform, please open an issue\[0mCloning gitlab repo...
Cloning into 'redox'...
```https://gitlab.redox-os.org/redox-os/ion/-/issues/990Unterminated single quotes may run arbitrary commands2022-11-26T09:23:24Zmatu3baUnterminated single quotes may run arbitrary commandsbug: The shell does not create and error upon a wrong let binding with single quotes. It appears to run arbitrary commands, when further single quotes appear.
If you are lucky, it creates a core dump.
expect: Not silently accepting a wr...bug: The shell does not create and error upon a wrong let binding with single quotes. It appears to run arbitrary commands, when further single quotes appear.
If you are lucky, it creates a core dump.
expect: Not silently accepting a wrong grammar (for files). The REPL should also indicate, that the string is not terminated.
related: #959 #949
code: input
```sh
let a = 'ab''
```
expect: output
```
ion: syntax error: unterminated single quote
```
version: f05b74e7f3ba96a667a343cd07de212183757b8d
interaction: Alacritty with ion
context: terminal multiplexers may prevent faster core dumpIon Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/redox/-/issues/1316Unsupported OS in bootstrap: Alpine Linux2023-06-13T03:06:41ZMelody HornUnsupported OS in bootstrap: Alpine Linux<!-- Thank you for taking the time to submit an issue! By following these comments and filling out the sections below, you can help the developers get the necessary information to fix your issue. Please provide a single issue per report....<!-- Thank you for taking the time to submit an issue! By following these comments and filling out the sections below, you can help the developers get the necessary information to fix your issue. Please provide a single issue per report. You can also preview this report before submitting it. Feel free to modify/remove sections to fit the nature of your issue. -->
<!-- Please search to check that your issue has not been created already. By preventing duplicate issues, you can help keep the repository organized. If your current issue has already been created and is still unresolved, you can contribute by commenting there. -->
<!-- Replace the empty checkbox [ ] below with a checked one [x] if you have already searched for your issue. -->
- [x] I agree that I have searched opened and closed issues to prevent duplicates.
--------------------
## Description
<!-- Briefly summarize/describe the issue that you are experiencing below. -->
I'm trying to build Redox from Alpine Linux, and the bootstrap script is incorrectly detecting it as FreeBSD.
## Environment info
<!-- To understand where your issue originates, please include some relevant information about your environment. -->
<!-- If you have built Redox OS yourself, please provide the following information: -->
- Operating system:
Alpine Linux
- `uname -a`:
Linux UberPC-V3 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 Linux
## Steps to reproduce
<!-- If possible, please list the steps to reproduce ("trigger") your issue below. Being detailed definitely helps speed up bug fixes. -->
1. Run the bootstrap script on Alpine Linux with some dependencies missing.
## Behavior
<!-- It may seem obvious to know what to expect, but isolating the behavior from everything else simplifies the development process. Remember to provide a single issue in this report. You can use the References section below to link your issues together. -->
<!-- Describe the behavior you expect your steps should yield (i.e., correct behavior). -->
- **Expected behavior**:
Dependencies are installed automatically.
<!-- Describe the behavior you observed when running your steps (i.e., buggy behavior). -->
- **Actual behavior**:
<!-- **Logs?** Posting a log can help developers find your particular issue more easily. Please wrap your code in code blocks using triple back-ticks ``` to increase readability. -->
```
|------------------------------------------|
|----- Welcome to the redox bootstrap -----|
|------------------------------------------|
+ echo 'FreeBSD detected!'
FreeBSD detected!
+ echo 'Installing missing packages...'
Installing missing packages...
+ install_freebsd_pkg git
+ install_bsd_pkg 'sudo pkg' git
+ PKG_MANAGER='sudo pkg'
+ PKG_NAME=git
+ BIN_NAME=
+ '[' -z ]
+ BIN_NAME=git
+ which git
+ true
+ BIN_LOCATION=
+ '[' -z ]
+ echo 'sudo pkg install git'
sudo pkg install git
+ sudo pkg install git
> pkg@4.4.4
> Error! Not more than one entry file/directory is expected
```
<!-- **Solution?** Have a solution in mind? Propose your solution below. -->
- **Proposed solution**:
Add support for Alpine Linux in the bootstrap script. Its package manager is `apk` and its package repository can be browsed at https://pkgs.alpinelinux.org/packages; an example of its usage would be `apk add git`.
<!-- **Screenshots?** Make it easier to get your point across with screenshots. You can drag & drop or paste your images below. -->
<!-- **Code?** Awesome! You can also create a pull request with a reference to this issue. -->
<!-- **Files?** Attach your relevant files by dragging & dropping or pasting them below. -->
<!-- You also can preview your report before submitting it. Thanks for contributing to Redox! -->https://gitlab.redox-os.org/redox-os/ion/-/issues/991Simplify slicing2020-12-12T21:56:29Zmatu3baSimplify slicingfeat: Remove edge cases
BREAKING CHANGE: progams relying on slicing MUST be revalidated
perf: impact
performance none
usability increase
maintainability increase
code: input
```sh
let array = [{1..10}]
let array2 = [{1...10}]
echo...feat: Remove edge cases
BREAKING CHANGE: progams relying on slicing MUST be revalidated
perf: impact
performance none
usability increase
maintainability increase
code: input
```sh
let array = [{1..10}]
let array2 = [{1...10}]
echo @array
echo @array2
```
expect: output
```
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
```
actual: output
```
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
```
reason: better usability and remove edge case
context: We should reuse the inclusive annotation for slicing to simplify working with the shell.
```
let array2 = [{1..=10}]
```Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/redox/-/issues/1317Issue with compiling for the first time.2023-06-13T03:00:00ZEvan HooseIssue with compiling for the first time.<!-- Thank you for taking the time to submit an issue! By following these comments and filling out the sections below, you can help the developers get the necessary information to fix your issue. Please provide a single issue per report....<!-- Thank you for taking the time to submit an issue! By following these comments and filling out the sections below, you can help the developers get the necessary information to fix your issue. Please provide a single issue per report. You can also preview this report before submitting it. Feel free to modify/remove sections to fit the nature of your issue. -->
<!-- Please search to check that your issue has not been created already. By preventing duplicate issues, you can help keep the repository organized. If your current issue has already been created and is still unresolved, you can contribute by commenting there. -->
<!-- Replace the empty checkbox [ ] below with a checked one [x] if you have already searched for your issue. -->
- [x] I agree that I have searched opened and closed issues to prevent duplicates.
--------------------
## Description
<!-- Briefly summarize/describe the issue that you are experiencing below. -->
`make all` Failing to compile.
## Environment info
<!-- To understand where your issue originates, please include some relevant information about your environment. -->
<!-- If you have built Redox OS yourself, please provide the following information: -->
- `uname -a`:
Linux laptop 5.4.0-7642-generic #46~1598628707~20.04~040157c-Ubuntu SMP [REDACT] x86_64 x86_64 x86_64 GNU/Linux
NOTE: I am currently running Pop!_OS, not vanilla Ubuntu.
- `rustc -V`:
rustc 1.48.0-nightly (6af1bdda5 2020-09-15)
- `git rev-parse HEAD`:
d7e52b5238e69df764adbf9f2a0b3bd3b056d322
## Steps to reproduce
<!-- If possible, please list the steps to reproduce ("trigger") your issue below. Being detailed definitely helps speed up bug fixes. -->
1. Follow Manual Setup in https://doc.redox-os.org/book/ch02-04-preparing-the-build.html
2. Run make all as stated in https://doc.redox-os.org/book/ch02-05-compiling-redox.html
## Behavior
<!-- It may seem obvious to know what to expect, but isolating the behavior from everything else simplifies the development process. Remember to provide a single issue in this report. You can use the References section below to link your issues together. -->
<!-- Describe the behavior you expect your steps should yield (i.e., correct behavior). -->
- **Expected behavior**:
Compile finishes without error.
<!-- Describe the behavior you observed when running your steps (i.e., buggy behavior). -->
- **Actual behavior**:
Receive error:
```
mk/depends.mk:13: *** cargo-config 0.1.1 not found, run "cargo install --force --version 0.1.1 cargo-config". Stop.
```
<!-- **Logs?** Posting a log can help developers find your particular issue more easily. Please wrap your code in code blocks using triple back-ticks ``` to increase readability. -->
I don't know where to find logs, but would be happy to provide them if someone can point me to the right place
Related to:
- #1310 Possibly same bug? I'm not familiar with the build systems involved, so I can't say for sure.https://gitlab.redox-os.org/redox-os/redox/-/issues/1318po4a required for clean build on Ubuntu 20.042023-06-13T02:54:48Zjeannekamikazepo4a required for clean build on Ubuntu 20.04<!-- Thank you for taking the time to submit an issue! By following these comments and filling out the sections below, you can help the developers get the necessary information to fix your issue. Please provide a single issue per report....<!-- Thank you for taking the time to submit an issue! By following these comments and filling out the sections below, you can help the developers get the necessary information to fix your issue. Please provide a single issue per report. You can also preview this report before submitting it. Feel free to modify/remove sections to fit the nature of your issue. -->
<!-- Please search to check that your issue has not been created already. By preventing duplicate issues, you can help keep the repository organized. If your current issue has already been created and is still unresolved, you can contribute by commenting there. -->
<!-- Replace the empty checkbox [ ] below with a checked one [x] if you have already searched for your issue. -->
- [X] I agree that I have searched opened and closed issues to prevent duplicates.
--------------------
## Description
<!-- Briefly summarize/describe the issue that you are experiencing below. -->
On Ubuntu 20.04, `po4a` seems to be required for a successful clean install.
## Environment info
<!-- To understand where your issue originates, please include some relevant information about your environment. -->
<!-- If you have built Redox OS yourself, please provide the following information: -->
- Operating system:
Ubuntu 20.04
- `uname -a`:
`Linux sha490 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux`
- `rustc -V`:
`rustc 1.48.0-nightly (f68e08933 2020-09-19)`
- `git rev-parse HEAD`:
`d7e52b5238e69df764adbf9f2a0b3bd3b056d322`
<!-- Depending on your issue, additional information about your environment (network config, package versions, dependencies, etc.) can also help. You can list that below. -->
## Steps to reproduce
<!-- If possible, please list the steps to reproduce ("trigger") your issue below. Being detailed definitely helps speed up bug fixes. -->
1. `cd path/to/your/projects/folder/`
2. `curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh && bash -e bootstrap.sh`
3. `cd redox`
4. `make all`
## Behavior
<!-- It may seem obvious to know what to expect, but isolating the behavior from everything else simplifies the development process. Remember to provide a single issue in this report. You can use the References section below to link your issues together. -->
<!-- Describe the behavior you expect your steps should yield (i.e., correct behavior). -->
- **Expected behavior**:
Successful build.
<!-- Describe the behavior you observed when running your steps (i.e., buggy behavior). -->
- **Actual behavior**:
Build fails saying `po4a` was not found.
<!-- **Logs?** Posting a log can help developers find your particular issue more easily. Please wrap your code in code blocks using triple back-ticks ``` to increase readability. -->
<!-- **Solution?** Have a solution in mind? Propose your solution below. -->
- **Proposed solution**:
`sudo apt install po4a`
<!-- **Screenshots?** Make it easier to get your point across with screenshots. You can drag & drop or paste your images below. -->
<!-- **Code?** Awesome! You can also create a pull request with a reference to this issue. -->
<!-- **Files?** Attach your relevant files by dragging & dropping or pasting them below. -->
<!-- You also can preview your report before submitting it. Thanks for contributing to Redox! -->https://gitlab.redox-os.org/redox-os/redox/-/issues/1319panicked at 'unexpected -vV format' with compiling2023-06-13T02:55:49ZYi Chengpanicked at 'unexpected -vV format' with compiling# Description
On WSL ubuntu 18.04, compile fail and output info:
```
thread 'main' panicked at 'unexpected -vV format', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc_version-0.1.7/src/lib.rs:126:5
```
# Environment info
* Oper...# Description
On WSL ubuntu 18.04, compile fail and output info:
```
thread 'main' panicked at 'unexpected -vV format', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc_version-0.1.7/src/lib.rs:126:5
```
# Environment info
* Operating system: WSL Ubuntu 18.04
* uname -a: Linux DESKTOP-GSOK8JJ 4.4.0-17763-Microsoft #864-Microsoft Thu Nov 07 15:22:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
* `rustc -V`: rustc 1.47.0-nightly (6c8927b0c 2020-07-26)
* git rev-parse HEAD: d7e52b5238e69df764adbf9f2a0b3bd3b056d322
# Steps to reproduce
1. `cd path/to/your/projects/folder/`
2. `curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh && bash -e bootstrap.sh`
3. `cd redox`
4. `make all`
## Behavior
* **Expected behavior**: Successful build.
* **Actual behavior**: Build fail and output panicked.
## Self Analysis
compile panicked with info `unexpected -vV format`, related to source code `.cargo/registry/src/github.com-1ecc6299db9ec823/rustc_version-0.1.7/src/lib.rs:126`.
```
// lib.rs
/// Parses a "rustc -vV" output string and returns
/// the SemVer version and additional metadata
/// like the git short hash and build date.
pub fn version_meta_for(verbose_version_string: &str) -> VersionMeta {
let out: Vec<_> = verbose_version_string.lines().collect();
const ERR_MSG: &'static str = "unexpected -vV format";
assert!(out.len() == 6 || out.len() == 7, ERR_MSG);
...
```
This function is used to parse `rustc -vV`,and I execute this command manually.
```
% rustc -vV
rustc 1.47.0-nightly (6c8927b0c 2020-07-26)
binary: rustc
commit-hash: 6c8927b0cf80ceee19386026cf9d7fd4fd9d486f
commit-date: 2020-07-26
host: x86_64-unknown-linux-gnu
release: 1.47.0-nightly
LLVM version: 10.0
```
According to the `rustc -vV` message, I write a testcase.
```
24 #[test]
23 fn parse_nightly_cy() {
22 let version = version_meta_for(
21 "rustc 1.47.0-nightly (6c8927b0c 2020-07-26)
20 binary: rustc
19 commit-hash: 6c8927b0cf80ceee19386026cf9d7fd4fd9d486f
18 commit-date: 2020-07-26
17 host: x86_64-unknown-linux-gnu
16 release: 1.47.0-nightly
15 LLVM version: 10.0",
14 );
13
12 assert_eq!(version.semver, Version::parse("1.47.0-nightly").unwrap());
11 assert_eq!(
10 version.commit_hash,
9 Some("6c8927b0cf80ceee19386026cf9d7fd4fd9d486f".into())
8 );
7 assert_eq!(version.commit_date, Some("2020-07-26".into()));
6 assert_eq!(version.channel, Channel::Nightly);
5 assert_eq!(version.host, "x86_64-unknown-linux-gnu");
4 assert_eq!(
3 version.short_version_string,
2 "rustc 1.47.0-nightly (6c8927b0c 2020-07-26)"
1 );
313 }
```
and everything is fine,when I ran `cargo test`.this means `version_meta_for` is correct.so why compile fail?https://gitlab.redox-os.org/redox-os/ion/-/issues/994Scopes: can not change variables in function from matches, conditionals or loops2021-06-01T11:13:04Zmatu3baScopes: can not change variables in function from matches, conditionals or loopsbug: values in same function scope are not writable from matches, conditionals or loops.
Additionally, one can not write into variables of higher scope. We need to clarify the syntax for this.
expect: It should be possible to write valu...bug: values in same function scope are not writable from matches, conditionals or loops.
Additionally, one can not write into variables of higher scope. We need to clarify the syntax for this.
expect: It should be possible to write values in functions.
code: input
```sh
let x = 4
let y = 0
let z = 0
let a = 4
fn demo
if test 1 == 1
let x += 1
end
echo "x:" $x
if test $x != 5
echo "x broken"
end
for i in {0..=4}
let z += 1
end
echo "z:" $z
if test $z != 5
echo "z broken"
end
match $a
case 4; let a += 1
case _; echo "FAIL"
end
echo "a:" $a
if test $a != 5
echo "a broken"
end
#echo $y
#while test $y -lt 5
# let y += 1 # BROKEN: does not update y
# #echo $y
#end
#echo "y:" $y
#if test $y != 5
# echo "y broken"
#end
end
demo
echo $x
echo $y
echo $z
echo $a
```
actual: output
```txt
x: 4
x broken
z: 0
z broken
a: 4
a broken
4
0
0
4
```
expect: output
```txt
x: 5
y: 5
z: 5
a: 5
5
5
5
5
```
version: e033ca1c0c2ff8d1932137d2ed7354d003ad9cdc
interaction: noneIon Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/redox/-/issues/1320RISC-V port2023-10-27T13:37:51ZDaniell MesquitaRISC-V portThe future of computing is graphene chips, RISC-V processors, e-ink displays and Rust programming language.
Why not, like Debian, have a redoxOS port to RISC-V arch?The future of computing is graphene chips, RISC-V processors, e-ink displays and Rust programming language.
Why not, like Debian, have a redoxOS port to RISC-V arch?https://gitlab.redox-os.org/redox-os/ion/-/issues/995neovim: can not read /tmp file created by shell2020-12-30T10:16:06Zmatu3baneovim: can not read /tmp file created by shellbug: I would like to use ion as shell inside neovim to read build logs in a new buffer or new tab. However neovim can not read /tmp files. Probably, because they are not created?
expect: ion should create /tmp files upon request and re...bug: I would like to use ion as shell inside neovim to read build logs in a new buffer or new tab. However neovim can not read /tmp files. Probably, because they are not created?
expect: ion should create /tmp files upon request and reading /tmp files should be possible
related: none
code: input to neovim in visual mode
```sh
:r !ls
```
expect: output
```txt
folder1
folder2
...
```
actual: output
```txt
Shell exit 1
E485: can not read file /tmp/nvimnokcRa/1
...
```
kernel: linux5.7
version: e033ca1c0c2ff8d1932137d2ed7354d003ad9cdc
interaction: none
context: run inside alacritty
behavior of bash: worksIon Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/997Replace err-derive with thiserror2021-01-23T17:10:01ZNathaniel Barragancontact@nathanielbarragan.xyzReplace err-derive with thiserrorThe `err-derive` crate is now depreciated, and the author currently recommends moving to `thiserror`
Some info:
Currently, the error dervies that use `err-derive` take up about 149 lines of code. `thiserror` although not a drop-in repl...The `err-derive` crate is now depreciated, and the author currently recommends moving to `thiserror`
Some info:
Currently, the error dervies that use `err-derive` take up about 149 lines of code. `thiserror` although not a drop-in replacement is close to it, and it shouldn't be too difficult to transfer over.
Info on switching over from `err-derive` that I've found out
`#[derive(Error)` still works as normal
An example of something that needs to change is any `#[error(display = "whatever")]` lines. This actually becomes easier with it looking like `#[error("whatever")]`. Any sort of fields that are needed from the struct or tuple are done very similarly.
More information on `thiserror` can be found on docs.rs [here](https://docs.rs/thiserror/1.0.23/thiserror/). I recommend we just base on "1.0" and let any minor versions update as needed.https://gitlab.redox-os.org/redox-os/ion/-/issues/998vi-mode: `e` does not work properly2021-08-31T08:28:31Zmseravallivi-mode: `e` does not work properlyin VI normal mode the `e` navigation does not work properly, it misses the last character.
How to reproduce:
```
[input from keyboard: ESC i l o r e m SPACE i p s u m]
$ lorem ipsum
[input from keyboard: ESC 0 d e]
$ m ipsum
```
Exp...in VI normal mode the `e` navigation does not work properly, it misses the last character.
How to reproduce:
```
[input from keyboard: ESC i l o r e m SPACE i p s u m]
$ lorem ipsum
[input from keyboard: ESC 0 d e]
$ m ipsum
```
Expected result ` ipsum`
This happens as well if I try to change the word:
```
[input from keyboard: ESC i l o r e m SPACE i p s u m]
$ lorem ipsum
[input from keyboard: ESC 0 c e h e l l o]
$ hellom ipsum
```
Expected result `hello ipsum`Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/1000Process substitution should be given a priority2021-06-01T11:10:44ZJMWProcess substitution should be given a priorityProcess substitution should be given a priority. Many Unix and Linux commands operate on files, and not because the creators of these utilities made any sort of bad decision, but because it was logical for these commands to operate on fi...Process substitution should be given a priority. Many Unix and Linux commands operate on files, and not because the creators of these utilities made any sort of bad decision, but because it was logical for these commands to operate on files rather than strings - and notwithstanding this, it is nevertheless often useful to make these utilities operate on strings using process substitution. The following link illustrates how full generality requires that Ion shell implement process substitution:
https://catonmat.net/set-operations-in-unix-shell
Sets don't really constitute an edge case here. There are a great many utilities that operate on files that can usefully be coerced into operating on strings using process substitution. Implementing process substitution in Ion shell should be given a priority.https://gitlab.redox-os.org/redox-os/ion/-/issues/1001Parameter Substitution on arrays2023-03-03T09:37:32ZNils ErikssonParameter Substitution on arraysfeat: Add an equivalent @or method for arrays. With this addition both arrays and string can have alternative default values.
How would it work?
An empty array would trigger the @or method to return the second argument instead of the fi...feat: Add an equivalent @or method for arrays. With this addition both arrays and string can have alternative default values.
How would it work?
An empty array would trigger the @or method to return the second argument instead of the first.
It could work with array slicing, but it's forbidden to create empty slices of arrays as of right now, thus the method would never trigger and return the second argument.
BREAKING CHANGE: None that I know of.
perf: impact
performance none
usability increase
maintainability increase
code: input
```
let array = []
# Inline array in @or method
echo @or(@array [foo bar])
# single value
echo @or(@array baz)
# variable expansion
let default = foobar
echo @or(@array $default)
# method would not trigger
let array ++= faz
echo @or(@array $default)
```
expect: output
```
foo bar
baz
foobar
faz
```
reason: Strings already have this feature and arrays should to. Parameter substitution are very common in bash scripts and should be ported over fully.
context: This is a stripped down version of a script I have today. I have to add the default argument in a check when I could have written it like: "${@-status}" in bash. I can't demonstrate how I would use the @or method as I still depend on array slicing.
```
fn mix_status
if bool $(pamixer --get-mute)
echo "--%"
else
printf "%2s%%\n" $(pamixer --get-volume)
end
end
test $len(@args) = 1 && let args ++= "status"
for arg in @args[1..]
match $arg
case status; mix_status
case toggle-mute; pamixer --toggle-mute
case mute; pamixer --mute
case _; echo "Usage: $(basename @args[0]) [status|toggle-mute|mute] ... (default: status)"
end
end
```
behavior of bash
Here is bash solution to parameter substitution: https://tldp.org/LDP/abs/html/parameter-substitution.htmlhttps://gitlab.redox-os.org/redox-os/redox/-/issues/1329Freeze when using std::sync::Barrier2023-05-12T18:39:59ZJacob Lorentzon4ldo2@protonmail.comFreeze when using std::sync::BarrierThe following example freezes on Redox, whereas it runs to completion on Linux.
```rust
use std::sync::{Arc, Barrier};
fn main() {
let barrier = Arc::new(Barrier::new(5));
let threads = (0..4).map(|_| {
let barrier = A...The following example freezes on Redox, whereas it runs to completion on Linux.
```rust
use std::sync::{Arc, Barrier};
fn main() {
let barrier = Arc::new(Barrier::new(5));
let threads = (0..4).map(|_| {
let barrier = Arc::clone(&barrier);
std::thread::spawn(move || {
barrier.wait();
})
}).collect::<Vec<_>>();
barrier.wait();
for thread in threads {
thread.join().unwrap();
}
}
```
The bug likely pertains to `relibc`, but given that there have been `futex` bugs in the past, I decided to file the issue here instead.Jeremy SollerJeremy Sollerhttps://gitlab.redox-os.org/redox-os/ion/-/issues/1002Cannot create empty slices when range start with the array length2021-05-31T23:26:46ZNils ErikssonCannot create empty slices when range start with the array lengthbug: It's not possible to create an empty slice when the start range starts with the arrays current length.
expect: That the slicing range 1.. would skip the first element and print nothing if the array only had one element.
related: n...bug: It's not possible to create an empty slice when the start range starts with the arrays current length.
expect: That the slicing range 1.. would skip the first element and print nothing if the array only had one element.
related: none
code: input
```
let foo=[bar]
echo @foo[0..]
echo @foo[0..0]
echo @foo[0..1]
echo @foo[1..]
echo @foo[1..1]
let foo=[bar baz]
echo @foo[0..]
echo @foo[0..0]
echo @foo[0..1]
echo @foo[1..]
echo @foo[1..1]
```
expect: output
```
bar
\n
bar
\n
\n
bar baz
\n
bar
baz
\n
```
actual: output
```
bar
\n
bar
ion: expansion error: invalid index
ion: expansion error: invalid index
bar baz
\n
bar
baz
\n
```
kernel: 5.12.4-arch1-2
version: ion 1.0.0-alpha (x86_64-unknown-linux-gnu)
rev 1170b84587bbad260a3ecac8e249a216cb1fd5e9
interaction: Run each command after the other
behavior of rust:
code:
```
fn main() {
let foo=vec!["bar"];
println!("{:?}", &foo[0..]);
println!("{:?}", &foo[0..0]);
println!("{:?}", &foo[0..1]);
println!("{:?}", &foo[1..]);
println!("{:?}", &foo[1..1]);
let foo=vec!["bar", "baz"];
println!("{:?}", &foo[0..]);
println!("{:?}", &foo[0..0]);
println!("{:?}", &foo[0..1]);
println!("{:?}", &foo[1..]);
println!("{:?}", &foo[1..1]);
}
```
output:
```
["bar"]
[]
["bar"]
[]
[]
["bar", "baz"]
[]
["bar"]
["baz"]
[]
```https://gitlab.redox-os.org/redox-os/redox/-/issues/1330log: vs logging: scheme2021-03-30T00:50:27ZJoshua Abrahamlog: vs logging: schemeThere are currently two different schemes for logging: `log:` and `logging:`. There doesn't appear to be any consumers of the `log:` scheme, which is provided by `logd`. The `logging:` scheme is created by the `redox-log` library and use...There are currently two different schemes for logging: `log:` and `logging:`. There doesn't appear to be any consumers of the `log:` scheme, which is provided by `logd`. The `logging:` scheme is created by the `redox-log` library and used by the `pcid` user daemon. Which scheme should be used by other daemons for logging? Is one deprecated in favor of the other?