6 ms·
You do seem to have an axe to grind with the people using Rust. I don't see any reason why the same thing [1] could not be implemented in Rust. EDIT: I got ca
by GrayShade 5y ago
You do seem to have an axe to grind with the people using Rust.
I don't see any reason why the same thing [1] could not be implemented in Rust.
EDIT: I got caught by an off-by-one there, the second fastest solution (doing JIT compilation) is actually [2].
[1]: https://codegolf.stackexchange.com/a/215231 https://codegolf.stackexchange.com/a/215231
[2]: https://codegolf.stackexchange.com/a/236737 https://codegolf.stackexchange.com/a/236737
- sillysaurusx 5y agoMuch like speedruns, it's up to you to prove it :) I just enjoy dosing the Rusties with reality every so often. If you write a Rust version that can beat the C version, I'll donate $500 to Watsi. Good luck!
- KingOfCoders 5y ago"I just enjoy dosing the Rusties with reality every so often." Aka troll.
- AnIdiotOnTheNet 5y agoNot necessarily. Language evangelists can be incredibly annoying... actually, evangelists in general can be really annoying. It is cathartic to prove annoying people wrong every once in a while.
- Ygg2 5y agoOtoh. Being a dick, to majority of people because of acts of minority is worse.
- GrayShade 5y agoI don't know. I use Rust myself, but I've seen more people complaining about Rust evangelism than people actually doing that. The RESF is a bad meme.
- colejohnson66 5y agoWhen there's a memory related bug (or CVE) in a program written in C or C++, there's almost always some comment about how the Rust compiler would've caught it
- KingOfCoders 5y agoFrom Rust developers or from app users? As an app user I would prefer if apps are written in Rust and Im reminded with every CVE for a C program.
- tialaramex 5y agoOn HN there is often: A comment about Rust would catch this (sometimes sarcastic), an explanation about how the bug isn't "really" memory safety and so Rust wouldn't catch it, followed by a comment explaining actually Rust does catch it. The recent Linux mutex security bug is an example. That's not a memory safety bug. Surely Rust doesn't help? But Rust's mutual exclusion design relies on the Rust type system to give us safer locks, in Rust you protect things by having "lock the mutex" be the way you get the reference to the protected object. Thus when the faulty code locks the wrong mutex in Rust it would get the wrong object, and either not compile (you lock variable A and then you're trying to change B but you don't even have B) or not work (you always lock variable A, then change variable A, but your code should change B, it does not work, trivially reproducible bug in your code)
- taneq 5y agoThat kind of behaviour (edit: theirs, not yours) is usually ultimately motivated by fear. ;)
- sillysaurusx 5y agoOh? Why is it trolling to say that Rust isn't as fast as C in this case? If it were, you'd claim the prize. If you really want to hurt a troll, wouldn't you try to separate them from their $500?
- detaro 5y ago> to say that Rust isn't as fast as C in this case That's not what the quoted statement is doing.
- sillysaurusx 5y agoI think we'll have to agree to disagree. It's illustrative that a seemingly simple C program can't be easily ported to Rust. If it could be, someone would have already done it -- it's been a few hours. It's also illustrative to examine exactly what the hangups are. You might even get more Rust converts if you acknowledge that there are serious engineering burdens to overcome when deciding to use Rust.
- deleted 5y ago[deleted]
- samhw 5y agoFor the record, it's not the anti-Rust sentiment which people find annoying, it's the treatment of programming languages as though they were football teams. If you want to make a case against Rust, then let's get concrete: why is one Turing-complete compiled language that can make arbitrary syscalls not capable of compiling down to the same assembly as another? That would be an interesting discussion; this is not.
- Retric 5y agoYou can dig into it, but the details are mostly only relevant to people designing computer languages and tooling. Aka Compilers, as long as the machine code is equivalent to the source code their output can be wildly different. However, someone needs to actually write them which means both linguistic differences and the sheer effort that was actually put into the compiler are both significant. You shouldn’t assume that every language is operating on an even playing field because their simply not. The obvious solution of compiling to a second language is never quite as capable as using the language directly.
- trevyn 5y agoNo no, C is great for writing fast FizzBuzz implementations; any larger program is hard to get correct. :-)
- gerbilly 5y agoUltimately, your argument is a troll because you are trying to tell people what they should value in a programming language.
- bawolff 5y agoPretty sure the fact its literally a speed contest is telling people what to value in a programming language.