/hrt/ - Hourly Rust Thread

>Docs and how to get started
docs.rs/ - good for docs on crates and libs. straightforward to use.
doc.rust-lang.org/book/ - good as a tl;dr, overview of most features of Rust. Read it a few times to get good with rust.

>Need help?
play.rust-lang.org/ - write your code here and post the link. Im sure anons will be happy to take a look.

>Further help
Join our Discord channel: discord.gg/UsrTr3w

No Rust bashing and no Cniles allowed beyond this point. This is a safe space for rustaceans.

Attached: hrt_pic.png (1552x873, 243K)

Other urls found in this thread:

rosettacode.org/wiki/N-queens_problem#Rust
forge.rust-lang.org/platform-support.html
github.com/japaric/rust-cross
benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust.html
github.com/chrislgarry/Apollo-11/
baltazaar.wordpress.com/2009/07/20/a-story-about-lisp-remote-debugging/
github.com/hyperledger/sawtooth-core/tree/master/adm/src
twitter.com/ID_AA_Carmack/status/1094419108781789184?s=20
twitter.com/AnonBabble

gender.unwrap();

Your code panic'd user, would you like to traceback?

I won't use it unless there is an IDE for it.
Text editors with a buttload of addons don't count

There are only two genders, kill trannies, democracy&liberalism are shit.

Why is there so much fucking boilerplate in Rust?

What did he mean by this

rosettacode.org/wiki/N-queens_problem#Rust

compare Rust to Perl 6, Ruby, Python etc.

suck my stainless cock rusty fags

CLion has a Rust plugin.

hourly reminder that not a single high performance thing was written in rust, wonder why?

>piggy backs on top of LLVM with their Tranny IR
>claims zero-cost abstractions, which no one needs because C offers low-level verbosity necessary for high perf software
>despite SJWZilla being behind Rust, their browser is still 40-50% slower compared to Chromium (??)
>despite being out for 9 years, not a single AAA video game or AAA game engine was written in rust

tldr is: Rust is a tranny language made for incompetent reddit NPCs that need training wheels for their programming due to being unable to reason/manage their memory properly piggy backing on top of LLVM

best IDE for ((( fast, safe, zero-cost abstractions ))) language is one made in Java that lags on every UI action you attempt to do

That’s all you deserve for insisting on an ide pajeet.

not everyone here enjoys brainlet ego stroking for their 300 cargo crates weekend project compiling in VS code without error, and it works! for actual software architecture you need a proper IDE

cloudflare and dropbox use rust

>someone kept the thread going with a new OP
Absolutely based

Every modern language is missing the point, the only ones that tried to make an actual usable one where google with Golang.

>So many symbols and reserved words.
Every symbol you add makes the code less readable, language designers should aim for the least amount possible without making it a retarded language >>>>>

>C is more verbose than rust
AHAHAHHAHAHAHAHAHA, you clearly havent seen function pointers and callbacks in rust Cnile, go suck more cock faggot. Daily reminder that the fastest SSL library was written in Rust.

Yeah the community is total cancer, but thats the only argument any even present.

hum?
i presented four

I shill for Rust but secretly do all my programming in Ada.

How easy is it to cross compiler Rust from Windows to Linux, x86_64? How about Windows to AIX, ppc64?

Attached: cat (9).jpg (869x1077, 139K)

is there a mailing list or irc channel?

call me when GNU makes GNU Rust with GCC

>just focus to one style of programing that makes actual sense and stop trying to make the same thing in 20 different manners
Do you have some more concrete examples of this? Rust doesn't even have do while or classes, and all of the other features seem pretty fitting for whatever task they're trying to accomplish, like iterators having many different FP-style/stream-like methods to make it easier to operate on their data.

Clang > GCC

if there is a GNU version, that's what i'll use. Seethe apple open source fags

>pick a host triple from forge.rust-lang.org/platform-support.html
>rustup target add (triple here)
>cargo build --target=(triple here) ...
Pretty easy.
There's a load of in-depth information here too: github.com/japaric/rust-cross

>no powerpc64 for AIX
I'm just going to kill myself.

Attached: 1547812619880.png (313x193, 85K)

I might not be knowledgeable enough to properly help, but wouldn't the triple "powerpc64-unknown-linux-gnu" work for you? It's tier 2 but chances are Rust will still run fine.

>hrt
this thread is dense as fuck

Rust SSL lib beat openSSL but no one uses openssl since 2015 or so?

