MurphyA/hacker-news huggingface dataset:
by josephg | 2025-11-23 23:21:19+00:00
A couple years ago I implemented a btree (technically order statistic tree) in a couple thousand lines of unsafe rust for a project. I wrote it more or less how I'd do it in C. Each internal node and leaf node was a separate heap allocation and internal nodes had an array of child pointers. It was surprisingly hard to program up. And complicated!

In my opinion, unsafe rust code is worse to use than C because rust is missing the arrow operator. And rust still requires strict aliasing to be followed even in unsafe code. This makes complex unsafe code very hard to implement correctly. Like, it’s easy for something to look right and work correctly but for MIR to still find subtle issues.

Eventually I rewrote my btree on top of Vecs. My node & leaf pointers are now array indices. The result? There is no longer any unsafe code. The code has become significantly simpler and it now runs ~10% faster than it did before, which is shocking to me. I guess bounds checks are cheaper than memory fragmentation on modern computers.

I have so many thoughts having done that. First, I think this is actually the right way to write rust. Yes, manually keeping track of which array slots are in use is inconvenient. But unsafe & pointers are also quite inconvenient in rust. Programming like this makes use after free bugs possible to write. But it’s still memory safe by rust’s definition. It’s impossible to get arbitrary heap corruption because there are no raw pointers. And the indexes are bounds checked.

I also don’t think the resulting code is any worse than the equivalent C++. Everyone talks about memory safety but IMO rust’s best features are enums, traits, cargo, match expressions and so on. Even when you do a run around the borrow checker, it’s these features which make me keep coming back to rust.

I agree better guidance would be nice, but so many words have been spilled on rust already. Would you find content talking about subtle stuff like this? Sometimes the only way to learn is by trying stuff out.
by cyrusradfar | 2025-11-23 23:21:20+00:00
I'll start with my bias as someone building a VS Code extension that I can see why folks forked initially, but don't see the need.

There's so much you can do as an extension and the Microsoft team behind it seems to be rational and listening to the extension community about their needs.

I do think Microsoft needs to find a way to host a conversation that discusses why folks must fork and how they can provide APIs to make the tools more configurable.

One big problem for extension programmers in the world with AI chatbots, is the extension is sandboxed and there isn't cross extension communications or a message bus. If there was that standard and a way to send messages, then my extension could push to a AI chat bot. This is a UX shortcoming I'm seeing.

There are also limitations in the ability to overlay UI/UX on top of the editors, e.g. to add comments or annotations that are persistent.

That said, these aren't reasons to fork in my view. I think you a get a good enough experience.

Anywho, I'm new to the eco-system so maybe I'm an optimistic idiot, happy to be wrong.
by hypeatei | 2025-11-23 23:21:28+00:00
> We actually had a recent Cloudflare outage caused by a crash on unwrap() function

Oh boy, this is going to be the new thing for Rust haters isn't it?

Yes, unwrapping an `Err` value causes a panic and that isn't surprising. Cloudflare had specific limits to prevent unbounded memory consumption, then a bad query returned a much larger dataset than expected which couldn't be allocated.

There are two conclusions: 1) If Cloudflare hadn't decided on a proper failure mode for this (i.e. a hardcoded fallback config), the end result would've been the same: a bunch of 500s, and 2) most programs wouldn't have behaved much differently in the case of a failed allocation.
by gerdesj | 2025-11-23 23:21:35+00:00
No. Why would you "despise" being referred to?

My first name is Jonathan, I generally get referred to as (int al) Jon, Jonny, Jo, or John (bloody silent letters).

As it turns out, until I was 20 I thought my name was spelt Jonathon. I got a copy of my birth cert to get a student loan and discovered the "truth" - even my passport was wrong and my parents had to sort out the first few of those and they should have known better! I was born in 1970 and no one noticed that I misspelt my own first name for 20 years.
by jaredklewis | 2025-11-23 23:22:32+00:00
I like your thinking about this problem.

What if teams were integrated groups of engineers, designers, and product people, managed by polymaths with at least some skill in all of these areas. In this case, do you think it would be easier to evaluate the team’s (and thus the manager’s) performance and then higher levels of management would care less about processes and management philosophy?
by IncreasePosts | 2025-11-23 23:23:10+00:00
I've tried to calculate this for the New York City Metro, but they spend about $1 billion per year collecting $5 billion per year, out of a budget of $20 billion per year. Year so they would need to make up about $4 billion per year if they were to eliminate fare collection, or increase the budget by 20%.

