Posted by ksec 3 days ago
https://gist.github.com/corporatepiyush/5382d79192be9737cf3b...
Happy for you.
CLI tooling counter intuitively makes for very less friction especially when you are moving very fast.
I would have completely expected that.
fn run_query(alloc) {
arena = init_arena(alloc);
defer arena.deinit();
}For example, bump style allocators allocate very quickly, but at the cost of higher memory usage and therefore sometimes worse cache locality.
The only way to know is to actually measure.
> I think it should be preferred wherever it's an option for that reason most of all.
And that’s far too broad in my opinion.
Sure, if you’re writing in a language that makes memory management difficult, like C or Zig, that might be worth it, but arena allocators apply to many other languages too.
Yes, which you didn't respond to until now.
> And that’s far too broad in my opinion.
Similarly, it's far too broad to say that it's "much less error prone" to use a more general allocation strategy. Clearly we both make unspoken assumptions, but in the context of this discussion on Zig, where you initially responded to an example written in Zig, I think you actually understood what I meant.
eg https://www.dgtlgrove.com/p/untangling-lifetimes-the-arena-a...
that being said, it's even easier to not manage any lifetimes at all :)
although i suppose some will say that you still manage lifetimes in rust, you just have full support from the compiler to make sure you do it right. that seems better to me than relying on simplification to ensure you don't make mistakes.
It makes it much easier to avoid lifetime mistakes in my experience.
Using arena allocation also makes me think more about how much memory I am using and how much memory I should be using etc.
It is hard to benchmark it against just using a global allocator because it is a structural change to the whole codebase.
But, you can use hashmaps fine. Just need to think about it and structure the program well for it.
It becomes clear once you do it a couple of times
Now it all feels so pointless though. Like memorizing rules to do mental arithmetic. Sure, there is still use for language expertise, but not enough to get excited over new concepts and ideas.
For years I used Rust as my hobby-programming language and loved it greatly. I never managed to land a job working with it full-time, because either the work was too niche or it didn't pay enough, or I was simply too comfortable where I was to change. And now that I finally have enough discretion over my technology choices to run a "proper" project using whatever tools and languages I want, it is not me but the AI that writes all of the code.
There's a part of me that feels a quite sad about all this. It's almost as if there actually all along existed a real final deadline on finding that "dream job". And I missed it. And while I expect this one miss to be just a small piece in the grand picture of things that we're going to lose or have already lost to the zeitgeist of agentic SWE, it feels big to me. It was my professional dream, while I still had professional dreams.
Let’s say I’m writing some concurrent code with an LLM. I’d probably feel much safer having it write Rust, rather than C. So even in a post-LLM world, languages will continue to evolve as long as abstractions can be improved.
I just upgraded a less important service to Java 27, a few days after its release (several nice features). It's cool how easy it is to upgrade nowadays.
That an agent writes most of the code doesn't mean anything to me here.
My examples are Java because that is the main language where I work.
I would argue that "concepts" actually are more important than ever. Let's take my structured concurrency example. It doesn't matter here exactly what is, but if it ends up being as important as I think it will be, I likely want to write most concurrent code that way going forward.
However, it will likely be years until agents go to it unless deliberately steered in that direction. And if I want to make agents write it, I need to review it, and if I'm going to review, I need to understand it.
I think this is why I'm not pessimistic about the profession, it still feels like what I'm doing and learning matters.
eg. you dont need to memorise sorting algorithms or be able to write them, but you do need to understand the concept of sorting, and the concept of time complexity, etc etc. knowing what data structures to use and when to use them. knowing how to structure concurrency for your problem space. many many concepts.
system design is becoming the most important thing, and to me it's also the most interesting part of creating software. and there will always be more to know.
I'm never going back to it, but I do think it's the best it's ever been.
Programming and learning new things can still be fun in the era of agentic coding.
With LLMs, I get to quicky ask: what would this look like? Why do it that way? If you suspect that the LLM isn't doing it the right way, you can still investigate that yourself.
e.g. the other day, https://rhombus-lang.org/ was mentioned on HN. With LLMs, the cost for trying this out is practically much lower.
I’d push this more towards personal preference of how code is expressed matters much less now than how maintainable it is.
There is the aspect of long type names, they often don’t have much impact when tokenized. The character count of words is nearly negligible - they often become one or two tokens anyways. But, the choice of words may have a greater impact on how the word choice weights an LLMs contextual processing of that word (a human may be able to ignore an inaccuracy in naming a bit more flexibly than some LLMs).
I prefer to prototype in Golang since it compiles fast and makes for quick iteration, but at the end I ask the LLM to port the Golang to Rust.
Nice Rust enums for APIs are the chef's kiss.
I absolutely will not write anything in Python or scripting languages anymore. They're too brittle and don't have great devex or deployment stories. Especially when you can just as easily build in a typesafe language with good error handling that compiles down to a single static binary.
The main thing to change this feeling for me is the large number of articles on programming languages written by an LLM.
In 5-10 years, the people who have paid attention to these will be needed to bail us out of the mess that the rest of the slop-addled monke brains have created.
Jokes aside, have you watched 2001 - a space Odyssey?
First I thought you were going to comment about the grating LLM-isms in the article, which made me end up not enjoying reading it.
items.iter().enumerate().filter(|(_, i)| cond(i)).map(|(idx, i)| Pointer::idx(i, path, idx)).collect()
vs. Zig: while (i < cursors.len) {
if (actual_index < arr.items.len) { cursors[i] = .{...}; i += 1; }
else iteration.remove(i);
}
I think you have to be a special kind of person to call Rust "more readable."The thing about Rust is that if you can appreciate zero-cost abstractions on iterators then the language feels like the only right way to program. But many programmers either don't use this sort of programming at all, or don't care if it has a cost in languages like JS, Python, Java, etc.
Personally I like Zig a lot because it feels like you're doing low-level programming but without having to program C which is... well, https://xkcd.com/918/