Going through Raytracing in a Weekend to learn Rust

Going through Raytracing in a Weekend to learn Rust.

Never listen to Jow Forums about anything: Rust is made by SJW but the language is soooo good it offset it by at least one order of magnitude. Jow Forums babies can stay debugging their double frees and segfaults in their mom's basement.

Attached: sphere.png (800x400, 41K)

Other urls found in this thread:

github.com/japaric/rust-cross
blog.rust-lang.org/2016/05/13/rustup.html
reddit.com/r/rust/comments/6rxoty/tutorial_cross_compiling_from_linux_for_osx/
medium.com/@shnatsel/auditing-popular-rust-crates-how-a-one-line-unsafe-has-nearly-ruined-everything-fab2d837ebb1
en.m.wikipedia.org/wiki/Cluster_(spacecraft)?wprov=sfla1
twitter.com/AnonBabble

>Never listen to Jow Forums about anything
right and /threadpilled

it's good, but it can't replace C. It can replace C++ though.

It can replace most of C. The kernels written with Rust have a runtime with a comparable size than those written in C.

The real problem is the lack of support for a fuckload of stuff a C compiler exists for, be it MS-Dos or your smart toaster.

Rust users live in basements though because it's impossible to get a job

You may not like it but the maintainers being irrational is a legitimate concern for a language.
Imagine from a Rust advocate perspective their opinion of the people in control of the C++ standards.

Projecting much?

>tfw writing rust as my day job

Attached: Dww0u2aUUAIdsTS.jpg:large.jpg (764x720, 48K)

This. I'm really hoping that once Macs release with ARM only processors, they'll step their game up for tier 1 support.

It can't. Rust has much more complex constructs than C has. C has... well... structs, enums, functions, malloc. That's about it. It's the bare necessities.
And when you start looking at compile times for Rust, C becomes sexy.

then simply don't use it. you probably have worse mental illness than the tranny cunts who develop it if you can't just find another language to write code in and instead need to waste time bashing one you hate. it's like spending time hating Swedish instead of just talking in English

I don't know why you made the assumption that I use it...

then stfu about it you bitch ass nigga fucking retard

I'm not really sure what you're talking about. The point was already made, there's nothing left to say regardless. Pointing out the flaws of a language project are hardly "bashing", and explaining why they're valid to someone who doesn't understand them is sensible in the context of a public forum on the topic.

OP obviously doesn't see why this could be a valid concern, since most people probably don't explain it. Since they have no reason to since it doesn't benefit them to give patience and insight to someone they don't even know. It's only beneficial to the reader, while costing the writer.

Attached: 1412609379095.jpg (599x359, 22K)

The only legitimate gripe I've heard about Rust is that the runtime and everything is over 4GB so it's not very portable, even though the binaries are portable.

The Kernels written in Rust also use a fuckton of unsafe Rust, defeating the purpose of Rust.
Seriously just use C

>some unsafe is the same as all unsafe
>safety is the only benefit of Rust

For me, it's Nim.

Attached: nim.jpg (900x506, 65K)

Nim is fucking based.

What crates are you using? I've wanted to get into graphics programming but linking openGL in C++ is such a PITA, especially if I want to open source it. I'm considering just using an openGL Rust crate to get started.

Alright I have a simple main.exe that says hello world, written on Windows 10.

How the fuck do I build the application for Mac now? The documentation is fucking PUTRID and again the same bullshit of having to hunt down random github issues for outdated comments and fucking emojis.

If this is the best Rust has to offer, I ain't gonna miss it.

Prove me wrong rustfags.

Google "rust cross compile" you fucking idiot

>thinks github issues is a replacement to proper documentation

what a fucking moron, no wonder you write code with rust.

github.com/japaric/rust-cross
blog.rust-lang.org/2016/05/13/rustup.html
reddit.com/r/rust/comments/6rxoty/tutorial_cross_compiling_from_linux_for_osx/

There you go

Will you port it to Redox-OS?

