Live data from Hacker News

Why I love Rust

speakerdeck.com

151–159 of 159 posts

Re: Why I love Rust

#151
post #150

Earlier quoted context omitted.

Rust is more than semi-stable: we take backwards compatibility very seriously. It will not be subject to deep changes from here on out, or at least, those changes will not break existing things.

> we take backwards compatibility very seriously. You're yet to display that. Half a year is too short time to give that confidence.

Theres two components of "display that": process and follow through.

On the first point, we've set up a lot of tools and process to deal with stability, including testing releases against all open source code in existence. It's not perfect, but it does demonstrate commitment.

The second is the actual follow through. Due to said tools, we can calculate exactly how good we've done at it: so far, it's something like 97% of all code that was ever published still builds with 1.5. I'm on mobile so I don't have the real number on me. And that breakage was due to soundness updates, which we introduce over multiple releases, starting with warnings, so there's time to adapt.

Yes, it's early days, but that doesn't mean that you can't say anything.

Re: Why I love Rust

#152

Earlier quoted context omitted.

I think that Rust simplifies some things that you must do yourself in C++, and learning how to do them is valuable. At the very least, it will help you appreciate other languages, but it can also show you areas where you get manual control over performance in ways no other language offers. And, perhaps most significantly, there are a wealth of C++ libraries out there that have no equivalent in other languages, and be…

> I think that Rust simplifies some things that you must do yourself in C++, and learning how to do them is valuable. Given that you didn't answer the question, I think it's pretty clear at this point that you haven't used Rust. Rust is a low-level language with low-level control over memory and resources.

Speaking about C, since I never went too deep into C++.

The original assertion was:

> ...gives a developer more insight into the actual machine...

For better or worse, Rust feels like a reference is a proper abstraction over a memory location whereas C drives home that it really is just a number. Perhaps I don't know Rust well enough but, without unsafe, I'm not sure how I would refer to an arbitrary memory location or use pointer arithmetic to access memory locations relative to a known memory location in Rust. Vector indexes in Rust appear to be more than just syntax sugar for addition whereas C allows both array[2] and 2[array]. And I know that Rust will prevent me from accessing memory that's already been freed since it's one of the selling points of the language.

Now you can argue that Rust is mostly saving you from unpleasant consequences, and you'd be right. But the fact that C forces you to understand those unpleasant consequences teaches you something about the nature of the underlying machine. C makes you realize just how much of a "wild west" situation exists at that level. It would be very easy for someone to learn Rust without being confronted with that fact.

Re: Why I love Rust

#153
post #52

Earlier quoted context omitted.

> it's still pretty immature from a production tooling point of view. I think that the production tooling for Rust is pretty good. For example, it has a package manager that everyone uses, with features like lockfiles that are specifically designed for production. Not many languages have this. It's undeniable that Go is more popular than Rust, but I think "production tooling" is not the reason.

Rust and Go are going into different directions. Rust is trying something new and Go tries to only use the stuff that worked in the past. It's no surprise that people favor Go instead of Rust. Also the last time I saw a video about a low level language discussion, only Rust had a dev there nobody really knows. C++, D and Go had prominent people speaking for them. The tooling really isn't the problem, as far as I can…

> Also the last time I saw a video about a low level language discussion, only Rust had a dev there nobody really knows. C++, D and Go had prominent people speaking for them.

They were each represented by a prominent member of their language design team. Its tragic that more people don't know of Niko Matsakis, but his blog is one of the best resources on the design of the Rust language: http://smallcultfollowing.com/babysteps/

Re: Why I love Rust

#154

Earlier quoted context omitted.

> you can see C++ adopting pretty much the borrow checker as a tool This may be because I'm too close to it, but the Core Guidelines are similar in ways, but also very different. Preventing data races is an explicit non-goal, for example, whereas in some ways, it's the focus of the borrow checker. > Rust has no major production deployments of which I am aware Dropbox is the latest production user, as of last month. A…

I'd really like to know how well that works out at Dropbox. How honest and public do you think they'd be if major data losses resulted from Rust crapping out on them? I'm not sure about them but lots of businesses keep such things on the DL. I think it's a risky move. I'd have first deployed existing, native code along with Rust in parallel using the data splitting technique so some is saved with original and some wi…

  > I'd have first deployed existing, native code along with 
  > Rust in parallel using the data splitting technique so 
  > some is saved with original and some with Rust.
