Is this language worth learning? it's got a cute book cover

is this language worth learning? it's got a cute book cover

Attached: 20180708rustbook.png (502x668, 441K)

Other urls found in this thread:

benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fast.html
blog.rust-lang.org/2017/09/05/Rust-2017-Survey-Results.html
piston.rs/
github.com/rust-unofficial/awesome-rust
youtube.com/watch?v=kdlIlIIHCz0
twitter.com/SFWRedditGifs

Yes. I should get my physical copy soon. Rust is the future.

Any books for non-retards? Take Haskell, a language that is interesting because of all the big brane concepts implemented, yet it is taught separately from any type theory. Purposely dumbed down. No. fuck this you brainlet faggots.

that's a cute crab

It's interesting and has a use case, but it's useless for 99% of projects where you want productivity and on't give two shits about performance or multithreading

under da sea~

I like that the crab is doing a roman salute.
Otherwise Rust is completely useless, and written by Ruby-programming, latte-sipping queers.

There are a lot of good languages out there, but at the end of the story it's useless to learn the basics of 100 languages, it's more difficult but more useful to learn 3 languages top and have a good grasp of them. Rust might be the future, but why not learning C? Rust seems something new, but until now you can have endless possibilities learning C. Programming is always about learning, you will never end up learning a language and get comfy. My advice is to learn what's hot now, when something new we'll peek up, you'll have time to learn new things

Every book of that editor has cute cover.
Learn Python!

Yes you should totally learn Rust so you can become a useless programmer who doesn't know how to manage their own memory.

Why do people think Rust is useless? No meme answers please?

for some reason Jow Forums is full of people who write exclusively drivers, kernel modules and operating systems

There are no non meme arguments against Rust except for maturity.

In practice the minor annoyances of making predictable abstractions allow you to be much more productive on Code that needs optimization.

In my experience, those people are actually excited about Rust and the other language in the space.

Even that one hardened kernel vet I know was fawning over it when I expected nothing but the same acorn he gives sepples.

Always do the opposite of what Jow Forums says.

>Always do the opposite of what Jow Forums says.
Well, that's the reason why I don't touch rust

I don't know about the book.
But Rust is definitely worth learning. It won't give you job nor money, but it will teach you some good practices to avoid potential runtime bugs in your code. And it's a fast and efficient language without any deprecated legacy, and has a nice dependency manager.
It's pretty good if you want to write some efficient physical or rendering library as part of your project.

>useless for 99% of projects where you want productivity and on't give two shits about performance or multithreading
Just like C. Always choose suitable tool for given task. Rust has same usecase as C and C++.

>using Rust without understanding how memory works
Sounds like masochism. If you don't understand how memory works, Rust compiler will beat you to death before you manage to compile anything more than hello world.

Most of people who hate Rust are just Jow Forums-tards who do it because muh politics. They don't even know it, I've seen so many times people complaining about GC, even though Rust doesn't even have one.
It's as useless as there is barely any jobs. But for hobbyist projects and practicing it's pretty good.

That's perfect usecase for Rust though.

>iamverysmart

>Most of people who hate Rust are just Jow Forums-tards who do it because muh politics.
At least their CoC isn't as bad as the FreeBSD one
and written by people from the geek feminism wiki

>Rust has same usecase as C and C++.
That's not correct. Rust is a safe language, which means it's only appropriate for business logic at the application level. Systems programming can only be done in an unsafe language so you need to drop down to C/C++ for performance, talking to hardware, or doing anything with threads.

I haven't dug into Rust, but isn't its main selling point that the safety is enforced at compile-time? As such nothing makes it "unusable" for systems programming, and its performance seems to be improving as well.

Its performance is fundamentally unacceptable for systems programming because it does implicit bounds checking at runtime.

Ok then. If it's never gonna reach C-like performance then I guess its niche really is rather limited. In my experience you either need every last bit of performance, or you don't and you're free to use any decently fast high-level language.

See? Now you're getting it. Now you can go tell everyone whats wrong with Rust

That's not how it works. Java and C# are the languages for business logic at the application level. They are safe at costs of performance, they run on virtual machine(at least Java does) as an abstract layer.
Rusts safety comes from compile-time checks which doesn't allow you to write any safe code that could potentially violate memory or thread safety.

