lemmysmash
- 0 Posts
- 10 Comments
lemmysmash@piefed.socialtoHacker News@lemmy.bestiver.se•GrapheneOS user reported to authorities for using GrapheneOSEnglish
15·7 days agoThey’re an age verification company. Of course, they’re cunts, duh.
lemmysmash@piefed.socialto
Technology@lemmy.world•Let us filter AI slop, you cowards - Online platforms could prove whether AI labels work by giving us a filter option, but then they’d have to face reality.English
5·7 days agoHa, peasant! They’re not here to give you options, they’re here to make you watch more of the stupid garbage and click on more ads.
lemmysmash@piefed.socialto
Green Energy@slrpnk.net•TIL the cost of transporting energy aroundEnglish
2·8 days agoWhat about Uranium? How expensive is that?
Does it really NOT allow downloads/exports of the GPX/route files? Or am I just stupid?
lemmysmash@piefed.socialto
LocalLLaMA@sh.itjust.works•Gemma4 12b released with "unified" approach to multi-modalityEnglish
3·9 days agoAre there already any uncesored models based on it? Asking for a friend…
lemmysmash@piefed.socialto
Fuck AI@lemmy.world•'Meta AI's is a disaster': Instagram is banning millions of creators and your account could be nextEnglish
4·9 days agoWhy would you have an account there in the first place?
lemmysmash@piefed.socialtoHacker News@lemmy.bestiver.se•Microsoft degrades functionality of perpetually-licensed offline productsEnglish
1·13 days agoIt’s not as much of a Microsoft problem, as it is the problem of the whole app notarization concept, which is extremely hostile to both consumers and developers and provides little to none security benefits. If Apple didn’t have that crap in place, not Microsoft and not anyone else would be able to pull off such stunt.
lemmysmash@piefed.socialto
C Programming Language@programming.dev•Is this a limitation of scanf() or bad control flow?English
6·13 days agoI’m too lazy to confirm, but I think scanf (as well as many other I/O functions) works on top of the buffered input. I.e. when you scanned only one character on the first run of scanf but there are more left in the buffer, then subsequent calls will read from that buffer, e.g.
printf("your prompt>") /* you type 123 */ /* buffer contains: "123" */ scanf(...) /* you scanned 1 char ("1") */ /* buffer contains: "23" */ printf("new prompt>"); /* the prompt has been printed AFTER your previous input but the buffer hasn't been reset! */ /* buffer contains: "23" */ /* you type 456 */ /* buffer contains: "23456" */ scanf(...) /* scanf returns "2" */ /* buffer contains: "3456" */In general you have two options:
- drain the buffer after / before each loop cycle
- use unbuffered I/O
For both cases, do your research on how to do it :) That K&R from above should be a great start indeed.



You are absolutely right to question that! Let me check…