Originally posted by amxfonseca
View Post
Announcement
Collapse
No announcement yet.
Rust-Written Replacement To GNU Coreutils Progressing, Some Binaries Now Faster
Collapse
X
-
- Likes 4
-
Originally posted by kylew77 View PostI will need to see benchmarks of any language being faster than C that is not named machine code or assembly. I find it VERY hard to believe that any Rust language program can beat a pure C language program. I have some friends that are die hard Rust fans and I don't see the point in learning it when I already know C and C++. Throw in a bit of shell scripting, Perl Scripting, and good old C and you can write an entire OS!
I'm not into Rust, but I know enough about it to find it extremely appealing.
- Likes 5
Comment
-
Originally posted by dec05eba View Post
Just look at the first example. Rust in the first example uses manual SIMD intrinsics while the C version does not use any SIMD. It's like writing assembly and saying its rust.
fannkuch-redux - Which programs are fastest? — How fast programs repeatedly access a tiny integer-sequence.
By the way, the fastest implementation is a simd-c++ version. But like you said, that's no c++.
- Likes 4
Comment
-
There's support for rusting things but I wonder why Elixir wasn't chosen: https://elixir-lang.org/
There's already a GoLang version: https://github.com/guonaihong/coreutils
The rewrite was a solution searching for a problem we didn't have while avoiding a better suited (for CoreUtils) language that scaled and is concurrent, with safety.
Comment
-
-
Originally posted by poncho524 View PostI'd people dig the safety that rust offers, why not use Ada?
why is rust talked about like it's revolutionary when Ada has had these features for forever?- Rust doesn't have the same features as Ada. Ada is richer than Rust when it comes to runtime checks, with its interval types etc., but Rust goes much further in static analysis than Ada with its borrow checking and lifetime analysis. It also has some nice bonus features that don't exist in Ada, like the Hindley-Milner type inference
- Ada never caught on outside of very specialised use cases because its compilers were expensive and required expensive hardware. Had Ada been free (as in both beer and speech) and ran on the typical personal computer at the time, it may have become more popular but now that ship has long sailed. Like Plan9 and VMS have always had some features that are only now coming to Linux, but the point is that people want to use Linux, no-one is going to go back to those OSes.
- Rust has much better runtime performance than Ada
- Likes 9
Comment
-
Originally posted by poncho524 View Post
C doesn't have "undefined behavior", libraries do.
- Likes 4
Comment
-
Originally posted by sdack View PostWe had many standards after K&R, not to mention C++, and none of them being "heat of the moment".
Originally posted by poncho525 View PostC doesn't have "undefined behavior", libraries do.
Code:#include <limits.h> #include <stdio.h> int main(int argc, char *argv[]) { int i = INT_MAX; printf("Only God knows what this does %d\n", ++i); return 0; }
Originally posted by sdack View PostNo, I am talking objectively. What is "easy" or "very easy" is a matter of subjectivity. The very idea that a language could prevent you from using < instead of <= because it was an "easy" mistake to make is madness. Not checking for a NULL pointer is often laziness, sometimes also caused by a lack of attention, but it can have many more reasons. The problem is not the lack of the check but the human nature that led to the mistake, and as long as the guy at the keyboard does not get his shit together does it matter little what language he uses. And as long as this is the case will you use the wrong register in assembly, place your test at the wrong scope in C, initialize your objects in the wrong order in C++, or perhaps even use the wrong language altogether. You will keep making mistakes and these will need fixing. To think Rust would change this and lead you to make fewer mistakes is a pipe dream.
- Likes 9
Comment
-
Originally posted by sdack View PostNot really. When an increase in complexity brings fewer gains then the logical conclusion is to go with simplicity.
Basically, the simpler the tool, the more burden you place on its users. Hence, there's an optimal amount of complexity. And even if C was the best low-level language of its era, that doesn't necessarily mean it's optimal for any purpose, today.
Originally posted by sdack View PostAs such have inventions like the wheel, the blade and the hammer remained for a long time and are still widely used today.
The other weird thing about this analogy is that there's a vast diversity of these tools to suit different purposes and needs. That's because they don't scale. If you need to drive a big stake into the ground, you don't use the same hammer as you'd use to nail floorboards. Anyway, we can spend a lot of time arguing over your analogy, but I think it's telling that you didn't address the more substantive points I made.
- Likes 8
Comment
Comment