Remix.run Logo
kstrauser 4 days ago

OTOH, I have zero interest in contributing to a C kernel. Even the experts can't write it without messing up with C's vastly many footguns. I'm not a C expert. What chance to I have to add a new kernel feature that doesn't literally destroy my system? It's too intimidating in the sheer amount of risky "surface area" I have to perfectly manage or else face dire consequences.

Nah. I'd much rather use a newer language that's explicitly designed for writing the same sorts of things that C is but with a teensy portion of the footguns.

I'm not saying C is bad. I am saying that if the Linux kernel devs still write buggy code sometimes — not because of logic errors or other design-level mistakes, but because of some goofy memory issue or accidentally wandering off into the wilderness of UB — then I guarantee I'm going to screw it up.

If it were in Rust or Zig or whatever, I'd feel like I had at least a fighting chance of making a tweak that didn't immediately format my hard drive and kick my cat.

mathiaspoint 4 days ago | parent | next [-]

Yeah and the rest of us don't want a kernel that mutates a heap-like structure for every minor operation. So until there's a language for writing software with a C-like approach to memory and lifetimes you're not going to see C or C software replaced.

kstrauser 4 days ago | parent [-]

So, Rust or Zig are OK, then.

mathiaspoint 4 days ago | parent [-]

So you've never written a rust program then. Or you don't know how to write C well.

cultofmetatron 3 days ago | parent [-]

out of curiousity, wheat heap like structure are you talking about? there are data structures as part of the standard library that do that but as far as I know. you can avoid that and stick to data structures within the stack just fine in rust. I don't claim to be an expert so Id appreciate if you could explain further

kstrauser 3 days ago | parent [-]

I think they mean https://en.wikipedia.org/wiki/Heap_(data_structure), but their claims are so odd that it’s hard to tell.

yjftsjthsd-h 4 days ago | parent | prev [-]

Redox exists; are you contributing to it?