Live data from Hacker News

Why Rust?

rerun.io

171–180 of 294 posts

Re: Why Rust?

#171
post #95

Earlier quoted context omitted.

Obviously not fast enough for Google since they literally invented a new programming language (Go) to address the compile time and runtime limitations of Java.

Of all the criticisms I’ve heard hurled at Java, compile time isn’t one of them. Have you actually used any of these things you comment on?

Javac isn't even an optimizing compiler. There's few things faster than it.

Re: Why Rust?

#172

How does Rust do at random number generation? Is there (for example) a crate for seeding random number generators?

I'm not sure if I understand your wording: "a crate for seeding random number generators"? Do you mean, "is there a RNG that you can seed in Rust"? There's a `rand` crate[0] which I believe was written by folks in the Rust project, though it's not part of std. You can seed the RNG[1]. [0] https://crates.io/crates/rand , https://github.com/rust-random/rand [1] https://docs.rs/rand/latest/rand/rngs/struct.StdRng.html#m…

Sorry, yes, that's kind of what I meant. Ultimately, I want to be able to seed an RNG with an alphanumeric string, and in other languages that means using a third-party library or writing one myself.

Re: Why Rust?

#173
post #86

Earlier quoted context omitted.

Except that cryptomoney isn't adding insane amounts of value in any niche, outside of extortion and evading government controls.

Evading government controls sounds like a valuable attribute.

oh hi there, would you like to hire a few super expensive accountants to optimize taxes like the other big corporations?

(in case it isn't obvious, yes, I fully agree that evading government control/taxation is a hugely lucrative market).

Re: Why Rust?

#174
post #50

Earlier quoted context omitted.

It's a bubble, 99/100 crypto companies are going to crash and burn, or already have. If you manage to land on the 1/100 that actually does something useful and survives, well, better odds than the lottery I suppose.

> It's a bubble, 99/100 crypto companies are going to crash and burn, or already have. I'm sure this is the 990th time that I have heard this. The fact is, it isn't going away and it seems even more crypto companies have taken interest in using Rust and that is good. Even some (crypto) companies are sponsoring the Rust Foundation as silver members. Nothing wrong with that. [0] [0] https://foundation.rust-lang.org/mem…

Well, considering that 90% of all startups fail, that number isn't unrealistic

Re: Why Rust?

#175
post #9

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

Yeah? I was excited about C++, when I learned it. Basically all the performance of C, and the standard library included a vector class? And linked lists? And trees? And strings? I don't have to manually manipulate char pointers anymore, and can just say foo + bar to concat strings? Sign me up.

(Does C++ have its warts? Absolutely. But it's a huge productivity boost over C.)

Re: Why Rust?

#176
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.

Erlang doesn't have enums.

Re: Why Rust?

#177

As someone who's not the biggest fan of Rust because of its complexity. There is a big reason to use it today. If you need to use something that has safety guarantees where it's possible to achieve acceptable performance in certain classes of programs where languages like golang, nim or crystal have trouble achieving then I just don't see any other options out there certainly not one with as many libraries available…

Yeah even if I'm a big fan of ML family lang, complexity to solve memory safety is too much to the point Zig is more appealing in way that helps you do it yourself more easily.

Oh, I forgot about Zig. I haven't had a chance to really check it out yet.

As far as memory safety do you think it would be a good idea to write something like say a http server or client in Zig?

Re: Why Rust?

#178
post #117

I don't understand why everyone seems to ignore Ada? Granted I am completely new to it, but from what I see it is years ahead of Rust in terms of safety (it can prove correctness!! Rust is only heading into that direction). Yes syntax is verbose, but I dare to believe there must be another blocker than just syntax?

For me it's the borrow checker and lack of shared mutable states stopping me from doing dumb things. Add on things like cargo build manager and crates and it's like a delicious roast dinner smothered in gravy.

I've written in Ada95 back in college and it was great but I'm like a duck in water with Rust.

Re: Why Rust?

#179
post #31

Earlier quoted context omitted.

> Too bad most of the Rust jobs right now seem to be in crypto. What is the problem with that?

It's a bubble, 99/100 crypto companies are going to crash and burn, or already have. If you manage to land on the 1/100 that actually does something useful and survives, well, better odds than the lottery I suppose.

True, but that's the investor's problem, not the employees. They'll end up losing their jobs in the end and move on, but it's not like people in other tech company never lose their job either. The good thing when it eventually happens is that there will be a lot of senior Rust developers that are needed by most company to even start doing things in Rust.

Is their work pointless? Sure. But aren't Googlers' jobs not pointless too? That's the sad state of the 21th century: most people have a bullshit job but they need it to pay their mortgage.

Re: Why Rust?

#180
post #30
post #12

> Rust's enums and exhaustive match statement are just amazing ADTs + pattern matching are the killer feature set that makes the more popular functional languages so damn pleasant to use, and they're starting to spread to more and more languages. I suspect that, 50 years from now, we'll look back and see them as the key paradigm shift of this era.

ADTs is last missing piece that would make me fully content with Go :)

aren't interfaces technically an abstract data type?

EDIT: ah, it's algebraic data types, my bad, apologies.

Post reply on HN