Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If by "replace" you mean "nobodies rewrite existing crap into Rust", then yes.


That's a bit harsh of an approach. And I think at least Doom would disagree.


he means in the context of a kernel developer. im sure there is some nerd who would rewrite stuff to prove to themselves and shutup their inner imposter syndrome. but mostly its quite accurate.


> rewrite stuff to .. shutup their inner imposter syndrome

you think that might do it?


ffs dont do it. no its not enough. you will always feel that feeling because you are born into this world and it absolutely makes no fucking sense. so you want to atleast feel competent in one thing. but you wont ever feel competent in life because this whole experience of existing is fucking ridiculous. bla bla computer bla bla ping pong. you are an ape and we are spinning around. imposter in the world. not in knowing a "job" skill. haha you comment is so deep i wanna give you a hug and buy you a beer.


Rust is evidently an impostor language.


I agree that the parent claim ("Rust will quickly replace C in the Linux kernel") was utterly risible, but your comments just seem like the mirror image of theirs. What on earth is an 'impostor language'? Imposture of what or whom?

I'm tired of having to deal with this culture war crap in our profession. These languages are tools. C, C++, and Rust all compile down to the same LLVM IR (or GCC if you stray from rustc). There are certainly semantic and grammatical peculiarities that affect how each of them do so[0], but by and large running a simple Rust program and a simple C program through Godbolt will do a lot to disabuse you of the idea that the two are irreconcilably different.

To anyone else who wants to write performant Rust, my advice: (1) no_std, if only to focus the mind, (2) .try_foo(), not .foo(), b/c allocation is fallible, (3) always set `opt-level` to at least 1 (1 is far further from 0 than 3 is from 1, ime), (4) use stack-allocated alternatives to heap-allocated types ('smallvec' or equiv vs Vec, 'smolstr' vs String, &c) even at the expense of overallocating buffer space, (5) exploit vectorisation where possible (e.g. SIMD), in general practising mechanical sympathy, and (5) parallelism is not a panacea, whereas cache locality usually is. Measure everything, but also: memorise every instruction and how many cycles it takes, and think in those terms - in terms of your assembled, perhaps-handmodified code - rather than unscientific laptop benchmarks. (Jeff Dean's famous 'numbers every programmer should know' are a good start but are just the very basics, and obv his exact values are long obsolete, in some areas [disk] more than others [CPU].)

[0] These are discussed extremely soberly and intelligently here, for you or anyone else who may be interested: https://kornel.ski/rust-c-speed


It's an impostor because it doesn't belong in the kernel. Or anywhere else for that matter - look at Firefox sources. It just causes fragmentation and its security is yet to be proven. From my POV, it's just written by people too lazy for C and too ignorant for C++.


bah to me people who write C and C++ whine too much should be force sterilised so that us real humans can have peace and quiet and write our machine code and bring our albatrosses to work. like you people who use querty? they should just stop smoking pot and learn to use morse code and why arent phone numbers in hex? its like the world is full of ignorant lazy people. i mean its just my POV. i dont mean i want to promote force sterilisation on C++ and C programmers for being too underdeveloped to function and have a home. i just am talking from my POV you know? anyway good comment.




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

Search: