frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

The first year of free-threaded Python

https://labs.quansight.org/blog/free-threaded-one-year-recap
14•rbanffy•1h ago•1 comments

Baby is healed with first personalized gene-editing treatment

https://www.nytimes.com/2025/05/15/health/gene-editing-personalized-rare-disorders.html
924•jbredeche•17h ago•384 comments

Compressed music might be harmful to the ears

https://www.economist.com/science-and-technology/2025/05/07/compressed-music-might-be-harmful-to-the-ears
32•doener•1h ago•38 comments

Ollama's new engine for multimodal models

https://ollama.com/blog/multimodal-models
225•LorenDB•9h ago•31 comments

Material 3 Expressive

https://design.google/library/expressive-material-design-google-research
54•meetpateltech•2d ago•83 comments

A leap year check in three instructions

https://hueffner.de/falk/blog/a-leap-year-check-in-three-instructions.html
342•gnabgib•13h ago•121 comments

The Awful German Language (1880)

https://faculty.georgetown.edu/jod/texts/twain.german.html
94•nalinidash•6h ago•224 comments

Náhuatl and Mayan Language Renaissance Occurring in Mexico

https://yucatanmagazine.com/mayan-language-renaissance/
63•bryanrasmussen•2d ago•2 comments

Teal – A statically-typed dialect of Lua

https://teal-language.org/
139•generichuman•10h ago•65 comments

Cracked - method chaining/CSS-style selector web audio library

https://github.com/billorcutt/i_dropped_my_phone_the_screen_cracked
62•stephenhandley•8h ago•20 comments

The unreasonable effectiveness of an LLM agent loop with tool use

https://sketch.dev/blog/agent-loop
362•crawshaw•15h ago•236 comments

Beyond Text: On-Demand UI Generation for Better Conversational Experiences

https://blog.fka.dev/blog/2025-05-16-beyond-text-only-ai-on-demand-ui-generation-for-better-conversational-experiences/
5•fka•1h ago•0 comments

BuyMeACoffee silently dropped support for many countries (2024)

https://zverok.space/blog/2024-08-08-bmac-snafu.html
218•beeburrt•4h ago•179 comments

Wasmer (YC S19) Is Hiring a Rust Compiler Engineer

https://www.workatastartup.com/jobs/15822
1•syrusakbary•4h ago

Initialization in C++ is bonkers (2017)

https://blog.tartanllama.xyz/initialization-is-bonkers/
159•todsacerdoti•13h ago•148 comments

Comma 3X: Initial Impressions

https://beesbuzz.biz/blog/14719-Comma-3X-Initial-impressions
41•surprisetalk•3d ago•8 comments

Lock-Free Rust: How to Build a Rollercoaster While It's on Fire

https://yeet.cx/blog/lock-free-rust/
85•r3tr0•2d ago•32 comments

Launch HN: Tinfoil (YC X25): Verifiable Privacy for Cloud AI

128•FrasiertheLion•18h ago•88 comments

Archisuits (2005–2006)

https://insecurespaces.net/archisuits-2005-2006/
23•internet_points•2d ago•1 comments

Apple Blocks Fortnite's Return to iOS App Store, Epic Claims

https://www.macrumors.com/2025/05/16/apple-blocks-fortnite-return-to-ios-app-store/
17•tosh•58m ago•2 comments

Leeks and Leaks – Daniel.haxx.se

https://daniel.haxx.se/blog/2025/05/16/leeks-and-leaks/
30•mrmanner•1h ago•0 comments

Thermoelectric generator based on a robust carbon nanotube/BiSbTe foam

https://onlinelibrary.wiley.com/doi/10.1002/cey2.650
3•PaulHoule•2d ago•0 comments

Zinc Microcapacitors Are the Best of Both Worlds

https://spectrum.ieee.org/zinc-microcapacitor
25•Brajeshwar•2d ago•0 comments

Show HN: A free AI risk assessment tool for LLM applications

https://www.gettavo.com/app
23•percyding99•22h ago•6 comments

Tek – A music making program for 24-bit Unicode terminals

https://codeberg.org/unspeaker/tek
138•smartmic•15h ago•15 comments

Windsurf SWE-1: Our First Frontier Models

https://windsurf.com/blog/windsurf-wave-9-swe-1
93•arittr•16h ago•28 comments

Coinbase 8K SEC filing for breach

https://www.sec.gov/ix?doc=/Archives/edgar/data/1679788/000167978825000094/coin-20250514.htm
79•weinzierl•4h ago•38 comments

GTK Krell Monitors

https://gkrellm.srcbox.net/
70•Deeg9rie9usi•3d ago•23 comments

A Tiny Boltzmann Machine

https://eoinmurray.info/boltzmann-machine
243•anomancer•21h ago•42 comments