>Systems programming can only be done in an unsafe language so you need to drop down to C/C++ for performance, talking to hardware, or doing anything with threads.
Rust has unsafe for this very reason.
>inb4 what's the point of using Rust if you use unsafe
The point is to reduce dangerous code to minimum and hide unsafe internals under a safe interfaces. You should end up with a code that has very little places where things can go wrong(this practice should not be limited to Rust only). Compiler just helps you with it.

Rust performance is very close to C/C++.
benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fast.html

If bounds checking makes so much difference in the algorithm you use and you are sure nothing can go where there, just put it behind unsafe. Try to keep unsafe code to minimum though.

Unsafe Rust still can't reach the performance of C, and even if it could, there would be no benefit to writing that instead of C.

Even if rust could achieve same performance as C or even better, it would be difficult to convince people to migrate their already existing large code bases to Rust.

Getting safe Rust to be at least as fast as C is a matter of getting their LLVM IR emitter together. It will decide if they can walk their talk or if they are just another Hasklel which can't create a good compiler 30 years after design.

LLVM can't fix something if it's broken because of its design.

what for?
It's pretty good as a language, but there's a few caveats in lack of maturity, meaning there's little industry adoption. It's somewhat popular amongst hobbyists, though.
I wouldn't listen to points about speed, the language is maybe slightly slower than C++ depending on use case, but is much more "expressive" than something like C. Tooling is generally good, but again, might lack maturity.

What's wrong with GHC? It does a pretty good job of transforming Haskell into something that runs well on a von neumann machine, it's pretty much alien tech IMO.

The standard library and core are still being changed and a lot of useful features are in the nightly branch
Those have been my main source of headaches while writing a hobby OS in Rust.

Wow, its like you haven't even written Hello World in rust and don't know what the unsafe keyword does.

>Wow, its like you haven't even written Hello World in rust and don't know what the unsafe keyword does.
wow, it's like every single rust thread

>maturity
To expand on that, all the tooling is extremely buggy, the compiler will just break on certain code like having a "break" or "continue" statement in the size field of an array literal, its error messages can send you down rabbit holes that have nothing to do with why your code won't compile, platform support is nonexistent outside of x64 desktops, it can't even build itself on x86, they don't bother trying on less mainstream platforms like MIPS, there's no standardized indentation (tabs/spaces argument is ongoing) and you can't autogenerate bindings to a C++ template library and have them just work

That's true and it probably will never happen.
However nothing stops people from using it in new systems. Just like dropbox, firefox, wire, etc are doing.
Also C FFI is really easy in Rust.

It's because you talk nonsense. If you really think Rust is best suitable for applications, it means you have never really used it. It's a system programming language.

>they don't bother trying on less mainstream platforms like MIPS
Well, I can't say for other platforms, but I've successfully compiled Rust to WebAssembly. There is even "native" SDL 2 support.

I've been interested in learning rust for game development. There are engines out there already but no concrete products that can tell me how good those engines are so the task seems more complicated than that it's worth.

Attached: 1418320507720.png (1149x910, 1.66M)

Rust is not best language for gamedev, but it would be good for a game engine.
If it's just a simple prototype, you should be fine with SDL 2. But if it's something more ambitious, you might want to consider Unity or game maker. Especially if you have lost motivation even before you pick the tool you want to use.

>It's because you talk nonsense
I'm not that user, I was just pointing out that Rust threads are filled with such fud

I'm specifically interested in rust because I want to develop this engine that will squish the most out of integrated graphics and low end GPUs so rust's multi-threading may help but that's just adding more work to this matter.

>I haven't dug into Rust, but isn't its main selling point that the safety is enforced at compile-time?
Yes.

>As such nothing makes it "unusable" for systems programming, and its performance seems to be improving as well.
What makes it unusable for systems programming is that the compile-time safety is quite limited, and forbids a wide range of sensible ways of doing things that come up a lot in systems programming. Using unsafe operations for all of that is to make rust practically useless.

As a programmer you use the right tool for the right job, and that tool isn't Rust. A game engine should be written in C++. Lucky you, they already are.

It's always good to decide whenever you want to make a game or engine. You probably will never finish if you do both at the same time.
I've used Rust for multi-threaded rendering and low level communication with GPU(pic related). It was fun and not particularly hard. Multithreading is nice, but it's just like in other languages based on threads and channels.

Attached: frac.png (1920x1080, 569K)

Threads are where Rust performance is hit hardest, it's not made with concurrency in mind

