https://www.linusakesson.net/programming/pipelogic/index.php
Past HN post: https://news.ycombinator.com/item?id=15363029
S
| |
-------| |
G \/\/|##| |
-------| |
| |
D
This is essentially a pressure regulator, except that the pressure is controlled by an independent signal. Pressure in G pushes a spring-loaded piston to block flow from S to D (a slightly different construction instead allows flow when G has pressure). Modulating the pressure in G can also used to modulate the flow, based on F = -kx. This simple construction has some issues, such as the fact that the pressure needed to move the piston depends on the pressure in S-D.Fun fact, in British English the term for a vacuum tube triode is "valve" precisely because it operates like a valve. FETs (particularly JFETs) follow the same analogy (which is why FET and triode amplifier circuits look basically the same) using the field effect instead of thermionic emission.
"The Phillips Machine is an analogue computer which uses fluidic logic to model the workings of an economy."
Pipe Logic (2011) - https://news.ycombinator.com/item?id=17040762 - May 2018 (18 comments)
Pipe Logic – Simulating circuits in the Unix shell (2011) - https://news.ycombinator.com/item?id=15363029 - Sept 2017 (10 comments)
/dev/zero has infinite electrons and /dev/null has an infinite appetite for them - https://news.ycombinator.com/item?id=4063459 - June 2012 (23 comments)
So I had this idea that you'd design code to be applied to a processing unit of specific capacity which would lead to execution flowing at a certain speed when applied a certain computation potential... and surprise surprise the relation would be uh, linear, and say you increase a loop's count and so the code would _resist_, or you'd increase computation potential to increase the flow.
So uh, yeah, Ohm's law but it's _code_ that's resistive.
And then I started to look for the pattern and find code with inductive properties, and code with capacitive properties, and some deeper properties emerged when you started modelling stuff with multiple processing units and data flowed around, split (map?), rejoined (reduce?).
And there was something strangely efficient about a way to see code that way and optimise using _laws_ describing the whole execution flow using familiar tools as a whole instead of thinking in gritty details barely higher-level than MOV AX... you "just" had to design code and the execution system so that it would operate in this kind of framework and allow that kind of analysis to identify bottlenecks and weird interplay actions across components.
And then I brought that up to my mentor and he said "well that's complete lunacy, stop thinking about that and focus on your current work" and, uh, case closed.
That was the young and naive me who thought that research labs were made to do think-outside-the-box connect-the-dots innovative stuff...
...because the typical setup assumes λ ≤ μ so all arriving jobs eventually get serviced.
I think there's a lot of unmet potential in design of interfaces for pipelines and services that really gets at the higher level you mention. There are some universal laws, and some differences between practice and theory.
The Chinese comments ("issues") also seem to be the same kind of jokes as the English ones, "no code means no bugs, perfect", etc., from the few I tried getting translations of. I imagine this went viral on Chinese social media, which makes sense since it's the sort of joke that's easy to translate and doesn't depend on particular cultural assumptions or anything.
https://github.com/kelseyhightower/nocode/commit/80f38e0f103...
Later on in deployment, it will go somewhere else. Somewhere that has been evaluated for being able to handle it.
In that way, /dev/null is to storage what `true` is to execution - it just works.
Both (along with a lot of the standard utilities) are a testament to what talented C programmers plus years of people beating on them in unintended ways can achieve in terms of reliability/stability.
It took a while before noticing I had no more /dev/null on the machine (read: the time needed to fill the rootfs). In a panic, I removed the file.
Seeing the machine collapse due to /dev/null missing was fun.
Luckily it's usually a tmpfs
Wait: that's just not true.
Carry on.
Truly, it is the only database which can be scaled to unlimited nodes and remain fully CAP.
I am putting my marketing hat on right now.
Specifically, these definitions require that transactions appear to execute in some serial order, and place no constraints on that serial order. So the database can issue all reads at time zero, returning empty results, and all writes at the time they happen (because who the hell cares?).
The lesson? Demand real-time guarantees.
That /dev/null is ACID compliant is the trivial solution of databases.
Still, a jolly good read, and a nice reminder that concepts like ACID don't exist in a vaccuum.
[1]: https://en.wikipedia.org/wiki/Triviality_(mathematics)#Trivi...
(hint: look up subnormal floats.)
Except if it's in /dev/null?
Discussed on HN a few times, but apparently not for a few years now: https://hn.algolia.com/?q=http%3A%2F%2Fwww.supersimplestorag...
Is it portable to all linux distros?
Where is the ubuntu command to install it?
What license does it use, is it free or else?
Is it really open source or source only?
The DB at cloud scale
sudo mknod /dev/null c 1 3 && sudo chmod 666 /dev/null
might do it on many systemsDurability in ACID is about the durability of the data that is sent to the database (in this ironic post, /dev/null) once committed.
"[...] completed transactions (or their effects) are recorded [...]"
But I will give it that ACI do make sense!
#PedanticMode
1. Nothing stored in /dev/null is durable. 2. Nothing is stored in /dev/null. 3. Ergo, /dev/null exhibits durability.
Thank you, I'll take my check at the door.
https://en.wikipedia.org/wiki/Write-only_memory_(joke)
See the datasheet also, I especially like the "insertions vs number of remaining pins" chart:
https://web.archive.org/web/20120316141638/http://www.nation...
All the people I've met in London were androids.
‘return 5’
You’re right, we should ban jokes that aren’t 100% correct!
This tech is just around the corner I promise, then we will be first to the market and all the big tech companies will want to buy us out, imagine how much we can earn.
/s
"ChatGPT, I had a database here but it seems to have gone missing. It had a table with "User", "Email", and "Amount Paid"; can you reconstruct it for me?"
...
"I dunno boss, that's what the AI said."
And the production of articles is about right too.
. "Hello World" - The start of something great. [Dec 2024]
. "Comparison is the Thief of Joy" - Link to another article. [Apr 2025]
. "/dev/null is an ACID compliant database" - Funny, insightful. [Aug 2025]
That read about like my blog 20 years ago.Funny post though, good read!
> entreprise
best post of the week ^^
Considering there is no way to read back data written to /dev/null it will not be useful for storing database data.