In my mind it would be a no-brainer for all the benefits you would get from free service, but 20% increase in cost is not an easy sell - especially when a lot of people paying tax on it never go to NYC
by themafia | 2025-11-23 23:23:34+00:00
I'm conservative. I think buses should be free. Then they'll actually get used and all the secondary benefits they were supposed to bring will be much more easily realized.

You need public transport in major cities. Not everyone can or should drive.

You need private transportation almost everywhere. Not everyone should be forced to ride public transport just because it exists.

As long as people have an actual choice that's not manipulated in some way then I think the system is fine. It has a public function and it provides immediate and secondary benefits.
by alphazard | 2025-11-23 23:23:47+00:00
There are components of management culture which are fads, like the idea that one could be an effective manager, while not understanding what one's reports are doing, through some management-foo learned from books and blogs. The success of that fad is no doubt partially due to the economic climate. People want the tech industry money, but don't have the tech industry skills.

Leadership is timeless, humans have always organized themselves in groups with leaders, and we instinctively play the part of leader or follower according to the situation. Being a good leader just means allowing the group to accomplish something that would be less likely without one's guidance. Being a good follower is mostly a selection role, where one exercises judgement in choosing a leader to follow.

The mechanism for dealing with bad leaders has also changed relatively little: stop giving them your own resources, and put distance between you and them. In the workplace this is asking to switch to another team. You can dress it up with fake reasons, like you are interested in another project, or you aren't learning enough, whatever. The important thing is that it takes a resource (you) away from a bad leader and gives it to a better one. Iterate this process enough, and the incompetent leaders are outed through their inability to maintain personnel.

People don't do this enough, it's an easy way to signal to upper leadership who in management is bad at their job, without a direct accusation.
by palata | 2025-11-23 23:24:23+00:00
> That's not meaningfully more difficult than tricking you into revealing your key file password.

No, but that's meaningfully more difficult to do without an intervention from the user. Say your computer is infected, the malware won't silently do it: it will have to interact with you.

And an important part is that you apparently don't have to make the key exportable:

> So if that's in your threat model don't make the key exportable.

Which now makes it meaningfully more difficult to extract.

I would personally not export it, just like I don't export (and can't export) the key from a security key. That's a feature.
by Gualdrapo | 2025-11-23 23:25:07+00:00
After all this years I still think the Applications - Places - System "start menu" was the best way to present available stuff in a DE, in any DE, in any OS, ever. You didn't have to skim through so many submenus to locate something - the main categories were available at a glance. It was pure genius.

I kind of get why they felt pressured to remove it but pretty much every other DE had a start-menu-like thing and they never did any change. It was just GNOME.
by ttoinou | 2025-11-23 23:25:18+00:00
Something I never see mention is that all agents / CLI tools seem to modify local files. Which makes editing current files, working with the git, asking to only modify some parts of the files etc. cumbersome, as the agent is constantly reading and writing to files that we are also accessing. This is usually solved by using git worktree but this solution requires 1 new folder name and branch for each new agent, and each folder will have its own unique name and others issues.

While it can be super powerful, I wish there was a quicker "in memory" agent solution where each agent keeps in its own RAM the list of files modifications ("patch") it recommends to apply to solve current issue. Then we could apply that patch depending on what we're doing, if we have others patches to apply before etc.

Also even if agents can work in parallel, sometimes we only have 1 of them in front of us and if we already know what's the next thing we're gonna ask, we'll still wait for the previous task to be completed before sending the new prompt. I'm not sure how to improve this async problem, I guess I could launch multiple agents in parallel but I wouldn't get sharing of the chat history between the different agents, and when I work I usually work on related issues that depend on each others, thus I do need some kind of global or shared context between agents analyzing codebases and creating patches.

Anyone has ideas over how to improve those AI coding agents workflows ? Maybe latest versions of GitButler https://gitbutler.com/ but I'm not sure, and it does use git worktree behind the hood
by Nextgrid | 2025-11-23 23:25:49+00:00
Keeping the certificate’s key as non-exportable in the HSM means you do not need to revoke it as it cannot be compromised (not permanently at least), once you’ve regained access to the HSM you can assume the bad guys are out.

Of course the CA key itself is another story, which is why this merely moves the problem elsewhere (however since you only need access to the CA during initial provisioning of a new certificate key, you can better control access to it).
by PaulHoule | 2025-11-23 23:27:05+00:00
Spending out something better isn’t easy. As an applications developer I want to ask “Why don’t you just use Java/C#?” and I’d go so far to say that the software reuse revolution behind Java was not OO or it’s particular approach to OO but rather the garbage collector.

