Live data from Hacker News

How I went about learning Rust

eli.thegreenplace.net

91–100 of 303 posts

Re: How I went about learning Rust

#91

Earlier quoted context omitted.

> there's no job in [Rust] As of today, indeed.com lists 1,500 remote jobs mentioning Rust vs. 4,018 jobs mentioning Golang. That's not so bad. (However, there's no way to tell how many of those listings are Rust-specific as opposed to polyglot job descriptions.) > Also, the [Rust] community is toxic. Speaking slightly humorously, if you think Rust community is toxic, try expressing your dissatisfaction with Swift or…

Most "jobs mentioning Rust" are in the crypto space for some reason. I can't fault devs for thinking that such "opportunities" are just not very serious compared to the alternatives.

I agree that crypto indeed started out as a dumb, speculative, monetary technology, but it is currently moving toward smart-contract, non-speculative applications, such as guaranteed voting or transfer-of-ownership systems. Crypto indeed started out as a nonsensically power-hungry technology (via Proof-of-Work), but it is currently moving toward power-friendly infrastructure (via Proof-of-Stake). I think the crypto sector will slowly become more and more interesting, employment-wise. For example, how about writing a single contract that is understandable not only by a machine, but also, at the same time, by a judge in a court of law?

Re: How I went about learning Rust

#92
post #78

Earlier quoted context omitted.

It could suggest a travelling rust learner in the same way that swordsmen in feudal Japan used to perfect their art by travelling around.

Ha! That's funny. I hadn't thought of that. I may be mistaken, but I think to be correct in that context, it would need a comma: "I went about, learning Rust"

The comma is not necessary for it to be correct, but with the comma the meaning is a bit different still.

Re: How I went about learning Rust

#93
post #3

I have been thinking to myself whether I should pick up Go or Rust as a new language this year. Coming from a NodeJS background, Rust looks a tad more complicated but it looks cooler. There are also more job listings looking for Golang than Rust which makes me wonder if Golang might be a more rewarding investment? What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially l…

I enjoy writing go a lot more then I enjoy rust. Rust is... dense. It's a lot harder for me to read code and understand what it's doing. That said, I feel that Rust is likely the winner long term. So I'm still building my rust skills, but programming personal stuff in go.

>That said, I feel that Rust is likely the winner long term.

Interesting; why do you think so?

Re: How I went about learning Rust

#94
post #71

Earlier quoted context omitted.

I mean it depends . Many of aspects of Rust that are perceived as sharp edges are in fact the programmer bringing in their preferences and paradigms from other languages and trying to program that way in Rust. I was one of those and tried to do OOP in Rust. It was a pain. At some point I gave up and was like: "Okay Rust, I do it your way, I just want this to work". And it worked flawlessly and easy. I literally had t…

Rust actually supports most OOP features, with the main exception of implementation inheritance. And implementation inheritance is a nasty footgun in large-scale software systems (search around for: "fragile base class problem"), in a way that just doesn't apply to simple composition and pure interfaces (traits). So it's hard to fault Rust for including the latter and not the former.

For me, one of the main reasons to use OOP is dynamic dispatch / runtime polymorphism. I have not spent much time with Rust, but it seems like that is a bit cumbersome there, and doesn't exactly work like you would expect from Java, C++, Python, ....

I mostly use OOP when I have a bunch of Foos and Bars, and want to treat them differently in some places. Instead of having ifs in each function, I use inheritance, and override the methods that I want to treat differently. It's mostly about heterogenous containers and avoiding explicit ifs. When you use it that way, it's safe and convenient and I've never ran into the fragile base class problem or other typical issues.

Re: How I went about learning Rust

#95
post #39
post #9

Earlier quoted context omitted.

As someone with extensive experience with Rust and a teensy bit of experience in Go I can tell you that I adore Rust for every use case I’ve tried it out for *except* for network services. It works ok for low level proxies and stuff like that; but Python/Flask-level easy it is not. Meanwhile my experience with Go has been the reverse. I’ve found it acceptable for most use cases, but for network services it really sta…

Yes. Rust is for what you'd otherwise have to write in C++. It's overkill for web services. You have to obsess over who owns what. The compiler will catch memory safety errors, but you still have to resolve them. It's quite possible to paint yourself into a corner and have to go back and redesign something. On the other hand, if you really need to coordinate many CPUs in a complicated way, Rust has decent facilities…

Regarding concurrency and Go, it's truly an awful language from the view of concurrency when coming from Rust. It's a loaded footgun where you have to keep tons implicit details in your mind to get it right.

https://eng.uber.com/data-race-patterns-in-go/

Re: How I went about learning Rust

#96
post #71

Earlier quoted context omitted.

I mean it depends . Many of aspects of Rust that are perceived as sharp edges are in fact the programmer bringing in their preferences and paradigms from other languages and trying to program that way in Rust. I was one of those and tried to do OOP in Rust. It was a pain. At some point I gave up and was like: "Okay Rust, I do it your way, I just want this to work". And it worked flawlessly and easy. I literally had t…

Rust actually supports most OOP features, with the main exception of implementation inheritance. And implementation inheritance is a nasty footgun in large-scale software systems (search around for: "fragile base class problem"), in a way that just doesn't apply to simple composition and pure interfaces (traits). So it's hard to fault Rust for including the latter and not the former.

> Rust actually supports most OOP features, with the main exception of implementation inheritance.

I've tried some basic OOP.

Fields from the base class need to be redefined in each child, and making shared methods private require an ugly workaround. Both concepts are very basic OOP concepts, not advanced or inherently/tendentially dangerous, and the results is that even basic Rust OOP requires a lot of boilerplate. It's workaroundable with macros if one wants, although they have some limitations, and I guess this is the reason why the macro approach is not widespread.

Some devs use composition to emulate it, but the result is another form of boilerplate (very noisy builder patterns).

Regarding "non-basic" OOP features, I remember that Rust GUI framework programmers uniformly complain about Rust not being appropriate to translate the OOP hierarchies typically used in GUI frameworks, so the gap is significant (this is not inherently bad; not supporting OOP can be a respectable choice, but matter of factually, this does create a gap in some cases).

Re: How I went about learning Rust

#98
post #3

I have been thinking to myself whether I should pick up Go or Rust as a new language this year. Coming from a NodeJS background, Rust looks a tad more complicated but it looks cooler. There are also more job listings looking for Golang than Rust which makes me wonder if Golang might be a more rewarding investment? What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially l…

> What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially lesser monetary reward?

Anything where low-level control is required. It's not clear if there are true-Rust web apps in the wild (as opposed to web apps with some services in Rust); as far as I read, Rust web programming is ugly.

The market still offers few positions, largely dominated by crypto. I have the impression that it will still take many years before the field will move to Rust (where appropriate).

> Any advice on which I should pick as a new language to learn?

Depends on the concrete goals. If you want to make a career, Golang is the safe bet, by a very long stretch. If you want to have fun, try both, and you'll naturally find your inclination, as they have a radically different flavor.

Re: How I went about learning Rust

#99

Earlier quoted context omitted.

I think rust is the new haskell. After spending 7 months learning it, I can say I really enjoy the language, but there's no job in it and in my opinion, they take academic decisions that make the language way more complex than it should. Also, the community is toxic. For example, generics in Go were criticized by some, praised by others. You have the feeling that you can freely share your opinion in the go community…

> but there's no job in That's just not true. Rust got already adopted by lot of either big or interesting to work at players (Amazon, Microsoft, DropBox, ...?) and, while anecdotal, I myself get also paid to program rust. > the community is toxic. > In the rust community, just like a sect, everybody must say that everything is just perfect. I often get the opposite feeling with all the diverse and lengthy discussion…

> Rust got already adopted by lot of either big or interesting to work at players (Amazon, Microsoft, DropBox, ...?) and, while anecdotal, I myself get also paid to program rust.

There are very few open positions, though. Just check out the Rust newsletter - the open positions for each release can be counted on one hand.

I have the suspicions that Rust positions are typically filled in-house. Shopify, for example, adopted Rust, but AFAIK they did not hire anybody external to do so (nothing wrong with this, of course).

Re: How I went about learning Rust

#100
post #14
post #3

I have been thinking to myself whether I should pick up Go or Rust as a new language this year. Coming from a NodeJS background, Rust looks a tad more complicated but it looks cooler. There are also more job listings looking for Golang than Rust which makes me wonder if Golang might be a more rewarding investment? What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially l…

Rust is the more elegant and powerful language. Creating a new language and repeating the "billion dollar mistake" by including null (sailing under the brand name "nil" in Go) is just crazy. Error handling is another strange thing in Go. And generics have been only introduced recently, but there is hardly any support for libraries in it (now). While Go is definitely fast enough for most scenarios, it is not the best…

> Creating a new language and repeating the "billion dollar mistake" by including null (sailing under the brand name "nil" in Go) is just crazy.

Can you explain? What do I set ‘score’ to when someone hasn’t sat the test yet?

Post reply on HN