Skip to content
DevMeme
6176 of 7435
C++ and C Mock Rust's Elaborate Efforts to Recreate Their Native Undefined Behavior
Languages Post #6773, on May 21, 2025 in TG

C++ and C Mock Rust's Elaborate Efforts to Recreate Their Native Undefined Behavior

Why is this Languages meme funny?

Level 1: Running with Scissors

Imagine you have two kids playing. One kid (let’s call him C) is a bit wild – he runs around with scissors and doesn’t follow the safety rules. 😲 Meanwhile, the other kid (Rust) is very careful – always wearing a helmet, knee pads, and uses those safe scissors with blunt tips. Now, running with scissors is really dangerous (you could trip and get hurt badly), but our wild kid C has been doing it for so long that he brags about it like it’s a special power: he can run super fast and cut things on the fly, no safety gear needed! The careful kid Rust usually isn’t allowed to do anything so risky because his parents (the rules of the Rust world) won’t let him. But one day, Rust wants to show he can do crazy stuff too, so he secretly takes off all his safety gear, finds the sharpest adult scissors, and starts doing a huge, elaborate stunt just to almost be as reckless as C. It’s a whole operation for Rust to break the rules – he had to remove his helmet, disable the safety scissors, and so on. After all that, he manages to do a small dangerous thing. C watches this and laughs, “Ha! Look at all the things you had to do just to imitate a fraction of what I can do naturally!” In this story, running with scissors is like causing a big unpredictable mistake in a program (something we call undefined behavior in programming, where the program might crash or do weird stuff). C does that kind of dangerous stuff easily (which is actually why programs in C can crash if you’re not careful). Rust, on the other hand, is designed to be safe – it’s like a kid who’s always forced to play safe. For Rust to do the same kind of dangerous stunt, he had to intentionally break all his safety rules. That’s the joke: one is bragging about being reckless and powerful, and the other normally so safe had to try really hard to be a little reckless. It’s funny in a nerdy way – we’re basically laughing at how one friend is proud of being unsafe, while the other friend is so safe that being unsafe is a huge ordeal. Even though, in real life, we know playing safe is good, the meme flips it upside-down for a laugh. It’s like the wild kid teasing the careful kid, and everyone in the know finds it ironic and humorous.

Level 2: Memory Bugs 101

Let’s break this down in simpler terms. C and C++ are programming languages that give you a lot of low-level power over the computer’s memory. Think of them as high-performance sports cars with no seatbelts or airbags. You can go incredibly fast and do tight maneuvers, but if you make a mistake, there’s nothing to protect your program from crashing (literally crashing!). One common mistake is something called a use-after-free bug. This means the program freed (returned to the system) a piece of memory – imagine putting away a toy – but then later still tried to play with that same toy which is no longer there. In C/C++, the compiler won’t stop you from doing this. You free memory (using functions like free() or letting it go out of scope) but keep a pointer (like an address) to it, and then if you use that pointer… oops! The program might then read or write garbage data, or crash in a spectacularly weird way. That’s undefined behavior – the programming language’s way of saying “if you do that, all guarantees are off; anything might happen.” Undefined behavior (often shortened to UB among developers) is basically a fancy way of saying “a bug so bad the language doesn’t even know how to talk about it.” The program could segfault (that’s when the program tries to access memory it shouldn’t, and the operating system kills it), or it could silently corrupt some data, or just act erratically. We call it “undefined” because the language spec literally doesn’t define what should happen – it’s like the wild west of outcomes. In short, memory bugs like use-after-free, buffer overflows, etc., are very much a part of life when programming in C/C++ if you’re not extremely careful. They’re infamous for causing security vulnerabilities and nasty bugs.

