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

  • #61
    Rust code has memory leaks as well, memory leaks are considered safe, also in Rust.

    Comment


    • #62
      Oh yay, tools written in a language that make it significantly less portable and way more of a pain to build and maintain where it is buildable.

      Comment


      • #63
        C is just a broken old language.
        I don't agree with the 'broken' part ... and nothing wrong with being old, well defined/understood either. C is a language that gives you complete freedom to do anything. There are no restrictions per-say. It is wonderful. It is up to the programmer whether the person crashes the system or writes a thing of beauty. Between C and assembly we can accomplish anything. So broken? No. Far from it. Just simplicity at it's best. Do we write everything in 'C'? Of course not. At work, I use a lot of Python as that fits as lot of the tasks at hand. However when I work in our control system and real-time RTUs, C/C++/Fortran/Perl is used. And for embedded projects at home I use C/Assembly and some cases circuit/micro Python. Dabbling in Ultibo with Object Pascal.... Point is 'C' is not broken. It gives you the freedom to do 'anything' you can imagine to do with a computer. I like that. I don't like being hemmed in when I don't need to be and C gives me that.

        Comment


        • #64
          Originally posted by BesiegedAce View Post
          There is a certain irony to you whining about language choice and then beating the tired drum of "cancel culture". Anyone sane can understand what is meant by the title.
          LOL, sdack is just triggered. I guess "Rust" and "replacement" are two of his trigger words. Maybe he needs a "safe space" where nobody is allowed to mention them.

          Comment


          • #65
            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!
            gnu malloc is a grotesque POS.

            Comment


            • #66
              Originally posted by sdack View Post
              One could have spent the time to improve GNU Coreutils performance if there is an opportunity to do so. So instead of giving back to the GNU Coreutils, which people have been using for decades, are the GNU Coreutils instead used to make a show.

              Frankly, not giving back, but instead making it into some sort of cancel culture is pathetic.
              Look at it this way: there's at least value in someone finding where coreutils could be further optimized. Now, somebody else can examine those cases and figure out the best way to port over those optimizations. Since you seem to have some spare time & energy, maybe you could even have a go at it?

              FWIW, I don't love coreutils. Never have. It's too crufty, but it gets the job done. The way I see it, at least this project is providing equivalent functionality in a more modern codebase, where someone could more easily experiment with better metadata formats and data processing modalities. It might shock you to learn that this 25-year veteran of the bash shell doesn't love bash scripting, either. We can do better.

              Comment


              • #67
                Originally posted by JellyBrain View Post
                But doesn't the Coreutils inherntly need to use unsafe code in rust (because it's directly interacting with the operating system)?
                It doesn't gain the advantage of rust's memory safety, right?
                Or is it still reduces the amount of unsafe code they use, and they still gain it on all the other code?
                I am really asking, I don't know if my assumption is correct.
                I don't know rust coreutils but I don't see a reason why it would need unsafe code. There is nothing low level in it.

                Comment


                • #68
                  Originally posted by MadCatX View Post
                  A proof of what exactly? ...
                  You are making excuses, being lazy so you can believe in a language that was sold to you as safe and that its safety feature would somehow transfer onto you and make you into a skilled programmer. Only it does not do this. You can still make many mistakes with it and these can lurk in the code for decades just the same. Your argumentation hinges on one particular feature, which is a drop in the ocean compared to all the bugs one can create, all while it is a restriction and can be as obstructive as it may seem helpful to you. You are still holding onto the belief it would make you a better programmer and reduce the number of mistakes you could make. It does not do this. Not learning why some code can lead to memory leaks, is insecure, or create a race condition, will eventually cause you to make this mistake in some other form. It will then not have the form you expect it to be but lurk as a bug in the larger structure of your code just the same. It does not matter if this is Rust, Java, Python, or some other language. You are better off going straight for a higher-level language than for C or Rust. You will still be making mistakes, but you will be doing these on a much higher level. There is however no way any language will make you into a better programmer or spare you the experience of just some of the common mistakes.
                  Last edited by sdack; 29 January 2022, 04:10 PM.

                  Comment


                  • #69
                    As an aside: UNIX and C have aged astonishingly well. More than 50 years old! How often does that even happen, in the tech world?

                    And they're not done, yet! But, when have we ever collectively decided the following?

                    "No, that technology is perfect. Don't improve it further."

                    Never. Technology isn't a closed system. Advancements in one area feed on advancements in another. When C was developed, computers didn't have the horsepower for a language like Rust to be feasible. Now they do. Without specifically backing Rust, the whole tenor of this discussion just sounds oblivious to the basic fact that advancement is an innate characteristic of technology.

                    Comment


                    • #70
                      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!
                      Benchmarks are what they are worth, but Rust often beats C in them for a couple of reasons:

                      - Rust's strict aliasing rules allow it to use optimisations that are difficult or impossible in C by essentially automatically inferring const or volatile pointers

                      - On a somewhat related topic, the Rust compiler does a better job at autovectoring code

                      - Compared specifically to C++, Rust can elide bounds checks in many cases and still remain safe. In C++ you must either use [] and ensure safety manually, or use at() and have the penalty every time

                      - Rust, being higher level than C, makes it easier to implement more efficient algorithms

                      - Rust makes it much, much easier than C to parallelise your code

                      It's not a silver bullet and your mileage may vary like in any language, including C. The main point in learning Rust when coming from C though is not so much performance but provability.

                      Comment

                      Working...
                      X