That is, building applications out of premade parts is a struggle in C or C++ or rust because memory management is part of the API. C devs would be very concerned about having control of memory allocation and would like to have the choice of reusing a buffer from the application in the library or have the library allocate into an arena managed by the application, etc. It’s complicated enough that libraries can’t reasonably support every scenario application developers would like and ultimately tough because to free something the application has to know if the library is done with it or the library has to know if the application is done with it…. However, the garbage collector knows!. In the end there are a lot of libraries you can’t really write for C or if you can write them you have to write them assuming the application allocates or a certain way or you lose the benefit of being in control of allocation that C allegedly gives you.

On the flip side I think C is too high level in some cases, for instance you come to think the gymnastics involved in written embedded C or device drivers are normal but there are quite a few things that are a little bit cleaner in assembly language and I write things for AVR-8 that are rather small but it drives me nuts that C is moving the stack pointer around and following calling conventions that are not at all necessary for these particular programs.

I had friends who worked in the IBM Mainframe world where it is still common for applications to have bits written in assembly because of efficiency or to get finer control than you can get with COBOL. Part of the COBOL puzzle is that you have to be a Macro Assembler programmer to work on that stuff and you can’t just port it to GNU COBOL on Linux without also porting the assembly!

We’re still living in a multi-architecture world so the interesting idea of trying to make it easier to write assembly (imagine a super macro assembler with an integrated theorem prover) is a non-starter. Let x86 founder for a decade and if RISC-V makes no progress that picture could be different in a few years.
by shkkmo | 2025-11-23 23:27:32+00:00
Homeless already often get access to free or cheap passes, often that allow unlimited rides.

Insisting that we charge everyone a bus fare because we think otherwise it might make it eaier to homeless people to use the bus is not only uninformed, but also heartless.

If you have problems with homeless people on buses, then figure out why those people aren't in a better shelter and solve that problem.
by fingerlocks | 2025-11-23 23:28:08+00:00
Even when HDR tone mapping in real time, such as a game engine or raw video feed, you would still be merging two or four multi-sampled tile memory blocks into a single output image. This is not fundamentally different, just a fancier pipeline on modern GPUs. And it’s completely unrelated to OPs rant about stupid developers preventing them for sharing their HDR images or whatever.
by throwaway81523 | 2025-11-23 23:28:29+00:00
The Collatz conjecture is "obviously" (i.e. probabalistically) true, so it's frustrating to not be able to turn that into a proof. PA doesn't matter, there's no known approach to proving it with stronger theories either. Of course many other propositions like the twin prime conjecture are in the same situation.

Goodstein's theorem by contrast is obviously provable in slightly stronger theories than PA, and it involves a fast-growing sequence which suggests it's out of weaker theories' reach. In fact it encodes ordinals up to eps_0 in a natural way, so its equivalence to CON(PA) is unsurprising. The Collatz conjecture is nothing like that. It's beguilingly simple by comparison.
by bastard_op | 2025-11-23 23:28:34+00:00
This is literally every/any ISP that maintains last-mile infrastructure or anything in between. Cable MSO's are (still it seems) the worst, and having worked for various of them in a network engineering capacity, including @home networks the pioneer of cable modems and service, I've seen it for 25+ years after now first or second hand from others that still do. Eventually it's cheaper to pay a call center agent to take their calls and abuse than fix the actual issue in the ground, which is simply business mantra for the 21st century for anything.
by spankibalt | 2025-11-23 23:28:40+00:00
> "I don't understand what you mean by this. Do you mean to say the worth of an artwork for you is tied to how well it executes technque?"

Art, to me, is a marker of excellence in the already mentioned confines. Technique is just a part of it.

> "Art" is a word so nebulous that it's hard to pin down a definition, [...]"

On that we agree; hence me informing you about mine, otherwise we just run circles around each other.

> "[...] but I think the millions of people that prefer a punk rock song over an academic figure drawing study would disagree with this."

