Announcement

Collapse
No announcement yet.

Rust-Written Replacement To GNU Coreutils Progressing, Some Binaries Now Faster

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by kylew77 View Post
    I 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!
    Why is it hard to believe, fundamentally Rust remains more type information which means the compiler has more information to make better performance optimizations. Its also the case that doing multithreaded programming in Rust is a lot easier/safer which probably gave some performance wins.
    Last edited by mdedetrich; 30 January 2022, 06:29 AM.

    Comment


    • Originally posted by sdack View Post
      We had many standards after K&R, not to mention C++, and none of them being "heat of the moment". Any programmer, who does not know the risk of using gets(), will be just as bad a programmer regardless of the language they use. The language that stops people from making mistakes has not been invented yet despite all claims of Rust being a magic bullet.
      You're saying C++ is the same as C? And you're not joking? Wow
      Well I think I'll call it a day for this discussion

      Comment


      • 119 comments, 90% are utter garbage.

        I see that there is a strong anti-Rust party, made up of people of have never programmed. Otherwise things like "C has no undefined behaviour", "Rust is just hype", "Rust is made to inflate the egos of incompetent programmers", "you must write large swats of your code in unsafe Rust" and other "pearls" shouldn't be here.

        I note that very few people understand that the tectonic shift promoted by Rust regards forcing upon programmers a restricted programming model, with strong guarantees and limitations that make possible to write compilers that can reason about the code being compiled.

        This is why Rust compiler is able to catch a lot of bugs at compile time. No magic, just science.

        And yes, you start from unsafe code and encapsulate it in higher level abstractions ( for those things that aren't enforced by the programming model, like forcing strings to contain valid Unicode code points only ), with appropriate controls on inputs and a careful coding. Nonetheless you reason about small portions of code, of which you can "see" the state by static analysis.

        It is appalling to read comments of people that don't understand that software complexity is exponential and the human brain is incapable of following the state of thousands ( or even millions ) of code fragments interacting with each other. More so when the software is updated and other people make the changes. People who obviously could never know every quirk in the code and/or the architecture. Or do you think that every Linux contributor knows every single line of code in the kernel? There are some contributors who have specialized on specific subsystems. And often they don't know how their changes can affect distant parts of the kernel ( ever heard of the butterfly effect? ).

        Seriously, reading such bull**** on a technology forum is depressing. And only because there are luddists who don't like innovation. Start programming and we will see how far you will go writing super duper secure software in C.

        Comment


        • Originally posted by catpig View Post

          You're saying C++ is the same as C? And you're not joking? Wow
          Well I think I'll call it a day for this discussion
          I think we should all just ignore @sdack

          He would rather argue that 2+2=5 than admit that he doesn't know what he is talking about and the only reason he is selling his children to argue that C is the bees knees because he is a GNU sellout and can't stand something technically superior is beating gnu coreutils in god forbid, a different language.

          Comment


          • Originally posted by mdedetrich View Post

            Why is it hard to believe, fundamentally Rust remains more type information which means the compiler has more information to make better performance optimizations. Its also the case that doing multithreaded programming in Rust is a lot easier/safer which probably gave some performance wins.
            Whatever is the case with that, it's also quite normal for the re-implementation to be faster, since the programmer actually aims to be as good or better as the original, whereas the original just aimed to get the job done with good enough performance (from practical use cases point of view).

            Comment


            • Originally posted by pmorph View Post

              Whatever is the case with that, it's also quite normal for the re-implementation to be faster, since the programmer actually aims to be as good or better as the original, whereas the original just aimed to get the job done with good enough performance (from practical use cases point of view).
              That might be true for a lot of software but not coreutils, its such a core part of Linux and its had so many eyes look at it that you can assume that at minimum its had countless of hours put into it.

              look at this way, if something in coreutils is slow then a **lot** of software is slow, its a central part of the ecosystem.

              Comment


              • Originally posted by sdack View Post
                No. A protocol is in itself a set of instructions.
                That's why I said "protocols and tools" but you conveniently chose to ignore the second part.

                Originally posted by sdack View Post
                You are tacking on code onto code to fix other code, because you have not learned why you keep making these mistakes.
                Incorrect. We know what mistakes we make and why and yet we still keep making them. Sometimes, having a technical measure that prevents a mistake from being made is the only thing that works. If you don't believe IT guys, go ask people in the automotive or aerospace business.

                Originally posted by sdack View Post
                You will make as many mistakes as before, no matter the language you use.
                No, you won't if the language you use stops you from making them.

                Originally posted by sdack View Post
                In the end will you get caught up in so many restrictions that the only reason why you make fewer mistakes is because you get less done.
                If you spend less time worrying about whether this data structure is shared safely amongst threads or if this complicated user input may lead to a buffer overrun, you can probably get more done.

                Originally posted by sdack View Post
                And each of these new wheels is made for a specific purpose that these cannot really be used anywhere else than their intended place. These all do the same and trade simplicity for complexity and lose their usefulness. If you cannot see this then you can also not see why C is still successful.
                If you want to use analogies, at least use them correctly. A modern car wheel is objectively better and more universal than a wooden chariot wheel. Stainless steel kitchen knife with ergonomic handle is objectively better than a rusting piece of metal. Glock 45 is a better gun than a blunderbuss.

                Comment


                • Originally posted by catpig View Post

                  So by that logic we should remove e.g. railings to prevent people from falling down stairs.... Car vendors used to have that absurd attitude, too, claiming "our cars are designed for driving, not crashing" - which was exactly the problem, they should've been designed (in part) for crashing. "Oh we'll just fix the bugs once we encounter them" is a great attitude for hobby projects, but not so much if you're dealing with stuff that matters.
                  Don't fall and cover your eyes -- Imperial OSHA.

                  Comment


                  • Originally posted by sdack View Post
                    Fire, wheel, blade, hammer, ...

                    Those are ancient and are still going strong.

                    You better be ready to add C to this list.
                    Very bad analogy. Fire turned into nuclear fusion; an overturned log became rubber tires, rims, and axles; simple blades turned into complex power tools like circular saws and reciprocating saws; a rock tied to a stick or a big frigging stick turned into a hardened steel Eastwing with a padded handle and a tuning fork on the opposite end to counteract vibration...or a power-hammer if we're talking about blacksmithing, etc.

                    Comment


                    • Originally posted by MadCatX View Post
                      We know what mistakes we make and why and yet we still keep making them.
                      Exactly, and Rust is not going to change this. You will keep making mistakes and run off to the next pasture.

                      A modern car wheel is objectively better and more universal than a wooden chariot wheel. Stainless steel kitchen knife with ergonomic handle is objectively better than a rusting piece of metal. Glock 45 is a better gun than a blunderbuss.
                      You see the gains, but not the losses and so again keep wandering pastures. A modern car wheel consumes large amounts of energy in its production and burdens the environment quite a bit. A wooden wheel can be made by anyone and is far more environmentally friendly. Stainless steel is no different. It is composed of several metals, from chrome to molybdenum, and uses equally a lot of energy in its production. It is sad that in a time when the whole world tries to cut down on CO2 you still think you could do no wrong. Do you even know that we use more resources right now than the planet can regenerate? You probably think there is no limit to it.

                      That you mention a Glock 45 is rather curious. Do you believe people should have the right to a gun or that these should be taken away from them?
                      Last edited by sdack; 30 January 2022, 08:02 AM.

                      Comment

                      Working...
                      X