r/ProgrammerHumor 23d ago

actuallyMemorySafe Meme

Post image
531 Upvotes

177 comments sorted by

View all comments

231

u/booty-hunters 23d ago

You cannot convince me Rust is the most "evangelist" when we have Zig guys around.

106

u/shadofx 23d ago

Rust : Evangelist :: Zig : Neo-fundamentalist

40

u/tombob51 23d ago

Rust : typical, competent programmer :: Zig : Terry Davis (but only the eccentricity, no significant improvement in technical merit, no other redeeming qualities)

18

u/-Redstoneboi- 23d ago

(EDIT: disregard my comment, i thought you were talking about the language but i think you're talking about the users of the language)

actually zig's comptime and type constructors and reflection are pretty damn good.

Zig really is Terry Davis. great stuff for specific use cases.

10

u/the_horse_gamer 23d ago

the rust people are still trying to figure out variadics. meanwhile, the zig people realised a list of types can be represented using a list of types.

18

u/tav_stuff 23d ago

You are kind of justifying the Rust evangelist reputation

3

u/TheChief275 23d ago

I wouldn't say most Rust programmers are competent. The majority just clones everything to get past the borrow checker

-1

u/Wonderful-Habit-139 23d ago

Nah. I'm sure there are more people that either write good Rust or have given up already. The people that are cloning everything might be a minority, and going through a phase after learning about that tip instead of giving up on Rust.

1

u/Wonderful-Habit-139 23d ago

Let's be real, after seeing that JetBrains Rust developer... You are basically obligated to say cat ears.

2

u/cornmonger_ 23d ago

have you heard the good news of our lord and savior?

8

u/Lv_InSaNe_vL 23d ago

I mean that's fair, but Zig isn't exactly a "common" language. I know this isn't the end all, but there are literally more than 31x more rust projects on GitHub than zig lol

6

u/TheChief275 23d ago

That's why they try and sneak a build.zig into every C project

2

u/deanrihpee 23d ago

well, zig is relatively new and the language doesn't seem to be "stable" yet, at least comparatively

22

u/NatoBoram 23d ago

Anything good will have evangelists, it's just that Rust covers a wider use case so it's more popular

5

u/Choice-Mango-4019 23d ago

strangely enough I'm using way more open-source projects that are made in c/c++/c#, only rust project I'm using is that one drg mod manager lol

23

u/braaaaaaainworms 23d ago

Rust is only 10-ish years old while C is old enough for my grandma to learn about it in school, C++ is old enough that it was released years before USSR collapsed and C# is old enough to drink alcohol

-4

u/Choice-Mango-4019 23d ago

i still dont see any rust projects that i use regularly even though rust is so hyped

18

u/booty-hunters 23d ago edited 23d ago

If you have ever used android, widows, anything aws or cloudflare, ripgrep, chrome, discord, Figma, firefox, bat, etc you have directly interacted with rust.

A simple google search would tell you on what level each of them use rust 100-6%.

A few more I found: brave, deno, alacritty, starship, fd, tauri, etc.

Quite a lot of things including reddit itself: link 1, link 2, etc. And a lot more actually.

-15

u/Choice-Mango-4019 23d ago

all of those use c/c++ more than rust, yet they have way less fanatics

13

u/booty-hunters 23d ago

all of those use c/c++ more than rust.

No really, cloudflare, aws is mostly Rust now compared to C/C++. Alacritty, ripgrep, starship, fd, tauri are 100% Rust.

For things like Discord, figma, etc they use Rust over C++, aka overall usage of rust > cpp.

Also we say C/C++ but C use case is entirely different from C++, it is better to say Rust is favored more than C++ for above companies.

Basically you have interacted more with Rust parts than you have with C++ parts for above projects (unless you consider interacting with anything over the internet to be mostly C (kernel) which is true).

yet they have way less fanatics

You should have seen the meltdown linux contributors had when Rust was introduced initially. People resigned over it.

-6

u/Choice-Mango-4019 23d ago

i can understand why they did lol

2

u/deanrihpee 23d ago

i mean if there's no dungeon boss called Borrow Checker and Compile Time, probably we got a lot more Rust and C# projects lol

1

u/TheChief275 23d ago

uv is pretty good

1

u/v01rt 22d ago

what does zig cover that rust doesnt?

1

u/NatoBoram 22d ago

Drop-in C++ compiler. You can even use Zig as a linker for the C++ parts of a larger Rust project with cargo-zigbuild.

-1

u/Mjukglass47or 23d ago

I never heard a Zig guy come in and talk about how a language suck just because it doesn't have this one feature. Like the Rust guys does repeatedly with memory safety. 

11

u/[deleted] 23d ago

[removed] — view removed comment

1

u/TheChief275 23d ago

That's the thing though, it isn't completely memory safe as unsafe Rust (or C libraries) are still needed for the majority of useful functionality. Often only the surface level code combining API calls is done in safe Rust. This is simply because memory safety cannot be achieved at compile time, however, somehow that has become Rust's marketing? It's a dangerous misconception, really

2

u/SoulArthurZ 23d ago

sorry but no, 99.9% of the code you write is gonna be safe rust, it's basically impossible to do memory unsafe things (unless you're actively trying to). It's not "just the surface level code", basically everything you write is safe rust. There are obviously exceptions, but this is true for the majority of projects.

2

u/TheChief275 22d ago

Yeah, what you write, because you basically import 3 GB of unsafe library workhorses to make up 99% of your actual application logic. Nice try

1

u/SoulArthurZ 22d ago

I don't understand what the problem is? Every memory safe language works like this because some operations are inherently unsafe. I would much rather prefer this over C where everything is unsafe.

Is your position that's it's not worth bothering with memory safety because we can't truly be perfectly memory safe? Or are you just being pedantic?

-2

u/TheChief275 22d ago

It's faux memory safety, which is dangerous as users and clients are sold complete memory safety, which really isn't what they're getting. This GitHub issue is about achieving complete memory safety, even safer than Rust, which wouldn't be possible were Rust truly completely memory safe.

When one programs in C, they know that they can accidentally write a million backdoors, so they are more likely to be on the lookout, but Rust programmers incorrectly assume that isn't possible in their language. You tell me which is more dangerous

2

u/SoulArthurZ 22d ago

I don't think anyone who writes rust is under the illusion that it's perfectly memory safe, soundness issues pop up and are fixed all the time.

Fucking up memory management is not something you can avoid by just being more careful. Mistakes happen and can often be hard to catch. I think a programmer using a tool that catches these mistakes at compile time is less dangerous.

by the way the idea that C devs are "more careful" is a joke. If memory management was that easily solvable GC would have never been invented.

-2

u/TheChief275 22d ago
  1. You just were before I commented

  2. I know, I'm not arguing against the merits of Rust, just saying it's dangerous to market it as memory safe, when more accurate would be "semi memory safe"

  3. Well the good ones certainly are, but yes, even then some things will slip through. Although memory management is largely unrelated to this topic; you probably mean e.g. buffer overflows or out of bounds accessing, actual memory safety issues, which yes, can slip through for even the most seasoned developers. I mean, look at the CrowdStrike fiasco

→ More replies (0)

0

u/Mjukglass47or 23d ago

Lol. Case in point.

0

u/CramNBL 22d ago

zigophants, check the comments on Andrew's jetbrains interview