Live data from Hacker News

Why Rust?

rerun.io

151–160 of 294 posts

Re: Why Rust?

#151
I saw a YT video about how safe Rust is. I want to give it a try but I do mainly web applications, where I use Spring Boot and front-end frameworks. From what I have read Rust is better for system level or regular applications (not web apps). Can modern web applications be built efficiently with Rust? And by efficiently I mean, is the ecosystem there (libraries and tools).

I imagine the following would be needed..

1) Spring MVC like library for interfacing with HTTP requests.

2) DB ORM or ORM like. DB libraries for any possible DB.

3) centralized logging. e,g, Logback that forwards all logs to ELK.

4) Dependency injection.

5) Versatile configuration system. Similar to Spring configurations.

6) AWS SDK.

7) Commons like libs like Guice or Apache Commons.

stuff like that.

Re: Why Rust?

#152
For someone like me that's an experienced programmer but relatively new to Rust, what are some open source Rust projects that could benefit from some help?

Re: Why Rust?

#154
post #16

> Rust's enums and exhaustive match statement are just amazing, and now that I'm using them daily I can barely imagine how I could live without them for so long. I feel this! I absolutely love rust's fancy enums - i.e. not just a set of constants, but where each variant can be a full fledged type of its own, and how you have to handle every case whenever you're matching on it. It dovetails absolutely wonderfully with…

Scala, Kotlin, Haxe, Swift, and several others. The search term you want is "Algebraic Data Types" Erlang has the superpowered version of this - binary pattern matching, that lets you pattern match on a bitstream directly.

Don't forget Java :)

Re: Why Rust?

#155
post #9

This must be how people felt about C++ in the beginning ...

I actually remember that time! C++ rode on a wave of OOP hype. It was all about that, packaged into something people were kind of familiar with. OOP WAS THE FUTURE, MAN!

C++ was C with a better interface for GUI widgets and generic templates.

There was a lot of hype about OOP too, but I am not sure it was ever adopted because of it.

Re: Why Rust?

#156

Earlier quoted context omitted.

Quoted post unavailable.

Exceptions are invisible though? (unless you're using checked exception in Java, which nobody does and neither python nor C++ offer). I've personally found unexpected exceptions being thrown to be one of the main causes of unreliability in production applications I've worked on. Of course you can have a blanket catch statement so it doesn't entirely crash your app, but that doesn't compare to the Rust experience wher…

> I've personally found unexpected exceptions being thrown to be one of the main causes of unreliability in production applications I've worked on.

Python has a serious problems with this. Not only are exceptions not documented, they are also thrown by normal execution, so you can't just say "something serious happened here, go to the recovery".

Re: Why Rust?

#157
post #59

Earlier quoted context omitted.

I imagine if you're not a cryptographer, you don't have a chance getting those jobs.

You'd be surprised. Most legitimate cryptographers I know won't touch this space with a ten-foot pole. That should you to guess who the people actually implementing it are.

Sorry to be explaining the joke, but I think GP (deliberately) misunderstood what was meant by the term "crypto".

Re: Why Rust?

#158

Earlier quoted context omitted.

In which way is that incorrect? How can you, when reading Python code, know whether it may error? Or is your point that Rust code can panic too, without it being clear from reading the code?

Except for the maybe simplest variable initialization, I always assume that if it exists, it may error. “Won’t error ever” doesn’t exist in the real physical world. (See also: halting problem.) The “invisibility” of errors in languages that have first-class exceptions usually means that exceptions are being somehow swallowed without being handled properly. Shit happens, and the program happily chugs along regardless,…

> See also: halting problem.

The one that can be solved for the overwhelming majority of code people write on real life?

Re: Why Rust?

#159
post #87
post #70

> By using Rust for both our frontend and backend, we have a unified stack of Rust everywhere, simplifying our hiring. > I can write web apps in another language than JavaScript > I can write web apps that are fast Yeah, this is what's worrying me. If you look at rerun.io website, you will notice that it's built with Next.js, i.e. is using a React framework to build pages that have no interactivity whatsoever. Next.j…

Rust will never make it to the frontend at scale. There is a reason why JS was invented. People doing frontend dev don't want to bother with slow compile time or 3 strings implementation. And the fast argument is missleading at best, every modern language are "fast" enough, if Amazon and Google runs Java that mean it's fast enough for 99% of workload.

> People doing frontend dev don't want to bother with slow compile time or 3 strings implementation.

As someone doing both, my frontend JS/react pipeline has noticeably longer compile times (both to build locally, and for users rendering client-side) than my server-side one.

> There is a reason why JS was invented.

JS isn't here because it's "fast". JS is here because it shipped in browsers, and browsers were popular. JS got fast, after lots of people put a ton of effort into their JS implementations for almost two decades straight to make it so.

(See https://blog.mozilla.org/javascript/2012/12/04/arewefastyet-... from ten years ago as just one of many, many examples)

Re: Why Rust?

#160
post #87
post #70

> By using Rust for both our frontend and backend, we have a unified stack of Rust everywhere, simplifying our hiring. > I can write web apps in another language than JavaScript > I can write web apps that are fast Yeah, this is what's worrying me. If you look at rerun.io website, you will notice that it's built with Next.js, i.e. is using a React framework to build pages that have no interactivity whatsoever. Next.j…

Rust will never make it to the frontend at scale. There is a reason why JS was invented. People doing frontend dev don't want to bother with slow compile time or 3 strings implementation. And the fast argument is missleading at best, every modern language are "fast" enough, if Amazon and Google runs Java that mean it's fast enough for 99% of workload.

Our TS frontend compile times are worse than our Rust compile times.
Post reply on HN