4 ms·
I think "too slow" is "too slow to onboard juniors", not "too slow in terms of performance".
by autarch 5y ago
I think "too slow" is "too slow to onboard juniors", not "too slow in terms of performance".
- rattray 5y agoCorrect – it took about 6 months for people to become fully productive in Rust, which matches what I've heard elsewhere. Though I will note that the Rust compilation times were also far more painful than I'd expected – even the tiny (~5k sloc) app at hand would take what felt like a minute to recompute the red squigglies in my editor. TS felt slow if it took 5-15sec, and Sorbet (for Ruby) was usually <3sec IIRC, so a minute+ was pretty bad. Rust was in the realm of "just don't use this language if you have ADHD" since you really can't make progress without the compiler's exacting approval, and I'd constantly get distracted while waiting.
- jkelleyrtp 5y agoMake sure you're not using `cargo build` to check your project. `cargo check` (the thing that makes your squiggles red) has never once taken me a minute to complete. RLS (the default LSP for rust uses `cargo build` - definitely switch to Rust-Analyzer (the soon-to-be default). I just ran `cargo check` on my workspace (10 crates, about 5k LoC) and it took 3 seconds.
- rattray 5y agoMy mistake! Replacing RLS with Rust-Analyzer, it now takes 20-30s to incrementally check a trivial change to some core model code (compared to ~90s with RLS), though now rust-analyzer gives me an unrelated error which I assume may be the result of using a different rustup/cargo binary or something – so I'm back to RLS. Oh well. It looks like RLS and Rust-Analyzer are working on unifying their code, so I'm sure this will get better in the not-too-distant future.
- jkelleyrtp 5y agoHmmmm RA has been good with me, unless I’m doing something with Arrayfire or PyTorch which are both sensitive to $PATH. RA is seriously the real deal, so I suggest wrenching around until it works. I had to modify my $PATH in VSCode to fix the issue - do you know what library you’re using that causes the issue?
- rattray 5y agoAh, thanks for the nudge. Looks like I had run into https://github.com/rust-analyzer/rust-analyzer/issues/6835 https://github.com/rust-analyzer/rust-analyzer/issues/6835, had to bump the patch version of a library to fix.
- zozbot234 5y ago> you really can't make progress without the compiler's exacting approval, and I'd constantly get distracted while waiting You can use cargo check for that, which is fast. It's only for running tests or the like that an actual build is required. Rust also has IDE integration via rust-analyzer, so the error-marking "squiggles" can be recomputed incrementally.
- steveklabnik 5y agoIronically, I recently received an ADHD diagnosis…
- throwamon 5y agoEveryone and their mother is receiving an ADHD diagnosis nowadays. Call me a conspiracist, but I believe this is just one more case of deliberate overfitting by Big Pharma, coupled with the consequences of technology on our attention spans and other characteristics of our cognition and behavior. As someone that might be similarly diagnosed for the same reasons, your comment does make me more optimistic of achieving something significant in my life, though.
- steveklabnik 5y agoBelieve whatever you want, I am just glad that some things are starting to get better for me. I didn't need big pharma to tell me that stuff was bad, I struggled to even get help for far too long, and stigma around over-diagnosis certainly prolonged my problems here.
- throwamon 5y agoI'm sorry if I sounded like I was trying to invalidate your diagnosis. I'm sure ADHD is a real issue many people face their entire lives without receiving proper information or care and of course it's better to find out as early as possible. I realize now your comment wasn't the proper place for me to rant about this. I'm happy for you.
- steveklabnik 5y agoIt's all good. It's a really, really tricky topic, for sure.
- scns 5y agoBy the same author, nay help: https://www.lpalmieri.com/posts/fast-rust-docker-builds/ https://www.lpalmieri.com/posts/fast-rust-docker-builds/
- sbeckeriv 5y agoThis is also covered in a chapter in the book when you deploy the project. I did not do a live deploy but the it looked like a nice setup even for a pet project.
- zozbot234 5y agoIt would be interesting to know where the difficulty was in training juniors to write comparatively simple code in Rust. Was it all about fighting the borrowck, or was there more to it?