Announcement

Collapse
No announcement yet.

Making The Case For Using Rust At Low Levels On Linux Systems

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

  • mmstick
    replied
    Originally posted by totoz View Post
    I wonder why suddenly Rust generates so much hype while Ada has been there for years.
    Three critical things: ambition, community, and organization.
    • Ambition:
      • Rust aims to be a systems programming language that takes advantage of the best of the best ideas that have come before in functional and imperative languages, and further expand upon them.
      • Not only does it aim to be as fast as C for low level systems programming, even for embedded development, but it aims to be the best high level systems programming language without the cost of high level programming.
      • The development of the Rust standard library and compiler is so that Rust will always be a moving target that will keep up with technological advancements as they come.
      • They hired full-time staff to design a beautiful website and theme for all of their web content, including the automatic code generator. Ada's website, in comparison, looks like a cheap HTML template designed to appeal towards business suits rather than programmers.
      • They have also hired full-time staff to focus on improving the quality of Rust documentation, and regularly report on progress via This Week in Rust Docs.
    • Community:
      • The stronger the ecosystem of libraries, the stronger a language becomes, but a language can never gain libraries without an active community.
      • Node was able to explode in popularity thanks to the Node Package Manager, and it has been one of the most successful attempts of open source software to take over the desktop, despite being based on web technologies. Rust provides it's own NPM-like solution with Cargo.
      • The Rust community is focusing a lot on promoting an actual community through active forums, blogs, IRC channels, a subreddit, and even social media.
      • The Code of Conduct ensures civility in the community rather than hostility that is common in other communities.
    • Organization:
      • Mozilla is really good at organizing community resources. Just check out how much detail and effort that has been placed into every section of their website, including how they are managing their GitHub repository.

    You really have to ask yourself. How many languages have come about that are as ambitious, community-oriented, and managed as well as Rust?

    Leave a comment:


  • mmstick
    replied
    Originally posted by zanny View Post



    There are plenty of use cases for Qt as a systems library framework. It is really useful just for its json / http daemon / dbus support in many cases, albeit you can get the same from boost with much less dependency bloat.
    That's the sad thing about C++. You have to rely upon Qt in order to achieve simple tasks that Rust already allows you to do out of the box with it's standard library.

    Leave a comment:


  • mmstick
    replied
    Originally posted by liam View Post

    Rust only claims performance parity with c++ iff c++ is written with similar safety guarantees as idiomatic rust. That's not a real issue, imho. Rust is fast enough for many (maybe most) userspace applications. It's libraries, however, may not be as mature as we'd expect from something like libc.
    Rust doesn't prevent one from using the unsafe keyword to disable bounds checking and achieve C performance or go beyond. It's still idiomatic Rust, even if you use unsafe functions like get_unchecked(). The only thing lacking for Rust in performance right now is for the simd crate to become stable and shipped with Rust by default.

    Leave a comment:


  • mmstick
    replied
    Originally posted by cl333r View Post
    But even for user-space. I'm doing Qt5 and the Rust binding I found [1] has only one example and this TODO list:
    • More Qt modules support
    • Global Qt functions support
    • Qt enums support
    • Qt generic container classes support
    • Operator methods support


    In other words it's not worth for me switching from a known language (C++11) with a good and known building system (cmake) with a good toolkit (qt5) to: an unknown but allegedly superior language (Rust) with an unknown building system (cargo or whatever) with inferior bindings to Qt5.

    I'm trying to be unbiased here since I'm interested in good stuff, but Rust's pros and cons just don't do it for now for me.



    [1] https://github.com/kitech/qt.rs
    Why should anyone care about Qt support? Qt isn't supported by any language other than C++, and it's not the best graphical toolkit for Linux. Cross-platform UI toolkits tend to use GTK3 as the backend for Linux, and Rust has amazing support for GTK3. The lack of Qt support in Rust hasn't stopped me from developing first class GUI applications in Rust. In addition, I notice that many people who program with C++ are using Qt as a crutch to cover the many lacking features and flaws in C++, but Rust doesn't need that kind of support. Rust is pretty awesome out of the box.

    Leave a comment:


  • liam
    replied
    Originally posted by schmidtbag View Post
    To my knowledge, Torvalds deems C++ libraries as unstable, not C++ itself. I don't get the impression he hates OOPs, just poorly implemented ones. As far as I'm aware, C was never intended to be object-oriented, and C++ was sort of just an "add-on", for lack of better phrasing. Though, I'm not sure how much that still applies today. I don't dabble in C++. If I want to work with objects, I use python.

    Since Rust apparently has comparable performance to C++ but was meant to be secure and object-oriented from it's inception, it makes sense that Linus may be more accepting of it. But as stated by others, Linus really only deals with the kernel, where objects should be entirely avoidable. It would be interesting to see if Rust starts replacing applications, but I don't suspect Linus will be working with it much.
    Rust only claims performance parity with c++ iff c++ is written with similar safety guarantees as idiomatic rust. That's not a real issue, imho. Rust is fast enough for many (maybe most) userspace applications. It's libraries, however, may not be as mature as we'd expect from something like libc.

    Leave a comment:


  • ssokolow
    replied
    Originally posted by atomsymbol

    Immutable data structures are an efficient computational model of just a restricted subset of phenomena of the world.
    That's why Rust lets you opt into mutability. (Rather than "const" like C/C++, Rust has "mut")

    Leave a comment:


  • zanny
    replied
    Originally posted by FishB8 View Post

    If you're using frameworks like Qt, you are not writing low-level system software and are by de facto outside the scope of the blog post's subject matter.


    There are plenty of use cases for Qt as a systems library framework. It is really useful just for its json / http daemon / dbus support in many cases, albeit you can get the same from boost with much less dependency bloat.

    Leave a comment:


  • F1esDgSdUTYpm0iy
    replied
    Originally posted by FishB8 View Post
    If you're using frameworks like Qt, you are not writing low-level system software and are by de facto outside the scope of the blog post's subject matter.
    Agreed, with an addendum -- If you're using Qt, chances are even the currently chosen language (C++) might in fact be overkill.

    Leave a comment:


  • FishB8
    replied
    Originally posted by cl333r View Post
    But even for user-space. I'm doing Qt5 and the Rust binding I found [1] has only one example and this TODO list:
    • More Qt modules support
    • Global Qt functions support
    • Qt enums support
    • Qt generic container classes support
    • Operator methods support


    In other words it's not worth for me switching from a known language (C++11) with a good and known building system (cmake) with a good toolkit (qt5) to: an unknown but allegedly superior language (Rust) with an unknown building system (cargo or whatever) with inferior bindings to Qt5.

    I'm trying to be unbiased here since I'm interested in good stuff, but Rust's pros and cons just don't do it for now for me.
    If you're using frameworks like Qt, you are not writing low-level system software and are by de facto outside the scope of the blog post's subject matter.

    Leave a comment:


  • F1esDgSdUTYpm0iy
    replied
    Originally posted by stqn View Post
    So in the author’s mind Rust is the way to go, just like systemd.
    That’s not helping with my opinion of Rust.
    O.o

    ... *Insert a very well known picture of Jean-Luc Picard here*

    Leave a comment:

Working...
X