Josh Stone

Results 817 comments of Josh Stone

It's not quite that simple since there's also `NoSign`, but we do have an internal function for this already: https://github.com/rust-num/num-bigint/blob/367481903a56a89eee2bffa5a27f8b9c75bfd40f/src/bigint/power.rs#L9-L21 I was hesitant to add public `Sign` powers during the...

I want to first acknowledge this with thanks -- it's quite impressive to be near GMP performance! However to set expectations: this is also a large PR, and I will...

> ```rust > num_bigint::BigUint::to_radix_be(&(_local1_param0_helper1) ,_param2); > ``` It appears this is passing radix 1 (in `_param2`), which is an invalid input for that function: "`radix` must be in the range...

It's a bad input, so a panic is expected. There's no fix possible, only improved communication about the issue.

Sure, but that needs to happen in the `num-bigint` crate. I'll transfer this issue.

What if it is not supported? Is it possible to have a fallback? e.g. [python issue 37586](https://bugs.python.org/issue37586) discusses a problem with support added in macOS 10.15, where apparently older versions...

Yeah, `setsid` seems plenty standard (POSIX.1-2001, POSIX.1-2008, SVr4), and `libc` has it defined unconditionally in `src/unix/mod.rs`, so we should be ok using it under fork/exec with `POSIX_SPAWN_SETSID` as an optimization.

We compile `std` with older system minimums -- glibc 2.17, macOS 10.7, etc. -- so we need runtime checks to see what's actually available. And as I mentioned earlier from...

> Does that matter though? If we're just using it opportunistically and make no guarantees, can't we just always pass the flag when it won't cause an error? It matters...

This functionality already exists privately as `map_either!`: https://github.com/rayon-rs/either/blob/53ae3de557cf2a5e35af5fc63406676d0d9d9779/src/lib.rs#L133-L140 So the internal use is evidence enough that this is a useful macro. The existing macro is named like the [`map_either`](https://docs.rs/either/latest/either/enum.Either.html#method.map_either) method,...