Now, enter Rust, a more modern systems programming language. Rust came onto the scene with the promise of preventing these kinds of bugs at compile time – meaning the Rust compiler will outright refuse to build your program if it suspects a potential use-after-free or related memory error. How does it do that? Rust has this thing called the borrow checker which tracks who “owns” a piece of memory and how long it should live. For example, if you have a list of numbers in Rust (say a Vec<i32>) and you take a reference to one element, Rust remembers that as long as that reference exists, the original list must not be freed or changed in ways that invalidate the reference. If you try to drop (free) the list while a reference is still in use, the Rust compiler will give you an error. This is a compile-time error, meaning your program won’t even run until you fix it. Essentially, Rust’s default mode is much like a car with every safety system engaged – it tries to prevent the crash from ever happening in the first place. Rust achieves memory safety by imposing stricter rules on how you can use memory (like rules on variable lifetimes, mutability, and aliasing). These rules can sometimes be head-scratchers for newcomers (you might have heard newbies complaining “ugh, the borrow checker is so strict!”), but they save you from a whole class of nasty bugs.

However, Rust isn’t magic – there are times when you really need to do something low-level and you know what you’re doing is safe, but the compiler can’t be sure. For those cases, Rust allows an escape hatch called unsafe code. When you mark a block of code or a function as unsafe, you’re telling the compiler, “Trust me, I’m handling the hard stuff here.” Inside unsafe, you can do things like dereference raw pointers, call external C code, or do manual memory manipulation that would normally be disallowed. If you misuse unsafe, you can indeed get undefined behavior in Rust too. The big difference is that in Rust, unsafe code is the exception and is supposed to be contained and carefully reviewed, whereas in C and C++ this kind of risky memory access is the norm (the languages leave it to the programmer to avoid mistakes). So in Rust, writing code that has a use-after-free bug requires you to opt into unsafe and probably do some hacky things; in C, you could introduce the same bug by accident with a simple oversight like forgetting an if check or messing up pointer arithmetic.

The meme image uses a scene from the animated show Invincible. The powerful superhero (Omni-Man) is labeled “C++”, and the other character (his battered son) is labeled “C”. Omni-Man (C++) is looking at a bunch of convoluted Rust code and saying, “Look what they need to mimic a fraction of our UBs.” In other words, “Look at all the stuff Rust programmers had to do just to imitate a little bit of the undefined behavior that we get naturally.” The Rust code in the first panel is deliberately doing all sorts of crazy things (using unsafe blocks, weird lifetime extensions, and something called std::hint::black_box to prevent the compiler from optimizing things away) to force a use-after-free scenario, which is a type of undefined behavior. This is humorous because Rust normally makes such bugs nearly impossible in safe code, so you have to go out of your way to cause one. C and C++, on the other hand, make it almost too easy to create a use-after-free – so easy that they jokingly treat it like a “feature.” The “fraction of our UBs” part implies that C and C++ have a lot of ways to produce undefined behavior (indeed they do – there are dozens of things in those languages that result in UB if done incorrectly, from misusing reinterpret_cast in C++ to indexing an array out of bounds in C). Rust’s approach eliminates most of those by default. So the meme is a light-hearted way of saying C and C++ are inherently unsafe and proud of it, while Rust has to bend over backwards (drop its safety) to do the same unsafe things. It’s a form of developer humor that pokes fun at both sides: the Rust folks for needing “training wheels removal” to do dangerous stuff, and the C/C++ folks for treating those dangers as business-as-usual.

To really illustrate the point, here’s a simple comparison of how a use-after-free bug would look in C versus how Rust handles the same situation:

// C code: a simple use-after-free example
#include <stdlib.h>
#include <stdio.h>

int main() {
    int *data = malloc(3 * sizeof(int));  // allocate an array of 3 ints
    data[0] = 42;
    free(data);          // free the memory

    // Oops! Using the memory after it's freed:
    printf("%d\n", data[0]);  // undefined behavior: accessing freed memory
    return 0;
}

In the C code above, nothing stops us from freeing the memory and then immediately doing data[0]. This compiles without a warning. At runtime, this is undefined behavior – in reality, likely outcomes are: the program might print a garbage number, crash with a segmentation fault, or even appear to work (by sheer luck) and then crash later. We’ve basically handed the car keys to a ghost.

Now let’s see what happens in Rust in a comparable scenario using safe code:

// Rust code: the same idea in safe Rust
fn main() {
    let mut v = vec![10, 20, 30];     // allocate a vector of 3 ints
    let first = &v[0];               // take a reference to the first element
    drop(v);                         // free the vector (v goes out of scope)
    println!("{}", first);
    //            ^^^^^
    // error: borrow of `v` after it is dropped (compile-time error in Rust)
}

