Announcement

Collapse
No announcement yet.

GNOME's SVG Rendering Library Migrating To Rust

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

  • #31
    Originally posted by emblemparade View Post

    Yes, but that's something that still has a way to go. It's not just the speed of compilation, but it's that Cargo is hard to integrate into other build systems (I'm speaking from experience: I integrated it into Rōnin). If I have a big project with a bunch of C/C++ code and some build system for that, the Rust code lives in its own little universe, with hard-coded directory structures and in its own of doing things. My dream here is to have .c and .rs files live together and have a build system that would be able to work with either. Again, I totally understand the need for a fresh start on all the old thinking (Cargo is a joy to use if all you're doing is Rust programming), but the time has come for Rust and Cargo to come back into the real world.
    You can have .c and .rs files in the same directory and compile the .rs files into C-compatible objects with rustc, and you can write libraries as cargo projects, have cargo build a C compatible library, and link it all the same.

    Comment


    • #32
      Originally posted by M@yeulC View Post
      Even if I am not convinced that Rust is our Messiah, there have been some examples of programming languages (but also OSS, etc) that, while not completely revolutionary, allowed for a whole new level of complexity in software by suppressing common mistakes, and adding some safeguards against undefined behaviour.

      If Rust can allow this, I am all for it. I started learning it, and will see by myself.
      Basically, undefined behavior is considered a bug in Rust. Rust is designed so as to not allow for undefined behavior, not even in unsafe code.


      Comment


      • #33
        Originally posted by ldo17 View Post
        Your attempt at a pun has awakened another pet peeve of mine: referring to the magnetic coating on hard drives as “rust”.

        Rust isn’t magnetic.
        Yes, but only metal that can rust is or can be magnetic.

        Comment


        • #34
          Originally posted by emblemparade View Post
          Too many people here feeding the trollls. Sometimes it's better not to reply! The universe will continue to dance even if someone was wrong somewhere on the Internet.
          Yep. Trolls must be trolled back, not fed. Let's keep Phoronix great.

          Comment


          • #35
            Originally posted by devius View Post

            Yes, but only metal that can rust is or can be magnetic.
            Oxygen is paramagnetic (attracted by magnetic fields), did you know? Yet it is not a metal, nor can it rust.

            Comment


            • #36
              Originally posted by ldo17 View Post
              Oxygen is paramagnetic (attracted by magnetic fields), did you know? Yet it is not a metal, nor can it rust.
              Actually, oxygen is always necessary to form rust, so it "rusts" too.

              Comment


              • #37
                Originally posted by starshipeleven View Post
                Actually, oxygen is always necessary to form rust, so it "rusts" too.
                No, because its not the one losing the electron, its gaining them to complete its p orbital. You can't just throw around words, they have precise meanings.

                Comment


                • #38
                  Originally posted by mmstick View Post

                  Basically, undefined behavior is considered a bug in Rust. Rust is designed so as to not allow for undefined behavior, not even in unsafe code.


                  https://doc.rust-lang.org/nightly/re...ered-undefined
                  Well, I was thinking of runtime UB, which I guess is still possible in unsafe areas (?)

                  emblemparade -> https://xkcd.com/386/

                  Comment


                  • #39
                    Originally posted by M@yeulC View Post

                    Well, I was thinking of runtime UB, which I guess is still possible in unsafe areas (?)

                    emblemparade -> https://xkcd.com/386/
                    As far as I know, undefined behavior is completely banned in unsafe Rust. The type checker makes sure of that at compile-time. If there is a case of undefined behavior that's not detected at compile time, it should be filed as a bug.

                    Comment


                    • #40
                      Originally posted by funfunctor View Post
                      No, because its not the one losing the electron, its gaining them to complete its p orbital. You can't just throw around words, they have precise meanings.
                      Huh? "rusting" is just "forming rust", not "redox reaction" nor anything more specific.
                      A fire has the same identical type of redox reaction with oxygen where the reductant is carbon instead of iron, but a fire isn't "rusting", but "burning".

                      Comment

                      Working...
                      X