Hacker Newsnew | past | comments | ask | show | jobs | submit | zodwick's commentslogin

Kind of scary tbh. I now feel like a perfect sandbox will proly be never achieved. It will always be a cat and mouse game. So many side channels possible.

Wow such an amazing read. I'm sure the author has good future in writing even if academia dies out. So many great quotes.

Jokes apart, honestly i sorta hope that there will be a property that humans possess that will be uneconomically hard to recreate in silicon.


Humanness would be one. Sounds glib, but it's crucial. After all, everything we build is ultimately for a human purpose. And humans will always be best at teasing out that purpose.

Love his work. Another one of his work that I would recommend: https://dominicroye.github.io/blog/visualize-urban-growth/in...

I love when people share actionable writing tips like these.

Similar blog which has helped me: https://flowtwo.io/post/on-10-years-of-writing-a-blog-nobody...

As producing "content" has gotten democratised, I feel like good-writing is such a standout quality. I immediately have more attention and admiration to people who write well ( I don't mean this in a grammatical sense, but rather in a sense that they are able to communicate ideas in a manner that is enjoyable and useful ).

As a rather noob writer, I want to get better at this. Been really trying hard not to put my writings into an LLM before posting. Tbh it does mean I make more mistakes, but I do feel like I'm getting better.


One of those posts which truly hits you in the face and calls you an idiot for how much you don't know. Definitely a rabbit hole I'm going down this week. Thanks

> they get way more user conversations

Idt its that simple. Openai is much bigger than anthropic in terms of userbase


Not to be non-diplomatic, but I think claude users have the more challenging conversations.

I’m not sure it’s that simple either, it’s just very tough to take anyhing for bare value with everything that’s at stake. Trillions of value, future of humanity.

Tricky..


yeah, but their users are mostly normal people while users of claude are mostly developers. There is presumably more learning value in conversations about complex codebases than in the 10th planning of which lamp would go well in this kitchen. Also I'd assume the claude users are much better at saturating their usages, so even though the number of users is smaller, the number of conversations is more comparable

why would you be skeptical given that the claims seem to hold up in real world ? Assuming they measure stuff correctly

Because correlation doesn't prove anything? The "real world" might be telling you something but maybe not what you think it is.

I think so too. tbf it does seem to work. Had this not been on Simmon Willson's blog and the creator having good track-record, I wouldn't have bothered to have a look.

Although I personally give more weightage t to "Creator of xyz" part than the "pre AI" part.



I would like to argue that one could make most codebases 50% faster if rewritten from scratch with performance in mind even in the same language.

Taking python as an example, one could use benefit of hindsight and make better decisions from the start ( offloading slow parts to C binaries, better DS decisions, eliminating bloat etc.. ) if they rewrite the same app in Python. This is kind of what happens when a program gets rewritten to another language ( Rust ) - better decisions are made from the start and less bloat is copied over.

Yes, obviously there are exceptions to this. But most of the time it is the choices we make that make the program slow and not the language itself.

It used to be that rewriting programs were almost always a dumb idea due to how much effort went into it - see: https://www.joelonsoftware.com/2000/04/06/things-you-should-... . But AI has made this argument less compelling imo. I now regularly rewrite big chunks of programs with various end goals given to the agent.


Over the many years I was writing code in C, I noticed that the original program design and data structures were very persistent, i.e. they were never reorganized. I suspect the cause is the tendrils of those choices found their way into everything, so reorganizing it was thoroughly impractical.

One of the problems, for C, is the use of . to access a field via a variable, and -> to access a field via a pointer. To switch between a pointer and a variable in a struct means you've got to re-edit large quantities of code everywhere. The result is just too tedious.

This was the motivation in D for using . for both. It turns out, it is completely unnecessary for having both . and -> as the compiler semantic pass can trivially figure it out. Eliminating this issue makes for much easier redesign of a data structure.


I actually don't hate that part of C. You have to acknowledge it's a pointer with a different accessor. I liken it to = vs := in Go. It's an unnecessary semantic, sure, but it elevates a technical detail to be part of the syntax of the language. Go has caught me a couple of times when I forgot I had the same variable name in scope already (e.g. opening a second file descriptor and trying to name it "fd" again).

My mind equates -> to "this could be NULL" without ever looking at the function signature.

It is way more of a pain in the ass for refactors than = vs := though.


I don’t think that’s a good comparison. It’s to do with variable scoping, which is really quite core to reading and comprehending code.

-> just… isn’t. Acknowledging it’s a pointer with a different accessor is just not really that important. I mean, in some specific cases it might be, but in general it’s not.

Point in case: go?


There's one more aspect to it in D:

    struct S {
      int a;
      int f(); //getter
      void f(int i); // setter
    }
    void test() {
      S s;
      int i = s.a;
      int j = s.f;
      s.f = i;

      S* ps;
      int k = ps.a;
      int l = ps.f;
      ps.f = k;
    }
i.e. the field can be replaced by a function and the usage of it would not change.

Actually, those are things I like about C:

- It does not run code behind my back when I access a field.

- I see when a pointer is used, so the syntactic distinction between -> and . is important.

Being able to change this without changing these little things is far less important to me than being able to understand important properties of the code just by looking at it.


> it elevates a technical detail to be part of the syntax of the language

For me that's definitely a bad thing. It's the reason I don't like Rust syntax, they make you write everything out even if there is no possible way to misinterpret the code. And they never do things like Zig enum variant shorthand because syntax sugar is evil. Maybe they're just diabetic.


Rust Deref trait can do quite a bit behind the scenes. And there is (sort of) an enum shorthand, e.g. the following works. (It's more useful in match statements.)

  #[derive(Debug)]
  enum E { A, B, C }
  pub fn main() {
    use E::*;
    let x = B;
    println!("{:?}", x);
  }

Totally fair, I get that. I’m also not a hardened C dev, so maybe it would annoy me at some point. I gripe about Go’s assignment operators from time to time, but I like it on the net.

Not really Go in general, though. It’s mostly disappeared from my personal projects, in part because of their matching allergy to syntax sugar. I am incredibly tired of writing “if err != nil” blocks, and I don’t understand why there isn’t some kind of “if this function returns a non-nil error, return zero values and the error”. If only I could get something better to make a static binary. By which I mean “I like Clojure and refuse to learn SBCL because… reasons”


Rust offers this via de Deref trait

See uv - replacing pip with a rewrite in Rust was a good stunt, but the big performance gains came from eliminating dynamic features (uv doesn’t allow packages to execute code when installed) and I/O (better caching and parallelization).

I think the biggest win of going from pip to uv is that breaking your python environment no longer breaks the tool to manage your python environment. Pip was always fragile in that you could carelessly use it to break a library it is depending on. (Yes, there are ways to avoid that - but they require not being careless.)

I once, on a fresh Ubuntu install, did "apt install python-pip3", and then "apt install python3.8" when I realized I actually needed Python 3.8. The pip3 complained that it was outdated and suggested a command to run to update it. Naturally, I ran it, and it completely broke apt, it couldn't even do "apt list" never mind intalling/removing packages, so I had to rollback the VM to fix this bullshit. Wonderful, 10/10 DevEx.

I'm not sure that's a compelling indictment of Python specifically, but you definitely make a good case for tools that are often needed as prerequisites for using other tools (package managers, decompressors, the basic drivers needed for HID, slow networking, VESA graphics, storage) being distributed in a self-contained way.

I'm not necessarily a "statically link all the things" zealot, but I think that pattern definitely has a place where problems like yours often occur.


Well, Ubuntu (and Debian) definitely have a fair share of blame for both weirdly insisting on packaging parts of Python standard library into separate apt packages, and also on setting the system-wide Python in such a way that packages from different Python versions will end up in the same site-packages/ directory, and also on making apt rely on system-wide Python which can be very easily broken by apt itself... tl;dr is that the only sane way to use Python on Ubuntu is to immediately get virtualenv (yes, it's too distributed separately from Python itself, you need to run "apt install python3-virtualenv" first) — and then never, ever touch system-wide Python or its packages with apt, upgrade the pip inside your venvs only.

Or install uv

Though to give credit where it's due, it's a lot easier to parallelize things well in rust than in python. The coarse-grained download parallelism is easy in both, of course (though with higher overhead in python), but the more fine-grained solver parallelism favors rust (or c/c++ but let's not do that).

Every cursed rust application I've been hired to fix has been diagnosed as spending 90%+ of its time pointlessly jumping tokio threads because someone thought that async means fast. I give these 10x throughput boosts by removing concurrency or, sometimes, just rewriting them in Go.

You're talking about concurrency and I'm talking about parallelism. :-)

Rust's async situation is still a pain in many ways.

But throwing Rayon at something often results in very reasonable parallel performance gains without cluttering things much. It usually won't get you to an optimal solution, but it's good for 80% with 10% of the pain.


I interpreted GP as talking about maintaining Rust code that was written with performance in mind by people who were not familiar with the difference, and who shot themselves in the foot as a result.

It depends on what you are going for: service latency, or throughput. Rayon's work stealing is inappropriate for any throughput oriented work and questionable for the majority of latency sensitive services. It does have a niche but it's not the first thing I would reach for. Unfortunately it IS the first thing Claude reaches for.

That's why the rust server I work on is an unholy mix of threads and tokio...

The performance oriented (data plane) work happens on dedicated, cpu-pinned threads and sockets outside the tokio runtime. The control plane work happens in tokio async. Interaction between the two is tricky. But decreased latency and increased throughput is valuable. And it's a complex server, so we can't really try too many approaches.

It certainly doesn't help that the data structures are, by necessity, a cephalopod that have to be used across threads.


Rust makes it pretty hard to do fast async, IMO.

Everything wants to push you down the path of using `ARC<Thing>` even when `Thing` is immutable or the lifetime can be mostly guaranteed.

Here's an example of that problem. Let's say I want to do 2 things concurrently against the same data set. I might want to write code that looks like this:

    let v = vec![1, 2, 3];
    let taskA = tokio::spawn(async {
        println!("Here's a vec: {:?}", v);
    });
    let taskB = tokio::spawn(async {
        println!("Here's a vec: {:?}", v);
    });
    tokio::join!(taskA, taskB);
But that immediately gets you in hot water because "async block may outlive the current function, but it borrows `v`, which is owned by the current function"

Now, you and I can clearly see that the async block does not, in fact, outlive the current function. However, AFAIK, there's no real way to convince rust that that is the case.

So now even though `v` is immutable, making this a thread safe operation, we need to introduce unnecessary concurrency constructs or break out unsafe in order to force the language to recognize that "Yes, you can trust me".

For rust to actually be fast with concurrent operations, it needs to be smarter about lifetimes in terms of async.


You don't need to spawn tasks for concurrency.

https://docs.rs/tokio/latest/tokio/macro.join.html


Yeah, and the amount of work that rustc has to do contemplating the safety of these async bodies, their witnesses, etc, especially if the signature is generic, explains most of the reason why rust builds are so long.

Absolutely. I have the exact same problem dealing with Python people who have done the same thing. "This is all modern, async python and therefore can scale. What do you mean our event loops are routinely blocked?!"

I thought we as an industry had hopefully moved past "async == magic code-go-fast sauce", but apparently we have not.

As much as Go annoys me, you're right there as well. I have to admit that Go did "solve" the make-concurrency-and-parallelism-accessible (and relatively safe) space in a way that very, very few other programming languages did (and none that people widely use).


> and none that people widely use

Java already did, especially now with virtual threads. Now other JVM languages can also get this benefit.


Java solved half of it: the risk of race conditions creating data corruption. But it didn't solve efficient threading or IO multiplexing (at least until virtual threads arrived recently), which put a damper on the ability of folks to use the language's concurrency primitives to model units of business logic; that'd just create too many threads even on a modern system. Goroutines have no such issue.

Erlang, as the adjacent comment points, out, did solve that! But at such a significant runtime (performance/memory) and syntactic cost that it's very rarely used, even nowadays after the Elixir renaissance.


Erlang BEAM VM

What absolutely kills me is people who go the other way, hard-line refusal to ever block an executor, then a few days into it they decide they need "backpressure" which they would have got FOR FREE if they had just stayed on the main event loop.

Eeeeh...backpressure via loop blocking only kinda-sorta works, with some nasty externalities. If you're doing heterogenous work (e.g. serving lots of different web routes on one server and only want to backpressure some) loop-blocking can have an unwelcome blast radius, plenty of telemetry/sidecar-ish systems will either bug out or alarm if the loop's blocked, and some event-loop-based systems will start to struggle processing signals/shutting down the runtime while the loop's blocked as well.

Loop-blocking-as-backpressure is sometimes the right move, but only rarely. If you can isolate event loops for specific workloads (e.g. some shameless self promotion, releasing in PyPi this week: https://github.com/zbentley/async-anywhere/blob/main/src/asy...) that becomes a more tractable approach.


There are multiple ways to do it, sure. But I really hate hydraulic analogies and what people want from "backpressure" is what you get from simply not accepting and reading sockets quite as eagerly. You can always read a socket later. That's how TCP works.

Yes exactly, I think this article explains it well :- https://nesbitt.io/2025/12/26/how-uv-got-so-fast.html

I rewrote a C++ batch process in Python 1.4 (this was 1997) and the Python version was ~10x as fast.

The port was pretty direct, function for function. It was even line for line where language and library differences didn't offer an easier way. I was just trying to see if Python was so slow that we couldn't consider using it in production, and this was the most speed critical batch we had.

I assumed the speed difference was a bug that was skipping work, but that seemed unlikely because the output was correct. It turned out to be a bug in the C++ code that was needlessly reproducing work (an issue with cache keys). The bug was extremely subtle. When I fixed the C++, there was very little difference in speed as the batch was I/O bound when the cache was working.

So, adding to your point, sometimes you can greatly improve speed by rewriting in a slower language, even without performance in mind.


To be technical about it, the Python program didn’t match the behavior of the c++ program. ;)

But also technically I think your point still stands. Because rewriting it helped you find a defect in the original. Which did improve performance of the original.

It’s quite interesting the two implementations performance was so close in the end. Do you consider one implementation “better” for non-performance reasons? Maybe one type of dev is easier to find. Or one language is easier to create and maintain correctly behaving programs in your environment?


The Python version was far easier to maintain and add features to. We kept it and rewrote other code in Python whenever we did significant work on it. All new back-end code was also written in Python after that.

Hiring devs who already knew Python was not really an option in 1997. But we quickly found that there was not much difference in time to ramp up a C++ developer on our C++ codebase vs. ramping up a developer on Python plus our Python codebase. It was just a matter of finding developers who were happy to learn a language they may or may not have heard of, but had likely never looked into.


Were you around for migration into python 2 or 3?

I was there for migrating to Python 2 and I don't remember much in the way of challenges, but Python 2 wasn't that big of a leap.

I was not there for Python 3, but I was at a larger place that had ~2 million lines of Python 2 code when the migration happened. It was much easier than I had expected. The two key differences from other stories I was hearing was that were a lot of automated tests (nearly 100K of them), and we had someone who was very good at writing parsers. He spent a few weeks automating the changes and getting tests to pass, and the night he ran the final conversion was remarkably clean. We never even used `six`.


A good point in time to mention Casey Muratori: https://www.computerenhance.com/p/clean-code-horrible-perfor...

You're right, but sometimes you do the 50% performance improvements (over time, 10% here, 5% there) and you're still not happy.

We converted a Python pipeline to Rust and it's 50x+ faster depending on the customer.

This was mostly important for tasks like backfills where you're processing hundreds of times more data than usual.


Or, as I have seen it succinctly put: The value is as much a Rewrite in Rust as a Rewrite in Rust.

About python, I did exactly small things and optimized a data pipeline really well https://brunoarueira.com/blog/optimizing-19-million-rows-pip...

On the other hand, starting out writing everything in a fast language like C or Rust gives you more wiggle room to be stupid about performance and still get something that's decently fast.

I mean, it's definitely both. Of course there can be algorithmic improvements, but a like-for-like rewrite of Python code into Rust can often be 10x faster.

Don't forget 10x iteration time and deploy time due to building on large projects. Still can be worth it, but I highly recommend build costs (CPU, RAM, Disk, Time) are considered in a rust rewrite decision. I'd even architect around it from the start as it can really add up.

Depends on the application. Tbh the comparison btwn python and rust is kind of dumb. But for the sake of argument - I don't think most well-written Python codebases can get 10x faster by using Rust. Bit faster ? sure maybe. Remember Python uses C under the hood. Unless there is a shit ton of looping or weird unrealistic conditions i don't think this is true

I think it totally depends, I’ve seen huge (100x) speed ups by moving a pure-python CPU heavy task to a compiled language. If you’re using something like numpy already to run compute natively, then yes it’s probably much more difficult to get gains.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: