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
IlPalazzo-ojiisa has quit [Quit: Leaving.]
starblue has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
emerent has quit [Remote host closed the connection]
emerent has joined #rust-embedded
starblue has quit [Quit: WeeChat 3.0]
<re_irc> <@thejpster:matrix.org> : > thus RTIC v2.x currently requires a nightly toolchain)
<re_irc> Did I read that right? I’ll have to stick to 1.x for now.
<re_irc> <@thejpster:matrix.org> ->
<re_irc> <@thejpster:matrix.org> Damnit matrix. I lost the quote.
<re_irc> <@korken89:matrix.org> : Correct, when TAIT is stabilized RTIC will automatically be working on stable
<re_irc> <@korken89:matrix.org> The crates themselves are not dependent on nightly features, only the generated code from the codegen
<re_irc> <@korken89:matrix.org> Unless you enable the "embedded-hal-async" support in "rtic-monotonics", then AFIT is required
<re_irc> <@thejpster:matrix.org> Does TAIT have a roadmap?
<re_irc> <@diondokter:matrix.org> Not sure, but I believe I read somewhere that it's supposed to be stabilized this year
Foxyloxy has joined #rust-embedded
Foxyloxy_ has quit [Ping timeout: 240 seconds]
m5zs7k has quit [Ping timeout: 240 seconds]
m5zs7k has joined #rust-embedded
Foxyloxy has quit [Ping timeout: 240 seconds]
<re_irc> <@jannic:matrix.org> According to this roadmap https://blog.rust-lang.org/2023/01/20/types-announcement.html#roadmap TAIT should be "stabilized or on the path to stabilization" this summer.
<re_irc> <@jannic:matrix.org> AFIT as well.
<re_irc> <@dominicclifton:matrix.org> If anyone here does embedded work using IntelliJ and uses the rust plugin I'd love to get some thumbs up on this issue:
<re_irc> <@jannic:matrix.org> Looks like there was a design meeting on TAITs yesterday. Unfortunately I can't find any meeting minutes. https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/design.20meeting.202023-05-31.20TAITs
<re_irc> <@jannic:matrix.org> As the linked hackmd document was edited yesterday, I guess the results of the meeting were immediately incorporated into that document.
cr1901 has quit [Remote host closed the connection]
cr1901 has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
cr1901 has quit [Remote host closed the connection]
Foxyloxy has joined #rust-embedded
hmw has quit [Quit: Bye.]
hmw has joined #rust-embedded
loki_val has quit [Ping timeout: 250 seconds]
emerent has quit [Ping timeout: 248 seconds]
crabbedhaloablut has joined #rust-embedded
emerent has joined #rust-embedded
cr1901 has joined #rust-embedded
cr1901 has quit [Remote host closed the connection]
cr1901 has joined #rust-embedded
cr1901 has quit [Remote host closed the connection]
cr1901 has joined #rust-embedded
cr1901 has quit [Remote host closed the connection]
cr1901 has joined #rust-embedded
<re_irc> <@thejpster:matrix.org> Is anyone else watching the embedded.fm / memfault live chat?
radens has joined #rust-embedded
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<re_irc> <@barafael:matrix.org> : Where is/was this?
dc740 has joined #rust-embedded
<re_irc> <@thejpster:matrix.org> I signed up to a webinar on the memfault I think
<re_irc> <@thejpster:matrix.org> +website
<re_irc> <@thejpster:matrix.org> Now we have https://doc.rust-lang.org/core/cell/struct.OnceCell.html
<re_irc> It’s like an UnsafeCell<Option> but you can only set it once. Useful for global GPIO pin objects and similar.
dc740 has quit [Remote host closed the connection]
<re_irc> <@peter9477:matrix.org> Can you not then set it again even after you "take()" it? Or is that a minor nuance that isn't clear enough from the docs?
<re_irc> <@peter9477:matrix.org> -even
<re_irc> <@dirbaio:matrix.org> if you take() it becomes empty, so you can set it again
<re_irc> <@dirbaio:matrix.org> take() requires &mut self so you normally wouldn't use it
<re_irc> <@dirbaio:matrix.org> it's intended to be put in a "static" or similar places where you only get "&", not "&mut"
<re_irc> <@peter9477:matrix.org> Yep, that's what I figured. But as a pedant I was confused by "can set only once", despite there being a path to setting it repeatedly...
<re_irc> <@dirbaio:matrix.org> in which case it is indeed true that you can only set it once
<re_irc> <@dirbaio:matrix.org> :)
<re_irc> <@dirbaio:matrix.org> the mut methods are provided for completeness I guess.
<re_irc> <@peter9477:matrix.org> And possibly useful in e.g. automated testing, or other unusual situations.
WSalmon has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
WSalmon has joined #rust-embedded
<re_irc> <@diondokter:matrix.org> : Seems like it's !Sync though, so I don't think you can make it a static variable
<re_irc> <@dirbaio:matrix.org> OnceLock is the Sync version
<re_irc> <@diondokter:matrix.org> Yeah, but that's only available on std
<re_irc> <@dirbaio:matrix.org> oh wtf
<re_irc> <@dirbaio:matrix.org> nooooooo
<re_irc> <@diondokter:matrix.org> Yeah...
<re_irc> <@dirbaio:matrix.org> oh well, I guess it makes sense. It needs mutex-like behavior
<re_irc> <@dirbaio:matrix.org> If another thread is currently in the process of putting a value in, other threads have to wait ...
<re_irc> <@dirbaio:matrix.org> yeah I'm not sure what applications the non-Sync OnceCell has...
<re_irc> <@diondokter:matrix.org> Could be done with atomics though
<re_irc> <@diondokter:matrix.org> Yeah me neither, so I don't really understand why it exists
<re_irc> <@dirbaio:matrix.org> for completeness I guess
<re_irc> <@diondokter:matrix.org> Wait but like... If it can't be static it's pretty much the same as an Option
<re_irc> <@dirbaio:matrix.org> ¯\_(ツ)_/¯
<re_irc> <@diondokter:matrix.org> Ok well with one difference. You can set the value through an immutable reference
<re_irc> <@dirbaio:matrix.org> yeah some sort of "RefCell<Option<T>>"
<re_irc> <@dirbaio:matrix.org> similarly OnceLock is some sort of "Mutex<Option<T>>"
IlPalazzo-ojiisa has joined #rust-embedded
IlPalazzo-ojiisa has quit [Quit: Leaving.]