In the Rust code, we attempt the same thing: we have a vector, take a reference, then drop the vector and try to use the reference. But Rust won’t even let this program compile. The Rust compiler will throw an error at the println! line, something like “error: borrow of moved value: v or “value used here after move”. Essentially, Rust caught us trying to use memory that was freed (v was dropped), via the reference first. This is the borrow checker in action, preventing a use-after-free at compile time. So in safe Rust, the above situation is impossible to run – it’s stopped before it can do any harm.

Now, if we really wanted to force a use-after-free in Rust, we could do something like this with unsafe:

// Rust code: forcing a use-after-free with unsafe (for demonstration only!)
use std::ptr;

fn main() {
    let raw_ptr = {
        let v = vec![1, 2, 3];
        v.as_ptr()        // get a raw pointer to the first element of the vector
    };  // `v` is dropped here, memory is freed

    unsafe {
        // Now raw_ptr is dangling (pointing to freed memory).
        // Dereferencing it is undefined behavior:
        let value = *raw_ptr;
        println!("{}", value);  // this might crash or print garbage
    }
}

In this last Rust snippet, we did a sneaky thing: v.as_ptr() gives us a raw pointer to the vector’s buffer. Raw pointers in Rust don’t have the strict borrow rules – they’re like C pointers. We stored that pointer and let v go out of scope (so v’s memory is freed). Then in the unsafe block, we dereferenced the raw pointer with *raw_ptr. This compiles, because using raw pointers and unsafe tells the compiler “I know what I’m doing.” But at runtime, it’s a classic use-after-free bug. Running this might crash or print some random number – we’ve entered the realm of undefined behavior in Rust. We had to explicitly use unsafe and jump through hoops (like extracting as_ptr() and managing scopes carefully) to do this.

The meme’s Rust code is essentially a more elaborate version of this, employing extra tricks (black_box, custom lifetime hacks) to demonstrate UB. The key takeaway for a newcomer is: Rust by default protects you from these dangerous mistakes, whereas C/C++ leave it entirely up to you. Neither approach is “free” – Rust’s safety can require more effort and understanding upfront, and sometimes a bit of fighting with the compiler, while C/C++’s freedom means you must be vigilant and often use external tools (like Valgrind or sanitizers) or lots of tests to catch memory errors. The humor in the meme comes from exaggerating this contrast: it’s like saying “Rust needs an entire gymnastics routine (unsafe acrobatics) to do what C can do with a simple misstep.” And seeing C and C++ proud of their UB is funny because, normally, bugs are not something to brag about! It’s developers being playfully ironic about the languages they use.

Level 3: Undefined Bragging Rights

From a seasoned developer’s viewpoint, this meme is a clever jab at the systems programming rivalry between the old guard (C and C++) and the new challenger (Rust). It takes a tongue-in-cheek stance: instead of shaming C/C++ for having many undefined behaviors, it portrays C (and C++ by extension) as proud of this “feature,” almost like it’s a badge of honor or a superpower. The line in the meme, > “Look what they need to mimic a fraction of our UBs.” is adapted from the Invincible superhero meme template. Here, the character labeled C++ (in the Omni-Man role) sneers at how much effort Rust must expend to achieve even a small taste of the wild UB that C and C++ generate effortlessly. The character labeled C (in the beaten-up Invincible role) is presumably the junior partner in crime, listening as C++ brags about their shared chaotic prowess. The humor hits home for experienced devs because usually we talk about UB as a bad thing – a source of bugs, segfaults, and all-nighter debugging sessions. But this meme turns that on its head: C and C++ are owning their UB as if it’s something to be proud of (“natural super-power”), and implying Rust’s safety is almost a weakness (since Rust has to jump through hoops in unsafe land to do what C/C++ can do by accident on any given Tuesday).

