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
Guest7221 has left #rust-embedded [Error from remote client]
jasperw has quit [Server closed connection]
jasperw has joined #rust-embedded
crabbedhaloablut has joined #rust-embedded
fooker has quit [Server closed connection]
fooker has joined #rust-embedded
emerent_ has joined #rust-embedded
emerent has quit [Killed (zinc.libera.chat (Nickname regained by services))]
emerent_ is now known as emerent
Guest7221 has joined #rust-embedded
notgull has quit [Ping timeout: 246 seconds]
notgull has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
korken89[m] has quit [Quit: Idle timeout reached: 172800s]
Noah[m] has quit [Quit: Idle timeout reached: 172800s]
ithinuel[m] has quit [Quit: Idle timeout reached: 172800s]
<ryan-summers[m]> Man, my `menu` changes got merged and released before I even came back online for the day :) Thanks thejpster and eldruin - I'll go ahead and publish the 0.4.0 release
<eldruin[m]> <jannic[m]> "I don't know how much I'll..." <- Sounds great! could add yourself to the [meta repo](https://github.com/rust-embedded-community/meta) in a PR?
<ryan-summers[m]> Also, there's an interesting overlap between the REWG libs team and the REC now
crabbedhaloablut has quit []
crabbedhaloablut has joined #rust-embedded
Ekho has quit [Server closed connection]
Ekho has joined #rust-embedded
<StephenD[m]> What does it mean when spawn_after returns an Err? I can't find that in the rtic docs anywhere
<StephenD[m]> They just unwrap it everywhere. Which is what I was doing and just got a panic
<xiretza[cis]> <StephenD[m]> "What does it mean when ..." <- what's a `spawn_after`?
<StephenD[m]> This is the closest I can find for documentation for it
<StephenD[m]> I wish I could find the real docs. I.e. a docs.rs page on that specific function instead of a high level overview
<StephenD[m]> Thanks
<StephenD[m]> I'll admit I have a bit of trouble following that code. I guess it errors when the fq queue is empty. But what does that actually mean?
<StephenD[m]> Ahh I see
<StephenD[m]> So if it's panicking it means there's a spawn for that task already in the queue
<StephenD[m]> Thanks
romancardenas[m] has quit [Quit: Idle timeout reached: 172800s]
andodeki2[m] has joined #rust-embedded
<andodeki2[m]> I have this snippet for ESP32 with a GPRS/module which works when I use Serial Monitor software in my laptop.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/HjEAvdiybMQuJIgXzpdfraYW>)
<spinfast[m]> Is there something like a Box<T> but for statically allocated things so I can do like StaticRef<dyn X>
<spinfast[m]> the use case I have is the SAI peripheral for iMX.RT which can have 1 to 4 data channels associated, and I'm working on creating a Builder for the peripheral
K900 has joined #rust-embedded
<K900> `&dyn T`
<ryan-summers[m]> Is there a meaningful difference between dyn T and impl T?
<spinfast[m]> Won't that not move it though? e.g.
<spinfast[m]> fn add_tx_channel<const PeriphInst: u8, const Channel: u8, TxPin>(self, tx_pin: TxPin) -> Self { self.tx_pins[Channel] = Some(tx_pin); self
<spinfast[m]> }
<spinfast[m]> * Won't that not move it though? e.g.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/AoETYDziEZgHShCBxRyyWJIv>)
<spinfast[m]> * Won't that not move it though? e.g.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/EhhAWBHeuIkKTUpIlxqMVrVF>)
<spinfast[m]> * Won't that not move it though? e.g.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/QNKVHMSZhYWbsqDdjmydsNMX>)
<spinfast[m]> * Won't that not move it though? e.g.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/LqWXTcrGnmyFwMFUkFVoIPjx>)
<spinfast[m]> * Won't that not move it though? e.g.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/SZUuHXubOnQouPxJVOdCuaUe>)
<spinfast[m]> Or I guess alternatively, I create something like.. TxDataPins<T0, T1, T2, T3> = (T0, T1, T2, T4); and go from there, adding another generic param I guess
<spinfast[m]> * Or I guess alternatively, I create something like.. type TxDataPins\<T0, T1, T2, T3> = (T0, T1, T2, T4); and go from there, adding another generic param I guess
<spinfast[m]> * Or I guess alternatively, I create something like.. type TxDataPins\<T0, T1, T2, T3> = (T0, T1, T2, T3); and go from there, adding another generic param I guess
<jannic[m]> <ryan-summers[m]> "Is there a meaningful difference..." <- I think `impl T` will be monomorphised for each concrete T. So it might be slightly faster, but also produce a larger binary if you use it with more than one actual T.
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<fu5ha[m]> <ryan-summers[m]> "Is there a meaningful difference..." <- Completely different things :P `impl Trait` can mean different things in different places, but it's *always* resolved by the compiler to some *single* actual type `T` at compiletime (like a generic). `&impl T` is just a regular thin pointer to that type that... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/hlODijnitWkMkOBUiBSnmTfS>)
<fu5ha[m]> (Just realized you may already know this and were asking the question specifically in reference to the situation presented, which would be a different answer)
JonathanDickinso has quit [Quit: Idle timeout reached: 172800s]
mightypork has joined #rust-embedded
<ryan-summers[m]> Ah interesting, so when wanting a trait object, it's probably better to do &dyn Trait. Is there any value in having the distinction in the language? It feels to me, as a user, to be a purely semantical issue
<dirbaio[m]> depends on what you want
<ryan-summers[m]> Ah okay yeah I had to reread the discussion. It sounds like it has to do with allocation sizes etc.
<ryan-summers[m]> Where there could be some niche locations where you'd want dyn instead of impl
<dirbaio[m]> generics/impl make faster code because the compiler inlines and optimzies everything
<dirbaio[m]> at the cost of bigger code size if you use multiple types
<dirbaio[m]> but perhaps that cost is OK if you really want max perf
<ryan-summers[m]> But still, this is essentially (mostly) irrelevant to a language user
<ryan-summers[m]> The performance characteristics are likely exceptionally marginal
<dirbaio[m]> dyn avoids the code growing for each type you use, but is slower, and bigger code if you actually use only one type
<dirbaio[m]> dyn allows putting different types in the same array, impl/generics don't
<dirbaio[m]> ryan-summers[m]: oh no it can make a big difference in some cases
<dirbaio[m]> especially in embedded where you care about code size a lot, or care about perf a lot, depending on what you're doing
<dirbaio[m]> and that's the whole point of Rust: give you the tools, don't hide how they work under the hood, so you can choose the best one for your use case to optimize
<thejpster[m]> <ryan-summers[m]> "Man, my `menu` changes got..." <- Don’t forget to tag it!
fuse117[m] has joined #rust-embedded
<fuse117[m]> is there a preferred method for debugging embedded rust apps? i am hitting some stack overflows on an app running on an nrf9160. i have never debugged an embedded rust app, but i feel like i need to now
barnabyw[m] has joined #rust-embedded
<barnabyw[m]> <fuse117[m]> "is there a preferred method..." <- it’s a while since I’ve used it, but probe-rs and vscode can be used for interactive debugging https://probe.rs/docs/tools/debugger/
barnaby has joined #rust-embedded
TimSmall[m] has joined #rust-embedded
<TimSmall[m]> barnabyw[m]: fuse117: ...or Vim (Vimspector), or any other editor or graphical debugger which supports the Debug Adapter Protocol (DAP).
DirkVanHaerenbor has quit [Quit: Idle timeout reached: 172800s]
IlPalazzo-ojiisa has joined #rust-embedded
emilgardis[m] has quit [Quit: Idle timeout reached: 172800s]
jessebraham[m] has quit [Quit: Idle timeout reached: 172800s]
newam[m] has quit [Quit: Idle timeout reached: 172800s]
bartmassey[m] has quit [Quit: Idle timeout reached: 172800s]
IlPalazzo-ojiisa has quit [Read error: Connection reset by peer]
IlPalazzo-ojiisa has joined #rust-embedded
SanchayanMaity has quit [Server closed connection]
SanchayanMaity has joined #rust-embedded
<thejpster[m]> Apropos my thoughts earlier on a no-std team, here’s what what-async are thinking: https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async/topic/checkboxes.20on.20async.20stabilizations
<thejpster[m]> s/what/wg/
vollbrecht[m] has quit [Quit: Idle timeout reached: 172800s]
kevlan[m] has quit [Quit: Idle timeout reached: 172800s]
SergioGasquez[m] has quit [Quit: Idle timeout reached: 172800s]
AdamHott[m] has quit [Quit: Idle timeout reached: 172800s]
<fu5ha[m]> <ryan-summers[m]> "But still, this is essentially..." <- Not really... They're very distinct concepts although can totally understand they feel similar. There's overlap in the things they can accomplish but dyn lets you write code that is impossible to express with generics/impl trait. A generic type, whether an... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/NAOIMpZLhJpOMzPkcmghehaX>)
geky[m] has quit [Quit: Idle timeout reached: 172800s]
sknebel has quit [Server closed connection]
firefrommoonligh has quit [Quit: Idle timeout reached: 172800s]
sknebel has joined #rust-embedded
kenny has quit [Server closed connection]
kenny has joined #rust-embedded
danielb[m] has quit [Quit: Idle timeout reached: 172800s]
mabez[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has left #rust-embedded [Error from remote client]
ello has quit [Server closed connection]
ello has joined #rust-embedded