Fish Shell Outlines Their Successes & Challenges Going From C++ To Rust

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • pWe00Iri3e7Z9lHOX2Qx
    Senior Member
    • Jul 2020
    • 1582

    #21
    Originally posted by NateHubbard View Post
    I must be getting old. Suddenly I can't care what language something is written in as much as I feel like I'm supposed to. Nor which shell everyone else is using in whatever terminal they run. Which wayland compositor or even if they are still using an X window manager just doesn't make me want to argue with anyone. Go ahead and run KDE. I haven't since 1999 and don't want to.
    What a strange community we seem to be, where we want to tell everyone what they should be doing with their computer.
    It's no wonder people just buy a Mac.
    Indeed. We should celebrate people using any FOSS OS with any FOSS DE / apps / toolkits. More market share is good for all of us. But this is Phoronix so people will shit on everything instead.

    Comment

    • Weasel
      Senior Member
      • Feb 2017
      • 4500

      #22
      Originally posted by Veto View Post
      Fun how people get all fired up because some other developers have different tool preferences than themselves
      Rustards are not devs tho.

      Comment

      • hyperchaotic
        Senior Member
        • Oct 2013
        • 122

        #23
        Originally posted by lowflyer View Post
        It's sad to see such commonplace unspecific "reports" from the development. They say:



        As a C++ developer I am very much interested in exactly which features they found easier/less annoying in rust.

        The whole thing really just looks like another attempt to bash C++.
        I read that not as language features but how well the language supports the development of features of the component in question. For example as a C++ dev of 20+ years I have become very fond of Option/Result in Rust and ownership/lifetime restrictions and send/sync traits that makes multithreaded features much safer up front and reduces (eliminates) debugging time of what is normally the most annoying bug types.

        Despite our commitment to using safe patterns in C++ we are fallible humans, the most experienced C and C++ devs I've had the pleasure of working with readily admit that. Might as well let that powerful CPU+compiler spend cycles taking care of object lifetimes and shared data access for us so we can concentrate on the logic.

        Comment

        • Akiko
          Phoronix Member
          • Sep 2017
          • 69

          #24
          Hmm, I don't know... how to start this without starting another vim vs emacs... uh, I mean, rust vs c++ war? Some already know me as a kernel dev criticizing the shit out of everything. For the ones who didn't came across me yet. I'm a mainline kernel dev, means I'm a C guy and yes, also writing a tons of libs and apps using C++. I also code using Rust, Zig and since GCC 13.2 I started to have a lot of fun coding Modula-2. I even ended up being also a GCC dev fixing and enhancing the Modula-2 frontend. Well, I have fun. I also retry my kernel stuff in Rust where possible (the kernel does not support Rust everywhere yet), just to be able to have more perspectives about the issues. I actually follow two rules, "there is a proper tool for a specific problem" and "ignore the hype". And I must admit, I don't get the Rust guys, and I don't get the C++ guys, either. Yes, C++ is unsafe, especially if you have a fucking skill issue. And this is on purpose, because at the same time C++ is more flexible than Rust. Don't believe me? Implement a fast double linked list example and we speak again. But Rust is memory safe! Uhm, just search github for "memory leak rust example" (or similar). It is something like a contest now on how to find the funniest and most simple way to show how Rust fucks up.

          Ah well, and here comes my fish shell in Rust critique:
          Code:
          /tmp % git clone https://github.com/fish-shell/fish-shell.git
          /tmp % cd fish-shell
          /tmp/fish-shell (git)-[master] % git tag
          ...
          /tmp/fish-shell (git)-[master] % git checkout 4.0b1
          /tmp/fish-shell (git)-[tags/4.0b1] % cargo build --release
          ...
             Compiling rust-embed v8.5.0
              Finished `release` profile [optimized] target(s) in 47.66sā€‹
          /tmp/fish-shell (git)-[tags/4.0b1] % ldd target/release/fish
                  linux-vdso.so.1 (0x000072842ee0a000)
                  libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x000072842e45d000)
                  libpcre2-32.so.0 => /usr/lib/libpcre2-32.so.0 (0x000072842e3d2000)
                  libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000072842e3a5000)
                  libm.so.6 => /usr/lib/libm.so.6 (0x000072842e2b6000)
                  libc.so.6 => /usr/lib/libc.so.6 (0x000072842e0c5000)
                  /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000072842ee0c000)ā€‹
          /tmp/fish-shell (git)-[tags/4.0b1] % cargo --version
          cargo 1.83.0 (5ffbef321 2024-10-29)ā€‹
          Did I miss something? Please stop repeating the "memory safe" stuff, while the application links to the whole c-runtime, gcc-stubs and other c-based libs. This is annoying. There... the flame war can start now.
          Last edited by Akiko; 29 December 2024, 01:59 PM.

          Comment

          • skeevy420
            Senior Member
            • May 2017
            • 8638

            #25
            Akiko
            That really highlights the downsides of using Rust and Cargo. Pull in the wrong Crate and you bring in all these dependencies that defeat the purpose of all of Rust's safeties. It'd be nice if there was a C-free, Unsafe-free, version of Crates.io.

            Comment

            • DumbFsck
              Senior Member
              • Dec 2023
              • 332

              #26
              Originally posted by Akiko View Post
              Hmm, I don't know... how to start this without starting another vim vs emacs... uh, I mean, rust vs c++ war? Some already know me as a kernel dev criticizing the shit out of everything. For the ones who didn't came across me yet. I'm a mainline kernel dev, means I'm a C guy and yes, also writing a tons of libs and apps using C++. I also code using Rust, Zig and since GCC 13.2 I started to have a lot of fun coding Modula-2. I even ended up being also a GCC dev fixing and enhancing the Modula-2 frontend. Well, I have fun. I also retry my kernel stuff in Rust where possible (the kernel does not support Rust everywhere yet), just to be able to have more perspectives about the issues. I actually follow two rules, "there is a proper tool for a specific problem" and "ignore the hype". And I must admit, I don't get the Rust guys, and I don't get the C++ guys, either. Yes, C++ is unsafe, especially if you have a fucking skill issue. And this is on purpose, because at the same time C++ is more flexible than Rust. Don't believe me? Implement a fast double linked list example and we speak again. But Rust is memory safe! Uhm, just search github for "memory leak rust example" (or similar). It is something like a contest now on how to find the funniest and most simple way to show how Rust fucks up.

              Ah well, and here comes my fish shell in Rust critique:
              Code:
              /tmp % git clone https://github.com/fish-shell/fish-shell.git
              /tmp % cd fish-shell
              /tmp/fish-shell (git)-[master] % git tag
              ...
              /tmp/fish-shell (git)-[master] % git checkout 4.0b1
              /tmp/fish-shell (git)-[tags/4.0b1] % cargo build --release
              ...
              Compiling rust-embed v8.5.0
              Finished `release` profile [optimized] target(s) in 47.66sā€‹
              /tmp/fish-shell (git)-[tags/4.0b1] % ldd target/release/fish
              linux-vdso.so.1 (0x000072842ee0a000)
              libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x000072842e45d000)
              libpcre2-32.so.0 => /usr/lib/libpcre2-32.so.0 (0x000072842e3d2000)
              libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000072842e3a5000)
              libm.so.6 => /usr/lib/libm.so.6 (0x000072842e2b6000)
              libc.so.6 => /usr/lib/libc.so.6 (0x000072842e0c5000)
              /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000072842ee0c000)ā€‹
              /tmp/fish-shell (git)-[tags/4.0b1] % cargo --version
              cargo 1.83.0 (5ffbef321 2024-10-29)ā€‹
              Did I miss something? Please stop repeating the "memory safe" stuff, while the application links to the whole c-runtime, gcc-stubs and other c-based libs. This is annoying. There... the flame war can start now.
              From your specific POV, what are some of your general opinions on Zig?

              I like C so much more than C++, and from the outside it really does seem like Rust is trying to be a more functional, "better" C++, while Zig just wants to improve C ergonomics.

              Also, have you taken a glance at C3? I read a few interesting bits about the language, but haven't even opened the documentation even if to see subtitles...

              Comment

              • cl333r
                Senior Member
                • Oct 2009
                • 2304

                #27
                Originally posted by DumbFsck View Post

                From your specific POV, what are some of your general opinions on Zig?
                I'm not akiko but to me the largest issue with Zig is it has no concept of interfaces, so if you want something that remotely resembles an interface you use "anytype" which sucks big time.

                Comment

                • Veto
                  Senior Member
                  • Jun 2012
                  • 544

                  #28
                  Originally posted by Weasel View Post
                  Rustards are not devs tho.
                  Ahahaha šŸ¤£ You are cracking me up! You are such a comedian. 'Rustards' that was a good one. Keep them coming.
                  Last edited by Veto; 29 December 2024, 03:34 PM.

                  Comment

                  • darcagn
                    Phoronix Member
                    • May 2021
                    • 66

                    #29
                    Originally posted by skeevy420 View Post
                    Akiko
                    That really highlights the downsides of using Rust and Cargo. Pull in the wrong Crate and you bring in all these dependencies that defeat the purpose of all of Rust's safeties. It'd be nice if there was a C-free, Unsafe-free, version of Crates.io.
                    Rust people who claim Rust is perfect are stupid and anti-Rust people who try to hold Rust to the bar of perfection are also stupid.

                    A good crate can still have limited and targeted use of "unsafe" in performance-critical areas. This doesn't defeat the purpose of all of Rust's safeties, and isn't a "downside" compared to other languages that provide no guarantees at all.

                    Just use cargo geiger to audit the use of unsafe in a crate and its dependency tree.

                    Comment

                    • Gabbb
                      Phoronix Member
                      • Aug 2023
                      • 93

                      #30
                      I said it before a few days ago, but here I go again.

                      I use fish BTW. (and it's really great, has the best autocomplete / file picker around)

                      Though I do hope the config file I have keeps working in the new Rust era, it was really not that easy to theme it.

                      Comment

                      Working...
                      X