How so?
Large part of Rust safety system is to prevent data/condition race. Intuitive mutexes, inability to create multiple mutable references, Arc, etc it all was designed with multi threading in mind.

>squish the most out of integrated graphics and low end GPUs so rust's multi-threading may help but
Multithread performance is largely irrelevant with regards to GPU performance.

it's clearly made with concurrency in mind when type system ensures thread-safety

The only thing it "ensures" is that you'll never write a useful program

False. Look at the current rust ecosystem. Several great libraries for different fields of programming.

What ecosystem? Everything is version 0.3

That's true but they are still great libraries and remember: Rust has been only out for about 3 years. It needs time to gain traction.

Every popular technology I can think of became popular overnight so it sounds like Rust has died on the vine before it even got out of beta

blog.rust-lang.org/2017/09/05/Rust-2017-Survey-Results.html

Not the person you are responding to, but this is just factually incorrect. It is already being used to write very useful programs. Just because YOU can't write useful programs in it doesn't mean that professionals can't. Because they can and are. I mean, none of us who like Rust are dumb enough to believe it will replace C/C++, but there very clearly are incentives to use it since it is beginning to be used in major projects.

>Every popular technology I can think of became popular overnight
No programming language has

I am literally a super-genius, deal with it brainlet

I think Java pretty much exploded in popularity once 1.2 got released, but I don't know.

No. Learn Ada instead

>dumb crabbyposter


based crabbyposter

Attached: 1449948441928.png (700x400, 12K)

it's about as worth learning as any other language.

if you
1. have something you want to program
2. could use rust for it
3. generally like rust's approach
then yes.
otherwise there's probably not much use in learning rust just to learn that language.

>I've used Rust for multi-threaded rendering and low level communication with GPU(pic related). It was fun and not particularly hard. Multithreading is nice, but it's just like in other languages based on threads and channels.
That sounds nice, maybe my idea has a future.

It happened with Java, and it is happening right now with Go.

Actually learning Rust here, and finding the language rather easy to write and compile
And am thinking about buying a dead-tree book, but the actual online 'book' seems to be just fine.

Anybody who actually fucks with this language want to recommend some good external libraries/crates?

And fuck those who say "There is no use in learning the language", have you considered the amount of effort it takes to learn a language? Rust seems easier than Python 3 or C to me.

piston.rs/
Have you given this a look?

>Have you given this a look?
yeah, nothing particularly interesting has been done with this engine, I'd live to try stuff with it later on.

Considering how new both the language and the engine are, I'd be rather surprised if there was anything more advanced than a minecraft clone.

github.com/rust-unofficial/awesome-rust
For anyone who has learned some Rust, this seems like a pretty good pile of resources.

>Rust seems easier than Python 3 or C to me.
It's more difficult than both combined. It's even more difficult than C++. You have to understand every feature of Rust before the compiler will let you write a single program. Its creators learned much from Haslel.

Only if you like dicks in your anus

> Its more difficult than C/C++
In whut way?
The structure is very similar, commands are similar, as far as my untrained eyes can tell.

> You have to understand every feature of Rust before the compiler will let you write a single program
> every feature
You mean its rather aggressive safety net they include in the complier? I'm not in 100% agreement on it, but I can write simple programs without reading entire libraries, and use commands without understanding every feature without errors stopping me.
Or maybe its just your lack of understanding in the language, or attempt to write it like its C, or simple retardation, stopping you from writing simple programs?


I continue to read documentation and libraries, both included and external, and am now starting some of the various programming challenges, like a re/g/ular guy while my skills improve
Am I doing good, guys?

Attached: cmonitsnothard.png (500x500, 77K)

The number of traps, sock threads and similar here, do you really think Jow Forums isn't for Jow Forumsay?
Or are traps not gay?

C++ is better than C for most tasks.
youtube.com/watch?v=kdlIlIIHCz0
Bisqwit gets it.

I've heard it's great for homosexuals.

Cool, how is this relevant to conversation at hand?

I meant to (you) the relevant person. Hm, the actual discussion? Well, Rust could see some use as in application development. It's better than React Native and it's leaner than C++ for now. If I was writing some dumb fucking app, I'd try Rust.

I'm just hoping Rust continues to remain relatively lean.
Can I just say I like it and I want to use it?

How can you like it if you've never used it user

Not him, but I understand what he means. He likes the idea of it. That's pretty fair to say without having used something.

Are you talking full-fledged application development or the little bullshit I've been messing with? I'm by no means a programmer user...