NASA keeps ancient Voyager 1 spacecraft alive with Hail Mary thruster fix

https://www.theregister.com/2025/05/15/voyager_1_survives_with_thruster_fix/
291•nullhole•10h ago•61 comments
Open in hackernews

Lock-Free Rust: How to Build a Rollercoaster While It's on Fire

https://yeet.cx/blog/lock-free-rust/
85•r3tr0•2d ago

Comments

r3tr0•2d ago
hope you enjoy this article on lock free programming in rust.

I used humor and analogies in the article not just to be entertaining, but to make difficult concepts like memory ordering and atomics more approachable and memorable.

tombert•8h ago
Interesting read, I enjoyed it and it answered a question that I didn't even realize I had been asking myself for years, which is how lock-free structures work.

Have you looked at CTries before? They're pretty interesting, and I think are probably the future of this space.

nmca•6h ago
Did you get help from ChatGPT ooi? The humour sounds a bit like modern ChatGPT style but it’s uncanny valley.
bobbyraduloff•5h ago
at the very least that article was definitely edited with ChatGPT. i had someone on my team write “edgy” copy with ChatGPT last week and it sounded exactly the same. short paragraphs and overuse of bullet points are also a dead giveaway. i don’t think it’s super noticeable if you don’t use ChatGPT a lot but for the people that use these systems daily, it’s still very easy to spot.

my suggestion to OP: this was interesting material, ChatGPT made it had to read. use your own words to explain it. most people interested in this deeply technical content would rather read your prompt than the output.

r3tr0•33m ago
i had help GPT help with some grammar, editing, and shortening.

The core ideas, jokes, code, and analogies are 100% mine.

Human chaos. Machine polish.

tombert•8h ago
Pretty interesting.

I have finally bitten the bullet and learned Rust in the last few months and ended up really liking it, but I have to admit that it's a bit lower level than I generally work in.

I have generally avoided locks by making very liberal use of Tokio channels, though that isn't for performance reasons or anything: I just find locks really hard to reason about for anything but extremely trivial usecases, and channels are a more natural abstraction for me.

I've never really considered what goes into these lock-free structures, but that might be one of my next "unemployment projects" after I finish my current one.

forgot_old_user•6h ago
definitely! Reminds me of the golang saying

> Don't Communicate by Sharing Memory; Share Memory by Communicating

https://www.php.cn/faq/1796714651.html

tombert•5h ago
Yeah, similarly, Joe Armstrong (RIP), co-creator of Erlang explained it to me like this:

> In distributed systems there is no real shared state (imagine one machine in the USA another in Sweden) where is the shared state? In the middle of the Atlantic? — shared state breaks laws of physics. State changes are propagated at the speed of light — we always know how things were at a remote site not how they are now. What we know is what they last told us. If you make a software abstraction that ignores this fact you’ll be in trouble.

He wrote this to me in 2014, and it has really informed how I think about these things.

throwawaymaths•5h ago
The thing is that go channels themselves are shared state (if the owner closes the channel and a client tries to write you're not gonna have a good time)! Erlang message boxes are not.
aatd86•5h ago
Isn't entanglement in quantum physics the manifestation of shared state? tongue-in-cheek
gpderetta•1h ago
> Don't Communicate by Sharing Memory; Share Memory by Communicating

that's all well and good until you realize you are reimplementing a slow, buggy version of MESI in software.

Proper concurrency control is the key. Shared memory vs message passing is incidental and application specific.

revskill•5h ago
How can u be unemployed ?
0x1ceb00da•7h ago
> AtomicUsize: Used for indexing and freelist linkage. It’s a plain old number, except it’s watched 24 / 7 by the CPU’s race condition alarm.

Is it though? Aren't atomic load/store instructions the actual important thing. I know the type system ensures that `AtomicUsize` can only be accessed using atomic instructions but saying it's being watched by the CPU is inaccurate.

eslaught•5h ago
I'm not sure what the author intended, but one way to implement atomics at the microarchitectural level is via a load-linked/store-conditional pair of instructions, which often involves tracking the cache line for modification.

https://en.wikipedia.org/wiki/Load-link/store-conditional

It's not "24/7" but it is "watching" in some sense of the word. So not entirely unfair.

ephemer_a•6h ago
did 4o write this
fefe23•5h ago
To borrow an old adage: The determined programmer can write C code in any language. :-)
MobiusHorizons•5h ago
Atomics are hardly “C”. They are a primative exposed many CPU ISAs for helping to navigate the complexity those same CPUs introduced with OOO execution and complex caches in a multi-threaded environment. Much like simd atomics require extending the language through intrinsics or new types because they represent capabilities that were not possible when the language was invented. Atomics require this extra support in Java just as they do in rust or C.
MobiusHorizons•5h ago
I enjoyed the content, but could have done without the constant hyping up of the edginess of lock free data structures. I mean yes, like almost any heavily optimized structure there are trade offs that prevent this optimization from being globally applicable. But also being borderline aroused at the “danger” and rule breaking is tiresome and strikes me as juvenile.
bigstrat2003•5h ago
To each their own. I thought it was hilarious and kept the article entertaining throughout, with what would otherwise be a fairly dry subject.
atoav•4h ago
It is juvenile, but what do we know? Real Men use after free, so they wouldn't even use Rust to begin with.

