Readit News logoReadit News
mhandley commented on Deep-Sea Desalination Pulls Fresh Water from the Depths   scientificamerican.com/ar... · Posted by u/noleary
csense · 8 days ago
> one might think of pumping it “up”, but really the only hard work is producing the pressure difference P_feed - P_permeate or so — water is buoyant to an extent that almost exactly negates its weight

If you package the permeate in a balloon (hopefully a very strong one!) and let the balloon rise to the surface, buoyancy is very relevant.

If you instead pipe it -- to simplify the analysis, let's say it's going straight up a vertical chimney to the surface -- it doesn't seem like buoyancy is relevant.

Take a vertical water-filled pipe sealed at the bottom and open to the air on top. The water N meters from the top of the pipe will be the same pressure as N meters inside the ocean -- even if the pipe's nowhere near an external body of water! A water column self-pressurizes due to the potential gradient of Earth's gravity.

Now put the bottom of the pipe at the bottom of the ocean, you can unseal it and stick a pump on it.

You put 1 kg of water into the pipe N meters below the surface. You take 1 kg of water out at the surface. And repeat in a cycle. Some part of the system has to be doing enough work to lift 1 kg of water N meters per cycle. That work has to come from the pump -- where else could it come from?

I'm skeptical of any notion that water "floats" to the surface of the pipe "for free"!

mhandley · 8 days ago
If you have two pipes of the same height, one filled with fresh water and one with salt water, the pressure will be greater at the bottom of the salt-water pipe because salt-water is denser. Connect them at the bottom with a pipe and water will flow from salt to fresh until the pressures equalize. But connect them with a membrane, and this is countered by the osmotic pressure of fresh water trying to get to salt water, so you don't get any magic flow for free. You have however got a pressure gradient for free - just not enough to desalinate.

If you put this in the ocean, you can remove the salt pipe and get the same effect. But if you want continuous fresh water, you need to further increase the pressure difference across the membrane by continuously lowering the height of the fresh-water column by pumping water up and out of the top. That takes energy, but not as much as it would take if we had to raise the pressure on the salt-water side.

mhandley commented on Private Welsh island with 19th century fort goes on the market   cnn.com/2025/08/08/busine... · Posted by u/makaimc
comrade1234 · 16 days ago
No mention of the freshwater source... line from the shore? Shipped in?
mhandley · 16 days ago
The listing mentions a 30,000 gallon reservior, so I imagine rainwater collecion from the "parade ground".
mhandley commented on We'd be better off with 9-bit bytes   pavpanchekha.com/blog/9bi... · Posted by u/luu
mhandley · 18 days ago
If we had 9-bit bytes and 36-bit words, then for the same hardware budget, we'd have 12.5% fewer bytes/words of memory. It seems likely that despite the examples in the article, in most cases we'd very likely not make use of the extra range as 8/32 is enough for most common cases. And so in all those cases where 8/32 is enough, the tradeoff isn't actually an advantage but instead is a disadvantage - 9/36 gives less addressable memory, with the upper bits generally unused.
mhandley commented on JOVE – Jonathan’s Own Version of Emacs   github.com/jonmacs/jove/... · Posted by u/nanna
ww520 · a month ago
Jove was my first editor on Unix. Emacs took up too much resource and was too slow back then.
mhandley · a month ago
I also started using Jove back when 30 of us shared one PDP 11/44 running BSD Unix, and it was antisocial to use something as heavyweight as Emacs. 40 years later, I'm still using UNIX and Emacs.
mhandley commented on Writing Code Was Never the Bottleneck   ordep.dev/posts/writing-c... · Posted by u/phire
mhandley · 2 months ago
I've spent the last few weeks writing a non-trivial distributed system using Codex (OpenAI's agentic coding system). I started by writing a design brief, and iterated with o3 to refine it so it was more complete and less ambiguous. Then I asked it to write a spec of all the messages - didn't like its first attempt, but iterated on it til I did like it. Then got it to write a project plan, and iterated on that. Only then did I start on the code. The purpose of all this is to provide it some context.

It generated around 13K lines of Go for me in just over two weeks. I didn't previously speak Go, but its not hard to skimread to get the gist of its approach. I probably wrote about 100 lines, though I added and removed a lot of logging at various times to understand what was actually happening. I got it to write a lot of unit tests, so that coverage testing is very good. But I didn't actually pay a lot of attention to most of those tests on the first pass, because it generally got all the fine detail stuff exactly right on the first pass. So why all the tests? First, if something seems off, I have a place to start a deep dive. Second, it pins down the architecture so that functionality can't creep without me noticing that it is needing to change the unit tests.

Some observations.

- Coding this way is very effective - the new models almost never make fine detail mistakes. But I want to step it through chunks of new functionality at a size that I can at least skim and understand. So that 13K LoC is about 300 PRs. Otherwise I lose track of the big picture, and in this world, the big picture is my task.