>compare a systems language to my shitty high level scripting languages, why is there more code?
You can't be this retarded. Nobody can be.

see: clang(llvm) Rust vs gcc C
benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust.html

Just use C++.
If you KNOW how to code, you have nothing to worry about.

>just don't make mistakes lmao
Wow, all of my CVEs just vanished into smoke, thanks user.

Maybe you should practice harder.
NASA sent a man to the moon using C, because they knew what they were doing when it came to programming.

Your solution, Rust, is like telling a child to just use training wheels his whole life, instead of learning to properly ride a bike.

To be frank, it's a pathetic approach to programming.

The only difference is that training wheels restrict your ability to do advanced maneuvers, while Rust does not. You can use as many raw pointers and cause as many data races as you please, you just need to mark where you do so as possibly unsafe, to allow other programmers to more easily spot where things can go wrong. Most of the time these extra abilities aren't even needed, anyway.

That's for Linux. I need AIX (IBM UNIX OS). I'll have to google around and see what other rustilians are doing.

>NASA sent a man to the moon using C, because they knew what they were doing when it came to programming.

>1972 - Apollo 17, last time men went to the moon
>1972 - Ritchie started working on C

Once again, cniles demonstrate their retardation

look at all that C code github.com/chrislgarry/Apollo-11/

>assembly code took man to the moon
No wonder Apollo missions eventually ended up in disaster killing multiple people.

Attached: 1528599950280.png (250x250, 92K)

It's one thing to handke your own code, it's another to handle shit someone else wrote.

And it could have been so much worse in C.

Is that a joke? ASM is so much worse than C. Doing something stupid in ASM is unimaginably easier than doing something stupid in C.

I disagree, especially for the time period in question. Compilers were not as efficient or safe as they are today. Engineers continued to write assembly for decades because it was more reliable to write it yourself than rely upon a compiler.

That doesn't make hand written ASM any safer. It's incredibly easy to fuck over the entire system with a wrong instruction or memory address than the likely hood of your compiler generating wrong code. Furthermore, most uncertainly from compilers come from optimizations, not translating. It's very easy to write a proven and verifiable compiler if it doesn't involve much else.

All of those criticisms apply equally to C in an unhosted environment. Without virtual memory, C will trash your system just as easily as assembly.
You also aren't writing a "proven and verifiable" compiler without first verifying the language which it was written in. And people still can't do that for C without limiting the language down a determinable subset.

>40% of the time I run my app it kills its own process
How the fuck do people use this shit?

By actually handling the possibilities via match instead of just assuming it'll be right and letting Rust have a nervous breakdown if it isn't.

Handle the error cases

Go back to your basement, virgin.

The module code that sent men to the moon was in Assembly.

Shouldn't we have a discord server that's not with all the trannies? They'll get angry if some meme spouting 4channer comes and spams "niggers" all throughout the room.

That literally looks fine. I thought it was going to be littered with unsafe blocks or something but, nope, you're just a high level fagloid.

You should change it to bi-hourly next time.

>thinking people use openssl for speed
They use it because it has the most experience in the wild. It has been thoroughly tested and probably run through thousands of hours of fuzzers. It also supports every obscure configuration on the planet. Everyone knows it's relatively slow and poorly written.
I already know a decent bit of rust (enough to write some code but probably not large projects), but my main problem is that arm is a tier 2 platform, and that clang is the only backend for it. I'll probably look into it a lot more when gcc gets a frontend for it, but that require the language to have a standard.

>public discord servers

>speed
i care about ethics and morality above all, i'll wait for the GNU version.

lisp is the language of spacecrafts. Once, lisp's repl saved a spacecraft from a bug, they changed the code remotely while the program was still running

source?

Why should I choose Rust over Go for hobby programming?

Attached: 1561874902608.jpg (364x363, 31K)

i got to read about it in the practical common lisp book. This blogpost talks about it and links to the book too baltazaar.wordpress.com/2009/07/20/a-story-about-lisp-remote-debugging/

Rust has more safety nets, so you can have more confidence that the code you wrote will work as intended, while still having much higher speed than Go. Also learning how to use Rust's high-level features like the borrow checker and pattern matching and iterator chaining methods is quite fun, I've found.

>they'll get angry if some retard comes in spamming niggers
No, that's all normal people.

Rust is closer to a functional language than go.

can someone show me what good Rust code actually looks like?

Attached: 1540315043870.png (800x948, 62K)

i'm afraid that is an impossible task.

what the actual fuck is that tabbing

