I tried Rust about a month ago. The language itself is amazing, the pattern matching is super expressive, the borrow checker is incredible in the kinds of errors it can pick up on, and rust-analyzer is leagues beyond where RLS was. But... the compile times are an absolute non-starter for me. I'm the kind of guy that likes to re-run his code continually to see if it validates to what I expect it to be doing. In Rust,…
Rust Is Surprisingly Good as a Server Language
241–250 of 352 posts
Re: Rust Is Surprisingly Good as a Server Language
#242Re: Rust Is Surprisingly Good as a Server Language
#243Earlier quoted context omitted.
Yes, but you still can't write garbage collected code, which is tremendously useful in many circumstances. E.g. when using closures you really don't want to be thinking about memory allocation, and closures have proven a very useful concept. There are countless of reasons why the availability of a GC is a productivity booster. So I wouldn't describe Rust as a language that fits all domains and/or programmers well.
Isn't Rc essentially garbage collection though?
Re: Rust Is Surprisingly Good as a Server Language
#244Earlier quoted context omitted.
I can feel the pain on all 5 points. One thing I did notice though is that NodeJS has such a huge breadth of packages that its _very_ hard to actually pick something good. But there is almost always an alternative that's maybe not as popular, but is a lot more "solid" alternative. For example we used SOHU-Co/kafka-node for a while as a kafka client, until we hit some bugs that made us dig through its internals and we…
I will have to take a look Slonik. I feel like I have been to hell and back with ORMs, between Sequelize, Entity Framework, Hibernate, SQLAlchemy, etc.. and frankly, I think they just cause more headaches than solve problems. I would love to have strongly typed SQL queries, but I have found that Dapper [1] fills a special place in my heart. [1] https://github.com/StackExchange/Dapper
Re: Rust Is Surprisingly Good as a Server Language
#245Earlier quoted context omitted.
Maybe. At the rate I hit :w, probably not :)
How do you have Vim (or neovim) set up to do that and report errors inline?
Re: Rust Is Surprisingly Good as a Server Language
#246Earlier quoted context omitted.
The thing with ownership reasoning in Rust is that you can opt out of it whenever it makes sense to do so. If you really have "objects which live for indeterminate amounts of time and can be shared across views", that's not an increase in complexity; you just acknowledge that reasoning about ownership and sharing at compile time is not going to be feasible, write Rc > (with a documentation comment to that effect) and…
Yes, but you still can't write garbage collected code, which is tremendously useful in many circumstances. E.g. when using closures you really don't want to be thinking about memory allocation, and closures have proven a very useful concept. There are countless of reasons why the availability of a GC is a productivity booster. So I wouldn't describe Rust as a language that fits all domains and/or programmers well.
You don't have to think about this with Rust - and you don't need a GC either. The borrow checker will make sure that your closure doesn't outlive the variables it captures, which is what you need for correctness in this case.
Re: Rust Is Surprisingly Good as a Server Language
#247I tried Rust about a month ago. The language itself is amazing, the pattern matching is super expressive, the borrow checker is incredible in the kinds of errors it can pick up on, and rust-analyzer is leagues beyond where RLS was. But... the compile times are an absolute non-starter for me. I'm the kind of guy that likes to re-run his code continually to see if it validates to what I expect it to be doing. In Rust,…
```
[target.x86_64-unknown-linux-gnu]
rustflags = [ "-C", "link-arg=-fuse-ld=lld" ]
```
`-Clinker=clang` also works. I think you need a recent `gcc` (8 or newer) for `-fuse-ld=lld`. For `linker=clang` you probably need `clang` installed.
Permalink: https://reddit.com/r/rust/comments/dsfi5m/rust_2020_are_we_c...
Re: Rust Is Surprisingly Good as a Server Language
#248Earlier quoted context omitted.
Apparently you didn't bother to read the 3 answers that come up. Only one of them says anything and it an empty statement like > F#'s compile times also seem to err on the long side but not very much so, my impression goes. However it is quite easy to validate write the same algorithm in F# and Rust and then compare. Ah but Rust is AOT compiled, easy, use NGEN, .NET Native, or Mono AOT for the F# compile time measure…
Apparently you assume that everyone’s google results are identical.
People should be educated on the huge bias introduced by personalized services like google.
Re: Rust Is Surprisingly Good as a Server Language
#249Earlier quoted context omitted.
Ocaml is a somewhat fair comparison, but I have to say that Go is really in no way comparable to Rust. Rust is massively more complex.
I'd say Go is a fair comparison here. Type checking and Parsing isn't bottleneck in Rust compilation. Code generation is. LLVM is particularly heavy and while it generates optimized code, it is quite slow. Go Authors didn't pick LLVM because of compile speed reasons (as well as complexity), and that turned out to be worthwhile tradeoff.
Anyway in C++ land massive compile times are just as much of a problem. Fast code is expensive. Go’s a lot of things, but being good at generating fast code ain’t one of them (looking holistically anyway).
Re: Rust Is Surprisingly Good as a Server Language
#250Earlier quoted context omitted.
Ocaml is a somewhat fair comparison, but I have to say that Go is really in no way comparable to Rust. Rust is massively more complex.
I'd say Go is a fair comparison here. Type checking and Parsing isn't bottleneck in Rust compilation. Code generation is. LLVM is particularly heavy and while it generates optimized code, it is quite slow. Go Authors didn't pick LLVM because of compile speed reasons (as well as complexity), and that turned out to be worthwhile tradeoff.