Live data from Hacker News

I love building a startup in Rust but wouldn't pick it again

propelauth.com

241–250 of 496 posts

Re: I love building a startup in Rust but wouldn't pick it again

#241

Earlier quoted context omitted.

Why do you say logistically no? The challenges of distributing the runtime?

There's no runtime to distribute with modern C#.

Are you referring to the “compile to a big executable” feature?

I’d love to use C# without having to deal with distributing the runtime, so I’d like to hear more!

Re: I love building a startup in Rust but wouldn't pick it again

#242
post #69

Question for HN, all things being equal (you are not more familiar with one language/framework) what language would you choose to build a startup in?

Java or .NET platforms, hardly anything else comes close in languages, tooling and libraries.

Agreed, those are the ecosystems that "just work".

Re: I love building a startup in Rust but wouldn't pick it again

#243
post #37

If you're thinking about building something in Rust, a good question to ask is, "what would I use if Rust didn't exist?" If your answer is something like Go or Node.js, then Rust is probably not the right choice. If your answer is C or C++ or something similar, then Rust is very likely the right choice. Obv, there are always exceptions here, but this helps you work through things a bit more objectively. Rust can be a…

Not sure I agree with Go vs Rust. I think if you would choose Java or Python or C#, then Rust might not be the right choice.

I wouldn't group python with java and c# either. Quite different beasts

Re: I love building a startup in Rust but wouldn't pick it again

#244

Earlier quoted context omitted.

Go belongs in the exact same bucket as Java and C#.

Ergonomically, yes. Logistically, no.

For server binaries they're typically being dropped into Docker containers not scp-d to servers directly, and the moment you go there you can just use jib and get a JVM container easily so there's no difference in logistics.

For CLI tools whilst a single binary can be convenient, native-image lets you get those for JVM programs too these days. But it's not always the case that it's enough. In practice you will often hit the need for:

a. Cross platform / cross builds.

b. A way to easily update them for your users (that isn't "everyone mount this NFS/SMB drive")

c. Ability to ship other files e.g. third party libraries written in other languages, config files, data files, readmes ...

d. Possibly, avoiding virus scanners and Gatekeeper if you have users on Windows/macOS.

Conveyor [1] does support distributing CLI tools (in any language) that can then be updated via apt-get, the Windows package manager or Sparkle on macOS. If your language/runtime supports cross-building then it can do it all from your developer laptop, you don't need each OS to build for. The resulting artifacts are single files (deb, msix/exe, zip) and it supports both self-signing and regular signing if you want that.

It provides a few other neat features on Windows:

• One click install that immediately adds new tools to every single terminal session without needing restarts.

• If you want, silent background updates Chrome-style. If you don't, manually triggered updates.

• For JVM apps specifically it automatically configures the Windows terminal to support ANSI escapes, Unicode and other modern features so you can use all the same stuff as on UNIX without needing to futz around with win32 or wrappers.

Unfortunately the little default GUI that lets you trigger updates and add CLI tools to your path on macOS isn't officially launched yet, because it only works for JVM apps and not other types of program. But if anyone wants to try it just let me know, it's easy to activate.

If you don't need any such features then yes, a single binary can be a bit more convenient than a zip. But the number of situations where it breaks down is pretty high and it's not so hard to handle multiple files.

[1] https://hydraulic.software/

Re: I love building a startup in Rust but wouldn't pick it again

#245

Earlier quoted context omitted.

Sometimes matters, e.g. when you deploy new code.

How would real-world JVM startup times matter in deployments?

You reboot and suddenly your CPU is at 100% for 20 minutes starting every web service...

Re: I love building a startup in Rust but wouldn't pick it again

#246

Earlier quoted context omitted.

> Note that people now consider that as a mistake, people prefer having Exceptions be hidden instead of explicit and requiring handling like that. What people? Please tell me where they’re at so I can tell them they are wrong (lol) But seriously, I could not disagree more.

The designers of the Java functional and stream library for one. None of the functional contracts have throws. So you are forced to have un-checked exceptions for everything, unless you want a truly mind-boggling amount of try-catch everywhere which will rapidly exceed your normal code by factor of 2x-3x.

... or you can just use a sane FP library like

https://github.com/paulhoule/pidove

Some people don't like the Lispy signatures so I did start coding up a version with with a fluent interface but didn't quite finish.

Overall I would say the implementation of lambdas and method references in Java 8 was genius, but the stream library was a big mistake. Part of it is that has this cumbersome API that in principle would let it optimize query execution by looking at the pipeline as a whole but doesn't really take advantage of it.

Re: I love building a startup in Rust but wouldn't pick it again

#247
post #169

Earlier quoted context omitted.

Sometimes matters, e.g. when you deploy new code.

Not really, just do a rolling deployment like you should be doing anyway. No one cares if the new version takes 1 millisecond to start up or 3 seconds because they literally won't notice.

But 3 seconds isn't on the table. It is more like 20-30 seconds on a medium sized app and 8 seconds for a small one.

Re: I love building a startup in Rust but wouldn't pick it again

#248
post #182

I don't agree. I think the author is conflating two things: 1. learning Rust, and 2. using Rust. If you take away "Rust made us slow because our team had to learn how to use it and thus we had slow iterations and it's harder to find hires with Rust knowledge" from the equation, then you aren't left with much argument against using Rust early. The iteration time issue with Rust is solved by experience. We use Rust and…

The author touches on why it matters in the article - either you have to restrict hiring to folks who are already rust experts (much smaller hiring pool, also usually meaning higher comp expectations) - or you have to consider the cost of training new/existing staff on Rust. Rust has a notoriously difficult learning curve, especially to folks who don't have a background in C/C++. As the author mentions, you may be looking at 6+ month ramp up time until new hires can comfortably write non-throwaway tech-debt free production code. For many startups looking to iterate quickly, that's just too slow.

Conversely if you are looking to hire Java folks, you'll have an enormous pool to pick from, or if you need to train somebody in eg Go - you can do that significantly quicker than you could with Rust.

Re: I love building a startup in Rust but wouldn't pick it again

#249

Earlier quoted context omitted.

Not the fault of Rust compiler per se but in my case the errors that mismatching trait impls from async libraries yield can be downright suicide-inducing. I recognize this is not entirely on rustc though.

Having examples of these is useful to see what we could get rustc to do. The general case might be impossible to deal with in a generic way, but we can target specific patterns libraries use and emit custom errors for them. The problem with these is we have to be reactive: if we don't see a problematic patter ourselves (or it isn't reported to us), we can't do anything about them.

Unfortunately last I tried these code snippets was months ago, was rushing like mad because it was a startup and I couldn't afford to just stop and write everything down and... yeah, priceless info was lost.

Just recently I am making a comeback to rewriting a tokio 0.1 library to the latest version so I'll likely have a few examples that I can post... where? In GitHub issues?

Re: I love building a startup in Rust but wouldn't pick it again

#250

Earlier quoted context omitted.

How would real-world JVM startup times matter in deployments?

You reboot and suddenly your CPU is at 100% for 20 minutes starting every web service...

If your CPU is at 100% for 20 minutes starting every web service, that is definitely your problem, not Java’s problem.
Post reply on HN