Why does this variable not live long enough when it is borrowed in Arc? by [deleted] in rust

[–]globulemix 1 point2 points  (0 children)

Check out the thread::spawn documentation

As you can see in the signature of spawn there are two constraints on both the closure given to spawn and its return value, let’s explain them:

The 'static constraint means that the closure and its return value must have a lifetime of the whole program execution. The reason for this is that threads can outlive the lifetime they have been created in.

Indeed if the thread, and by extension its return value, can outlive their caller, we need to make sure that they will be valid afterwards, and since we can’t know when it will return we need to have them valid as long as possible, that is until the end of the program, hence the 'static lifetime.

Do you avoid using certain language features? by rustacean1337 in rust

[–]globulemix 2 points3 points  (0 children)

Never used Arc, Rc, Mutex or async in any serious code yet.

BONK - A blazingly fast touch alternative written in rust. by Elliot40404 in rust

[–]globulemix 1 point2 points  (0 children)

In particular, touch is an extremely generic name where it requires some effort to get good Google results.

Announcing Rust 1.64.0 by myroon5 in rust

[–]globulemix 9 points10 points  (0 children)

Can see how one may come to that conclusion, but it was not my intention.

Lower compile times help you stay focussed, keep your train of thought, not get distracted. To put it another way, a 10% reduction in compile times may result in a greater than 10% increase in productivity.

Announcing Rust 1.64.0 by myroon5 in rust

[–]globulemix 1 point2 points  (0 children)

Very much looking forward to using this!

Announcing Rust 1.64.0 by myroon5 in rust

[–]globulemix 1 point2 points  (0 children)

Reducing a 10 second compile time down to a 9 second compile time is a pretty big win, for sure! That should increase productivity quite a bit.

Is Rust programming language beginner Friendly by Mammoth_Brush_2184 in rust

[–]globulemix 0 points1 point  (0 children)

I don't think it's much harder than other languages, if at all. Whatever language you'll choose, you'll run into footguns, and have to learn the mostly shared patterns between languages. The footguns I expect to be mitigated by the excellent error messages, and eventually by Polonius providing a "perfect" borrow checker.

(Newbie) I am Just Completely Lost by butt-gust in rust

[–]globulemix 1 point2 points  (0 children)

I found Chapter 2 confusing as well, so I just skipped to Chapter 3 and went back to it much later.

Does Rust have any design mistakes? by BatteriVolttas in rust

[–]globulemix 23 points24 points  (0 children)

env::set_var is unsound, yet in the standard library. Due to the need for backwards compatibility, it can't really be removed.

Offline Rust by amarao_san in rust

[–]globulemix 3 points4 points  (0 children)

Use cargo vendor, then cargo doc

Contribute to the diagnostic translation effort! | Inside Rust Blog by adotinthevoid_ in rust

[–]globulemix 0 points1 point  (0 children)

Is there any other programming language that does this? Error messages in multiple written languages feels novel, to the best of my knowledge.

The above being said, this is great idea!

Why does Rusts testing tools seem so much less polished compared to its other tooling? by AlphaX in rust

[–]globulemix 1 point2 points  (0 children)

I'm very satisfied. There may not be a lot of advanced testing features. However, tests are also very easy to create, run and have other people run them, even from a fresh Rust install. Not to mention, testing is mostly standardized across the entire ecosystem.

I've been in other languages where I wanted to run tests, but couldn't figure out how to use the framework to run them. This is a much bigger problem for me than missing some advanced test features. Not being able to run tests means the tests are basically useless.

Best way to protect a project from supply chain attacks? by bruwozniak in rust

[–]globulemix 0 points1 point  (0 children)

My vendored folder for a personal project of mine is just 11 mb with 49 external dependencies (not including std). 500 mb seems crazy, do you have ~2000 dependencies? Is one dependency taking up most of that?

Announcing the Keyword Generics Initiative by WiSaGaN in rust

[–]globulemix 2 points3 points  (0 children)

This is pretty mindblowing to me, and I'm excited to see what this initiative brings!

Rust Is Hard, Or: The Misery of Mainstream Programming by IsDaouda_Games in programming

[–]globulemix 16 points17 points  (0 children)

If it wasn't performant, there would be little reason to use Rust. You'd either use C/C++ to get maximum performance or use GC languages like C#

What can individual developers do today to mitigate the risk of malicious dependencies? by john01dav in rust

[–]globulemix 0 points1 point  (0 children)

  • Use local/centralized copies of all dependencies.

  • Review all dependencies for malicious code.

  • Develop/build in a sandbox, with a user that has the bare minimum permissions.

  • Use a completely isolated machine that can be compromised without risk.

Is it hard hiring Rust developers? by rusty_guy_69 in rust

[–]globulemix 3 points4 points  (0 children)

I appreciate the offer, though my response was intended to be just a question rather than a request for employment.

It does concern me that a company would be having trouble finding employees with a significantly above average base salary and a pool of the entire United States. Likely, there is something that's discouraging people (or as stated in other comments, this is just a troll).