Attached: 1500384859078.gif (500x500, 1.96M)

t.discord tranny

All of takes is one memory vulnerability and your whole program is unsafe. :^)
medium.com/@shnatsel/auditing-popular-rust-crates-how-a-one-line-unsafe-has-nearly-ruined-everything-fab2d837ebb1

Also there are no other benefits aside from safety. Rust is way to verbose of a language. Even C++ is cleaner and that's sad.

Why did they have to add a bunch of nonsense to Rust? If they just kept the language to the basics but still resolved the memory unsafety issues it would be a fucking great language.

>actually thinking being a social justice warrior is a bad thing

>All of takes is one memory vulnerability and your whole program is unsafe. :^)
And yet the author notes that because there's only one line of unsafe code, it's obvious where the bug originates. That's the point of delineating safe from unsafe code, even if overall safety is poisoned by just one bug.
>Even C++ is cleaner and that's sad.
That's just false.

Discord and trannypilled

t.discord tranny

The author also states that many of these bugs are unfixable without severe performance regressions. The only way to have safe code is to use only safe Rust, but that also has many severe performance regressions unless you make your code unreadable and unmaintainable to coerce the compiler to find "happy paths"
Also this argument doesn't really hold up, you could also just as easily use Lua+C or Go+C and then you also isolate the unsafe code to what's written in C. Unless you have an autistic belief that everything should be in the same language, but that's just autistic and nothing more.

Sorry but .unwrap().unwrap().unwrap() is actually dirtier than C++. The borrow checker also frequently forces the programmer to write dirty code just to get it to compile. Since you often have to hand optimize safe rust, you now have even more verbose unreadable code.

Look Rust isn't a bad language, it's just not the C/C++ replacement. The replacement will be a new language that borrows ideas from Rust while learning from its mistakes.

This kills the Rust fags:

-fsanitize=address,undefined

>it's obvious where the bug originates
Yet there are already CVEs for critical bugs in Rust libraries. Why did not they pick it if it's so obvious?

Basically Rust is totally the wrong approach. Because it still throws exception when bad shit happens. So how do you avoid bad shit? You test your program.
So compare the offerings in terms of: static analyzers, dynamic analyzers, compiler sanitizers, code coverage tools, fuzzers, for respectively C and C++, and Rust.
You will observe that the C and C++ communities have been very productive developing testing tools over the past few years, while Rust only rely on their compiler, which as we've seen does not work when they have unsafe blocks.
This is why no one in the groups that write secure or safe software is interested in Rust.

>99% programmers just use GC languages and get things done.
Lol rust fanboys tried JS,Python and Ruby programmers care about borrow check.

>Look Rust isn't a bad language, it's just not the C/C++ replacement. The replacement will be a new language that borrows ideas from Rust while learning from its mistakes.
Well, I agree with that at least.

There are already replacements for C++: Java (replaced C++ for enterprise software), Python (replaced C++ for small programs) and Go (replaced C++ for back-end system software).

For everything that needs C++, C++ does not need a replacement. The mistake of Rust was being a new language instead of being a new tool for C++. To fix that mistake you'd have to develop better tools for C++ (like Conan, ASan, Valgrind, CMake, etc.), better libraries (like IMGUI) and not a fucking new language that is completely different.

Do you even zero-cost abstractions?

Tell me what you do senpai. I wanna get paid to be a rustnigger

>There are already replacements for C++: Java (replaced C++ for enterprise software), Python (replaced C++ for small programs) and Go (replaced C++ for back-end system software).

Yes, and Rust's going to be the replacement for C++ where it's still used. C++ BTFO. And more: it'll be able to replace C in a lot of areas, and C is going to be a niche language restrict only to kernels and embebedd programming.

C has long been deprecated by Ada decades ago.
Even C++ can easily replace it.

Programmers cost is cost

Ada is so unsafe that even C is safer.
en.m.wikipedia.org/wiki/Cluster_(spacecraft)?wprov=sfla1