The edgy tones sound like from an LLM to me..

lesser23•3h ago
The bullet points and some of the edge definitely smell like LLM assistance.

Other than that I take the other side. I’ve read (and subsequently never finished) dozens of programming books because they are so god awfully boring. This writing style, perhaps dialed back a little, helps keep my interest. I like the feel of a zine where it’s as technical as a professional write up but far less formal.

I often find learning through analogy useful anyway and the humor helps a lot too.

zero0529•3h ago
Like the writing style but would prefer if it was dialed down maybe 10 %. Otherwise a great article as an introduction to lock-free datastructures.
Animats•2h ago
I've done a little bit of "lock-free" programming in Rust, but it's for very specialized situations.[1] This allocates and releases bits in a bitmap. The bitmap is intended to represent the slots in use in the Vulkan bindless texture index, which resides in the GPU. Can't read that those slots from the CPU side to see if an entry is in use. So in-use slots in that table have to be tracked with an external bitmap.

This has no unsafe code. It's all done with compare and swap. There is locking here, but it's down at the hardware level within the compare and swap instruction. This is cleaner and more portable than relying on cross-CPU ordering of operations.

[1] https://github.com/John-Nagle/rust-vulkan-bindless/blob/main...

jillesvangurp•1h ago
This is the kind of stuff that you shouldn't have to reinvent yourself but be able to reuse from a good library. Or the standard library even.

How would this compare to the lock free abstractions that come with e.g. the java.concurrent package? It has a lot of useful primitives and data structures. I expect the memory overhead is probably worse for those.

Support for this is one of the big reason Java and the jvm has been a popular choice for companies building middleware and data processing frameworks for the last few decades. Exactly the kind of stuff that the author of this article is proposing you could build with this. Things like Kafka, Lucene, Spark, Hadoop, Flink, Beam, etc.

gpderetta•57m ago
> This is the kind of stuff that you shouldn't have to reinvent yourself but be able to reuse from a good library. Or the standard library even.

Indeed; normally we call it the system allocator.

A good system allocator will use per thread or per cpu free-lists so that it doesn't need to do CAS loops for every allocation though. At the very least will use hashed pools to reduce contention.

gpderetta•1h ago
The claim that the lock free array is faster then the locked variant is suspicious. The lock free array is performing a CAS for every operation, this is going to dominate[1]. A plain mutex would do two CAS (or just one if it is a spin lock), so the order of magnitude difference is not explainable by the lock free property.

Of course if the mutex array is doing a linear scan to find the insertion point that would explain the difference but: a) I can't see the code for the alternative and b) there is no reason why the mutex variant can't use a free list.

Remember:

- Lock free doesn't automatically means faster (still it has other properties that might be desirable even if slower)

- Never trust a benchmark you didn't falsify yourself.

[1] when uncontended; when contended cache coherence cost will dominate over everything else, lock-free or not.

michaelscott•53m ago
For applications doing extremely high rates of inserts and reads, lock free is definitely superior. In extreme latency sensitive applications like trading platforms (events processing sub 100ms) it's a requirement; locked structures cause bottlenecks at high throughput
bonzini•47m ago
Yes the code for the alternative is awful. However I tried rewriting it with a better alternative (basically the same as the lock free code, but with a mutex around it) and was still 40% slower. See FixedVec in https://play.rust-lang.org/?version=stable&mode=release&edit...
gpderetta•31m ago
Given twice the number of CASs, about twice as slow is what I would expect for the mutex variant when uncontended. I don't know enough rust to fix it myself, but could you try with a spin lock?

As the benchmark is very dependent on contention, it would give very different results if the the threads are scheduled serially as opposed to running truly concurrently (for example using a spin lock would be awful if running on a single core).

So again, you need to be very careful to understand what you are actually testing.

r3tr0•39m ago
totally valid.

that benchmarking is something i should have added more alternatives to.

jonco217•22m ago
> NOTE: In this snippet we ignore the ABA problem

The article doesn't go into details but this is subtle way to mess up writing lock free data structures:

https://en.wikipedia.org/wiki/ABA_problem

lucraft•8m ago
Can I ask a dumb question - how is Atomic set operation implemented internally if not by grabbing a lock?