Add rust copypasta
This commit is contained in:
parent
5471bbb810
commit
78442f49d2
2 changed files with 21 additions and 0 deletions
16
app/modules/rust.py
Normal file
16
app/modules/rust.py
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import niobot
|
||||||
|
import textwrap
|
||||||
|
|
||||||
|
with open("rust.txt") as copypasta_fd:
|
||||||
|
COPYPASTA = textwrap.dedent(copypasta_fd.read())
|
||||||
|
|
||||||
|
|
||||||
|
class RustModule(niobot.Module):
|
||||||
|
@niobot.event("message")
|
||||||
|
async def on_message(self, room: niobot.MatrixRoom, event: niobot.RoomMessage):
|
||||||
|
if not isinstance(event, niobot.RoomMessageText):
|
||||||
|
return
|
||||||
|
elif room.display_name != "rust":
|
||||||
|
return
|
||||||
|
if "rust" in event.body.lower():
|
||||||
|
await self.bot.send_message(room, COPYPASTA, message_type="m.notice")
|
5
app/rust.txt
Normal file
5
app/rust.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
What the fuck did you just fucking say about Rust, you little bitch? I’ll have you know I’ve been programming in Rust for over three years, and I’ve mastered more advanced features than you could ever dream of. Rust’s ownership model and borrow checker are no joke, and if you think you can just waltz in here and criticize its safety and concurrency guarantees, you’re dead wrong.
|
||||||
|
|
||||||
|
I’ve forgotten more about lifetimes and trait bounds than you’ve ever learned, and my code runs with zero undefined behavior, thanks to Rust’s rigorous compile-time checks. You think your memory-unsafe languages are better? Think again. Rust’s guarantees mean I don’t have to worry about null pointer dereferencing or data races—try doing that with your so-called “dynamic” languages.
|
||||||
|
|
||||||
|
You’re nothing but a keyboard warrior with no real understanding of what Rust brings to the table. So next time you want to spout off about Rust’s complexity or its so-called "inconveniences," remember that it’s the language that’s built to prevent the very problems that cause so much chaos in other languages. You better watch your mouth before you insult the language that’s revolutionizing system programming and making developers' lives a whole lot safer and easier.
|
Loading…
Reference in a new issue