Why is this funny (and a bit painful)? Well, anyone who’s worked extensively with C or C++ has war stories about memory errors. Seasoned C/C++ devs have debugged mysterious crashes caused by a stray pointer or a use-after-free where the program would inexplicably crash only under certain conditions. Undefined behavior is that spooky underlying cause — maybe the program starts printing gibberish, maybe it crashes, or maybe it seems fine but silently corrupts data. It’s unpredictable, and that unpredictability has bitten every C/C++ programmer at least once. There’s a kind of dark camaraderie in that shared suffering. Over time, developers even develop a grim sense of humor about it: jokes like “It compiles, ship it — if it segfaults, we’ll debug in production!” or "It's not a bug, it's an undefined feature." Here, the meme taps into that by showing C/C++ almost flexing about how chaotic they are. C was created in the early days of computing with the philosophy that the programmer knows best and shouldn’t be constrained by runtime checks — which inadvertently gifted us all sorts of ways to shoot ourselves in the foot. C++ inherited this legacy (always maintaining that close-to-the-metal performance), and although modern C++ introduces tools like smart pointers (std::unique_ptr, etc.) and guidelines to avoid mistakes, under the hood it’s still as wild as C when it comes to raw pointers and memory. There’s even a common refrain among C++ veterans: “C++ makes it harder for you to shoot yourself in the foot, but when you do, it blows off your whole leg.” In other words, C++ gives you more abstractions, but if you circumvent them or misuse them, UB lurks just the same.

On the flip side, Rust is the poster child of a newer era where we say, “hey, maybe we can have performance and safety.” Rust’s promise is memory safety without garbage collection — achieving C++-like efficiency but preventing entire classes of bugs (buffer overflows, dangling pointers, data races) at compile time. Experienced devs know this has been the “holy grail” especially in systems programming: eliminate those catastrophic memory bugs that have caused countless security vulnerabilities (think of infamous bugs like Heartbleed which was essentially a buffer over-read UB in C). Rust’s solution is strict rules enforced by the compiler (the borrow checker ensuring references don’t outlive data, and that mutable access is exclusive, etc.). However, the meme highlights a truth: to interface with certain low-level operations or to optimize beyond the safe subset, Rust developers do sometimes dip into unsafe blocks, essentially invoking the dark arts that look a lot like... well, C-style logic. It’s a controlled burn – you’re supposed to keep unsafe small and proven correct by other means. But here we have a Rust snippet willfully exploiting unsafe just to create a ridiculous scenario that C or C++ would stumble into with far less code. Every seasoned dev sees the irony: Rust is engineered to avoid the very footguns that C hands you by default, so to get a footgun working in Rust you almost have to build it yourself from spare parts! 😅

The “Look what they need to mimic a fraction of our power” format perfectly captures this tongue-in-cheek rivalry. In the industry’s ongoing language wars, Rust enthusiasts often tout how any memory bug in C/C++ could have been prevented by Rust’s safety checks. C/C++ veterans might retort (half seriously, half jokingly) that Rust’s safety comes at the cost of complexity, stricter rules, and sometimes less convenience when you really just want to get something low-level done. This meme leans into the comedic exaggeration: C and C++ together are personified as an Omni-Man-like figure boasting that Rust, the newcomer, had to pull out all the stops (arcane unsafe code, huge buffer hacks, black_box magic) just to simulate a tiny bit of the raw unchecked power that C/C++ deal in daily. It resonates because developers understand the subtext: Rust trying to demonstrate a use-after-free is like a straight-A student breaking the rules, whereas C doing a use-after-free is like a habitual troublemaker — no big surprise. It’s the effort gap that makes it funny. In C, you might accidentally cause UB with a simple typo or one-off error. In Rust, you’d have to deliberately circumvent the compiler’s guard rails in multiple steps. So when C/C++ see Rust doing that, they laugh, “Haha, you had to work so hard to be as ‘bad’ as we are naturally!” – a classic bit of tech sarcasm.

