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
Guest7282 has joined #rust-embedded
<dirbaio[m]> feedback welcome
<barnabyw[m]> looks good to me, I left a review with some typo and grammar suggestions
<M9names[m]> all feedback? you use an uncomfortable amount of commas. don't put one everywhere you would pause in speech, as when reading you chunk data out at your own pace. A good rule is to limit yourself to one per sentence where possible.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/YbhJHsmxGCUGdLyVvIUmCrue>)
<M9names[m]> s/does//
IlPalazzo-ojiisa has quit [Quit: Leaving.]
JamesMunns[m] has joined #rust-embedded
<JamesMunns[m]> You'd be very welcome in Germany :D
<JamesMunns[m]> > you use an uncomfortable amount of commas
<dirbaio[m]> huh, the comma thing maybe comes from spanish. I think we use a lot more commas :D
<M9names[m]> i think even the germans would tire of my anal-retentiveness
<barnabyw[m]> That is true. Germans love to write in short sentences. This has the side-effect of sounding blunt. It is not intended to have that effect.
<JamesMunns[m]> True, but in german you often duct-tape multiple short sentences into one giant mecha sentence with commas
<dirbaio[m]> spanish LOVES long sentences 🤣
<dirbaio[m]> when writing in English I always have to do a 2nd pass breaking down sentences, trying to have 1 verb per sentence
<barnabyw[m]> I like long complex sentences in english too (native speaker) and have to consciously fight that impulse when speaking or writing in german
<barnabyw[m]> but when doing technical or marketing writing in english I also always have to do a second pass to correct for my tendency towards long, comma-ridden messes 😅
<M9names[m]> yeah. bashing out a first draft with whatever makes your brain happy is a good strategy.
<M9names[m]> i usually cut most of what i write but it's easier to decide what is important once it's already on paper.
<barnabyw[m]> speaking it out loud catches 90% of problematic stuff in my experience
<dirbaio[m]> pushed, new version, addressing the, review, comments, and removing, the comma, spam.
<M9names[m]> new version flows so much better!
adamgreig[m] has joined #rust-embedded
<adamgreig[m]> personally I liked the commas :P
<adamgreig[m]> no accounting for style though huh
<M9names[m]> true! tbh i like writing them more than reading them so i'm a hypocrite 🙃
<dirbaio[m]> perhaps British English likes more long sentences and commas? :P
<dirbaio[m]> due to it being more "european"?
<adamgreig[m]> perhaps!
<barnabyw[m]> we brits are inclined to vocabulate somewhat more cromulently than our north american counterparts – some would even say excessively so
<dirbaio[m]> fun fact, on the flip side, if you write Spanish like you'd write American English (like, simplified, 1-verb sentences) it comes across as you're dumbing everything down because you think your reader is dumb :D
<M9names[m]> do you often have to write spanish expecting the reader to have spanish as a second language?
<dirbaio[m]> lol the blog repo is still using bors
<dirbaio[m]> M9names[m]: it's rare, if writing for a mix of spanish and non-spanish speakers you just default to english
<dirbaio[m]> like at work etc
<JamesMunns[m]> tbh I write a lot of longer, commafied sentences, and tend to write the same way I would speak (which violates some style guides).
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
<M9names[m]> once again, not trying to enforce anything for general communications - variety in language is a good thing!
<M9names[m]> i do try to hold myself to a higher standard when making announcements though, so I try not to hold back when folks ask for review. that is what I would want if the roles were reversed.
leonardvdj[m] has quit [Quit: Idle timeout reached: 172800s]
<dirbaio[m]> Of course, and I appreciate it, these things are why I asked for feedback ❤️
emerent_ has joined #rust-embedded
emerent_ is now known as emerent
emerent is now known as Guest2370
djdisodo[m] has quit [Quit: Idle timeout reached: 172800s]
hadez[m] has quit [Quit: Idle timeout reached: 172800s]
timokrgr[m] has quit [Quit: Idle timeout reached: 172800s]
crabbedhaloablut has joined #rust-embedded
crespum[m] has joined #rust-embedded
<crespum[m]> Couple of questions from someone not that familiar with your (awesome) work:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/lnIXvROBIOONzZXXUBKrmnYX>)
<crespum[m]> crespum[m]: Again, thanks for your effort
sample-user-just has quit [Quit: Idle timeout reached: 172800s]
leonardvdj[m] has joined #rust-embedded
<leonardvdj[m]> Hey y'all, does anyone know how I can get rust-analyzer to pick up on a PATH addition that adds the directory my gcc is in for a build script?
crabbedhaloablut has quit [Ping timeout: 252 seconds]
crabbedhaloablut has joined #rust-embedded
<dirbaio[m]> crates.io is down 🔥
sourcebox[m] has joined #rust-embedded
<sourcebox[m]> <dirbaio[m]> "crates.io is down 🔥" <- Seems that embassy-stm32 has too many features.
TristramGrbener[ has quit [Quit: Idle timeout reached: 172800s]
firefrommoonligh has quit [Quit: Idle timeout reached: 172800s]
richardeoin has quit [Ping timeout: 252 seconds]
IlPalazzo-ojiisa has joined #rust-embedded
richardeoin has joined #rust-embedded
sethiam[m] has quit [Quit: Idle timeout reached: 172800s]
notgull has quit [Ping timeout: 245 seconds]
notgull has joined #rust-embedded
<Ralph[m]> <barnabyw[m]> "we brits are inclined to..." <- i just learnt a new word: "cromulent". thank you for that! (and for making me read [the surprising - and surprisingly short - history of it](https://www.merriam-webster.com/wordplay/what-does-cromulent-mean) 🤣
Guest7282 has left #rust-embedded [Error from remote client]
jannic[m] has joined #rust-embedded
<jannic[m]> I found a minor mistake in a doc comment:
<jannic[m]> Perhaps it can still be merged before releasing 1.0.0?
<dirbaio[m]> merged it has been!
Rahix has quit [Quit: ZNC - https://znc.in]
Rahix has joined #rust-embedded
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #rust-embedded
Guest7282 has joined #rust-embedded
<thejpster[m]> Uh, is nightly broken for anyone else on RP2040? I get `error: failed to load bitcode of module "rp2040_hal-3b8686637e2905c6.rp2040_hal.5151058bbb86332b-cgu.0.rcgu.o": `
<jannic[m]> <thejpster[m]> "Uh, is nightly broken for anyone..." <- > <@thejpster:matrix.org> Uh, is nightly broken for anyone else on RP2040? I get `error: failed to load bitcode of module "rp2040_hal-3b8686637e2905c6.rp2040_hal.5151058bbb86332b-cgu.0.rcgu.o": `... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/DehIGUbbNqLevpPnCgvPUArY>)
<thejpster[m]> oh no
<thejpster[m]> I hope that gets fixed before the next beta
<thejpster[m]> (which is tomorrow?)
ChristianHeussy[ has joined #rust-embedded
<ChristianHeussy[> I'm a bit dismayed. I have a `-sys` crate that wraps Infineon's [peripheral driver library](https://infineon.github.io/mtb-pdl-cat1/pdl_api_reference_manual/html/index.html) but it looks like bindgen doesn't handle C macros. Which uh makes my life really difficult because I don't get definitions for any of the peripherals such as [GPIO
<ChristianHeussy[> ports](https://github.com/Infineon/mtb-pdl-cat1/blob/master/devices/COMPONENT_CAT1C/include/cyt4bb8cee.h#L1775). Has anyone worked around something similar?
<thejpster[m]> What would you like it to do with the c macro?
<thejpster[m]> You can’t turn it into a const because macros can do #pasting.
<thejpster[m]> (As a general rule anyway. Maybe a smart enough bindgen could work out when a macro didn’t do any pasting)
<thejpster[m]> Personally I’d write a regex to convert them, or use multiple cursors to edit a bunch of them simultaneously
<cr1901> pasting?
<thejpster[m]> #define debug(c) printf(“#x = %d“, x);
<ChristianHeussy[> > Personally I’d write a regex to convert them, or use multiple cursors to edit a bunch of them simultaneously
<ChristianHeussy[> That's a good suggestion! I suppose I could even get fancy and do it during the sys crate's build script if I needed to support multiple devices.
<thejpster[m]> Or something like that. Macros like STRINGIFY.
<thejpster[m]> s/c/x/
<ChristianHeussy[> I think this [ticket](https://github.com/rust-lang/rust-bindgen/issues/753) is what you're referring to in regards to pasting?
<thejpster[m]> They also have no type information.
AdamHott[m] has quit [Quit: Idle timeout reached: 172800s]
<cr1901> >You can’t turn it into a const because macros can do #pasting. <-- so why is macro pasting disallowed? Won't rustc see either "a const or not a const" after pasting?
dngrsspookyvisio has quit [Quit: Idle timeout reached: 172800s]
<thejpster[m]> I don’t know how you’d write a macro that did that.
<thejpster[m]> But also, not a bindgen dev. I don’t know how it why they support the subset of C they support.
<thejpster[m]> s///, s/it/or/
<thejpster[m]> * I don’t know how you’d write a const expression that did that.
But also, not a bindgen dev. I don’t know how or why they support the subset of C they support.
<M9names[m]> I've done this before by making my own wrapper C file that uses these macros.
<M9names[m]> If you made a C enum where the descriminants are the macro values you'll end up with a bunch of costs on the rust side
<M9names[m]> *consts
<thejpster[m]> And you compiled the C and linked it in?
crabbedhaloablut has quit []
<M9names[m]> No, just ran it through the preprocessor
<cr1901> after the pasting macro runs, you'd get a concat'd identifier. That identifier will either be a valid const expr (var name, literal), or not
<cr1901> I'm not sure why concatenation can't be a const expr
<M9names[m]> I've also done the compiled wrapper for function-like macros (fn that invokes the macro, compile that, link it in)
<M9names[m]> But since these are just peripheral addresses maybe it would be better to use a PAC?
<cr1901> >macros can do #pasting. <--- Oooooh, _C_ macros can do pasting
<cr1901> yea I guess you'd have to implement a full-blown preprocessor to figure out whether something can be safely converted into a Rust const
<ChristianHeussy[> > But since these are just peripheral addresses maybe it would be better to use a PAC?
<ChristianHeussy[> I don't see how to get the underlying pointer for one of the [GPIO](https://docs.rs/cyt4bf_d/0.0.1/cyt4bf_d/struct.GPIO.html#associatedconstant.PTR) ports from the PAC.
<ChristianHeussy[> * > But since these are just peripheral addresses maybe it would be better to use a PAC?
<ChristianHeussy[> I don't see how to get the underlying pointer for one of the [GPIO](https://docs.rs/cyt4bf_d/0.0.1/cyt4bf_d/struct.GPIO.html#associatedconstant.PTR) ports from the PAC.
<ChristianHeussy[> Oh, I should just be able to cast it.
inara has quit [Quit: Leaving]
inara has joined #rust-embedded