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

  • totoz
    replied
    Originally posted by Steffo View Post
    Don't compare rust with Ada. Ada does runtime checks, rust compile time checks. And rust does not have a GC like Ada.
    Runtime checks can be disabled at compile time, and Ada does also a lot of static checks and analysis at compile time.

    GC is optional for Ada, and the GNAT compiler (probably the most popular compiler, based on GCC) does not provide one, so we can almost consider there is no GC unless you target a specific compiler.

    Leave a comment:


  • totoz
    replied
    Originally posted by cb88 View Post

    Because ADA derives from Pascal... VHDL also hails to ADA syntax. The problem is that it is so verbose that it is cumbersome...this could be alleviated somewhat with better tooling but it either doesn't exist or costs an appendage and half your offspring.

    Emacs is probably as good as it gets free software wise for VHDL and ADA but I don't grok it.
    The verbosity of Ada is intentional: since the language aimed to be used for safety critical systems, code readability and clarity was very important, even for some newcomers or people not familiar with the language (but with some IT skills, though). When I see modern C++, it's just klingon for non C++ developers. Even for me, although I did program in C++ for years a decade ago.

    About tools, there's an IDE (GNAT Programming Studio) and an Eclipse plugin that you can get for free (GPL). And of course, Emacs ;-)

    Leave a comment:


  • cl333r
    replied
    Originally posted by mmstick View Post

    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. ...
    I moved from Gtk3 to Qt5 after dealing with it for like 2 years and finding out it's crap and at the time poorly supported on windows (at the time). The shittiest part is that it's written in C which is too low level, Python is a hog because it's interpreted that's one of the reasons Canonical couldn't keep up its software center because Python like any interpreted language only scales so much. And the C++ bindings to Gtk3 are crappy because they're still a wrapper around C logic with some bit of OO design. Anyone who tells me C++ isn't good for graphical apps, or any iteration of this idea, is only telling me he's not worth my time.

    Leave a comment:


  • ssokolow
    replied
    Originally posted by Hi-Angel View Post
    Just C++, really?.

    Also, from my little experience in both GTK and Qt, the last is better to code. E.g. I remember, as part of a student thesis, I was trying to fix a problem in GTK GUI of Yi with cursor, which doesn't become «big black box» in «normal mode», like it is in vim. Long story short, it turned out GTK didn't have that capability. In GVIM it is done via custom widget, and someone told a story, that for alike needs they hacked the mode of cursor when you press «Insert» key.

    I also met some other problems, which I badly remember, but what I do remember — I googled whether they could be easily done in Qt, and yes, they are! Plus — though it is subjective — to me Qt apps looks much prettier than GTK ones. So I consider Qt to be better than GTK.

    The only thing I'm miss in Qt, is that GTK allows creating global keybindings for textboxes via .gtkrc, e.g. for movement like in Emacs.
    Also, I find it irritating that, during the GTK+ 3.x series, it's become more and more difficult to maintain the desktop experience I had under GTK+ 2.x without regressions and their excuse is "GTK+ 3.x is an unstable series". If it's an unstable series, attack, name, and shame any distro which ships GNOME 3 as if it's a stable desktop! GNOME isn't the only consumer of the GTK+ APIs!

    Like the LXDE developers, I'm in the process of upgrading from GTK+ 2.x to Qt 5.x and the main thing limiting my adoption of Rust is that, as someone focused on UI/UX design, most of my creations are I/O-bound things which glue together non-QML (QML native widget support is too immature) UI elements in novels ways, so my creations will be 99% PyQt regardless of whether I use Rust and adding another language just complicates the build process.

    (I really want to be able to write pure Rust apps because the type system would greatly simplify the task of bringing all of my projects, old and new, up to my new unit testing standards... especially given how defining a state machine within Rust's type system lets you get compile-time validation of proper use of a wire protocol or file format.)

    Leave a comment:


  • dimko
    replied
    Originally posted by davidbepo View Post
    if torvalds didnt accept c++ for being among other things, unstable (sounds like a joke but it isn't). do you think he wil accept rust?

    i don't
    last I have seen - he did accept C++ code.

    Leave a comment:


  • Hi-Angel
    replied
    Originally posted by mmstick View Post
    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.
    Just C++, really?.

    Also, from my little experience in both GTK and Qt, the last is better to code. E.g. I remember, as part of a student thesis, I was trying to fix a problem in GTK GUI of Yi with cursor, which doesn't become «big black box» in «normal mode», like it is in vim. Long story short, it turned out GTK didn't have that capability. In GVIM it is done via custom widget, and someone told a story, that for alike needs they hacked the mode of cursor when you press «Insert» key.

    I also met some other problems, which I badly remember, but what I do remember — I googled whether they could be easily done in Qt, and yes, they are! Plus — though it is subjective — to me Qt apps looks much prettier than GTK ones. So I consider Qt to be better than GTK.

    The only thing I'm miss in Qt, is that GTK allows creating global keybindings for textboxes via .gtkrc, e.g. for movement like in Emacs.

    Leave a comment:


  • Steffo
    replied
    Btw. rust does only bound checking when neccessary. It doesn't do any bound checking in safe code when you are iterating over an array with for each.
    And it has overflow detection in debug mode which gets disabled in realease mode. Unit tests are integrated in the standard lib and compiler.
    If you are documenting code examples in your docs, these examples will get checked if they are compilable.
    In total, rust gives you an amazing tool chain by default!

    Leave a comment:


  • reepca
    replied
    *writes down interesting features of rust on laundry list of things to implement for lisp*.

    Leave a comment:


  • liam
    replied
    Originally posted by mmstick View Post

    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?
    This is a terrific account of possible reasons for the, apparent, success of rust.
    You mention the CoC (and if add its actual enforcement) but I think, in one case, at least, its attempt to fit everyone in a square slot (I realize civility shouldn't be viewed as such but it's an imperfect world) led to the loss of a really brilliant developer/contributor. For people like that, imho, you should provide an alternate* slot.

    *obviously, even for them, there are limits, but rudeness should be tolerated to degree that the person contributes

    Leave a comment:


  • liam
    replied
    Originally posted by mmstick View Post

    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.
    You're absolutely right that you can get baremetal-perf by going unsafe, but idiomatic rust encourages that to be used only when necessary, and even then only if you have a good feel for the behavior of the unsafe code.
    Btw, I'm not attempting to downplay the achievement of rust.

    Leave a comment:

Working...
X