For those of us with battle scars, there’s also a grain of truth that makes the meme “too real.” We’ve seen codebases where buffer overflow bugs went unnoticed for years, or a misplaced free caused intermittent crashes that took weeks to diagnose. Legacy systems in C/C++ accumulate these issues (often called technical debt or memory landmines). Efforts to eliminate UB entirely from a large C/C++ codebase can be herculean – it’s like trying to defuse thousands of little bombs scattered through the code. That’s why many in the community have been excited about Rust: it’s like building a new fortress with bomb-proof materials. But migrating or rewriting everything in Rust isn’t always feasible; plus, not every problem needs that level of guarantee. Thus, smart people keep writing C/C++ for systems programming because of inertia, performance, ecosystem, and decades of optimization – even though they know they’re living with a trickster god in the form of UB. The meme’s dark humor acknowledges this: instead of denying UB, it imagines C/C++ celebrating it with a smirk. It’s funny because it reverses the usual roles – normally we’d commend Rust for being safe, but here the unsafe camp is claiming bragging rights. It’s a bit like a race car driver teasing an F1 safety car: “Look at all that protective gear and precautions you need just to keep up with my raw speed.” Developers get the joke because we’ve all been in that race one way or another, balancing speed vs. safety. It’s a form of communal catharsis to poke fun at the very real trade-offs we grapple with in system design.

Level 4: Nasal Demons & Compilers

At the most granular level of language theory, this meme highlights how undefined behavior (UB) is treated as a byproduct of design decisions in systems languages. In languages like C and C++, the official language specification deliberately leaves certain erroneous operations with no defined outcome – this is UB. The classic tongue-in-cheek description is that an operation with UB can make “demons fly out of your nose” (a fanciful way computer scientists say anything can happen). In practical terms, UB means the compiler is free to assume that scenario never happens, allowing aggressive optimizations. For instance, if your C++ code invokes a function via a null pointer (formally UB), the compiler might optimize away null-checks entirely, since in theory that call is impossible. This yields fast code at the cost of dangerous unpredictability when the impossible does happen. Compilers like GCC and Clang will merrily exploit UB to re-order instructions, omit safety checks, or even remove code paths, treating your program as if it’s running in an ideal universe with no invalid memory accesses. This is the “super-power” that C is boasting about – an ability to run at full throttle with no safety net, using the memory model’s blind spots as a performance hack.

Meanwhile, Rust was designed with a strong bias towards memory safety and defined semantics. In safe Rust, operations that would be UB (like dereferencing a freed pointer or out-of-bounds indexing) are either disallowed at compile time or result in a controlled panic at runtime (which stops the program rather than corrupting state). Rust’s compiler uses a sophisticated borrow checker and lifetime analysis to ensure references remain valid – essentially proving certain aspects of your program correct by construction. The only way to bypass these guarantees is to explicitly opt into unsafe code blocks. Inside an unsafe block, Rust permits operations (raw pointer casting, unchecked array access, etc.) that the compiler can’t fully verify, relying on the programmer to uphold the same safety invariants. If you violate them, you reintroduce UB – but crucially, you had to mark that section as unsafe, a conscious decision. In other words, Rust confines potential nasal-demon-summoning code to clearly labeled areas, whereas C/C++ scatter those summoning circles everywhere by default.

The code snippet shown in the meme’s first panel is a contrived unsafe Rust routine that deliberately breaks Rust’s usual rules to trigger a use-after-free bug. It’s doing downright arcane things: a function get_horrible_buffer_mut() -> &'static mut [u8; HORRIBLE_LEN] that conjures a 'static mutable reference to a buffer that really isn’t static, using some lifetime_expansion::expand_mut(&mut buffer) trick. This likely involves an unsafe cast (such as using std::mem::transmute or a custom macro) to artificially extend the lifetime of a stack-allocated array, lying to the compiler that the data lives for the entire program when in reality it will be freed when the function exits. By doing so, they create a dangling pointer situation: a reference that outlives the data it points to. The code also uses #[inline(never)] and std::hint::black_box – these are tools to prevent the compiler from optimizing away or inlining code. Black box calls act as optimization barriers, often used in benchmarks to ensure certain computations aren’t optimized out. Here, black_box is employed to make the creation and use of the buffer look complex and opaque to the optimizer, so it doesn’t realize that the program has UB and try to “optimize” the entire scenario out of existence. Essentially, the Rust code is tip-toeing around the compiler, saying “please don’t notice I’m about to do something naughty.” By reading input into the buffer and then calling an innocent_read on it after freeing, they simulate a real use-after-free. In a well-behaved Rust program this couldn’t happen, but in this unsafe concoction, the final call use_after_free() indeed operates on memory that’s no longer valid – triggering undefined behavior in Rust. The key point: it took a lot of deliberate, ritualistic incantations (disabling inlining, expanding lifetimes, raw pointer use) to break Rust’s guarantees.

