Slashdot Mirror


Rust 1.0 Enters Beta

An anonymous reader writes: Rust is a systems programming language focused on safety and speed and aims, among other things, to offer memory safety without garbage collection and threads without data races. Over on the Rust blog, the Rust Core Team has announced the release of Rust 1.0 beta. They write, 'The beta release marks a very significant "state transition" in the move towards 1.0. In particular, with the beta release, all libraries and language features that are planned to be stable for 1.0 have been marked as stable. As such, the beta release represents an accurate preview of what Rust 1.0 will include.' The final Rust 1.0 release is scheduled for May 15th, 2015. A warning from the developers: "Rust is a work-in-progress and may do anything it likes up to and including eating your laundry." The FAQ is worth reading.

22 of 211 comments (clear)

  1. Likely interesting by umafuckit · · Score: 3, Funny

    When Rust becomes a little more polished it will likely become very interesting.

  2. Give the ecosystem a few days to catch up by drewm19801927 · · Score: 5, Interesting

    Now is a good time to play around with Rust and explore the language features! If you build against the beta release and don't add external package dependencies, your code will most likely continue to function for the duration of the 1.0 release cycle. However, now is probably a particularly ~bad time for new rust users to start a project and add a bunch of dependencies from Cargo/crates.io. Beta changed code dependencies on unstable features from warnings to errors, so a lot of common libraries in the ecosystem are broken at the moment, and will take a little while to get updated. Happy hacking!

  3. Ada by Elledan · · Score: 4, Interesting

    Is there any reason why anyone would want to use Rust when they're already proficient in both C++ and Ada?

    You'd think that Ada is already covering most if not everything what Rust is trying to cover here, especially the memory safety and concurrency aspects.

    --
    Site & blog: http://www.mayaposch.com
    1. Re:Ada by Anonymous Coward · · Score: 2, Funny

      C++ and Ada are geezer languages for unemployable old dinosaurs. Rust is hipster hotness, bitch. You know it or you don't get paid. Ever again.

    2. Re:Ada by Celarent+Darii · · Score: 4, Insightful

      No. Ada already has a very basic syntax, which if you look at the Ada example is so much like Rust that really I fail to see any significant difference. Ada is also completely buzz-word compliant. It has also been used to make real projects, and even has a ANSI Standard since 1983. Rust can't even guarantee a feature set, nor even a stable keyword set.

      Wish them luck, but frankly it's a bit like reinventing the wheel. I guess it's what hipsters do when they skip CS 102 in order to 'find themselves' - try to 'reinvent' what they should have learned in college.

    3. Re:Ada by Electricity+Likes+Me · · Score: 4, Insightful

      Complaining about other people's open source projects seems to be what Slashdot posters do in order to make themselves feel important.

    4. Re:Ada by tgv · · Score: 4, Funny

      Yes, but you'll need 5 to 10 years of Rust experience. In a lead role.

    5. Re:Ada by drewm19801927 · · Score: 3, Informative

      Wow, Ada code looks nothing like Rust code to me. Ada looks like a mix of BASIC and python. I don't know Ada, but Rust supposedly makes stronger guarantees of memory correctness for parallel code. Rust just went beta yesterday; breaking changes up to now were to be expected. Once there are more people with real-world experience with both Ada and Rust, I'll be very interested in reading about their experiences. Maybe you haven't been following it closely, but Rust is not some one-developer toy scripting language. A team of brilliant engineers has been working on it full-time at Mozilla for years.

  4. What's a "compiler" ? by Anonymous Coward · · Score: 3, Funny

    Is this Rust thing another web framework? Should I assert 5 years experience with Rust on my CV?

    1. Re:What's a "compiler" ? by gweihir · · Score: 2

      Not quite, but close enough methinks.

      (Yes, I do detect the irony, but it is reality that is ironic here...)

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  5. Why do we need new langs? by Anonymous Coward · · Score: 5, Funny

    Everything is written in JavaScript or soon will be. New language development is a waste of time that should be better spent making mobile apps for 3D printers.

    1. Re:Why do we need new langs? by siddesu · · Score: 2

      My 3D printer doesn't run Javascript yet, you insensitive clod.

  6. Re:"without garbage collection" by BasilBrush · · Score: 4, Interesting

    You must be a Java programmer. Garbage collection is generally a very bad idea for a systems language, because of the periodic stalls whilst it does the cleanup. Especially if it's shunting blocks around memory to defragment. It's one of the big reasons why Android underperforms iOS, why it's never been so smooth in operation. And the only thing a developer can do about it is switch to a different language or develop for a more powerful machine.

    Memory fragmentation can be a problem - but the success of C and C++ in most domains over the decades has shown it's just one more aspect a programmer has to deal with, it's not a showstopper. It's fixable, on the same machine, with the same language.

  7. Have you actually tried using Rust? by Anonymous Coward · · Score: 2, Informative

    Have you actually tried using Rust? I have, and I can tell you that it isn't "polished".

    Maybe it won't change as goddamn much as it typically has each day, but it's not a clean language like say Python or C# are.

    Its library API is something awful. You have to write stuff like:

    let path = Path::new(&app_path)
    println!("file name: {}", path.file_name().unwrap().to_str().unwrap());

    The memory management approach is also, to put it nicely, a royal pain in the ass to use. Maybe it can guarantee a higher level of safety, but it slows down development to a crawl, even once you understand how it all works and can work with the compiler instead of against it.

    Its string handling is fucked up beyond belief. Go read about about String and &str if you don't believe me.

    Rust is a very tedious and anal language to use, to the point of any safety gains being eliminated by much slower development time.

    I feel that I can get almost the same level of safety by using modern C++ techniques like RAII and smart pointers, along with strict compiler options, without the speed of development slowing to a crawl.

    Rust will be "polished" the day that we can use it swiftly and effectively, rather than being burdened by its awkward memory management, or its shit-for-brains library API, or it's convoluted string handling. I mean, these are some pretty basic things that it's screwing up. If it can't get those even remotely right, it's not "polished".

    1. Re:Have you actually tried using Rust? by gweihir · · Score: 2

      No, I do not. What I am pointing out is that this language will have "management" assign even less competent people to do "secure code" than they do now, for a likely net loss in security.

      And besides, Rust does not prevent you from making all "easy" mistakes either, just some of them.

      There is this class of "tool fetishists" that think all problems with coding can be solved by just using the "right tools". You even hear that opinion form people that really should know better. Well, guess what, if that were possible, we would have the right tools by now. The fact of the matter is that performance, security, maintainability, etc. cannot be enforced by tools. It takes coders that know what they are doing, that have the talent and experience to get it right. Of course, these people are expensive and they will give stand up to management when management wants things that are stupid.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Have you actually tried using Rust? by gweihir · · Score: 3, Insightful

      Indeed. I think these people are so in love with their own genius that they have overlooked that their tool is probably going to do a lot more harm than good. After several decades of research into software reliability and security it is clear that it is not a question of the tools used, although that flawed idea is strong in some academic and industrial quarters. What these people are basically saying is that if you have just the right kind of hammer, then you cannot hurt yourself with it anymore. Of course, that would be a Styrofoam hammer (or similar) that is also completely unfit for its primary purpose. The same is true for programming languages.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  8. Re:"without garbage collection" by gTsiros · · Score: 2

    "It's one of the big reasons why Android underperforms iOS, why it's never been so smooth in operation."

    no, there is only one reason: shitty coding.

    --
    Looking for people to chat about multicopters, coding, music. skype: gtsiros
  9. i was going to celebrate... by indy_Muad'Dib · · Score: 2

    rust finally going into beta but then some naked smashed my head in with a rock and stole my bow.

  10. Re:"without garbage collection" by IamTheRealMike · · Score: 4, Insightful

    You must be a Java programmer. Garbage collection is generally a very bad idea for a systems language, because of the periodic stalls whilst it does the cleanup

    Ah yes, the "systems language" debate. Oh how I love those.

    Here are a few things to ponder.

    The first is that your claim about Android underperforming iOS doesn't seem to have any merit. I have a Lollipop device here and it's as smooth as any iPhone I've ever used. Indeed I suspect by "smooth" you mean whether animations consistently hit 60fps and that has relatively little to do with garbage collection because most animations only last for a second or two, and you can easily delay GC until after it's finished. If you actually read about Project Butter and the work the Android team did to make things fast and smooth, it mostly involved deep changes to the graphics stack. The new GC in ART helps when doing things like scrolling down infinite lists, but otherwise, it's not a big deal. Bear in mind GC pauses on a modern Android device are in the realm of milliseconds - not fast enough to cause a frame skip unless you're really pushing up against the deadlines.

    Another thing to consider is that people love to try and define "systems language" to mean whatever language they happen to prefer at the time. For instance the Linux guys have claimed for years that C++ isn't a "systems language" because you can't use it to write a kernel. However, quite a few successful kernels have done just that: for instance parts of the MacOS kernel are written in C++, the osV kernel is mostly C++ and so on. Microsoft even wrote an entire OS with kernel and everything in garbage collected C#. I've come to believe that the term "systems language" is so vague as to be useless for describing programming languages.

    Final point. Rust claims to be superior for systems programming because it doesn't need a garbage collector. However, Mozilla is not in the business of writing kernels. They are in the business of writing web browsers. Web browsers absolutely can be garbage collected and due to the need to support Javascript, often are. At a time when Mozilla is dumping resources into designing an entirely new programming language and experimental layout engine that uses it (Servo), the Chrome guys are quietly getting on with migrating Blink (aka WebKit) to garbage collected C++. The project is called Oilpan, look it up. Apparently Google disagrees with Mozilla about the need for a non-GCd "systems language" for the kind of work they're doing.

  11. Re:Thank you! by drewm19801927 · · Score: 3, Funny

    The main hot newness in Rust is the borrow checker. It is the source of Rusts most notable strengh and also it's most notable weakness, but you won't see it at all if you just look at a code example online, or download an already-working code example. It's also interesting since it's the first language to really target the remaining C/C++ strongholds in a long time, and it does have an interesting mix of good ideas from other languages. As for graphical programming, I would have said that all the clicking (and not version controlling) puts an upper limit on program complexity, but who knows... people have designed some darn complex stuff in Minecraft; if someone designed a visual programming language for people with that temperament maybe they ~could write something like an operating system by clicking and dragging (and shoveling?).

  12. Re:"without garbage collection" by drewm19801927 · · Score: 2

    Things could get very interesting indeed if Apple opens up Swift. I'm not sure if Swift can cover all of the use cases that Rust does, but it can probably cover most of them, and Apple has worked very hard on Swift's ergonomics. Interactive REPL-style coding is a mere twinkle in some rust dev's eye right now; the closest we have is the playpen and the playbot in the IRC channel. The world wins if either of them catch on.

  13. Re:"without garbage collection" by Nubbywubwub · · Score: 2

    Your final point about Servo and Oilpan is off. Servo has garbage collection in the same way that Chrome is growing garbage collection via Oilpan: for keeping track of objects in the DOM (in fact, Servo uses the SpiderMonkey GC for this, it's actually pretty neat. See https://blog.mozilla.org/resea... for details). Mozilla isn't afraid of garbage collection, they just happen to think that if you can get by without it then hey, why not?