r/programming • • 5h ago

Relaying wakeups in fair locks

Thumbnail kusoroadeolu.github.io
19 Upvotes

This was pretty fun for me to write up on. Would love to hear y'all's thoughts on scheduling bottlenecks in fair locks.


r/programming • • 19h ago

A Deterministic Subexponential-time Algorithm for the Discrete Logarithm Problem

Thumbnail eprint.iacr.org
147 Upvotes

r/programming • • 21h ago

Happy Developers Build Better Products… A Message for Management!

Thumbnail youtube.com
111 Upvotes

r/programming • • 16h ago

Madrigal Games' Traction Point was rewritten in C3

Thumbnail madrigalgames.com
23 Upvotes

r/programming • • 4h ago

The Bowling Game - From Imperative to Functional Programming - Part 1

Thumbnail fpilluminated.org
1 Upvotes

r/programming • • 1d ago

Building apps is a system design exercise

Thumbnail blog.jacobstechtavern.com
24 Upvotes

r/programming • • 2h ago

Who cares about the new C++ standard?

Thumbnail a4z.noexcept.dev
0 Upvotes

r/programming • • 1d ago

A collision has been found for 38-step (a reduced round variant of) SHA-256

Thumbnail eprint.iacr.org
595 Upvotes

r/programming • • 1d ago

A Video on How 3D Rendering Actually Works

Thumbnail youtu.be
17 Upvotes

r/programming • • 4h ago

A server admin panel that can't execute anything: request files, a read-only Docker socket and a host that decides

Thumbnail boring-tech.com.pl
0 Upvotes

Admin panels with a terminal and a restart button are a big attack surface. If the web app can run docker commands, then anyone who takes over the web app can run them too. Here is a design that keeps the convenience and shrinks that risk. I used it for an internal panel on a single-node Docker Swarm.

1. The panel only reads. The Docker socket is mounted read only, and the panel only sends GET requests (services, tasks, nodes, logs). Metrics come from cgroup v2 and pg_stat_* through a monitoring role. Neither the database role nor the RabbitMQ account can change anything.

2. Actions are requests, not commands. "Restart", "scale to 0" or "prune" doesn't call Docker. The panel writes a small JSON request file to one directory. That directory is the only thing the panel can write to. A systemd unit on the host picks the file up, checks it against its own rules and runs it. The host has its own copy of the limits (max replicas, protected services such as SSO, the reverse proxy and the panel itself), and the host's copy wins. A compromised panel can ask for something, but it can't force it.

3. Risky actions need intent, not just a click. Scaling to 0 and prune require typing the service name. Every action is logged with who asked for it and what the host answered.

4. The browser terminal is treated as the most dangerous feature.

  • It opens only after a fresh SSO sign-in (≤ 5 min old). An old session cookie isn't enough, so the page sends you to SSO with prompt=login.
  • It closes after 15 min idle or 1 h total.
  • The host shell runs through ttyd on a unix socket and is never exposed on a port.
  • Every session is logged.

5. Monitoring without a metrics stack. For one server, Prometheus + Grafana + exporters is more to run than what it watches. Instead, a small agent (.deb) samples disk, CPU, RAM and containers every minute into PostgreSQL and deletes data older than 7 days. Alerts are plain SQL over those samples: disk ≥ 80% with hysteresis back at 78%, and CPU only when every minute of the last 10 was ≥ 95%, so short spikes don't page you.

What I'd keep in any similar tool: split "who wants" from "who does". The web app asks, and a separate process with its own config decides. It costs one directory and one systemd unit, and it removes a whole class of "web app → root on the host" bugs.


r/programming • • 1d ago

The V8 JavaScript Runtime Undermined My Constant-Time JavaScript Library

Thumbnail soatok.blog
20 Upvotes

r/programming • • 2d ago

Call Things What They Are

Thumbnail saturnci.com
119 Upvotes

r/programming • • 1d ago

On solving the Jane Street Reverse Engineering Challenge

Thumbnail jestoph.com
17 Upvotes

r/programming • • 1d ago

How I Got Postgres into a Single Binary

Thumbnail progrium.xyz
37 Upvotes

r/programming • • 20h ago

Multirepo setup - Working with multiple repositories, the easy way

Thumbnail wito.dev
0 Upvotes

r/programming • • 1d ago

Quarkus 4.0 released!

Thumbnail quarkus.io
15 Upvotes

r/programming • • 2d ago

NFS2ROOT: a 12-year-old pre-auth remote root in the Linux kernel's NFS server

Thumbnail opensec.in
210 Upvotes

r/programming • • 2d ago

Command-line JSON filtering at 20 GB/s

Thumbnail lemire.me
147 Upvotes

r/programming • • 3d ago

Schrodinger's pull requests: the 1,553 Next.js PRs with no review

Thumbnail oxynote.io
253 Upvotes

My goal at the beginning was to write a short list of projects that are good for a first contribution, because I have a few friends who want to get into the open source world and are looking for resources like this. However, most guides I found recommend Next.js, React, Kubernetes or other similarly popular and complex projects and I wasn't sure that was good advice, so I got sidetracked and counted how PRs are treated there. The headline example is that Next.js has 1,553 open PRs that nobody has reviewed in over a month (I have added the queries and scripts I used to count them at the end of the article).

If you're interested about my actual list, you can still find it in the article (in the second half of it): I picked six projects in rust, go, java and python that are less popular than Next.js but review PRs from first-time contributors fairly quickly. I counted their PRs/issues as well and added the stats to each entry


r/programming • • 2d ago

Make the Plan a Value | Blog

Thumbnail jackkelly.name
2 Upvotes

r/programming • • 3d ago

The matrix multiplication exponent is nine fourths

Thumbnail github.com
582 Upvotes

r/programming • • 3d ago

Can One VM Really Host 15 Million Web Servers?

Thumbnail labs.iximiuz.com
44 Upvotes

After reading the phenomenal article https://kapteko.com/15-million-webservers/, where the author shows how to do some very cool stuff inside one Linux VM with 10GB of RAM, I thought it would be cool to actually see it happen myself.

So I put together a tutorial in a custom iximiuz Labs playground to see it in action.

Feel free to play along as you read the article (which is excellent, btw...short and sweet with just the right amount of technical details).


r/programming • • 1d ago

Who are code comments for?

Thumbnail sheets.works
0 Upvotes

I've had my share of swear words, usually every time I missed a semicolon. And that sent me down a rabbit hole: what about everyone else? What do other programmers write when the code fights back?

So we pulled every comment out of 64 big projects on GitHub. That's 295,820 comments. Then we went through them and asked one question about each: wh


r/programming • • 1d ago

How Hard Is It to Build Your Own Web Server?

Thumbnail youtube.com
0 Upvotes