Attached: clap.png (809x707, 32K)

The whole point of C is you only have to deal with code you wrote yourself.

That's what you get when two different people with different editor setups work on the same codebase
Now imagine one of them doesn't understand how pointers work

I wouldn't be afraid at all, it's not like pointers in Rust are all that pervasive.

Is this the only gender fluid friendly programming language?

It's literally run by anti-white ANTIFA communists.

Clang is free software, so it is moral.

Aren't you guys supposed to capitalize the W

this is true, it passes the first condition, but i dislike permissive licenses as much as i dislike bandit simpatizing cucks against the right to arms and self defense.

Apt name *hurt*

Maybe you should stop comparing everything to Burger politics.

Yeah, you are degenerate.

I've been learning Rust by making a small game (around 1kLoC so far), and this is what I've found so far:
The good:
>I really the fact that almost everything is an expression. It does remove a lot of boilerplate, especially in combination with sum types.
>It's pretty easy to refactor working code.
>It's relatively easy to read other people's code, once you know the core of the language, since a common style is encouraged by cargo-fmt.
>Cargo itself.
The bad:
>I found auto deref rules pretty magical at the beginning, I felt a bit like in sepples' minutiae-driven development.
>Same thing with match ergonomics.
The weird:
>I need to get used to use lifetimes for references inside types, and learn how to prevent the lifetime annotations from propagating to the rest of the program.

I'd like to see the projects other user's are doing in Rust.

Actually handle your errors

Vscode

Less than C/C++, which is a much better comparison than the scripting languages you named

AHAHAH the AAA game autist is back

Enjoy your theocracy then.

At the worst you're saying that rust is equally good, but your post is retarded and you know it

>anyone who doesn't want to be called a nigger is a tranny
Copulate

...

Faster, has generics, and nice functional constructs if you want them

github.com/hyperledger/sawtooth-core/tree/master/adm/src

The only people in this thread mentioning gender or politics are the Jow Forumsshitters. Some of us want to actually discuss a fucking programming language

not with that op

I have used rust for ~1 year and I can safely say it is quite a nice language. Once you get past the community, the language itself is nice, and it's pretty nice being able to use the type system to either achieve true 0 cost abstractions (e.g. diesel) or to make sure you don't do retarded shit.

twitter.com/ID_AA_Carmack/status/1094419108781789184?s=20
B A S E D

>bad programmers deserve jobs too
>compilers should pick up their slack
>who cares if the Rust Way™ is utter garbage

Attached: rust_is_shit.jpg (512x512, 37K)

>>bad programmers deserve jobs too
As if Rust is an easy language to pick up.
>>compilers should pick up their slack
I guess we should stop using tools like Valgrind as well, if you're so confident that you can audit your code by hand.
>>who cares if the Rust Way is utter garbage
k

Who?

there really isn't a rust way in the way that you're implying -- you have the option of using whatever combination of imperative, OO, and functional constructs you want, and the zero cost abstractions provide multiple ways to achieve the same goal. The Rust way, then, is safe, secure, and performant code, and if you're trying to say that's in any way a bad thing then I'm assuming you're a NEET. Bugs which would have been prevented by rustc have been responsible for millions of dollars in damages, and even if you're as good of a programmer as you seem to think you are (and I can assure you, you aren't), there is no reason to use C/C++ over Rust for any new piece of software

>C/C++
this is how I know you've never used either of them, and have basically no idea what you're talking about

What makes you think I haven't? You can (aside from small syntax changes) write C code in C++

Because recommended idioms and practices are vastly different between modern C++ and C.
Both C and C++ programmers agree that referring to C and C++ as C/C++ is absolutely retarded, and only done by people familiar with neither. They are fundamentally different languages, despite C++'s heritage as a C language extension, and their interoperability.

And it would be nice if rustrannys would please stop pretending standards revisions from C++11 and onwards have memory safety issues, because it simply isn't true.
Modern C++ - written properly, of course - does not have any issues with safety, bar a few edge cases, which grow smaller with every revision of the standard.

>Modern C++ - written properly, of course - does not have any issues with safety
Holy shit no.

Ok, would you prefer "C or C++", which is what I meant? Also you're now hedging by saying (incorrectly, but that's another story) that C++ has some of Rust's functionality which you were previously trying to say was a bad thing -- if you're saying that C++'s attempts at memory safety are a good thing, then you're de facto acknowledging that Rust is better

Attached: You Missed It.gif (390x252, 1.29M)

oh fuck me how did i miss that