Rust (the language) hate thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
Serious question from a mere server infrastructure monkey: Are there any programming languages that DON'T suck ass?
I mean, there's C but what I really want is C with a nicer standard library, no header BS and a consistent non-textual macro system (one that means the standard library can be implemented without any hardcoded magic like regular C has)

My bets are on zig (or Jai for my ancestors when Joe Blow's descendants release it) but with one massive caveat. You have to modify the compiler to make it less gay.
Zig is in this bizarre paradoxical state that a lot of modern languages are. Wanting to be low level but dragging it's heels at almost every turn.

For instance, Zig's grammar was specifically designed to be easy to parse and it has a nice compile-time coding system that works directly on the syntax tree so you don't have to use any ugly textual macro languages that are different to the rest of the language.
It then counteracts this by performing tons of textual checks mid compilation to stop compiling if your code STYLE isn't what Andrew Kelly likes. They have a massive paragraph on their FAQ page bitching about why they won't support the tab character. A paragraph which is multiple times larger than the single OR statement required for such a herculean feat.
Zig will also refuse to compile your code if there are any unused SYMBOLS.
People had to fight Andy for years for him to implement normal range based for loops; because not having loop counter variables scope leaking everywhere is "syntactic sugar".
Multiline comments are banned because "Programmers can't understand two types of comments, they'll get confused" and the multiline string syntax is so bad it's like a joke.
This "Programmers are too stupid to sit on their chairs without falling off" mentality is a giant thorn in the side of the language and absolutely preposterous for A LANGUAGE DESIGNED AROUND MANUAL MEMORY MANAGEMENT.

Also, Bjarne is based:
1653514522609.png
 
memory safety is a meme lol allocate your memory normally and it's your fault if you forgot to free a pointer and suddenly you have your program using 6 gb
mem safety can be a legitimate issue for things like servers where you cant afford to have exploits/crashes, but Rust is still a retarded option. garbage collection has been worked on for literally decades and it's to the point that it has basically no effect on performance. Golang gets like 90% of C's perf despite GC and minimal compiler optimizations (forced -O1), and you don't have to deal with memory at all. no reason to go through all the nigger cocksucking that rust forces on you. plus with things like web servers, even a huge GC downtime of like 300ms isn't a big deal if it only happens a couple times a day/week, and that's a pretty exaggerated number assuming decent hardware.
 
Rust is holocaust deniers.
mozilla.png


Aside from the awful community that Rust has, it is actually a comfortable programming language to write. I find myself wishing for it when having to go back to writing Java and Python. Match Statements are very good idea; languages like Scala agree. One of my favourite features is that Match and If Statements can be used as expressions:
Code:
let result = if (x.is_empty()) {
"empty"
} else {
some_function_that_returns_a_&'static_str()
};

If you like using interfaces, then Rust would be a good choice, otherwise the retard danger-hairs that you'll meet at conventions and other places are worth skipping it in my opinion. Java, C++, and Rust all have generics. Rust and Java have explicate interfaces and bounds for generics, but Java does not allow for interface members to be constructors or static. In Rust you can guarantee that you can create an object of any type implementing an specified interface by creating trait that returns a "Self where Self: Sized;", like this:
Code:
pub trait UniformConsturtor {
    fn new(url:String) -> Self where Self:Sized;
}
In C++ you don't have explicate trait (interface) bounds because methods are supposed to serve as the interface. When creating a statically compiled interface using function you must use a template. There is no explicate way to designate methods being used in the function as part of a specific interface with templates. If you're thinking, "Wait, I'll just use a parent class with virtual member functions, too try to keep thinks organized." Ah, but then it's happening at runtime and done with type cast-ed pointers; no longer optimized during compilation. Rust does not have this problem, you can have trait bounds that will accept any implementing type at complication that will then be allowed to be optimized. Plus, Rust has explicitly named interfaces, so no more "methods that match the type signature are allowed in the template" non-sense. But you say, "Rust doesn't have pointers then?" Wrong again. Rust does have pointers and if you want a pointer to an object implementing an interface (a very common use for interfaces) then you can have a trait object to that interface, which is done by specifying dyn Trait in the return type.
Code:
pub trait UniformConsturtor {
    fn new(url:String) -> Result<Self,Box<dyn Error>> where Self:Sized;
}
Here we are creating a Self object or returning any object that implement the std::error::Error trait, as a trait object. You can also do this for your own traits, not just the built-in ones, like Error.

How do you stay Super Strait?

Simple, I really don't interact with the Rust Community at all. I find it disgusting how political they are. Though I don't think C and C++ are much better; they're just more your Eco-terroists types instead of Gender-terroists. I stay away from actually having conversations with these retards and instead just read the source and documentation in rustdoc (which will show you to a copy of the source outside of git) and git. Sometimes I'll read the mdBook sites that Rust Foundation and private developers put out. Maybe I read a blog post about a Rust project or coding style, but I don't reach out to socialize with the author. The funny thing is that as soon as Rust went hard on the tranny stuff, it probably killed the language there. No one wants to inherit the issues of gender freaks when they just want to write some source code. Rust is not a prefect language and some things like static singletons are not simple; you'll even get told not to bother from retards on StackOverflow. Competent people are getting alienated away from working on Rust because of their holocaust denial and transphilia.

This brings me to my next point. I had an opportunity to use Rust for a project recently and decided against it. The project was to replace some old C software with new one including upgrades and improvements. I chose to go with C++ instead of Rust for a number of reasons. Mind you, this was a complete rewrite, so it wasn't a priority to try to reuse old code from the existing package this project was replacing. I when with C++ after considering the following.
  1. No ability to use the new project and the old project together. In case it's better to use old implementation for some reason, if Rust then that'd have to be FFI call.
  2. No ABI. C++ doesn't have one either, but that's easier to get around using dlopen. Rust does not have a standard ABI and Rust's std does not support dlopen sort-of interface. I read some suggestions of using WASM to get around this, but a ridiculous over complication for the protect.
  3. Forward usability would be a problem. Most other project that might want to use this a library would be C or C++ and not subject to being rewritten, so it would make this project an island if done in Rust.
A lot of projects that claim "written in Rust" are not implemented in rust, but are rust FFI wrappers to C and C++ packages. So you are not actually getting the advantage of using Rust, because the C and C++ stuff is complied by their respective compilers and not rustc. It seems silly to go out of your way to use Rust with FFI in the face of no advantages in complication and a difficult community to avoid if you have a problem in the future, you may end up having to maintain a dead project to keep your own dependent projects going after the trannies have chased everyone else off and kill the project.

Most Rust projects are command line utilities that don't do anything graphical (system gui libraries, if you want opengl or vulkan they do have that). All the work is either done through FFI wrapper or std::process::Command (system command call). This actually make sense, given that Rust's strong suit is handling the logic of programming, with the statements and expressions and other niceties inspired by functional programming. But for more serious projects, it's not worth it to use Rust. A while back, I was evaluating using OpenCV from Rust and concluded that the Rust API exposed was so idiosyncratic the programmer would have to be looking at the rustdoc and cross referencing it with the C++ docs just to be able to do anything with it. So, you'd be better off just using C++ and forgetting about Rust at that point.

A lot of these criticisms may seem surprising given that Rust and Actix Framework have been given such positive reception due to it's performance as web server. Web Servers use a very well standardized (IETF) API provided by the operating system, and in Rust the Standard Library. At the end of the day it really doesn't matter how you pull data from a database, format it, write bytes to the client calling from the web server. You can use a thread pool, individual threads per request, or just load a static file per formatted into memory and copy it over the interface. It doesn't matter to the client. It only matters when there is a problem and the client can't get what it requested, so pick one way that's reliable and you're done. Not all programs are Web Servers and also don't have as well defined APIs and standards. So you end up in a situation where there is different lei-ways and constraints. For example, take having to create a GUI program that has a battery of image analysis tools: that's one library for the GUI, any number for the tools even if you make them your self you'll probably split them up that away, and maybe a base library for working with images as a concept. Could it be done in Rust, yes it's not impossible. But is it cost effective? Well, Rust can compile to most platforms, so the JVM argument goes out the window. How are you going to do the cross platform GUI; yourself implement the rust-platform FFI or get it from a tranny controlled project? That'll bite you in the future. What about the image interface, your self or another questionable library ran by the mentally ill? Other languages may require to do the same parts yourself as Rust, but are not advertising themselves as the catch-all for paedophiles and axe murderers. Even if all development costs were equal with Rust, you'd still have to account for the fact you are attaching your future to one controlled by Psychotics and type-2 psychopaths.

You may be tempted to write off these concerns about the Rust Community as just Transphobia. But Phobias can be healthy. For example, Fear of Heights. That's a healthy phobia because it keep you from falling to your death. Transphobia is also healthy because it keeps you away for dangerous psychotics who have been know to become violent. Trannies like to make up stories about how they were born in the wrong body and that they are symbolically -- spiritually really a women. If you don't know what sex you are and make up a story to try to explain otherwise that's evidence of a psychosis. There is also a disorder where a patient will go to a doctor complaining that they are the reincarnation of a solider who lost their limb (like a leg or an arm) in war and will insist that the limb be amputated. It's called Body Integrity Dysphoria and it goes away if you give the patient anti-pschotic medication. There is no differences in the two disorders: Body Integrity Dysphoria and Gender Dysphoria, I would even argue that they are exact same because both include the request for organs to be amputated. Only in the case of Gender Dysphoria it is sex organs. Under the guise of being accepting of psychotic people, Mozilla has allow for a new phenomenon of elected self identification to spring up. This is absolutely offensive as it is a nice sounding way to make people ware a target. Just think, if it were a Star of David and not pronouns on people's chests, would you be so accepting.

Pronoun badges are the new age's Stars of David and they are just as great an atrocity as the Stars of David were in Nazi German.
 
I wish I kept the conversation on the gentoo issue tracker about rust because it was filled with seething about how rustc cant compile itself, lol.

All you had to tell me is that any of the Green brothers had anything to do with Rust tangentially and that would have saved me a day or so picking it up. They're worse than trannies because not only is their base full of AGP lunatics but it's also equal parts AWFL which somehow makes it worse.
 
I did some reading on Rust via google and suddenly my YouTube feed was full of Rust videos, the video game with naked people. They're all like an hour or two long and always say 'I did THIS THING in Rust!' and then it turns out they never actually did it. I really hate that and it's all I watched for like a week or two.
 
Rust is a really interesting language and unlike almost every other language it's more than just Java/C but with some stuff switched around. I'm also surprised people think memory leaks are the reason for rusts memory safety despite that being the most trivial type of memory issue to correct. It's more about every other memory issue which can leave your program running for weeks before it decides to randomly crash with no explanation or way to trace it back to the source, which is a problem for software that has to run for more than 3 seconds.
 
I mean, there's C but what I really want is C with a nicer standard library, no header BS and a consistent non-textual macro system (one that means the standard library can be implemented without any hardcoded magic like regular C has)

My bets are on zig (or Jai for my ancestors when Joe Blow's descendants release it) but with one massive caveat. You have to modify the compiler to make it less gay.
Zig is in this bizarre paradoxical state that a lot of modern languages are. Wanting to be low level but dragging it's heels at almost every turn.

For instance, Zig's grammar was specifically designed to be easy to parse and it has a nice compile-time coding system that works directly on the syntax tree so you don't have to use any ugly textual macro languages that are different to the rest of the language.
It then counteracts this by performing tons of textual checks mid compilation to stop compiling if your code STYLE isn't what Andrew Kelly likes. They have a massive paragraph on their FAQ page bitching about why they won't support the tab character. A paragraph which is multiple times larger than the single OR statement required for such a herculean feat.
Zig will also refuse to compile your code if there are any unused SYMBOLS.
People had to fight Andy for years for him to implement normal range based for loops; because not having loop counter variables scope leaking everywhere is "syntactic sugar".
Multiline comments are banned because "Programmers can't understand two types of comments, they'll get confused" and the multiline string syntax is so bad it's like a joke.
This "Programmers are too stupid to sit on their chairs without falling off" mentality is a giant thorn in the side of the language and absolutely preposterous for A LANGUAGE DESIGNED AROUND MANUAL MEMORY MANAGEMENT.

Also, Bjarne is based:
View attachment 3330578
I had no idea Bjarne was based, this makes me even more happy with using mainly C++.
Zig's creator is retarded, source: https://www.youtube.com/watch?v=Gv2I7qTux7g&t=778s
 
  • Informative
Reactions: Aspiring Artist
mem safety can be a legitimate issue for things like servers where you cant afford to have exploits/crashes, but Rust is still a retarded option. garbage collection has been worked on for literally decades and it's to the point that it has basically no effect on performance. Golang gets like 90% of C's perf despite GC and minimal compiler optimizations (forced -O1), and you don't have to deal with memory at all. no reason to go through all the nigger cocksucking that rust forces on you. plus with things like web servers, even a huge GC downtime of like 300ms isn't a big deal if it only happens a couple times a day/week, and that's a pretty exaggerated number assuming decent hardware.
It's because Rust wanted to be a language that's appropriate for systems level programming like C. Not that it will ever be used for that, of course, but it's not like you can have your avionics controller decide to randomly GC.

Garbage collection is fine for practically everything else though.
 
One of the biggest memes is that the Rust standard library has a feature that if the program runs out of memory, it calls panic!() and shuts the program down.

The problem is that the compiler is supposed to be able to check in case the program will ever exceed system memory, so why have those checks in place (or maybe the compiler doesn't actually check for that, hence Rust is actually a meme).

Here's Linus, who put it beautifully:

zxvzxzb.JPG
 
One of the biggest memes is that the Rust standard library has a feature that if the program runs out of memory, it calls panic!() and shuts the program down.

The problem is that the compiler is supposed to be able to check in case the program will ever exceed system memory, so why have those checks in place (or maybe the compiler doesn't actually check for that, hence Rust is actually a meme).

Here's Linus, who put it beautifully:

View attachment 3393045
In the newer versions of the Rust patches added the OOM handler, though it does it through another unstable compiler feature and an intrinsic (const_eval_select) plus it's under a custom implementation of alloc

Code:
/// Abort on memory allocation error or failure.
///
/// Callers of memory allocation APIs wishing to abort computation
/// in response to an allocation error are encouraged to call this function,
/// rather than directly invoking `panic!` or similar.
///
/// The default behavior of this function is to print a message to standard error
/// and abort the process.
/// It can be replaced with [`set_alloc_error_hook`] and [`take_alloc_error_hook`].
///
/// [`set_alloc_error_hook`]: ../../std/alloc/fn.set_alloc_error_hook.html
/// [`take_alloc_error_hook`]: ../../std/alloc/fn.take_alloc_error_hook.html
#[stable(feature = "global_alloc", since = "1.28.0")]
#[rustc_const_unstable(feature = "const_alloc_error", issue = "92523")]
#[cfg(all(not(no_global_oom_handling), not(test)))]
#[cold]
pub const fn handle_alloc_error(layout: Layout) -> ! {
    const fn ct_error(_: Layout) -> ! {
        panic!("allocation failed"); // Churros: ct either means constant or compile time
    }

    fn rt_error(layout: Layout) -> ! {
        unsafe {
            __rust_alloc_error_handler(layout.size(), layout.align());
        }
    }

    // Churros: Here's the black magic, depending on the context `const_eval_select`
    // will use either `ct_error` in compile time or `rt_error` in runtime.
    unsafe { core::intrinsics::const_eval_select((layout,), ct_error, rt_error) }
}

// For alloc test `std::alloc::handle_alloc_error` can be used directly.
#[cfg(all(not(no_global_oom_handling), test))]
pub use std::alloc::handle_alloc_error;

#[cfg(all(not(no_global_oom_handling), not(any(target_os = "hermit", test))))]
#[doc(hidden)]
#[allow(unused_attributes)]
#[unstable(feature = "alloc_internals", issue = "none")]
pub mod __alloc_error_handler {
    use crate::alloc::Layout;

    // called via generated `__rust_alloc_error_handler`

    // if there is no `#[alloc_error_handler]`
    #[rustc_std_internal_symbol]
    pub unsafe extern "C-unwind" fn __rdl_oom(size: usize, _align: usize) -> ! {
        panic!("memory allocation of {} bytes failed", size)
    }

    // if there is an `#[alloc_error_handler]`
    // Churros: I think what this function is meant for doing things like calling
    // the classic unwind like the one you see in your kernel panics but idk
    #[rustc_std_internal_symbol]
    pub unsafe extern "C-unwind" fn __rg_oom(size: usize, align: usize) -> ! {
        let layout = unsafe { Layout::from_size_align_unchecked(size, align) };
        extern "Rust" {
            #[lang = "oom"]
            fn oom_impl(layout: Layout) -> !;
        }
        unsafe { oom_impl(layout) }
    }
}

Nonetheless, having a panic while running any function from the std crate without having the possibility to handle the error first clearly rises a red flag about its limitations, e.g. OOMing while operating buffered I/O. Other languages like Python or C++ at least may throw you an exception, elseways Go can return an error in the majority of cases.
 
generally i think that unless you're writing something super low level (like an os kernel or a device driver) you are better off staying away from manual memory management. just use c# or java or any of the million other languages that have garbage collection to take care of these things for you. there's really nothing wrong with using these. fat neckbeards might call you a n00b for not being a hardcore l33t h4x0r who writes assembly by hand and has his own homemade c compiler, but who cares lol
I don't know, C/C++ and lower-level languages that lack GC seem to shine quite nicely when it comes to implementing libraries that actually need the extra speed in other programming languages. Cases in point: SciPy and scikit-learn. Do you *really* want to contend with Python's garbage collection when you're dealing with massive amounts of data in an ML context?
 
Pffft. Use C, you fags.

Also, fuck this gay earth: Linus Torvalds: Rust For The Kernel Could Possibly Be Merged For Linux 5.20.
Why must everything good wither and die? said:
Speaking this morning at The Linux Foundation's Open-Source Summit, Linus Torvalds talked up the possibilities of Rust within the Linux kernel and that it could be landing quite soon -- possibly even for the next kernel cycle.

Linus Torvalds and Dirk Hohndel had their usual Open-Source Summit keynote/chat where Linus commented on Rust programming language code within the kernel.

Torvalds commented that real soon they expect to have the Rust infrastructure merged within the kernel, possibly even for the next release -- meaning Linux 5.20.

This is going to suck so very hard ... and to think I used to believe systemd was the biggest poison pill Linux has been force-fed in decades.
 
eh, I'll buy it when I see actually anything productive coming from it.
Oh we'll never see anything productive come from it, but it's going to be a sloppy mess while they try to shoehorn it in, scramble to find something useful to do with it, half-ass something nobody wants that makes the kernel unstable then wash their hands of it when it gets too hard to fix and gets quietly removed again.
 
  • Like
Reactions: Evil Whitey
I don't know, C/C++ and lower-level languages that lack GC seem to shine quite nicely when it comes to implementing libraries that actually need the extra speed in other programming languages. Cases in point: SciPy and scikit-learn. Do you *really* want to contend with Python's garbage collection when you're dealing with massive amounts of data in an ML context?
If GC kills the performance of your number crunching program, you are doing something horribly wrong. That something may be the fact that you're using CPython (afaik it heap allocates everything and uses undeferred reference counting, which is some worst-of-all-worlds shit), but that's Python which sucks, not GC.
 
Pffft. Use C, you fags.

Also, fuck this gay earth: Linus Torvalds: Rust For The Kernel Could Possibly Be Merged For Linux 5.20.


This is going to suck so very hard ... and to think I used to believe systemd was the biggest poison pill Linux has been force-fed in decades.
41 inbound 1.png

41 inbound 2.png

41 inbound 3.png

41 inbound 4.png


I was curious to ask others what they thought of this, he had already said Rust was going to get merged into the kernel back in 2020 I believe (after he go metoo'd), but apparently it'll only be used for driver development. I find it crazy that Rust of all languages made it into the kernel before something like Pascal, but I'm not experienced with developing kernels at all so my opinion doesn't hold weight.

There was also another thread here about the entire Rust moderation team (3 people) resigning because of how toxic the community was, how the fuck is a nu-language like that sustainable enough to become a part of Linux?
 
Back