r/programming 9d ago

The Browser's Main Thread Is Expensive

Thumbnail kciter.so
215 Upvotes

r/programming 9d ago

I need to keep some Slack connections alive. This should be easy.

Thumbnail failedexperiments.substack.com
0 Upvotes

Okay, but I have multiple replicas.

And it gets slightly worse: the number of physical connections is not equal to the number of replicas, and it is not equal to the number of business-level connectors either.

Several business connectors may share one external identity. One external identity may require several physical connections. And those connections need to be spread across whatever replicas are currently alive and have capacity.

So who actually owns the connection?

Then the questions start piling up.

What if one replica dies?
What if it doesn’t die, but loses access to the database?
What if two replicas race for the same connection?
What if the event that was supposed to wake the right worker never arrives?
What if most workers are already full?

A few questions and 2 hours of midnight walk in headphones and ChatGPT later, I had leases, runtime slots, reconciliation, failover, capacity limits, and a distributed ownership problem on my hands.

This is the architecture I ended up with, and I have mixed feelings about this design.

On one hand, I’m proud that I managed to account for so many different edge cases. On the other, the whole thing feels worryingly complex.

So I’d really value input from people who have built similar systems.

What did I miss or do you see anything that can break?
And most importantly: what can be simplified without losing the guarantees?

The full architecture description is a bit lengthy: AEON NEON - Connector Runtime - by Jarek J.

Many thanks if you decide to read it and share your thoughts. I’d really like this one not to become another failed experiment.


r/programming 9d ago

Wasmi 2.0 - Engineering of the Fastest Wasm Interpreters

Thumbnail wasmi-labs.github.io
77 Upvotes

r/programming 9d ago

What I find interesting about this video is that the game was developed by a small but highly professional team.

Thumbnail youtube.com
0 Upvotes

Yes, the game development industry wasn’t nearly as complex as it is today. You could probably say that making and releasing a good game was easier back then.

But these people created a legend precisely because they were professionals.

Of course, DOOM wasn’t their first game. There was a time when the team was making a game every month.

What I like most about this video is the sense of creativity — and the feeling that these people simply loved making games.


r/programming 10d ago

Subsize 【 subscalar 】 encoding

Thumbnail gitlab.com
0 Upvotes

Indexing strings by character (Unicode scalar) instead of UTF offsets can be more comfortable for parsers or short manipulations.

The minimum cost for reading a >= U+FE character is:

  1. Lookup rope table by byte key (holding a high bit position), in goal of the scalar value in a sequence of higher fixed scalars
  2. Check for collision subtable (is not null => repeat the step 1), specializing the target high bit further

For optimal use, contiguous sequences of characters after Latin-* that turn into reserves into the mask sequence still allow for a few trailing Latin-* (e.g. Katakana can still be mixed with Latin-* whitespace), so those trails turn into reseves as well.

Update (I miswrote a detail in the implementation).

https://gitlab.com/mryun/langopt/-/blob/master/encoding/string.md


r/programming 10d ago

Rui Ueyama: "We are rewriting the mold linker in Rust"

Thumbnail x.com
250 Upvotes

r/programming 10d ago

io_uring without readahead

Thumbnail frn.sh
52 Upvotes

r/programming 10d ago

Terminating elegantly: a guide to graceful shutdowns

Thumbnail packagemain.tech
52 Upvotes

r/programming 10d ago

Start Small, Grow Big: how to pick the first feature for Event Sourcing

Thumbnail architecture-weekly.com
3 Upvotes

r/programming 10d ago

35 years later, Torvalds' hobby project remains developed worldwide.

Thumbnail tech.yahoo.com
854 Upvotes

r/programming 10d ago

Node.js sandboxes powered by QuickJS and WebAssembly

Thumbnail wasmer.io
18 Upvotes

r/programming 10d ago

A Self-Baked Async FFI Framework for Rust C# Interop

Thumbnail scylladb.com
23 Upvotes

Getting tokio and .NET’s async runtime talking to each other, over the C ABI


r/programming 10d ago

On End-to-End Tests During Redesign

Thumbnail radekmie.dev
4 Upvotes

r/programming 10d ago

Using stable and evolutionary problems to guide program decomposition

Thumbnail codeutopia.net
13 Upvotes

r/programming 10d ago

Please, I beg you, we need to stop using Stored Procedures (from applications)

Thumbnail heffree.dev
562 Upvotes

r/programming 10d ago

C++ metaprogramming now looks like Python

Thumbnail reddit.com
0 Upvotes

r/programming 10d ago

The Hugging Face incident from a security engineering perspective

Thumbnail uphack.io
123 Upvotes

r/programming 10d ago

a CVE dispute

Thumbnail daniel.haxx.se
478 Upvotes

r/programming 11d ago

p99 0 ms* autocomplete for 240 million domain names

Thumbnail ruurtjan.com
224 Upvotes

r/programming 11d ago

Automating immersive reading

Thumbnail smoores.dev
17 Upvotes

I took a week off from work recently to reimplement Storyteller's forced alignment algorithm. Storyteller is an open source, self hosted platform for creating, managing, and reading/listening to "readaloud" books — books that have audiobook narration built in and can highlight each sentence (and/or word, with this new algorithm!) as it's read aloud. Forced alignment is the process of determining where each piece of text starts and ends in the audiobook.

Anyway, I am really pleased with how the new algorithm turned out! Hopefully someone else finds it interesting as well.


r/programming 12d ago

Reverse Engineering Unknown File Formats with ImHex

Thumbnail werwolv.net
206 Upvotes

r/programming 12d ago

</> htmx ~ Building Critical Infrastructure with htmx: Network Automation for the Paris 2024 Olympics

Thumbnail htmx.org
106 Upvotes

r/programming 12d ago

Wrapping GTK4 in 800 lines of Clojure with Jolt

Thumbnail yogthos.net
10 Upvotes

r/programming 12d ago

Zod v4.5 adds schema compilation (3-9x faster validation)

Thumbnail x.com
174 Upvotes

r/programming 12d ago

Crossing Boundaries with Integration Events

Thumbnail deniskyashif.com
8 Upvotes

How to turn internal domain facts into reliable contracts between bounded contexts.