- Normally the big design decisions are separated by days of fine detail coding. Using codex means I get to make all those decisions nearly back-to-back. This is both good and bad. The experience is quite intense - mostly I found the fine-detail coding to be "therapeutic", but I don't get that anymore. But not needing to pay attention to the fine detail (at least most of the time), means I think I have a better picture in my head of the overall code structure. We only have so much attention at any time, and if I don't have to hold the details, I can pay attention to the more important things.

- It's very good at writing integration tests quickly, so I write a lot more of them. These I do pay a lot of attention to. Its these tests that tell me if I got the design right, and if not, these are the place I start digging to understand what I need to change.

- Because it takes 10-30m to come back with a response, I try to keep it working on around three tasks at a time. That takes some effort, as it does require come context switching, and effort to give it tasks that won't result in large merge conflicts. If it was faster, I would not bother to set multiple tasks in parallel.

- Codex allows you to ask for multiple solutions. For simpler stuff, I've found asking for one is fine. For slightly more open questions, it's good to ask for multiple solutions, review them and decide which you prefer.

- Just prompting it with "find a bug and suggest a fix" every now and then often shows up real bugs. Mostly they tend to be some form if internal inconsistency, where I'd changed my mind about part of the code, and the something elsewhere needed to be changed to be consistent.

- I learned a lot about Go from it. If I'd been writing myself, my Go would have looked more like C++ which I'm very familiar with. But it wrote more idiomatic Go from the start, and I've learned along the way.

- Any stock algorithm stuff it will one-shot. "Load this set of network links, build a graph from them, run dijkstra over the graph from this node, and tell me the histogram of how many equal-cost shortest paths there are to every other node." That sort of stuff it will one-shot.

- It's much better than me about reasoning about concurrency. Though of course this is also one of Go's strengths.

Now I don't have any experience of how good it would be for maintaining a much larger codebase, but for this sort of scale of utility, I'm very impressed with how effective it has been.

Disclaimer: I work at OpenAI, but on networks, not AI.

mhandley commented on Cloudflare to introduce pay-per-crawl for AI bots   blog.cloudflare.com/intro... · Posted by u/scotchmi_st
mhandley · 2 months ago
That sounds reasonable for access to actual content, but it produces a huge new incentive to constantly produce vast amounts of AI-generated slop served via Cloudflare. Is there a way to disincentivize this?
mhandley commented on Ask HN: In 15 years, what will a gas station visit look like?    · Posted by u/thomassmith65
mhandley · 3 months ago
The ones in towns will mostly disappear. There will be enough chargers at supermarkets, malls, restaurants, anywhere people actually want to go, and most people will charge at home or work. The remaining business won't be enough to keep in-town gas stations in business. Range anxiety will become more of an issue for gas cars.

On highways, it will be a different situation. There will be plenty of gas and diesel still available, as the remaining business from towns becomes more concentrated. You won't find a gas station without a restaurant attached though. Fast chargers will be common, but ultra-fast ones won't be as common as we'd like, as they will want to keep you just long enough to buy a meal, etc.

mhandley commented on Joining Apple Computer (2018)   folklore.org/Joining_Appl... · Posted by u/tosh
duxup · 3 months ago
What a wonderful read.

I find myself pining for a lot of the "old days" when anything seemed possible and it was open and exciting. You could DO surprisingly, not a lot, but everything still felt possible.

Now everything seems trapped in advertising dominated closed box. Login and live in this limited little space...

The internet is still there, I can still put up a site that isn't covered with ads. I wish I could surf just that internet and so on.

mhandley · 3 months ago
I came of age in the 8-bit era of the early 80s, rode the Internet wave of the 90s and early 2000s, kind of missed the mobile wave but spent that time developing ideas that would eventually turn out to be useful for AI, and now I'm having great fun on the AI wave. I'm happy to have grown up and lived when I did, but I feel that each era of my life has had its own unique opportunities, excitement and really interesting technical problems to work on. And perhaps most importantly, great people to work with.
mhandley commented on Coventry Very Light Rail   coventry.gov.uk/coventry-... · Posted by u/Kaibeezy
closewith · 3 months ago
I don't think you could do that for CVLR specifically as it's not segregated from traffic and the second car would have to react individually to vehicles, pedestrians, roundabouts, etc.
mhandley · 3 months ago
If it's really just 1m behind, it doesn't need to respond individually to anything except pedestrians. And you can solve that with some extensible tapes that actually do connect the vehicles to prevent pedestrians walking between them.

u/mhandley

KarmaCake day6368June 21, 2012
About
http://www0.cs.ucl.ac.uk/staff/M.Handley/

Server proudly running Cern httpd 3.0 since 1994 on Sun Sparc hardware. May be a little slow.

View Original