@wizzwizz4 @chjara I'm not galaxy brain enough to work with that, but damn it you make me wanna try.
@Paradox @wizzwizz4 @chjara@mk.absturztau.be
There are multiple ways. Note that to build a computing machine you need both logical operators *and* an amplification setup (usually double negation can serve as an amplifier), because you need deep logical expressions. You also obviously need to have a way to pass signals with a well-defined symbols (usually just two). If you want to have an actual computer, you also need to have memory; usually that can be arranged by doing the same feedback loops that SRAM uses (e.g. https://commons.wikimedia.org/wiki/File:SR_Flip-flop_Diagram.svg), so usually gates are sufficient to construct that.
One approach is to define flow of water/fluid as one symbol and lack of flow as another. Then you can have free-air gates like https://en.wikipedia.org/wiki/Fluidics#/media/File:Fluidic_AND_XOR.svg.
In the same setup, you can use constructions such as a modified version of https://en.wikipedia.org/wiki/Fluidics#/media/File:Fluidicamplifier.svg to get logical gates without relying on free-air streams and on gravity. This allows you to have a wider range of pressures, which helps if you are forced to have long or thin pipes.
Another setup (that I know very little about) is to have constant flow of water and distinguish symbols by overlaying a vibration on top. The advantage is that the total flow is roughly constant over time, which makes "water supply" simpler.
Yet another setup that can work at very low scales, is to have constant flow of fluid and indicate symbols by different patterns of bubbles in the liquid stream. There are very ingenious ways to combat desynchronization, and to make a memory cell that keeps its state across a water flow outage. See http://cba.mit.edu/docs/theses/08.09.Prakash.pdf for lots of details.
The search term for all this is "fluidics". You'll find not only digital logic, but also (maybe even predominantly) analog logic. There are for example very simple purely-fluidic angular rotation rate sensors (that rely on Coriolis effect), and many effectors are anyway actuated hydraulically. That, a.o., once made fluidics very attractive for closed loop control systems in aircraft (at the time when electronics were less reliable).
Note that fluidics includes systems that work with other fluids, in particular with air. For example, https://www.technologyreview.com/1997/02/01/41630/kosher-sound/ is a (very abstruse) example of a fluidic system that uses just air.
I've tried reproducing fluidic amplifiers (or rather, generators) in water. I've managed to get oscillations of frequencies that I did not expect and put the project on hold because I didn't really have a good way to measure the resulting signal (I wanted to target low acoustic frequencies, both because I wanted the device to make sound that can be heard and because this is the range which is practical to design oscillators for while keeping all the pipe lengths shorter than 10m).
@robryk I can't imagine there are very many people, even on fedi, that have experimented with this, so I'm kinda impressed you found this. (unless you follow wizz or chjara and I don't know)
My ultimate concept is going primitive technology with a computer, as close to a modern one as possible. If time was no object, I could certainly replicate one, even given I only barely have a Master's in CS. However I would likely only have enough time to make something much simpler.
If I were to use water flow as an analogue to electricity flow, what I might do is have cells to hold water and logic gates to control the flow of water. I shouldn't need detectors because the very presence of a fluid (or lack thereof) dictates the output. Biggest issue might be that water, unlike electricity, doesn't flow as readily. Electrons will happily hop to and fro as long as there's room and energy to do so. Water isn't particularly energetic by itself (as far as I can tell). I don't like the idea of using gravity because I'd eventually need to pump it back up to restore energy.