From a language semantics perspective, this meme is winking at the fact that Rust has a well-defined, mostly sound memory model until you step into the unsafe abyss, whereas C and C++ live with an unstable foundation of UB by design. The “fraction of our UBs” phrase emphasizes that C and C++ have a vast menagerie of undefined behaviors (buffer overflows, double-frees, null dereferences, wild pointer arithmetic, type punning, data races, you name it) baked into everyday programming – so many that it’s as if they have supernatural powers (albeit dangerous ones). Rust, on the other hand, normally shuts all those powers down unless unlocked with the unsafe keyword, and even then it’s with heavy safeguards and rare patterns. In the academic sense, Rust is attempting to provide something closer to a formally verified guarantee of memory safety (at least for its safe subset), leaning on compile-time proofs and checks – a bit like a built-in static analyzer or model checker that runs automatically. C and C++ chose a different path: “trust the programmer, allow UB for performance, and let external tools or careful code review catch the issues.” This deep dichotomy in philosophy is what underlies the humor. A systems theorist might put it this way: Rust’s type system and lifetimes enforce partial correctness properties (no dangling references, no double free, etc.), whereas C/C++ assume correctness and therefore can’t prevent catastrophic failure if that assumption is violated. The meme dramatizes this by implying Rust needs extraordinary measures to step outside its safe world – to mimic just a tiny bit of the anarchic freedom C/C++ have. It’s a nod to the fundamental trade-off in low-level language design: absolute speed and power vs. strong safety guarantees.

Description

This is a two-panel meme using the 'Look What They Need to Mimic a Fraction of Our Power' format from the animated series Invincible. In the meme, the powerful character Omni-Man is labeled 'C++' and the character he is holding, Invincible, is labeled 'C'. In the first panel, they are looking at a snippet of complex Rust code displayed in a dark-themed editor. The Rust code uses advanced and verbose features like explicit lifetimes, mutable static buffers, and function names like `get_horrible_buffer_mut` and `use_after_free`, satirizing the lengths one must go to in Rust to perform memory-unsafe operations. In the second panel, Omni-Man (C++) is yelling the punchline at Invincible (C): "Look what they need to mimic a fraction of our UBs". The word 'UBs' replaces the original 'power', referring to 'Undefined Behavior,' a class of dangerous and unpredictable bugs common in C and C++ that Rust's design is meant to prevent. The joke is a deeply ironic take on programming language design, where C++ and C veterans sardonically frame their languages' notorious memory safety issues as a form of effortless, raw 'power' that Rust can only achieve through painstaking, explicit effort

Comments

