ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
WSalmon_ has quit [Ping timeout: 265 seconds]
WSalmon_ has joined #rust-embedded
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
inara` has joined #rust-embedded
inara has quit [Ping timeout: 244 seconds]
sroemer has joined #rust-embedded
sroemer has quit [Changing host]
sroemer has joined #rust-embedded
d34db33f has quit [Remote host closed the connection]
marmrt[m] has joined #rust-embedded
<marmrt[m]> <JamesMunns[m]> "did anyone ever make a tool that..." <- https://github.com/s7rul/pico-test-bench Erik's thesis is on this. I don't remember the details, and can't find a copy of the thesis atm.
<Farooq> so now I've used a 1k ohm resister to analog input of my stm32. Do you have any idea to make the noise more drastic?
<Farooq> as in, bigger changes
<Farooq> the ADC is 12bit. I get values in range of 4050-4096. Currently to make the changes have high influence in the seed, I read from ADC 5 times and then multiply the numbers after subbing 4000
<Farooq> I'm interesting in hardware/electronic solutions to learn more on that port. Writing a code which makes these small changes or differences so big, is not much of a big deal for me. I already can code well. But I don't know electronics
<Farooq> * know electronics(I'm learning)
<Farooq> oh and I'm using these values to seed the RNG
<whitequark[cis]> ducks run a tesla coil nearby
<whitequark[cis]> that will generate enough noise alright
<Farooq> maybe if I use a resistor with lower wattage, the influence of heat would be bigger?
<Farooq> @whitequark:matrix.org wdym?
<whitequark[cis]> uh... arc discharge produces broadband RF noise that couples to basically all electronics around it
<whitequark[cis]> whatever noise figures you're seeing now, wherever they are, i guarantee you that if you start an arc discharge somewhere close they'll get an order of magnitude worse
<whitequark[cis]> this isn't a very serious suggestino
<whitequark[cis]> s/suggestino/suggestion/
<Ralph[m]> whitequark[cis]: i'd take a radiation source and measure that 😜
<Ralph[m]> (to be fair you can buy such entropy sources, but i don't think that they're particularly cheap, so this also isn't a very serious suggestion 😅)
<whitequark[cis]> you can get a radiation source for like ten dollars
<whitequark[cis]> search amazon for "negative ion"
<Farooq> ten dollars? too much!
<whitequark[cis]> a geiger counter will run you more than that, but you can approximate it with a CMOS camera that is looking at a black rectangle
<Farooq> hmm alternatively, I could use a photocell
<Ralph[m]> <JamesMunns[m]> "🍴" <- there was no need for that - once i had dirbaio's confirmation that `DelayNs` should be clone-able the maintainer was awesome and finished up his PR and merged & released it last night! now `adafruit-seesaw` can be used with stable rust (for most modules, anyway) and with `postcard-rpc` 🥳
<Ralph[m]> btw, dirbaio: would it make sense to update the `DelayNs` docs to state that it should support `Clone`? i don't feel confident to suggest that edit myself as i'm not familiar enough with the intricacies around the implementations
<JamesMunns[m]> <Farooq> "oh and I'm using these values to..." <- Usually stm32 parts have an internal temperature sensor as well as internal voltage monitor, these tend to have some noise in the low bits, one technique I've used is reading them many times (100-1000x), and feed all the readings into a hasher like ChaCha8, then use that output as the seed of a chacha8 rngs
mkj[m] has joined #rust-embedded
<mkj[m]> another option, instead of sampling voltage, sample time. https://github.com/mkj/caprand
<mkj[m]> * time. https://github.com/mkj/caprand (that also uses what James said)
<JamesMunns[m]> Hmm, I thought someone had made a chacha8/20 hasher impl, but I can't find it. The idea is to just use a fixed initial seed, feed the data into it like you're encrypting it, then use the state after consuming all data as the seed to an rng. I can't find it offhand tho
<vollbrecht[m]> while a chaotic system is "not random" its nature makes it really hard to predict. It's also something nice to use as one source. Keyword is "Chua-Circuit" :D
<Farooq> <JamesMunns[m]> "Usually stm32 parts have an..." <- ty
<Farooq> I think for the first project I will just use the resistor
<Farooq> also I was supposed to make the code understandable even for people who don't know Rust
<Farooq> I would like to send it to my friend with extensive C experience in embedded. And ask him what does he think about Rust
<Farooq> Maybe he could become Rusty xD
Alex[m] has joined #rust-embedded
<Alex[m]> Hi 👋🏻
<Alex[m]> What is the best maintained crate today with `no-std` std io traits?
<Alex[m]> Currently i'm trying both - `portable-io` and `no_std_io2`, but `no_std_io2` looks better because it's kinda transparent - there is feature-gated re-export of `std::io` traits if feature `"std"` is enabled, but there is unsolved issues like [that](https://github.com/wcampbell0x2a/no-std-io2/issues/5). So IDK 🤷🏻‍♂️
<JamesMunns[m]> https://docs.rs/embedded-io/latest/embedded_io/ is probably the most commonly used in the embedded space, it's mostly oriented around serial ports. There's also an `embedded-io-async` version.
dkm has quit [Ping timeout: 252 seconds]
dkm has joined #rust-embedded
<jason-kairos[m]> Is it possible to exclude a single function from LTO / optimizations?
<diondokter[m]> Other than that, I don't think you can do much
<Alex[m]> <JamesMunns[m]> "https://docs.rs/embedded-io/..."; <- I see, thanks. I just need traits like Read, Write, BufRead…
<mkj[m]> n
Koen[m] has quit [Quit: Idle timeout reached: 172800s]
wassasin[m] has quit [Quit: Idle timeout reached: 172800s]
hmw has quit [Quit: Bye.]
hmw has joined #rust-embedded
BartvanMaris[m] has quit [Quit: Idle timeout reached: 172800s]
DavidBrown[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7 has joined #rust-embedded
MitchellDScott[m has joined #rust-embedded
<MitchellDScott[m> Does anyone have recommendations on a Blas/lapack crate for small/medium matrices. I’d like to use something like https://github.com/giaf/blasfeo but would rather not depend on importing a c library. I would like to target cortex-m mcus, but I don’t know enough about hardware for this to be a hard requirement.
Guest7 has quit [Quit: Client closed]
<jason-kairos[m]> rust really needs the per function optimizations flags that are available in C / clang / GCC
<JamesMunns[m]> Currently, you can't generally set optimizations on a resolution smaller than crates.
sroemer has quit [Quit: WeeChat 4.5.2]
jonored[m] has quit [Quit: Idle timeout reached: 172800s]
RyanStreur[m] has quit [Quit: Idle timeout reached: 172800s]
romancardenas[m] has quit [Quit: Idle timeout reached: 172800s]
jannic[m] has quit [Quit: Idle timeout reached: 172800s]
bartmassey[m] has quit [Quit: Idle timeout reached: 172800s]
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
ello- has joined #rust-embedded
ello| has joined #rust-embedded
ello has quit [Ping timeout: 260 seconds]
ello_ has quit [Ping timeout: 252 seconds]
therealprof[m] has quit [Quit: Idle timeout reached: 172800s]
thejpster has joined #rust-embedded
<thejpster> evening all
* thejpster is logged in using NEXTSTEP on an HP 9000
<thejpster> kind of extraordinary this still works
<JamesMunns[m]> IRC?
<JamesMunns[m]> Nice :D
<thejpster> from a PA-RISC machine
thejpster has quit [Quit: Leaving]