News for hackers. Stuff that matters.

AnanasAttack

Re:Correctly implementing a spinlock in Modern C++ on Friday June 25, 2021 @08:53PM (#27638015)
Correctly using a spinlock: Never when preemption is enabled
Re:Lockless Algorithms for Mere Mortals on Wednesday July 29, 2020 @09:07PM (#23993291)
You can totally have memory barriers in macros. It doesn't have much to do with the language at all
I always feared sites would do things like this so I clear the clipboard/fill it with garbage after usage
Re:Go vs. Crystal Performance on Tuesday June 23, 2020 @01:48PM (#23617536)
People do whatever they can to "win" on these benchmarks, so the resulting code is often not idiomatic
Re:Nand2Tetris Hack assembler implemented in Rust on Thursday June 04, 2020 @04:19AM (#23414044)
It seems anything is newsworthy here when it's in Rust
Re:The Shapes of Code on Wednesday January 29, 2020 @12:41AM (#22177802)
The comment doesn't explain why there even is an offset in the first place. Who put it there and why? I think this should be explained as well
Re:C++ coroutines: Initial implementation pushed to master on Sunday January 19, 2020 @03:04PM (#22093634)
C++ coroutines are stackless
Re:Mutexes are faster than Spinlocks on Saturday January 04, 2020 @08:27PM (#21958960)
Thread scheduling (or waking up cores) is slow. Because of this, mutexes will look better on dumb benchmarks, as the contending threads keep going to sleep, while the single succesful owner has practically uncontended access
I can't be the only one who finds it cleaner to just use structs with state and pointers to them, than all such macro and typedef hackery
Only stød is unusual. It is written with a superscript glottal stop (ˀ) letter
Re:Avoiding Instruction Cache Misses on Saturday June 22, 2019 @12:10PM (#20250314)
I've been wondering about the impact of insturction cache misses and potential downsides of executable bloat caused by C++ templates, but have never seen a real case of this being a problem.
Re:What is a coder's worst nightmare? on Sunday June 09, 2019 @01:45AM (#20137367)
How about infringing on a patent for inventing something independently without knowing it?
Re:New Causes of Autism Found in Noncoding DNA on Tuesday May 28, 2019 @09:10PM (#20035996)
How is that naive or arrogant?
Re:Efficient IO with io_uring [pdf] on Monday May 06, 2019 @07:39PM (#19845034)
What do you dislike about edge triggered mode?
Re:Geohash in Golang Assembly (2018) on Tuesday April 02, 2019 @01:33PM (#19556606)
You're right: No fun is EVER allowed. Is that a smile on your face? Doesn't look very productive to me, now get back to work.
Not that unusual really. Whenever you hear about new stuff, chances are it's better to look it up on Wikipedia first.
>I'd much rather ...

How can you be sure that the NSA is any better than the chinese?

Re:Writing a Self-Mutating x86_64 C Program (2013) on Friday January 11, 2019 @06:51AM (#18882821)
I've seen points like these made before, but never really understood how. Can you give an example of self-modifying code becoming a security issue?
Re:Writing a Self-Mutating x86_64 C Program (2013) on Friday January 11, 2019 @06:21AM (#18882650)
>Are there any languages that could actually make use of self modifying code? JIT languages already do this.