<thejpster[m]>
jamesmunns accused me on his podcast of having the embedded rust project that’s had the most talks. One solution to that is for more people to submit more embedded rust talks.
<Gnome[m]>
Would the libs team accept a PR that made `heapless::Vec<T, N>` generic over the length type used? For the extreme example of a `Vec<u8, 2>` on a 64 bit system it would balloon to `(2 * 1) + size_of<u64>` which is `2` bytes of data and `8` bytes of length type.
<Gnome[m]>
This could be smoothed by implementing a default length value for common values of `N`, with some macro generated trait implementations and would only really affect users using weirdly high `N` values or generic libraries which would only need to add a concrete or generic value of `LenT`.
t-moe[m] has joined #rust-embedded
<t-moe[m]>
is someone also using the nordic ppk2?
<t-moe[m]>
<t-moe[m]>
I'm trying to set it up to catch power consumption regressions in CI/CD automatically. But I'm struggling to get the same current integral as in the GUI when using it in the terminal (via python library or also rust crate)
JamesMunns[m] has quit [Server closed connection]
JamesMunns[m] has joined #rust-embedded
<diondokter[m]>
<Gnome[m]> "Would the libs team accept a..." <- > <@gnomeddev:matrix.org> Would the libs team accept a PR that made `heapless::Vec<T, N>` generic over the length type used? For the extreme example of a `Vec<u8, 2>` on a 64 bit system it would balloon to `(2 * 1) + size_of<u64>` which is `2` bytes of data and `8`... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/buVcDZSCDIyCcFngfeCpTHoH>)
jxsl has quit [Ping timeout: 252 seconds]
whitequark[cis] has quit [Server closed connection]
whitequark[cis] has joined #rust-embedded
<Gnome[m]>
<diondokter[m]> "> <@gnomeddev:matrix.org..." <- Okay, I'll look into implementing it
<diondokter[m]>
Gnome[m]: I'm not a libs maintainer though! So I don't know if something like this would be merged
<Gnome[m]>
That's okay, if there's some precedent I can imagine it's wanted.
<JamesMunns[m]>
it might be worth looking back in history, IIRC, heapless USED to be generic over the len type?
<JamesMunns[m]>
and IIRC it was removed?
<JamesMunns[m]>
I could be remembering wrong tho
<diondokter[m]>
Gnome[m]: Just make sure to measure the change too. Padding could make the smaller fields not actually take less space
<JamesMunns[m]>
yeah, v0.6 -> v0.7 went from typenum length generics to just `usize`/`u8`
<JamesMunns[m]>
I can't remember why tho
<diondokter[m]>
Maybe they thought the complexity (both for the implementation and having to carry around the generics) vs saved ram tradeoff wasn't worth it?
<JamesMunns[m]>
yeah, I can certainly imagine a lot of reasons why
<diondokter[m]>
Gnome!: Probably good to figure that out first before spending lots of time on this