Announcement

Collapse
No announcement yet.

Grep 3.7 Released To Fix "Extreme Performance Degradation"

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

  • #21
    Originally posted by partcyborg View Post

    s/Java/nodejs/, but you were on the right track
    Rust is like a really ugly native language with only one quite bad compiler supported and a npm clone if the rest was not already insane enough.
    npm in native development, thats what we need, for sure.

    Comment


    • #22
      Originally posted by tildearrow View Post
      Rust uses a different scheme. Every operation returns a Result which may be either Ok (which may contain a value!) or Err (which may contain a value as well).
      You would have to use either a match block or ? operator.
      Thanks - so it's exactly the braindead hack I guessed? gj me! :P

      Screw that noise then. Are they gaslighting exception handling as "bad" / unnecessary / whatever, or admitting that they just couldn't figure out how to make it work yet but are still trying to fix it? (IOW, is there some flaw inherent in the language that makes stack unwinding impossible without breaking one of their guarantees?)

      I'm still planning on looking at it when I get a chance, I guess, but I'm not interested in traveling back in time 25 years to use a gimped language with crappy tools. Rust does look interesting on paper, but if it's only suitable for toy projects or unmaintainable messes then there are plenty of other options already.

      Comment


      • #23
        Originally posted by linner View Post

        Because Rust is changing the world with better software!

        /s
        Wow! Over 300 CVEs. GCC has 31. https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=gcc

        Comment


        • #24
          Originally posted by S.Pam View Post
          Although I'm not Rust fan, however, in sake of justice, the Rust CVE list (which was obtained just searching by a keyword "rust") includes also external libraries (crates i.e. Rust Package Registry).

          Comment


          • #25
            Originally posted by S.Pam View Post
            Hold my beer:
            java - 2285 CVE - Search Results (mitre.org)
            javascript - 3477 CVE - Search Results (mitre.org)
            java could be a subset of javascript request xD

            But this is a joke, proofing something by searching by a keyword in a database at least is not representative.
            Last edited by RedEyed; 16 August 2021, 07:08 AM.

            Comment


            • #26
              Originally posted by Alexmitter View Post

              Rust is like a really ugly native language with only one quite bad compiler supported and a npm clone if the rest was not already insane enough.
              npm in native development, thats what we need, for sure.
              Althought I'm not Rust fan, I agree with you with ugly syntax, however IMO, package manager is a thing.

              Comment


              • #27
                Originally posted by arQon View Post

                Thanks - so it's exactly the braindead hack I guessed? gj me! :P

                Screw that noise then. Are they gaslighting exception handling as "bad" / unnecessary / whatever, or admitting that they just couldn't figure out how to make it work yet but are still trying to fix it? (IOW, is there some flaw inherent in the language that makes stack unwinding impossible without breaking one of their guarantees?).
                No, it's not as stupid at you make it sound. If you get a Result, or Option that's because the value might be missing. This requires handling one way, or another. If you don't, it's a segfault because you didn't check for NULL.

                That doesn't mean you have to do verbose error checking like Go. There's the ? operator that extracts the value, or returns from the function, passing on that error value down the stack. Another thing you can do that is impossible to do cleanly with exceptions is monadic error handling with methods like .and_then(), or-else(), and the like. This basically works like && and || in a shell, but more nuanced. Using pattern matching is another option, but I prefer overusing the method combinations because I like puzzles and they make me feel like a real functional programmer . If you can't really handle the error locally and/or want something exception-like, the ? operator does it.

                What's great about it is that there's no hidden control flow. All errors that could be returned are part of the type signature of the functions you call. No way to accidentally get unhandled exceptions. But exceptions actually DO exist in Rust. They're just called panics instead, but can be caught, inspected and rethrown, just like in, say, C++. But they're supposed to be used only in the most exceptional cases and not for general error handling, you know, like exceptions. Not for stuff like "File not found".

                </rust-evangelist-rant>
                Last edited by binarybanana; 16 August 2021, 08:43 AM.

                Comment


                • #28
                  Oh well. I am not sure if human civilization is able to handle the free exchange of information and the decline of journalism as a profession. Anti-vaccers, Q-Anon, Flat-earthers, Rust, ...

                  Comment


                  • #29
                    Originally posted by tildearrow View Post

                    And way worse than Java.
                    At least in Java/C++ there is try catch, which allows you to catch errors with little effort. Java even has the benefit of not requiring manual memory management, but then talk about verbosity and high memory usage with garbage collector....
                    But Rust? It's a mess of match Ok/Err, asterisks, ampersands, muts... I remember trying Rust out once, and it made my head explode.
                    It feels as if JavaScript programmers (JavaScript being the worst thing ever already) teamed up with C ones and attempted to create a new language.
                    Rust's popularity comes 95% from its fan base who praise the language like a deity and want everything rewritten in Rust...

                    On the corner, Haxe
                    If you have trouble learning the concepts behind Rust then you shouldn't program in C because at that point you don't know how to write correct C code (or to more accurate, have some real assurance that the majority of your code are correct). Rust is basically a newer C with a compiler that checks you are writing memory safe code.

                    Originally posted by Alexmitter View Post

                    Rust is like a really ugly native language with only one quite bad compiler supported and a npm clone if the rest was not already insane enough.
                    npm in native development, thats what we need, for sure.
                    Cargo is nothing like npm but nice try. The only thing they have in common is that they are package managers.
                    Last edited by mdedetrich; 16 August 2021, 01:22 PM.

                    Comment


                    • #30
                      Originally posted by mdedetrich View Post

                      If you have trouble learning the concepts behind Rust then you shouldn't program in C because at that point you don't know how to write correct C code (or to more accurate, have some real assurance that the majority of your code are correct). Rust is basically a newer C with a compiler that checks you are writing memory safe code.
                      Too bad I already did. C is easy to learn, but hard to master. I can't miss a single check or the whole thing collapses in unexpected ways.

                      The problem with Rust is that even though it enforces checks, it does so in a bizarre way and the syntax is hell (as I mentioned before).

                      Comment

                      Working...
                      X