Just realized I mistyped there, 'want' to use it makes it seem like I've never used it. I'm presently learning to use it, and I think its pretty good, is what I meant to say

make sure to buy programming socks while you're at it

Attached: rust.jpg (381x499, 57K)

Is there any decent information out there about using Rust's C FFI to access C libraries? The official documentation is pretty thin.

>he's not a trans girl yet

This. What is the point of rust when Ada exists? Ada was designed for safety before anything else. Virtually no language will be as fast as well-written C, but maintainability matters more than speed if more than one person is involved in development. Ada is very easy to read - with the type safety and verbosity it has, it's hard to look at Ada code and *not* know what's going on.

To top that, it was developed with concurrency in mind, even to the extent of distributed systems. There are multiple runtime levels available, so if you think (for example) runtime bounds-checking is too bloated, you can disable it! Its like the Rust developers needed a car, found a car, disliked only the door handles and so they decided to design a car from the ground up. I just don't get it.

Rust interfaces "toll-free" with C. Does Ada? I'm not asking rhetorically. I've never even heard of Ada, so I don't know.

I used Rust a lot last year for a research project. It was designed very well, and it was a good tool for the job, is all I'll say. I wouldn't just learn it randomly, nor would I remember how to use it after I did that, nor do I remember how to use it now.

I've dealt a ton with Rust to C FFI. Basically it can do everything, just barely, and yes the docs suck. Support for unions had just come out when I started using it.

Rust is NOT for app dev, nor is it comparable to React Native in any way, unless I'm severely missing something.

Very accurate, lol. It's the safest language I've ever used. Great if you need the safety, sucks if you don't.

I can hope for it to replace C++. C will always have its place as the systems/barebones language.

I know python, C and JS (React, Vue and some other memes) and I make my money with this.
However I recently got into GOLANG and at times I replace most of the stuff I would otherwise do with python with it, great system lang.

Should I add Rust to my toolbelt and replace C with it for the most part or?

mine came last week user

>Should I add Rust to my toolbelt and replace C with it for the most part or?
Rust isn't really a C replacement, it's far more of a C++ replacement.

It's hard because it's hard to grasp the Rust way of doing things. Especially if you migrate from Java or other language where you have much more freedom. I wouldn't say it's harder than C++ because of tons of approaches this language has, in which most of them are deprecated and shouldn't be used. But it surely is harder than C or Python.

But once you get it and understand what does Rust consider safe, it's pretty straightforward to do anything. And you don't really need to know the whole language to use it. Pretty much whole Rustonomicon is not required to do normal programs.

>If I was writing some dumb fucking app, I'd try Rust.
You'd get disappointed. Rust has nothing in common with React.

>bloated syntax
>no good documentation
>no good libraries
>no cargo
>no modern features like modules, generators, coroutines, async await, destructuring etc
>over complicated type system
>doesn't really guarantee safety, just give you some extra tools
Rust is the Ada done right.

>However I recently got into GOLANG and at times I replace most of the stuff I would otherwise do with python with it, great system lang.
Learn what system language means. Neither Go nor Python are system programming languages.
Also: Node > Go > Python

>Should I add Rust to my toolbelt and replace C with it for the most part or?
I'd recommend it.

it's the other way around and bisqwit is just a dude

Trust me, I do as well. There is just not yet a reason to believe that it will. I love Rust, but I'm trying to temper my expectations.

Ada is what they actually use in the industries where security and reliability matter, i.e. military, aviation etc. It was developed by and for military. There's also a subset of Ada called SPARK that makes your program so unambiguous that you can pretty much prove its correctness through static analysis.

By comparison Rust is an irrelevant hipster language by and for hobbyists

>Learn what system language means. Neither Go nor Python are system programming languages.
Go is a much more valid C replacement than Rust.

>GC language
>C replacement
You have never done any system/embedded programming, haven't you?

I'm including embedded. The #1 rule of systems code is to keep it simple and maintainable, and Go is the right language for doing that.

Go has a runtime and requires an OS with threads. Try running that on a microprocessor

>requires an OS with threads
No it doesn't. It runs on the bare metal, which is more than you can say for Rust. And it turns out having a runtime is no big deal as long as you use static linking.

Attached: 1531197031384.png (502x668, 351K)

xD

>cute book cover
.. but a toxic SJW/antifa/anti-white/communist/anti-male community.

Attached: 1524171238044.png (988x1059, 143K)