As you probably can deduce by now, I see both examples as having the potential of being art. The rest of your rather labored example is an appeal to preference based on form or expression; such a thing is neither static (e. g. it change change with one's moods, a. s. o.) nor does it have to be a false dichotomy (i. e. I can enjoy both manifestations, even at the same time, and, more importantly, recognize both as artful). But this is also all very basic stuff and in itself tedious, and, especially for the reason you stated, also often useless to engage in online.

> Art is like playing Dark Souls -- maybe you beat the hardest boss once, but that doesn't mean you won't die tent more times before beating them again. Programming is like Zelda. Once you know the solutions to the puzzles, you're basically going through the motions.

Such comparisons, as relatable as they might sound to someone who is familiar with these titles, are often useless as well (I am aware of these games and their game mechanics, but have never played them nor care to do so).

Furthermore, for the reason outlined in the posts you responded to, they're a misfire anyway as art, to me, is first and foremost about the result, and not the way towards the result (as long as certain conditions have been met) as well as life itself being much more complicated... with significant implications for the process of making art and the development of an artist in one or more disciplines.
by ajkjk | 2025-11-23 23:29:01+00:00
so what if it is? incels are obviously suffering too; it's not like the fact that they presently hold a toxic and sexist opinion makes them into a moral non-entity. Instead they're just tragic. Doesn't mean you can, or should, help them, nor should you tolerate that attitude when it is threatening to others. But it's tragedy all the same.
by benjiro | 2025-11-23 23:29:55+00:00
The amount of Rust code using unsafe is a major issues for a language build around safety. And yes, the same argument can also be made about Go having a unsafe keyword.

The fact that there exist crates to detected the usage of unsafe in dependencies, shows that its a rather liberal used keyword. Geiger comes to mind.

Unsafe in a language like Go is very rare, mostly because people do not program at such low system level to get the max performance out of it.

Rust code with unsafe: 1.7M Go code with unsafe: 400k

and for comparison, Go has about 2.3x the amount of repo's. So Rust has about a 10x more usage of the unsafe keyword.
by lxgr | 2025-11-23 23:30:28+00:00
A lot of absolutes are being thrown around in the comments here, unfortunately. It really depends on your scenario.

Generating keys exclusively in (non-backup-able) secure hardware is great if your scenario readily supports multiple keys per server/domain you're authenticating in.

Creating an airgapped backup and loading that into a "daily driver" Yubikey marked as non-exportable can be perfectly fine if that's not the case and you don't want to notify the world every time you're adding or retiring a new Yubikey (for reasons other than key compromise).
by josephg | 2025-11-23 23:31:28+00:00
> The cloudflare bug was not caused by rust

Yeah. Rust’s Option::None as like null in C++. Unwrapping an option is like checking if something is null and crashing. This "crash from an unwrap" is just a null pointer exception / segfault in any other language. The same bug would be trivial to write in any other language, and with more or less the exact same result. Its just - weirdly news because it was rust code. What?

> Honestly, it reads like a lot of critiques of Rust: people haven't spent enough time with it, and are not over the learning curve yet.

Exactly. I’ve spent years with rust and my complaints are very different. Well, I still wish it compiled faster but all the other stuff is noobie problems. As someone with more experience, my frustration points are things like how async blocks do compiler magic you can’t write yourself. I hate unnameable types. I think Pin is confusing and weird. And the syntax for interacting with raw pointers is unnecessarily inconvenient and ugly.

Yes, rust makes programs with a lot of shared mutable state awkward to write. So don’t program like that. In general, if you write code in language X as if it were a bad version of language Y, you're going to have a bad time. The right question here is if the "rust way" of thinking about your code results in a beautiful program. You can't answer that if you go in with too many preconceptions of how programs should be designed.
by zelphirkalt | 2025-11-23 23:31:32+00:00
I wish Standard ML had a strong ecosystem and things like a good dependency manager/package manager. I really liked it. But there is even less of an ecosystem around it than some other niche languages, and I've gone into the rabbit hole of writing everything myself too often, to know that at some point I will either hit the limit of my energy burning out, or the limits of my mathematical understanding to implement something. For example how to make a normal distribution from only having uniform distribution in the standard library. So many approaches to have an approximation, but to really understand them, you need to understand a lot of math.

Anyway, I like the language. Felt great writing a few Advent of Code puzzles in SMLNJ.
by madrox | 2025-11-23 23:31:35+00:00
You're describing the GM (general manager) model, sometimes called the single threaded leader. This does work well in large scale organizations...especially ones where teams are built around projects and outcomes but exist for a finite time. Video game development tends to have this model.

I tend to believe in this model because when I've seen it in action, bad GMs are quickly identified and replaced for the betterment of the project.

It can be challenging to implement for a few reasons.

- It is difficult for a GM to performance manage across all disciplines. This model works best when you aren't interested in talent development.

- It's bad for functional consistency. GMs are focused on their own outcomes and can make the "ship your org chart" problem worse. It requires strong functional gatekeepers as a second-order discipline.