Live data from Hacker News

Rust Is Surprisingly Good as a Server Language

stu2b50.dev

201–210 of 352 posts

Re: Rust Is Surprisingly Good as a Server Language

#201
post #183
post #104

Earlier quoted context omitted.

Or OCaml, Java, C#, F#, Eiffel, Delphi,...

I've worked in a C# code base where compiling the solution took 40 minutes.

Wow, one of our solutions is nearly 100 projects (legacy) and the compile time for the whole solution is sub-5 minutes. I'd love to see what kind of solution would take 40 minutes to compile! (or maybe I don't :)).

That being said, C# is clever enough to only need to recompile the assemblies affected by your code change, so often you can get away with 10 second compile times even for large solutions.

Re: Rust Is Surprisingly Good as a Server Language

#202
post #201
post #183

Earlier quoted context omitted.

I've worked in a C# code base where compiling the solution took 40 minutes.

Wow, one of our solutions is nearly 100 projects (legacy) and the compile time for the whole solution is sub-5 minutes. I'd love to see what kind of solution would take 40 minutes to compile! (or maybe I don't :)). That being said, C# is clever enough to only need to recompile the assemblies affected by your code change, so often you can get away with 10 second compile times even for large solutions.

IIRC our solution was around 450 projects. Visual Studio just woudn't open the whole solution.

So you had to work in individual projects at a time, slowly going through and changing stuff project by project.

VS wouldn't even build it either, really. YOu had to build via batch file that did various ms build magic. I would make changes, set of a build and go to lunch, then come back and fix the errors.

Once you checked the code into source control it would trigger a build which would sometimes take upwards of an hour :( I hated that code base.

It got even worse when they added Coded UI tests. Wait an hour for a build and then a random Coded UI test would fail and the advice from the people who wrote the Coded UI was "just run another build!", yeah, flakey tests on a code bases that tests an hour to run...

Re: Rust Is Surprisingly Good as a Server Language

#203
post #30

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,…

In dynamic languages like JavaScript or Python it's necessary to continually run your code in order to validate that the API (of the standard library or of dependencies) was used correctly, that the types match, etc. Rerunning your code continually is no longer necessary in a language like Rust, because the compiler already does that for you. People complaining about slow compile times in static languages like Rust,…

But the compiler checks your code, and if the compiler is slow, the problem remains.

Re: Rust Is Surprisingly Good as a Server Language

#204
post #203

Earlier quoted context omitted.

In dynamic languages like JavaScript or Python it's necessary to continually run your code in order to validate that the API (of the standard library or of dependencies) was used correctly, that the types match, etc. Rerunning your code continually is no longer necessary in a language like Rust, because the compiler already does that for you. People complaining about slow compile times in static languages like Rust,…

But the compiler checks your code, and if the compiler is slow, the problem remains.

A good IDE effectively checks your code continuously.

Re: Rust Is Surprisingly Good as a Server Language

#206
“ honestly some of the Rust ecosystem reminds me of the NPM. My end release build needs to compile 267 different libraries, before getting to my code, and that's for my simple little blogging engine.” <- Thats something i had to agree with With lately , i guess is part of the good and bad of having a growing community. So spend time picking the crates that make you feel more safe

Re: Rust Is Surprisingly Good as a Server Language

#207

Earlier quoted context omitted.

> I keep reading in Rust surveys that Rustaceans just don't care that much about compile times enough to prioritize improving them. I am interested in how you got that impression, because at least in our official surveys, it's often one of the most-requested improvements to Rust, and it's something that we're constantly working on improving. Still a ton of work to do though! For what it's worth, my workflow is closer…

Maybe with some heuristics, you could hide some latency by beginning to compile before saving.

Maybe. At the rate I hit :w, probably not :)

Re: Rust Is Surprisingly Good as a Server Language

#208

Earlier quoted context omitted.

Having to care for memory management is by definition very low level.

It's not really. People working on low-level stuff most likely don't have any dynamic memory allocations at all.

Dynamic allocation is not the only memory management problem.

Re: Rust Is Surprisingly Good as a Server Language

#209
post #30

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,…

> I keep reading in Rust surveys that Rustaceans just don't care that much about compile times enough to prioritize improving them.

Confusing since this is, to my knowledge, a top 3 issue just about every year.

That said, I think Rust programmers dislike compromise (maybe to a fault). Rust is naturally a 'have your cake and eat it to' language and the community very much likes to be best-in-class, so compromises on runtime performance to improve compile time (which is one way you can go today) are often not seen as viable by a large part of the community.

For what it's worth, I think I've called out compile times as probably one of my top issues with Rust, working on a fairly large and quite dependency heavy codebase. It isn't a deal breaker for me by any means, but it's a pain.

Re: Rust Is Surprisingly Good as a Server Language

#210

Earlier quoted context omitted.

Maybe with some heuristics, you could hide some latency by beginning to compile before saving.

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?
Post reply on HN