Live data from Hacker News

One Year with Rust: I wrote a full featured application in rust, and so can you

vitiral.github.io

11–20 of 39 posts

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#11
post #9

Earlier quoted context omitted.

To be clear, no_std is itself stable, but when creating a binary, you need two language items, and those aren't stable. It's not 100% clear what the right path is yet for that, but we'll get there. :)

Can you explain what you mean by "you need two language items"? I'm just getting into Rust now and planning some bare metal stuff.

https://doc.rust-lang.org/book/no-stdlib.html

(This link will change in one or two releases; I landed a new "Unstable Book" a few days ago.)

The TL;DR is Rust expects certain stuff to be implemented in Rust code to work, and that's provided by the standard library. When you don't use the standard library, libcore implements all but a few of them. Implementing them is not yet stable.

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#12
Was your experience with Rust comparable to your Elm experience? I've been coding a lot in Elm lately and LOVE the reliability of the everything. Once you make it past the compiler, you know that it's not going to crash and that you'd managed all possible cases.

(I bring this up since using Elm was mentioned in the article)

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#13
What I would like to see is story from someone that is C/C++ expert and transitioned to Rust with their performance sensitive software, not side/hobbyist project, but real product working in production. I am interested in challenges that this person/team had, in which situations using unsafe was a must, what kind of performance problems they had with Rust abstractions (not all are cost-free) etc. And I emphasize on projects that strictly needed to be written in C/C++, not for example web api which requirements allowed it to be written for example in Java/Go etc.

Anyone like that here that could share his story?

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#14

Was your experience with Rust comparable to your Elm experience? I've been coding a lot in Elm lately and LOVE the reliability of the everything. Once you make it past the compiler, you know that it's not going to crash and that you'd managed all possible cases. (I bring this up since using Elm was mentioned in the article)

Rust is much more feature full, allowing you to do things (like mutate data) that you can't do in elm. It also has a lot of new concepts (like lifetimes). All of these things are to allow for ultra high performance applications - it can run as fast or faster than C!

One nice thing about rust is that everything is explicit. If someone can mutate your data, you have to pass "&mut" to them and declare your variable as mutable. This gives you a good balance of both performance and control.

It also has the benefits that make elm great like no exceptions, pattern matching, etc.

So ya, they are different languages but share a lot of the same concepts and benefits.

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#15
Seems odd to compare Rust and Python.

They're different levels of abstraction and I think are both great languages that serve different use cases.

I'm always going to be more productive in Python. And Python has an awesome ecosystem for web apps. Rust gives you native compiled binaries, concurrency, and speed in general.

Why you'd consider these two languages for the same app is beyond me.

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#16
post #2

I've been doing a lot of rust lately and I have to say it blows c/c++ out of the water. Sure, c/c++ has more libs, but almost every other feature in rust is fantastic, and wrapping a clib via ffi is really easy in rust. My only (minor) complaint with rust is that they aren't pushing no_std enough IMHO, but I'm biased since all my code is no_std :) so obviously I'd like to see a lot less work in the stdlib and more on…

The rust team deserves a thanking rally for pulling this off.

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#18
post #13

What I would like to see is story from someone that is C/C++ expert and transitioned to Rust with their performance sensitive software, not side/hobbyist project, but real product working in production. I am interested in challenges that this person/team had, in which situations using unsafe was a must, what kind of performance problems they had with Rust abstractions (not all are cost-free) etc. And I emphasize on p…

On vacation so no links, but check out posts from Andrew Gallant (ripgrep, regex), any of the Servo/WebRender/Stylo experience reports from the Firefox team, and I there're some reddit comments out there about Rust's use in production at Dropbox.

Re: One Year with Rust: I wrote a full featured application in rust, and so can you

#20

Seems odd to compare Rust and Python. They're different levels of abstraction and I think are both great languages that serve different use cases. I'm always going to be more productive in Python. And Python has an awesome ecosystem for web apps. Rust gives you native compiled binaries, concurrency, and speed in general. Why you'd consider these two languages for the same app is beyond me.

There are definitely areas where rust and python are closer in abstraction level than you might initially think. For example, rust's iterator trait enables things which are remarkably powerful when compared against python comprehensions.

Another example is the rayon library which is incredibly succinct compared to the multiprocess module in python.

Post reply on HN