Sometimes, people do that. But using 0/1 is explicit enough since you can refer to a line as ‘1’ or ‘0’ for high/low on the hardware as well
- 13 Posts
- 1.64K Comments
I am a lazy dev (not really, clients always want fast code), so I use the provided HAL libraries 99.9% of the time.
But I have seen code where someone would write something like
gpio_write(PIN_X, true)
and it always stood out to me.
I am working with C in embedded designs and I still use 1 or 0 for a bool certain situations, mostly lines level.
For whatever pea-brained reason, it feels yucky to me to set a gpio to true/false instead of a 1/0.
Croquette@sh.itjust.worksto Programming@programming.dev•AI coders think they’re 20% faster — but they’re actually 19% slower5·4 days agoLLM are prediction engine. They don’t have knowledge, they only chain words together related to your topic.
They don’t know they are wrong because they just don’t know anything period.
Croquette@sh.itjust.worksto Programming@programming.dev•AI coders think they’re 20% faster — but they’re actually 19% slower261·4 days agoLLM are just sophisticated text predictions engine. They don’t know anything, so they can’t produce an “I don’t know” because they can always generate a text prediction and they can’t think.
Croquette@sh.itjust.worksto A Boring Dystopia@lemmy.world•‘An uphill battle’: why are midlife men struggling to make – and keep – friends?2·5 days agoI have had the same 15ish friends for more than 20 years and we live in different cities, a few hours away from each other.
We don’t see each other frequently because of the distance, but we usually spend weekends together and it feels like we have not missed a beat since the last time we saw each other.
I think it is natural to have more than 10 close friends, it is like having a small community, but modern life made it very hard to keep close friends like that. And it sucks.
Croquette@sh.itjust.worksto Canada•Suncor fined after protected bird nests were buried at Alberta oilsands mine4·9 days agoPut % on revenue, not profits. Make sure that a fine of that magnitude is a bankruptcy threat.
Croquette@sh.itjust.worksto Games@lemmy.world•Founder of Arkane Studios: "I think Gamepass is an unsustainable model that has been increasingly damaging the industry for a decade"; impacts salesEnglish15·10 days agoWe haven’t seen antitrust with teeths for a while now.
Amazon, Microsoft, Meta, Apple should have been broken up in a million little pieces a long time ago, but it won’t happen.
Croquette@sh.itjust.worksto Games@lemmy.world•Founder of Arkane Studios: "I think Gamepass is an unsustainable model that has been increasingly damaging the industry for a decade"; impacts salesEnglish11·10 days agoThe goal is to lose money to capture the market and once it is done, to recoup their loss and bleed the market dry.
Croquette@sh.itjust.worksto Technology@lemmy.world•Connor Myers: As if graduating weren’t daunting enough, now students like me face a jobs market devastated by AIEnglish13·10 days agoIt reeks of shitty boss. I’ve heard the same bullshit from old folks 20 years ago that couldn’t use their computers to save their live.
When everyone’s an asshole, the common factor is you.
Croquette@sh.itjust.worksto Parenting@lemmy.world•Am I supposed to be enjoying any of this?4·11 days agoI was lucky enough to take 3 months off for both of my kid’s birth, so the connection was there pretty fast, but it really started to feel strong after 18 months for each, when they learn what a danger is and I can lower my guard a bit.
Even if my blood boils every other day, I would kill for them. This is really weird. They can bring the worst out of you and, in an instant, flip it on its head and make you feel almost high.
Croquette@sh.itjust.worksto Technology@lemmy.world•Xfinity using WiFi signals in your house to detect motionEnglish1·15 days agoI can’t get anything cheaper than that because it’s a price I got when the reseller started business and as long as I don’t switch, I get that price.
Good for you that you can get better, but coax still has its place until internet providers up their game, but I won’t hold my breath.
Croquette@sh.itjust.worksto News@lemmy.world•Teacher accused of having sex with 16-year-old student and telling co-worker3·15 days agoI have never thought of it that way and it makes sense.
Croquette@sh.itjust.worksto Technology@lemmy.world•Xfinity using WiFi signals in your house to detect motionEnglish4·15 days agoI still use coax because I buy internet from a reseller third party and this is what they have. I have 400/50 for 35$, which is a lot cheaper yhan the competitors. No reason for me to change.
Croquette@sh.itjust.worksto Games@lemmy.world•'Xbox Hardware Is Dead,' Says Founding Team Member, 'It Looks Like Xbox Has No Desire — Or Literally Can't — Ship Hardware Anymore' - IGNEnglish41·16 days agoI am a 4K PC little bitch, but playing games on my 1080p TV reminded me that it isn’t all that important. Fun > Smoothness > Graphics.
Croquette@sh.itjust.worksto Games@lemmy.world•'Xbox Hardware Is Dead,' Says Founding Team Member, 'It Looks Like Xbox Has No Desire — Or Literally Can't — Ship Hardware Anymore' - IGNEnglish11·16 days agoI think that xbox controller are the best controllers for PC, so I don’t need all the advanced features, but otherwise, you are right.
Their market is now clearly gamepass + Windows. Microsoft is banking on their market share to sell gamepass and capture the market.
Croquette@sh.itjust.worksto Linux@lemmy.ml•New Linux Kernel Drama: Torvalds Drops Bcachefs Support After Clash81·17 days agoMy uneducated kernel take. Flexibility is acceptable and desirable in small projects or low impact projects.
When the majority of the internet and a good chunk of PC are dependent on your project, predictability and stability is much more important than flexibility.
Croquette@sh.itjust.worksto Gaming@lemmy.ml•What is your personal favorite multiplayer game and what is it's fatal flaw?6·19 days agoDestiny 2 gun play is god damn good, but the new player experience and the monetization is downright pathetic.
Croquette@sh.itjust.worksto politics @lemmy.world•128 Democrats join House Republicans to block AOC, Al Green bid to impeach Trump32·21 days agoEverything Trump does strengthen his position with his base.
He could probably eat dog poo on live television and his base would cheer him for a dumb reason.
Merchants need payment processors to make money, and losing one makes a big dent in the sales. I won’t get a Mastercard because Visa isn’t accepted anymore.
If they say that X processor is a dick and lose them, they are worst for it.