r/programming • u/CircumspectCapybara • 15h ago
r/programming • u/Polixa12 • 2h ago
Relaying wakeups in fair locks
kusoroadeolu.github.ioThis 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 • u/Old-Illustrator-8692 • 17h ago
Happy Developers Build Better Products… A Message for Management!
youtube.comr/programming • u/Nuoji • 12h ago
Madrigal Games' Traction Point was rewritten in C3
madrigalgames.comr/programming • u/philip_schwarz • 42m ago
The Bowling Game - From Imperative to Functional Programming - Part 1
fpilluminated.orgr/programming • u/jacobs-tech-tavern • 21h ago
Building apps is a system design exercise
blog.jacobstechtavern.comr/programming • u/CircumspectCapybara • 1d ago
A collision has been found for 38-step (a reduced round variant of) SHA-256
eprint.iacr.orgr/programming • u/KrzysztofLopuchDev • 59m ago
A server admin panel that can't execute anything: request files, a read-only Docker socket and a host that decides
boring-tech.com.plAdmin 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 • u/fagnerbrack • 1d ago
The V8 JavaScript Runtime Undermined My Constant-Time JavaScript Library
soatok.blogr/programming • u/BrewedDoritos • 1d ago
How I Got Postgres into a Single Binary
progrium.xyzr/programming • u/fagnerbrack • 1d ago
On solving the Jane Street Reverse Engineering Challenge
jestoph.comr/programming • u/wito-dev • 16h ago
Multirepo setup - Working with multiple repositories, the easy way
wito.devr/programming • u/CircumspectCapybara • 2d ago
NFS2ROOT: a 12-year-old pre-auth remote root in the Linux kernel's NFS server
opensec.inr/programming • u/swithek • 3d ago
Schrodinger's pull requests: the 1,553 Next.js PRs with no review
oxynote.ioMy 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 • u/I_highly_doubt_that_ • 3d ago
The matrix multiplication exponent is nine fourths
github.comr/programming • u/lpmi-13 • 2d ago
Can One VM Really Host 15 Million Web Servers?
labs.iximiuz.comAfter 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 • u/Mastbubbles • 1d ago
Who are code comments for?
sheets.worksI'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 • u/Old-Illustrator-8692 • 1d ago
How Hard Is It to Build Your Own Web Server?
youtube.comr/programming • u/fagnerbrack • 2d ago