Announcement

Collapse
No announcement yet.

Should GNOME Begin Replacing More C Code With Rust?

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

  • ssokolow
    replied
    Originally posted by mmstick View Post
    There is the no GCC backend for Rust, and as far as I know, there never will be, nor should anyone waste their time writing one. Rust's libcore is deeply integrated with LLVM primitives, and the language makes extensive use of LLVM compiler plugins. Therefore, it does not make sense to waste time developing a GCC backend, as GCC will never have support for compiler plugins due to poor design decisions by the GNU developers, and it's usefulness is very limited in comparison to LLVM, which is a more capable tool. Any target that LLVM supports, Rust supports. Rust is even compiling for the web with WASM.
    Rust isn't intended to be dependent on LLVM. In fact, there' currently discussion about adding support to generate Cretonne IR rather than LLVM IR for WASM and debug-mode compiles.

    (Cretonne is an in-development WASM code generator backend for Firefox's SpiderMonkey JS engine so they can eliminate C-inspired undefined behaviour at the LLVM IR level and optimize for compile time constraints in a web context. Both of those would fit well alongside things like "Rust debug builds turn on the too-heavy-for-release guards for integer over/underflow" so that Cretonne and LLVM would take up roles similar to the C/C++ "do debug builds with Clang for the superior analysis, do release builds with GCC for maximum performance" pattern.)

    As for GCC, the following three lines have already shown up in that thread:

    It will help us validate that Rust is independent from LLV
    I agree that it's important to not tie a system language too much to a single back-end. How about also using the GCC back-end?
    I am a GCC contributor, if there's interest in a GCC backend I would be able to help. Although, I must say, I know little of Rust at this point so I wouldn't be able to carry this project forward by myself. Someone with a deep knowledge of Rust would need to mentor.

    Leave a comment:


  • mmstick
    replied
    Originally posted by DMJC View Post
    I'm programming in both C and C++. C++ is a total pain in the ass for short/quick/sweet applications which is what most of my code is. I'm only using C++ because I'm trying to interface it to other C++ code. I'm against moving GTK to Rust. Rewriting/changing everything yet again, just for some new shiny language isn't worth the effort. Where is the GCC Rust backend? how well maintained is it? Throwing out all the tools/utilities which exist for writing/debugging C just doesn't seem worth it.
    You're against something you don't even understand. That's not wise -- it's just silly. The decision to switch to Rust is being made by a lot of people in the open source world. You need to think long and hard about why that is instead of snarling your nose at what you don't understand.

    How is switching to Rust not worth it? When you no longer need to use all those tools and utilities that exist for writing and debugging C? Those tools exist because C is a terrible language. It can't stand on it's own without the need for those tools to fix the most basic and mundane tasks. Rust ensures that you will not need any tools because the compiler will otherwise not compile unless your source code is free of such bugs, and Cargo handles the build system and libraries for you. GNOME is entirely consumed by all these dozens of C tools that complicate the build process and make it hard to find contributors willing to put up with them. Switching to Rust means GNOME could eventually replace all of these tools for a single tool: Rust's Cargo.

    There is the no GCC backend for Rust, and as far as I know, there never will be, nor should anyone waste their time writing one. Rust's libcore is deeply integrated with LLVM primitives, and the language makes extensive use of LLVM compiler plugins. Therefore, it does not make sense to waste time developing a GCC backend, as GCC will never have support for compiler plugins due to poor design decisions by the GNU developers, and it's usefulness is very limited in comparison to LLVM, which is a more capable tool. Any target that LLVM supports, Rust supports. Rust is even compiling for the web with WASM.

    Leave a comment:


  • DMJC
    replied
    I'm programming in both C and C++. C++ is a total pain in the ass for short/quick/sweet applications which is what most of my code is. I'm only using C++ because I'm trying to interface it to other C++ code. I'm against moving GTK to Rust. Rewriting/changing everything yet again, just for some new shiny language isn't worth the effort. Where is the GCC Rust backend? how well maintained is it? Throwing out all the tools/utilities which exist for writing/debugging C just doesn't seem worth it.

    Leave a comment:


  • cj.wijtmans
    replied
    ^ no edit button on phone.

    Leave a comment:


  • cj.wijtmans
    replied
    You just lost your arguments not that you had any to begin to with.
    Last edited by cj.wijtmans; 05 November 2016, 10:26 AM.

    Leave a comment:


  • mmstick
    replied
    Originally posted by cj.wijtmans View Post
    I have used them 18 years ago and they are terrible. You still dont substantiate why they are better.


    How can you NOT see it in C++? You are not a natural programmer.


    Sounds like a dog not a programming keyword.


    How do you NOT see it in C++?


    Why is a descriptive keyword so bad? Never-mind the fact that it is platform agnostic.


    "fn" "mut" "let" everywhere is better? auto at least sounds cool.


    Rust wont replace it. If it does our programmers are beyond repair already and will write some unstable shitty programs.


    Mozilla writes unstable junk... so it makes sense.


    Google always tries new things they are cool like that. Doesnt mean they will use it extensively.


    GNOME never did see anything in it. That is why Qt is so much better.


    Yeah its for dyslexic programmers. Which there are probably a lot of since most programmers have something quirky on their character.


    Yet you named ... 0
    Obvious troll is obvious.

    Leave a comment:


  • cj.wijtmans
    replied
    Originally posted by mmstick View Post
    Plenty of functional languages have used those keywords before. Have you never sought out to learn functional programming languages to increase your programming aptitude and perspective?
    I have used them 18 years ago and they are terrible. You still dont substantiate why they are better.

    Originally posted by mmstick View Post
    It's easy on the eyes to know that you only have to memorize one keyword to know when a variable is being initialized
    How can you NOT see it in C++? You are not a natural programmer.

    Originally posted by mmstick View Post
    , and that if that keyword is followed by `mut`
    Sounds like a dog not a programming keyword.

    Originally posted by mmstick View Post
    , that the variable is mutable.
    How do you NOT see it in C++?

    Originally posted by mmstick View Post
    It is significantly worse with C/C++/D where you see `int, short, long, long long, float, auto, char, etc.` scattered about all over the place.
    Why is a descriptive keyword so bad? Never-mind the fact that it is platform agnostic.

    Originally posted by mmstick View Post
    The `auto` keyword is an eyesore in itself.
    "fn" "mut" "let" everywhere is better? auto at least sounds cool.

    Originally posted by mmstick View Post
    If C++ was a good language then Rust wouldn't have been created to replace it.
    Rust wont replace it. If it does our programmers are beyond repair already and will write some unstable shitty programs.

    Originally posted by mmstick View Post
    If Mozilla didn't see anything in Rust then they would not have taken the project and pushed it forward to write Servo to replace Gecko.
    Mozilla writes unstable junk... so it makes sense.

    Originally posted by mmstick View Post
    If Google didn't see anything, they also would not be using Rust.
    Google always tries new things they are cool like that. Doesnt mean they will use it extensively.

    Originally posted by mmstick View Post
    If GNOME didn't see anything in C++ or D, and has now decided to push forward with Rust,
    GNOME never did see anything in it. That is why Qt is so much better.

    Originally posted by mmstick View Post
    you know there's something to it.
    Yeah its for dyslexic programmers. Which there are probably a lot of since most programmers have something quirky on their character.

    Originally posted by mmstick View Post
    There are literally hundreds of reasons for why Rust is a significant improvement over Rust, and those reasons are readily available for you to see. If you still don't know why, it's because you've got your eyes covered.
    Yet you named ... 0

    Leave a comment:


  • plonoma
    replied
    Originally posted by mmstick View Post

    The crates and libraries are good enough for creating new frameworks or contributing to existing ones. There are big companies that are already using Rust right now in production for their big projects. There are plenty of frameworks to speed up the development process too. There's a lot of enthusiasm on the forefront to push Rust even further. There's nothing stopping you from developing something with Rust today.

    There hasn't been any changes in 'error codes'. I have no idea what you are talking about. Are you referring to increasing the documentation of error messages by the compiler? If so, that isn't changing error codes but elaborating them with great detail. We've never had a language that has such well-documented compiler errors that will feature suggestions on how to fix the error.



    Why shouldn't it be discussed? Rust is a highly successful language, and it is continuing to aim higher and higher. Every year the goals are the same: greater mentoring support for those wanting to contribute to Rust/Servo; greater documentation of the Rust API, improving error messages, and high profile crates; improving the book, increasing the number of tutorials, and improving the list of learning resources; more libraries, faster libraries, bigger libraries; evaluating and integrating new additions from the RFC process; and more.
    You misunderstand, I'm also very enthusiastic about Rust.
    It's just that a few months ago I read a few of the This week in Rust and Rust blog.
    I got the impression that Rust and it's ecosystem are a bit too immature for frameworks.
    And when responding in this threat trying to find back wat I read a few months ago I don't remember very well.
    But then reading things like we must have crates on essential stuff does not give the impression of a language that is ready.
    If the impression of Rust I got was misleading I'm very happy to find out.

    Leave a comment:


  • eigenlambda
    replied
    Gnome is gobject and GTK and the other core libraries. Gnome is not a bunch of apps that there are a million alternatives for in various other toolkits.

    The biggest mistake the Gnome project made so far has been to not port Gnome 2 to GTK 3, but try to come up with some crazy new paradigm for human-computer interaction, which led to Mate, Cinnamon, and Unity, with Unity being subsequently ported away from GTK.

    Getting rid of the core libraries, turning everything into Rust, in the belief that people want to use Gnome apps because they just like Nautilus that much better than Dolphin would be an even bigger mistake.

    Leave a comment:


  • mmstick
    replied
    Originally posted by cj.wijtmans View Post

    So "fn" and "let" everywhere doesnt bother you? It hurt me after 5 seconds of reading. To each their own. Also can you substantiate WHY rust is an improvement over C++?
    Plenty of functional languages have used those keywords before. Have you never sought out to learn functional programming languages to increase your programming aptitude and perspective? It's easy on the eyes to know that you only have to memorize one keyword to know when a variable is being initialized, and that if that keyword is followed by `mut`, that the variable is mutable. It is significantly worse with C/C++/D where you see `int, short, long, long long, float, auto, char, etc.` scattered about all over the place. The `auto` keyword is an eyesore in itself.

    If C++ was a good language then Rust wouldn't have been created to replace it. If Mozilla didn't see anything in Rust then they would not have taken the project and pushed it forward to write Servo to replace Gecko. If Google didn't see anything, they also would not be using Rust. If GNOME didn't see anything in C++ or D, and has now decided to push forward with Rust, you know there's something to it. There are literally hundreds of reasons for why Rust is a significant improvement over Rust, and those reasons are readily available for you to see. If you still don't know why, it's because you've got your eyes covered.

    Leave a comment:

Working...
X