Live data from Hacker News

An interactive guide to learning Rust

github.com

21–30 of 55 posts

Re: An interactive guide to learning Rust

#21

Earlier quoted context omitted.

As a web developer, you can write servers that take orders of magnitude less space, memory, and CPU than a similar JS server, without having to deal with the madness that is first-time C development.

Give me something that can run ReactDOM.renderToString() faster, and I'm all ears. Until that day (and I'm kinda hoping it comes) I'm a bit stuck.

I'm not very familiar with the React ecosystem but I thought the entire point was letting the client-side handle rendering and passing structured data via API calls? renderToString() sounds like it's doing what every scripting language and templating framework has been doing for the past 20 years?

Re: An interactive guide to learning Rust

#22

Earlier quoted context omitted.

It gets you very close to native performance while running in your browser and browser sandbox. That's mind-blowing. You'd still use JS for UI stuff, but WASM lets you run algorithmic or CPU intensive tasks like e.g. games, video decoding, image resizing, AI, or anything else you need fast performance for client-side.

There was a demo the other day of Rust outperforming JS for stuff JS usually does. Presumably this will continue to improve, so it won't even be a case of equivalent, it'll be a case of "thoroughly beats the pants off".

"Very close to native" means "much more efficient than JS", because JS is nowhere near native.

(Have we really gone so far that people hear "native" and think of the browser? Like the web browser is the machine we target, and not the metal box the end user purchased?)

Re: An interactive guide to learning Rust

#23
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

If you aren't marketable and know no other languages, then yes, you should probably start in something more mainstream. Just seems more time efficient.

If you are, then it doesn't matter. Learn a new thing and try it out.

Re: An interactive guide to learning Rust

#24
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

Rust and Go are not in the same category of language. Go is garbage collected; Rust is not.

The value of a language is not defined by how experience with it looks on a resume. If that is your only concern, of course you won't find Rust worthwhile (yet).

Re: An interactive guide to learning Rust

#25
post #16
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

If your goal for learning is to just be more employable then yeah I think its a waste of time. The language is probably worth keeping an eye on though and knowing enough about it to consider it in the future if it does pick up significant traction. And to go even more off topic. I thought the go hype was kind of dying down?

Go is probably going to stay. Last when I looked at job boards, I saw a fair number of Go keywords

Re: An interactive guide to learning Rust

#26
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

Rust and Go, while really similar, kind of are different in use -- the key differntiator is memory management, and memory safety. For a LOT of applications, this isn't necessary or a big deal (see: just about every program written in a language that isn't c/c++). I see Golang replacing Java longterm and Rust replacing C/C++ (yeah, even C) due to the memory safety and preciseness + speed it offers. It may never be tru…

> Knowing X language isn't what makes a good developer, it's knowing some sufficiently multi-paradigm langauge ...

True enough as far as it goes. But in practical terms, as platforms have multiplied in number and increased in surface area, being a useful and/or marketable developer means in-depth knowledge of specific platforms. It's much harder to spin up quickly on a platform than a mere language. However well you know java, you're not going to be a useful Android programmer without a decent understanding of the gamut of Activities, Fragments, dexing, etc. Cocoa is far more the key to iOS development than is Swift (or Objective-C). Go/Javascript/Java (etc) knowledge doesn't get you more 1/10th of the way to productivity with AWS.

All this is making it increasingly difficult to be a convincing generalist.

Re: An interactive guide to learning Rust

#27
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

It depends very much on where you are in your career. If you're at the stage where you feel confident that you can maintain a living, then of course it's 'worth the trouble'. I don't know Rust, and don't imagine it's something I'll ever use professionally, but it's definitely on my (too long, and increasing rather than diminishing) list of things to learn.

If you're not yet 'secure' (no-one ever really is, but you know what I mean), then, you'd probably be better off learning something more immediately bankable, and coming back to Rust later.

Though there's no rule. An early-stage developer might have a passion/aptitude for Rust, and the resources to work hard learning it, contributing to open-source, pitching themselves at companies they've researched and like the look of, etc.

Re: An interactive guide to learning Rust

#28

The Go Tour ( https://tour.golang.org ) is an excellent guide to getting started to Go, and I really wish something like that existed for rust. I have no excuse for not being the one to make it (outside of not at all knowing Rust well enough) but I selfishly wish someone would.

https://learning-rust.github.io/index.html

https://rustbyexample.com

Re: An interactive guide to learning Rust

#29
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

For comparison, think about the python paradox [0]

[0] http://www.paulgraham.com/pypar.html

Re: An interactive guide to learning Rust

#30
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

Rust and Go, while really similar, kind of are different in use -- the key differntiator is memory management, and memory safety. For a LOT of applications, this isn't necessary or a big deal (see: just about every program written in a language that isn't c/c++). I see Golang replacing Java longterm and Rust replacing C/C++ (yeah, even C) due to the memory safety and preciseness + speed it offers. It may never be tru…

> I see [..] Rust replacing C/C++ (yeah, even C)

To me, the possibility of Rust replacing C is the most interesting aspect of the language.

(I'm not sure I see it replacing C++, but maybe competing with it; choose between evolution or revolution!)

The general hype around Rust is fascinating to me though. I assume it's mostly driven by former C/C++ programmers, but the process has been noisy enough to attract attention from the general developer community? If anyone wanted a non-GC language, C++ has been here since forever and is still being worked on. But Rust has somehow made non-GC seem cool?

> It may never be truly C speed, but from where I stand the tradeoff is worth it

I'm a Rust newbie and haven't benchmarked anything, but the sense I get from the docs is that it theoretically can be as fast depending on how much you limit yourself. Kinda like how C++ can be as fast as C, if written with care.

It would be great to see a write-up comparing Rust and C overhead, e.g. cpu/memory overhead of function calls, slices, etc.

Post reply on HN