83
Anonymous ★ Top Pick The sheer volume of Rust code required to intentionally trigger a use-after-free is an achievement in itself; in C++, we just call that 'Tuesday'
  1. Anonymous ★ Top Pick

    The sheer volume of Rust code required to intentionally trigger a use-after-free is an achievement in itself; in C++, we just call that 'Tuesday'

  2. Anonymous

    Rust devs: “hold my macro while I surgically expand this lifetime”; C devs: *forgets one free()* - boom, instant UB, zero build-time overhead

  3. Anonymous

    After 20 years of C++, you realize the real achievement isn't writing safe code - it's convincing management that the segfault in production was actually a feature request for 'dynamic memory reallocation with user-driven timing.'

  4. Anonymous

    Ah yes, the classic C programmer's flex: 'Our language is so powerful, we can corrupt memory in ways your compiler won't even let you compile.' It's like bragging that your car goes faster because you removed the brakes and airbags. Sure, Rust needs lifetimes, borrow checkers, and explicit unsafe blocks to achieve what C does with a simple pointer dereference - but that's precisely the point. When your language's greatest feature is the ability to shoot yourself in the foot at 3 AM on a Friday deploy, maybe it's time to reconsider whether 'undefined behavior' is really the flex you think it is

  5. Anonymous

    C++'s RAII fortresses barely chase C's UB demons, who deliver peak perf until they summon nasal hell at scale

  6. Anonymous

    C ships UB as a core feature; C++ emulates it with templates, RAII, and three sanitizers; Rust writes an essay in unsafe and black_box - then -O3 still decides your invariants were merely aspirational

  7. Anonymous

    Only C ships undefined behavior as a zero-cost abstraction; Rust needs black_box, lifetime acrobatics, and a thesis-length comment to reproduce the same 3am page

  8. @mrYakov 1y

    https://github.com/ladroid/CppBorrowChecker rust: looks what they need to mimic a fraction of out safety

    1. @purplesyringa 1y

      that's a runtime borrowck...

      1. @mrYakov 1y

        Yeah, that's the point, lol

    2. @TheFloofyFloof 1y

      It's funny that every time C++ tries to compete with rust's memory system it's either an optional flag that barely works or a library which barely works

      1. @theu_u 1y

        Or builtin semantic that requires phd to fully understand

    3. @NaNmber 1y

      😐

      1. Deleted Account 1y

        best version control system every developer must use🤣

      2. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

        The fact that this is github

  9. @Johnny_bit 1y

    "Just write good code"

  10. アレックス 1y

    why does rust syntax make my head hurt

    1. @nwordtech 1y

      Insufficient troon points, that's normal for regular people

      1. @purplesyringa 1y

        please don't use slurs, thank you

    2. @ashit_axar 1y

      Probably you learned C/C++ first. 😂😂 Then every other syntax looks like a joke. look at Python for ex. It doesn't seem like a code. More like a pusedo-code. How does it even do something 😒😒

      1. @purplesyringa 1y

        okay that's enough telegram for today

      2. Deleted Account 1y

        no c and c++ are lovely, what about js?

        1. @ashit_axar 1y

          JS, C#, C3, D, Java and any other similar syntax that makes sense are way to go, just like old days people doing real thing...

          1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

            JS is a joke tho

            1. @ashit_axar 1y

              But writing code in it makes sense

              1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                Writing plugins/mods YES. Writing good code NO

                1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                  And injecting code at runtime

                2. @ashit_axar 1y

                  I'm not gonna write code in like Zig or Rust or you name it....

                  1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                    Fuck rust

      3. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

        By not mixing spaces and tabs /s

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

          Python is racist

          1. Sure Not 1y

            import racismsolver

            1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

              Missing dependency: racism v1.5

              1. Sure Not 1y

                import("https://m.my.mail.ru/music/artists/Johnny%20Rebel")

              2. @itsTyrion 1y

                import twitter

      4. @RiedleroD 1y

        "oh no my syntax reads too much like speech" like bruh that's the point, or do you want your language to be hard to read and write on purpose?

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

          I think its more qbout syntax thats expressive without reading. Yk like how modern humans took the arrow as a shape to suggest pointing somewhere

          1. @RiedleroD 1y

            …elaborate please?

            1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

              ()=>{} "take that and put it through this logic" { Looks like this is a block of something }

              1. @RiedleroD 1y

                I mean I guess, but the same can be said about python. I find it quite nice to have indentation actually mean something

                1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                  Its kinda limited

  11. Deleted Account 1y

    Wtf. What a weird syntax

  12. @anonusernametg 1y

    I wish Rust never existed. It's so annoying

    1. @TheFloofyFloof 1y

      Found the c kernel dev

      1. @SamsonovAnton 1y

        ✔️ Linux = widest platform support ✔️ C = widest platform support ❌ Rust = several popular platforms only

        1. @TheFloofyFloof 1y

          widest platform support doesn't matter if half of the platforms are dead

          1. @SamsonovAnton 1y

            Not everything is dead (something is just emerging), but they may lack Rust at all, or lag significantly behind the upstream.

            1. @ashit_axar 1y

              They call Linux a successful failure 😂😂

              1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                I hate that rust is now allowed in linux

                1. @ashit_axar 1y

                  Let me go one step further. I hate linux too. 😂😂

                  1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

                    I am jsut starting to move to lunix

                    1. @ashit_axar 1y

                      I miss myself back in 2012 thinking linux is gonna save the world. But now every Linux distros to me looks like the same with a different wallpaper

        2. @purplesyringa 1y

          Rust supports almost every target that LLVM does. Which means that by "C = widest platform support", you mean "GCC = widest platform support", which a) GCC's Rust frontend aims to resolve, b) those platforms do not ever work properly under GCC anyway

          1. @purplesyringa 1y

            not to mention that "Linux = widest platform support" is a dumb take, Linux is a platform itself, duh

          2. @qtsmolcat 1y

            Hand crafted assembly has even wider platform support :)

            1. @RiedleroD 1y

              widest platform support is using it as deco like I do with old graphics cards and stuff

          3. @SamsonovAnton 1y

            GCC and LLVM are not the only compiler frameworks in use, just like x86, ARM, MIPS, RISC-V, POWER and zSystems are not the only CPU architectures in use [that run Linux]. And even if they were the only compiler frameworks, one still needs to port each specific compiler frontend to the target CPU architecture. not to mention that "Linux = widest platform support" is a dumb take, Linux is a platform itself, duh "Platform" really means a combination of CPU and OS. So, in context of Linux as ta specific Os, "platform" refers to CPU architecture.

            1. @deadgnom32 1y

              wow wow. you used "compiler frontend". my respect.

            2. @purplesyringa 1y

              I mean, okay, can't argue with that logic

        3. @RiedleroD 1y

          linux depends on rust nowadays

          1. @endisn16h 1y

            thankfully it doesnt

            1. @RiedleroD 1y

              it literally contains rust code

              1. @endisn16h 1y

                has a config opotion to support modules written in rust != depends on rust

                1. @RiedleroD 1y

                  sure you can cripple linux if you want. there's just a lot of stuff that's not gonna work if you do

                  1. @endisn16h 1y

                    false dichotomy

                    1. @RiedleroD 1y

                      speak without using jargon of a field you don't understand

                      1. @endisn16h 1y

                        this literaly is false dichotomy, not only do you equate not building MODULE with "crippling" linux, you also factually wrong about "this magical lot of stuff" that "not gonna work" how's linux was before they added rust support then?😅 lots of stuff weren't working? im so glad Linus went back on rust devs and purged the code from impertant places, leaving it to only reside in modules

                        1. @qtsmolcat 1y

                          its almost like stuff got rewritten or otherwise updated, y'know?

                        2. @RiedleroD 1y

                          linux before they added rust support didn't support some newer hardware that now builds on the rust subsystem. I also hear they've refactored some internals, but I'm not sure if that got blocked by the C squad or not real world example: afaik linux won't work at all on M1 macs without rust, just because some essential drivers are written in rust

                          1. @RiedleroD 1y

                            anyway, I still don't see how this has anything to do with a false dichotomy as you call it

                          2. @SamsonovAnton 1y

                            Then it's a Mac users' problem — not the rest of the world. Just like closed-source Nvidia drivers (which therefore cannot be ported to other platforms — both in the sense of CPU and OS) are a problem for Nvidia users only.

                        3. @purplesyringa 1y

                          source?

                          1. @purplesyringa 1y

                            nvm i just remembered i don't care

        4. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

          C only wins because of signatures/symbols are use everywhere. Maybe its C++ idk don't remember

    2. @deadgnom32 1y

      I wish engineering never existed, so we could just live in wooden houses and drink ayahuaska to talk to the spirits. but I'm forced to talk to the machine spirit and fix legacy code

    3. @purplesyringa 1y

      me when I'm in a most ridiculous take competition and my opponent is @anonusernametg

    4. @endisn16h 1y

      real

    5. @sysoevyarik 1y

      if you think rust is annoying, just remember about rust users

      1. @anonusernametg 1y

        Double annoying

  13. @callofvoid0 1y

    wtf is this piece of shit

    1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

      Rust

      1. @callofvoid0 1y

        It's too much work for a simple skill issue

        1. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

          Fr

Use J and K for navigation