News for hackers. Stuff that matters.
Re:Ask HN: What is the thing you've build you regret the most? by haolez on Saturday November 19, 2022 @09:14PM (#33677401)
I've coded the firmware for a CAN-based communication bus for a medical device with lots of different boards talking to each other. This same company had a war industry department and they used this code in a missile project. It left a weird taste in my mouth.

Btw, they got an early version that had a memory leak, and when I went to warn them, they just said: "It's okay! It's just going to run for about 20 seconds!"

Re:Ask HN: What is the thing you've build you regret the most? by pests on Saturday November 19, 2022 @10:04PM (#33677731)
The ultimate garbage collection.
Re:Ask HN: What is the thing you've build you regret the most? by CyberDildonics on Saturday November 19, 2022 @11:00PM (#33678093)
A missile needing to dynamically allocate memory is already a ridiculous idea.
Re:Ask HN: What is the thing you've build you regret the most? by haolez on Sunday November 20, 2022 @11:31AM (#33682350)
There was computer vision stuff in the missile's head (for target tracking), which is where the code was used.
Re:Ask HN: What is the thing you've build you regret the most? by CyberDildonics on Sunday November 20, 2022 @01:48PM (#33683904)
That is a good reason to need a non trivial amount of memory, but I don't think it means there needs to be dynamically allocated memory. That basically implies that there is something unknown ahead of time, but specs, limitations, resolution fps, etc. should all be static.
Re:Ask HN: What is the thing you've build you regret the most? by haolez on Sunday November 20, 2022 @02:44PM (#33684505)
I think it was a slab allocator made in house. It was a long time ago.
Re:Ask HN: What is the thing you've build you regret the most? by nikeee on Sunday November 20, 2022 @06:40AM (#33680158)
Did you post about this previously? I feel like I've read that part with the memory leak before.
Re:Ask HN: What is the thing you've build you regret the most? by haolez on Sunday November 20, 2022 @11:32AM (#33682358)
Can't remember, so if I did, it was a long time ago. This story happened around 2010.
Re:Ask HN: What is the thing you've build you regret the most? by chrisallenlane on Sunday November 20, 2022 @01:31PM (#33683730)
I favorited this post some time ago:

https://news.ycombinator.com/item?id=14233542

The Google Groups page is currently in a redirect loop, but if that gets sorted out, you may find the story that you're remembering.

Re:Ask HN: What is the thing you've build you regret the most? by MacroChip on Monday November 21, 2022 @07:28PM (#33700202)