Live data from Hacker News

Announcing Rust 1.35.0

blog.rust-lang.org

31–40 of 111 posts

Re: Announcing Rust 1.35.0

#31
Coming from C++, this always throws me a bit:

    if (0..=10).contains(&5) {
I assume we are taking a ref to "5" (and not passing by value) because "Range" is a generic type that might be too big to want to copy (or it may not be copyable at all). But taking a reference to a number for a simple operation like this feels... weird. It makes me worry that Rust is going to be passing around pointers to some stack-allocated "5", but I hope that Rust is actually much smarter than that?

Re: Announcing Rust 1.35.0

#32

Coming from C/C++. Is working with the online package manager (Cargo?) mandatory? Or is there a sustainable way of working/developing with Rust while completely offline? I'd like to start a project, manually import libraries (downloaded manually, no dependency hell), read documentation, etc. Is it possible?

coming from rust - I spent three hours last night trying to build scylla (and failed). problem after problem, baffling errors, etc. -- what I would consider dependency hell. have you tried cargo? I'm actually curious what your perspective is that you think of the c++ situation as preferable somehow.

Re: Announcing Rust 1.35.0

#33

Coming from C/C++. Is working with the online package manager (Cargo?) mandatory? Or is there a sustainable way of working/developing with Rust while completely offline? I'd like to start a project, manually import libraries (downloaded manually, no dependency hell), read documentation, etc. Is it possible?

Once you have rustup installed, run ‘rustup doc’. You will get standard library documentation from disk as well as “the book” which introduces the core concepts

Then, if using cargo which I totally would, run ‘cargo doc —open’ to see api documentation for your project as well as your projects dependencies both direct and indirect.

All from disk!

Re: Announcing Rust 1.35.0

#34
post #30

Earlier quoted context omitted.

Does that mean it only needs internet for the first build. And then, subsequent builds won’t need internet connection (if I don’t add new dependencies, of course), kind of like Maven?

No, you can do everything, including the first build, offline.

Sorry, I should’ve been clearer: I need cargo to be online the 1st time so that it could resolve my dependencies for me online the 1st time because I don’t want to setup local repos and stuff. Thanks

Re: Announcing Rust 1.35.0

#35

Coming from C++, this always throws me a bit: if (0..=10).contains(&5) { I assume we are taking a ref to "5" (and not passing by value) because "Range" is a generic type that might be too big to want to copy (or it may not be copyable at all). But taking a reference to a number for a simple operation like this feels... weird. It makes me worry that Rust is going to be passing around pointers to some stack-allocated "…

The optimizer should take care of that, yeah. The ABI isn’t defined so it can re-write stuff. And inlining, all that fun stuff.

Re: Announcing Rust 1.35.0

#36

I no longer care about Rust anymore because of their lang team's await syntax decision process. It seems the team only cares about satisfying themselves rather than listening to the community's concern. Whenever users spoke about problems proposed by the team, they simply dismissed them saying the concern doesn't contain any new information. With this lang team, I think Rust is going to die quickly. It doesn't worth…

For anyone playing along at home, when the async/await RFC was accepted, it left the final syntax of "await" to be decided before stabilization. That was a little over a year ago. There was some debate, but it's been under pretty intense debate since at least November of last year. This has been the most discussed aspect of Rust ever. The tracking issue has 296 comments. There have been numerous threads on the intern…

> This has been the most discussed aspect of Rust ever.

I still remember the lifetime syntax (&'a T) discussion. await syntax discussion felt really similar.

Re: Announcing Rust 1.35.0

#37

Coming from C/C++. Is working with the online package manager (Cargo?) mandatory? Or is there a sustainable way of working/developing with Rust while completely offline? I'd like to start a project, manually import libraries (downloaded manually, no dependency hell), read documentation, etc. Is it possible?

In addition to what's been said in other replies, there's also `cargo vendor` which can give you even more flexibility when working offline.

Re: Announcing Rust 1.35.0

#38
post #30

Earlier quoted context omitted.

No, you can do everything, including the first build, offline.

Sorry, I should’ve been clearer: I need cargo to be online the 1st time so that it could resolve my dependencies for me online the 1st time because I don’t want to setup local repos and stuff. Thanks

If you use dependencies from crates.io or other online sources, then yes you'd need to download those somehow. But that can be done separately, on an entirely different computer if you wanted.

Re: Announcing Rust 1.35.0

#40
post #18

I no longer care about Rust anymore because of their lang team's await syntax decision process. It seems the team only cares about satisfying themselves rather than listening to the community's concern. Whenever users spoke about problems proposed by the team, they simply dismissed them saying the concern doesn't contain any new information. With this lang team, I think Rust is going to die quickly. It doesn't worth…

You do you. The reality was that _every_ time some discussion about the async syntax came up _every_ proposal and concern was uttered again. It's not that any direction was particularly more popular in the community than any other one, so it's not that the lang team decided against what the community wanted. The only thing that seemed certain in the end that all options have some downsides. I'm very happy with the Ru…

[deleted]
Post reply on HN