r/rustjerk • u/Icy_Chemist5555 • 10h ago
r/rustjerk • u/Perceptes • Oct 26 '26
MOD APPROVED "AI" does not satisfy the borrow checker.
Good day, fellow jerkers.
For some time, /r/rustjerk has had a rule against low effort content, which notably includes anything generated by "AI".
Watching the general discourse on the subreddit over time, it seemed to me that the community was generally in agreement in their views on "AI", but lately I've seen an increasing number of posts that are thinly veiled promotion of "AI" content under the guise of making fun of it. So I thought it would be a good idea to revise and clarify the rules around this.
/r/rustjerk is an anti-"AI" subreddit. The reasoning for this is simple: "AI" generated content is by definition trained on data that has been mutably borrowed more than once simultaneously, which is a violation of Rust's ownership and borrowing rules.
You can post things making fun of "AI" or people who use and support it, as long as it does not contain identifying information about the creator or the project itself, such that the post might drive legitimate traffic to the content. In many cases this might make it impossible to post such content, because the real project could be trivially found by searching the web for its name or tagline. In such cases, the content is simply not fit for /r/rustjerk. Ownership and borrowing is at the core of Rust's safety guarantees, and we must make sure to do whatever we can to uphold these sacred regulations.
The following text has been added to rule 5 to clarify this stance:
If you're posting something made by "AI" to make fun of it, make sure you've obscured any identifying information that might drive legitimate traffic to it. When in doubt, just don't post anything related to "AI".
Feedback on this wording is welcome, but it is not up for litigation whether or not "AI" content or pro-"AI" sentiments are allowed in /r/rustjerk. If that's your cup of tea, you are welcome to make your own subreddit with different rules, akin to how crab memes are welcomed on /r/rustjerkjerk.
Thank you for your time and attention. You may now continue masturbating.
r/rustjerk • u/scadoshi • 11h ago
Turning into that kind of a night
Just trying to be a good boy and do my clippies right
r/rustjerk • u/stdmemswap • 1d ago
J.K Rowling To Rewrite All of Harry Potter Books In Rust
r/rustjerk • u/scadoshi • 9m ago
From the makers of WalmartMaxxing™: rustmas™, Advent of Code tooling for the working class 🦀
Tired of COPY PASTING puzzle inputs like a PEASANT? Tired of TIMEOUTS for ONE wrong guess? NOT. ANYMORE.
rustmas™ fetches your input, runs your Rust, checks it against an INDEPENDENT SOLVER and ONLY submits when they AGREE. Wrong answer cooldowns are a TAX and WE DON'T PAY TAXES HERE.
Timings in MICROSECONDS so you can FLEX on those Python CHUDS you call friends.
Was $0 NOW $0. AoC starts TUESDAY. COMPILE FREEDOM THIS SEASON. 🇺🇸
(link in the comments)
r/rustjerk • u/Slow-Nefariousness49 • 14d ago
Never(!) thought I'd say this, but thanks for Nothing, Scala
Look I'm a tired dad I need to get these puns out of the system occasionally
r/rustjerk • u/yolosuperboss • 15d ago
Upcoming rust contender??? C with generics: crust
I was watching tsoding's crust stream and I thought it would be so funny if I extended c to have generics like rust. Here is the result of that abomination:
#include <stdio.h>
// you can define your own operator in fortran .op. style with a trait
trait<T> DotP {
// for parsing reasons any dot-op must have whitespaces around it in any context
T .dot. (Self self, Self other);
}
// using a very similar syntax to rust, you can add generics to structs
typedef<T> struct {
T x;
T y;
T z;
} Vector<T>;
// and by appling the trait to your struct (with generic parmeters)
// you can define what your operator should do.
impl<T> DotP<T> for Vector<T> {
T .dot. (Self self, Self other){
return self.x * other.x + self.y * other.y + self.z * other.z;
}
}
int main(void) {
// by concretly defining which type you want to use as the generic
// you create in generated c a struct with that/those type(s)
Vector<float> fv = {1.0, 2.0, 3.0};
printf("Dot product of fv^2: %f\n", fv .dot. fv);
Vector<int> iv = {1, 2, 3};
printf("Dot product of iv^2: %d\n", iv .dot. iv);
}
// The generated c code looks something like this:
// /* Generated by typedc. */
// #ifndef TYPEDC_SIMPLE_GENERICS_H
// #define TYPEDC_SIMPLE_GENERICS_H
//
// #include <stdio.h>
//
// typedef struct float_Vector float_Vector;
// typedef struct int_Vector int_Vector;
//
// struct float_Vector {
// float x;
// float y;
// float z;
// };
//
// struct int_Vector {
// int x;
// int y;
// int z;
// };
//
// int main(void);
// static inline float float_dot(float_Vector self, float_Vector other);
// static inline int int_dot(int_Vector self, int_Vector other);
//
// int main(void) {
// float_Vector fv = {1.0, 2.0, 3.0};
// printf("Dot product of fv^2: %f\n", float_dot(fv, fv));
// int_Vector iv = {1, 2, 3};
// printf("Dot product of iv^2: %d\n", int_dot(iv, iv));
// }
//
// static inline float float_dot(float_Vector self, float_Vector other) {
// return self.x * other.x + self.y * other.y + self.z * other.z;
// }
//
// static inline int int_dot(int_Vector self, int_Vector other) {
// return self.x * other.x + self.y * other.y + self.z * other.z;
// }
//
// #endif /* TYPEDC_SIMPLE_GENERICS_H */r/rustjerk • u/kalilamodow • Oct 29 '26
thanks rust-analyzer, i'll consider it
let's circle back on this later
r/rustjerk • u/zabolekar • Oct 25 '26
Written in 95% safe Rust
// finally, memory safety!
mod gc {
use std::sync::LazyLock;
use dlopen::raw::Library;
type Malloc = extern "C" fn(usize) -> *mut std::ffi::c_void;
static LIBGC: LazyLock<Library> = LazyLock::new(|| {
Library::open("libgc.so").unwrap()
});
static GC_MALLOC: LazyLock<Malloc> = LazyLock::new(|| unsafe {
LIBGC.symbol::<Malloc>("GC_malloc").unwrap()
});
pub struct GcPtr<T>(*mut T);
impl<T> std::ops::Deref for GcPtr<T> {
type Target = T;
fn deref(&self) -> &T {
unsafe { &*self.0 }
}
}
pub fn alloc<T>(value: T) -> GcPtr<T> {
let address = GC_MALLOC(std::mem::size_of::<T>()) as _;
unsafe { std::ptr::write(address, value) };
GcPtr(address)
}
}
#[cfg(test)]
mod tests {
use super::gc;
#[test]
fn doesnt_crash() {
assert_eq!(*gc::alloc(123), 123);
}
}r/rustjerk • u/Schaex • Oct 24 '26
This is fun
use ;
use slice;
Output:
[]
[1]
[1, 1]
[1, 1, 1, 1]
[1, 1, 1, 1, 1, 1, 1, 1]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
When do I get my Rust software developer job?