Yes, this is how Dropbox tests all of their features, and they did this with their new Rust-based storage engine as well. This tool has been in development for over a year by now and has seen extensive multi-stage testing (at first handling only a few terabytes of data, then "just" petabytes, and now exabytes).

Re: Why I love Rust

#155

Earlier quoted context omitted.

I'd actually like to have those links in case I take up Rust or someone I know trying it gripes about the problem. Good to have them stashed away. I see what you mean, though, if it's just rules you have to memorize and apply in many situations. Might be potential for my proposal but I'll take your word for now. "Anyway, like I said, I'm doing my best. More experience reports is the only way that I can do that, basic…

The official docs are https://doc.rust-lang.org/book/ownership.html and the following two sections. They explain the basics. I'm currently working on the next draft of the book, which will be more in-depth. http://chrismorgan.info/blog/rust-ownership-the-hard-way.htm... and http://codrspace.com/buntine/aha-understanding-lifetimes-in-... are two blog posts that I can remember.

Emailed an experience report to your profile address. Hope it helps.

Re: Why I love Rust

#156

Earlier quoted context omitted.

> (rather than higher level, which these languages both are) Rust should be (and is, modulo wrinkles, I mean there's no fundamental reason) as low level as it gets. What makes Rust too high-level for gamedev?

It's probably not too high level for game dev. However, modern AAA game dev is largely about customising and upgrading large existing game engines, which are all C++ based. Rust could be used for them, but isn't, and the extra features Rust brings are not compelling enough to rewrite huge amounts of working code and suffer (re)training costs. This is a hole many new languages find themselves in. JetBrains have come u…

If you want to be fully compatible with C++, you have to be fully compatible with all its issues and design mistakes. If those could be fixed without sacrificing compatibility, they would be fixed within C++ already. In case of rust, such compatibility would defeat the purpose of its existence.

Re: Why I love Rust

#157
post #46

Earlier quoted context omitted.

Junior level is when you know all language features Wow, in that case I don't think I've ever worked with anybody who's ever managed to reach "junior level" in any language. What do you call someone with, for example, just a PhD in the relevant field, 6 or 7 years of professional programming experience and several successfully shipped products under his belt. And what do you call the guy that is obviously his junior?

When someone with a PhD in the relevant field, 6 or 7 years of professional programming experience and several successfully shipped products under his belt starts learning something new, he's a junior at that new thing.

nice dodge. chewbacca defense!

Re: Why I love Rust

#158

Good presentation with a great, artistic style. Also liked her articles about speeding Java up and "A/A testing." Far as this one, the only correction I have is regarding the slide that says you can't write an OS in Java. Several have been written w/ JNode and JX OS coming to mind immediately. JX is my favorite given its interesting architecture is mostly compatible with high assurance requirements. Just needs a high…

Yes indeed, and of course we must not forget Singularity/Midori which were implemented in a derivative of C# and .NET I'd really like an OS built this way to become competitive. 64 bit flat address spaces and fully type safe designs really let you simplify things a lot in some fundamental ways. And you'd be able to run existing Java desktop apps without much in the way of porting effort. Unfortunately all the Java OS…

Yeah, that is unfortunate. JX OS at least might be useful for single or minimal purpose appliances. Maybe soft-real-time or non-real-time embedded, too.

Singularity, esp Midori per Duffy's blog, were the biggest pushes into an inherently better OS's for desktops. I hope we see more Midori move into Windows or other tech.

Re: Why I love Rust

#159
post #154

Earlier quoted context omitted.

I'd really like to know how well that works out at Dropbox. How honest and public do you think they'd be if major data losses resulted from Rust crapping out on them? I'm not sure about them but lots of businesses keep such things on the DL. I think it's a risky move. I'd have first deployed existing, native code along with Rust in parallel using the data splitting technique so some is saved with original and some wi…

> I'd have first deployed existing, native code along with > Rust in parallel using the data splitting technique so > some is saved with original and some with Rust. Yes, this is how Dropbox tests all of their features, and they did this with their new Rust-based storage engine as well. This tool has been in development for over a year by now and has seen extensive multi-stage testing (at first handling only a few te…

I was expecting they probably did given what's on the line. Re-reading it, I realize it probably didn't come off that way. Gotta work on that.

Thanks for the confirmation, though. I do look forward to reading the experience report. Hoping they include data on all key attributes vs prior language: productivity, debugging time comparison, CPU use, memory use, integration issues, and any changes in defect rates. Community evaluating Rust needs that data for something at this level.

Post reply on HN