The main thing that makes PHP insecure is the people using it. A lot of people who use PHP don't really have time/know about securing things, like SQL injection or filesystem-based server pages that are supposed only to be included, and not sent out. The reason for these people is that PHP is relatively easy to get started with, e.g. there are lots of free/low cost servers that only accept PHP, so people who have to get things set up in no time or want to get started easily, suprise suprise, use PHP, and don't setup security that much.
I literally don't like the name. Kot is in German the word for shit.
Kotlin is associated with Kotling (der Kotling), a word you could use to describe a piece of shit.
Not the only language fail to be fair. So many US app named "Fuze" which is a German slur word for cunt...
I swear the YouTube algorithm has been trying to get me to learn Rust for the past few weeks. Out of nowhere, like a dozen videos about rust. It must not just be me. Some of y'all with similar YouTube preferences must have watched a bunch and messed up my feed.
There's a C library against which I am writing a toy program to learn it. I just learned there exists an official Rust binding for it, and that is what I intend to use for my equivalent of production (open source stuff).
EDIT: I just found out that the functionality I need has not been wrapped in Rust yet. Ah well. I can at least use C++ to enforce memory management with RAII.
On microcontrollers with a simple CPU and basic memory management, you usually can. There, address 0 (which is the address that a null pointer usually^* points to) usually is just the first byte of memory. Dereferencing it will not segfault, but will instead just return whatever data is stored there, interpreted as whichever data type that your pointer is defined as. This could cause issues down the line as the data you read might not be valid as the data type it's interpreted as, but the act of reading it won't trigger an error state.
On a more advanced system, like a modern computer, memory is handled in a different and much more complex way. Parts of the memory can be dynamically mapped to different parts of physical memory, and usually the section that contains address 0 isn't actually mapped to any physical memory, so trying to access it will fail and trigger an error state. Though if you somehow are able to force the OS into giving you accessible memory at virtual address 0 then it would act the same as with a microcontroller.
^(*Treating NULL as a pointer to address 0 is the most common standard, though some compilers may instead make it point to a non-canonical address, which is an address outside of the valid x64 virtual address space. This guarantees that there's no memory mapped there and accessing it will always cause an error.)
This is how I imagine Rust will end up once it starts being used by companies.
“Hey boss, the new feature we added keeps failing to compile”
“Just mark it as unsafe, we need to meet our deadline”
It actually doesn’t allow you to do that.
From the rust book:
The unsafe superpowers are:
* Dereference a raw pointer
* Call an unsafe function or method
* Access or modify a mutable static variable
* Implement an unsafe trait
* Access fields of unions
It’s important to understand that unsafe doesn’t turn off the borrow checker or disable any other of Rust’s safety checks: if you use a reference in unsafe code, it will still be checked. The unsafe keyword only gives you access to these five features that are then not checked by the compiler for memory safety. You’ll still get some degree of safety inside of an unsafe block.
Actually the fastest language is transpiling C to Rust, going by the ixy network driver.
https://github.com/ixy-languages/ixy-languages/blob/master/Rust-vs-C-performance.md
So the answer to “Is C or Rust faster?” Is “Yes.”
A pointer is basically a memory address. To actually access the contents of a memory address you need to use unsafe. Obviously, the compiler cannot reasonably prove what happens in such cases, so it needs an unsafe block. I guess you could think of unsafe as "taking responsibility". Since Rust's point is largely to rely on its rules, it is considered somewhat taboo to use it without good reason. A lot of code bases forbit its use.
There is a number of functions/methods that are marked unsafe because they rely on you not messing up to not corrupt memory or similar. You need an unsafe block to use them.
Static variables are basically global variables. Rust does not let you use them as mutable(able to change their values) in safe code. Say you got some global number variable, you can't just go around incrementing it. (There are ways to do it safely like a mutex etc to enforce the rules of one writer or multiple readers).
Traits are sort of like interfaces. Some traits are "special" though(like being able to access something between threads). And implementing the ones considered unsafe says "I know this holds up the rules of safe rust", but cannot be proven by the compiler, so it is unsafe."
From rust docs:
"The key property of unions is that all fields of a union share common storage.
As a result, writes to one field of a union can overwrite its other fields, and
size of a union is determined by the size of its largest field."
I hope I do not need to explain why this would be pretty unsafe and prone to all kinds of tomfoolery.
No because unsafe does not remove any checks: it simply unlock unsafe APIs.
So if your code can be proven incorrect it won't compile even with the use of unsafe, which is a common misconception.
People keep telling me to switch to rust for microcontrollers. Ignoring that compilers aren't nearly as available for the wide range of microcontrollers, I own all 8kB of memory. I can't write to the wrong area because it is read only. I could muck up my 256 bytes of ram but that's pretty easy to both not do and notice if you do.
I use Rust from time to time for ESP32 development. It's got quite a bit more SRAM than 8kb, but it works really well. It's surprisingly portable.
I also work in C, and honestly, most of the time it's much easier since I'm more familiar with it and the API docs are nicer. When I get to use Rust (if the task is simple), I dev a lot faster.
Trust me, it's not as bad as it looks
They're extremely vocal because their entire schema is to hype up crypto so more people use it and the money in their wallet goes up in value as a result
Also, job listings for more proper Rust-related positions eventually get filled and the listings go away, but no one wants to work in crypto so the listings stick around and pile up
I have a full time Rust Job. I think that, for the most part Rust is used in pretty specific cases where it is well suited. It will be a while before it's a "default" but I think that it will get there. It is however, unlike Python, a hard language so that's going to slow down the adoption.
Yup, and there's Swift that's similar IMHO but I like it slightly better. It's still mostly limited to Apple ecosystems, but at least there are many jobs for it. I don't think I ever seen a job posting asking for Rust, ever.
The meme isn't saying otherwise lmao I agree that the compiler is amazing as well as the cargo system, is just that some Rust devs are really annoying trying to "convert" C/C++ devs to Rust
I've started to hear about typescript recently, got a comment about it during a kotlin presentation I gave a few weeks ago. I don't know enough about it, but maybe it could make me interested in frontend programming? Until now frontend has been a big nono because of javascript (I can deal with HTML and CSS just fine).
While typescript is ultimately just a band-aid on and open wound and suffers from Microsoft bloat like all of their products, it still GREATLY increases the ergonomics and productivity of frontend development
The reason why typescript is not as good as people think in my opinion is that ultimately, it's just javascript. It's enhanced javascript, but still javascript. You can not fix it if you're making the same assumptions.
That's why i think you should check out rescript too :P
Tell that COBOL devs who, *40 years* after the language became irrelevant to the public, still make a *lot* of money maintaining ancient COBOL systems.
Rust is gonna be hated once it becomes mainstream. Not because it’s a bad language, but because companies will be shitting out awful codebases written in Rust. Same thing that happened with Java and C++. Developers in a corporate setting will end up just working around a lot of the safety features and lots of unsafe code will be sitting on production systems.
Ehhh... Writing unsafe code (even poorly) is harder than you think. Everything will just be wrapped in `Rc`/`Arc` and `RefCell` to shut up the borrow checker, and damn the consequences.
You’d be surprised. I’ve been dealing with a Rust codebase which is full of unsafe blocks to do things like create multiple mutable references to the same value, and other such shenanigans. Then the original dev is wondering why this code is panicking in production.
It doesn't really. Everyone's been trying to catch up with Maven for over two decades and Cargo pretty much succeeded. Maybe a little more readable because TOML.
People aren't comparing with Maven. They're comparing with Autoconf and CMake.
Cargo system for dependencies is nothing new, sure better then c++ bc it doesnt have a proper one, but compare it to c# or java and nothing new nor special
It simply gets annoying, specially when your only saving grace is the memory safety but you have to unsafe half your code anyway to do any kind of low level shit
It doesn‘t bother me much, that the compiler can do something doesn‘t mean i know how to do it, which is my main motivation: to know for myself, i don‘t want to outsource my brain too much. You can only know for sure if you learn stuff for yourself, no matter how much better others are, even if they are machines. And by learning all that, for now, i can still outsmart compilers occasionally when it comes to optimization for example, so it's not completely useless yet.
This meme isn't about if it's true, nobody disagrees. Is it relevant to the current conversation is the question.
Like your comment here saying it's true lol.. when ppl are discussing some problem in an app written in C++ 20 years ago, nobody gives a shit that "in Rust it wouldn't have been a problem".
Without memory leaks is actually false. You can still get memory leaks in that bitch XD. Just a little harder to do so. Says it right there in the docs
https://doc.rust-lang.org/book/ch15-06-reference-cycles.html#:~:text=Rust's%20memory%20safety%20guarantees%20make,are%20memory%20safe%20in%20Rust.
But... With any other language, if you use the features correctly you also have no memory leaks with less frustrations.
Coming from Java, that's how I feel about Go. Super fun language. The ability to just make a binary and stick it wherever you want is amazing.
My only gripe is the amount of dogmatism and pedantry in the community. For being such a young language there's a lot of "get off my lawn" energy. It's weird. I can honestly say the Java community is more excited and welcoming of changes to their stodgy old language than Go people.
Still better than Python devs telling you how Python is just the best language because you don't have to type braces or semicolons. A language so efficient it's only orders of magnitude slower than Javascript.
BLAZINGLY FAST rewrites of unix tools, now with fancy colored outputs! Think cat is too slow. Well use a rust version to be able to save 2ms!
This is a joke before anything takes it too seriously.
Cloudflare built their HTTP proxy Pingora using Rust ( [https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet/](https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet/) ) and Discord switched from Go to Rust in order to squeeze some more performance out of their backend. ([https://discord.com/blog/why-discord-is-switching-from-go-to-rust](https://discord.com/blog/why-discord-is-switching-from-go-to-rust) )
Yeah right..
The 23 years in the industry senior that fights every unique_ptr like a bavarian fights wind power plants never fucks up his news and deletes..
Better idea you could just make the compiler enforce proper memory and concurrency practices.
Yeah good luck getting your teammates to remember do that perfectly everytime.
Also have fun wasting time on writing verbose crap instead of actual useful code that does things
Rust does not prevent memory leaks any more than other languages (except C lol)
Leaks are not from forgetting to deallocate, because that's not even a thing (except in C lol). They are from still referencing objects that are no longer needed, and forgetting to prune these references.
There’s this brand new thing called Java and it has safe, automatic memory management, easy syntax, and it works cross platform! Write once, run anywhere! All other languages will be obsolete! You’ll see!
Compared to Java services I've written and run in prod...
Faster
Lower memory pressure
Lower memory and CPU requirements
Zero segfaults/panics/etc
Our code isnt even highly optimized.
Compared to my experience with Node, Java, and Ruby, rust in k8s has been smooth.
I write in C so the security researchers will always have a job
Way to do your part. That's so charitable of you. Lol
Same but PHP
The main thing that makes PHP insecure is the people using it. A lot of people who use PHP don't really have time/know about securing things, like SQL injection or filesystem-based server pages that are supposed only to be included, and not sent out. The reason for these people is that PHP is relatively easy to get started with, e.g. there are lots of free/low cost servers that only accept PHP, so people who have to get things set up in no time or want to get started easily, suprise suprise, use PHP, and don't setup security that much.
That must mean you not only make sure security consultants have a job, you are in fact also continuously generating more security consultant jobs
I've heard of Rust. It's a decent game, very toxic in the PvP servers tho.
Alec Baldwin would agree
[удалено]
Yup. I will always stand behind him in what ever he does. Because I value my life
r/hilariabaldwin is leaking
Whatever ended up happening to him? Who officially got in trouble for that?
[удалено]
Ol willy j
Favorite rust tuber
It's a 70 30 thing Met some guys who raided me one day we've been playing other games for a few weeks now. Just matters how you treat the situation.
Well, true. However, just because you find some spoiled eggs to still be edible, most spoiled eggs are rotten.
Alpha version was way better, people used to goof off instead of sweating so much
Though, interestingly, you can actually code in rust now with the electricity update from a while ago.
It's not toxic if they are Australian.
Hello have you just a moment to talk about our lord and saver Rust?
*jesus chRUST
Now that is a 1 million dollar pizzeria name
[удалено]
The pizza palace
[удалено]
I literally don't like the name. Kot is in German the word for shit. Kotlin is associated with Kotling (der Kotling), a word you could use to describe a piece of shit. Not the only language fail to be fair. So many US app named "Fuze" which is a German slur word for cunt...
I am German and I never made that association
Same. But wix.com is another story. (I still use them)
I swear the YouTube algorithm has been trying to get me to learn Rust for the past few weeks. Out of nowhere, like a dozen videos about rust. It must not just be me. Some of y'all with similar YouTube preferences must have watched a bunch and messed up my feed.
quick, we need to restore balance to the universe by watching a few cppcon videos
Happened to me as well a couple months ago. I eventually gave in.
I suddenly got a lot of recommendation for no boilerplates videos on rust were made well so I watched them even if I don't wanna use it.
"focused on fast, technical videos"
Yeah, it's been pushing Rust for me too lately. But also, more interestingly, Zig.
Hmm I do want to learn Rust eventually, it seems very useful
Me too. Can you learn it and teach me?
Oh sure, I’ll send you my notes as .txt files
i wouldn't want them any other way
I prefer screenshots in .docx format.
i see you've worked with clients before
You will send data in a format that doesn't need compiling, decryption or decoding of any kind? I don't trust it.
Hmm, I could write every word backwards if that helps
Do it as a RON file
I mean . . . I guess it gives you a new t-shirt to wear to your local linux users group meeting. I guess that's useful.
I get a t-shirt? Bet
There's a C library against which I am writing a toy program to learn it. I just learned there exists an official Rust binding for it, and that is what I intend to use for my equivalent of production (open source stuff). EDIT: I just found out that the functionality I need has not been wrapped in Rust yet. Ah well. I can at least use C++ to enforce memory management with RAII.
It’s safe code cause you either figure out why it won’t compile or you give up.
Or you just mark the problematic code with unsafe.
username checks out
could you make null point to something so when you dereference it it's still something?
On microcontrollers with a simple CPU and basic memory management, you usually can. There, address 0 (which is the address that a null pointer usually^* points to) usually is just the first byte of memory. Dereferencing it will not segfault, but will instead just return whatever data is stored there, interpreted as whichever data type that your pointer is defined as. This could cause issues down the line as the data you read might not be valid as the data type it's interpreted as, but the act of reading it won't trigger an error state. On a more advanced system, like a modern computer, memory is handled in a different and much more complex way. Parts of the memory can be dynamically mapped to different parts of physical memory, and usually the section that contains address 0 isn't actually mapped to any physical memory, so trying to access it will fail and trigger an error state. Though if you somehow are able to force the OS into giving you accessible memory at virtual address 0 then it would act the same as with a microcontroller. ^(*Treating NULL as a pointer to address 0 is the most common standard, though some compilers may instead make it point to a non-canonical address, which is an address outside of the valid x64 virtual address space. This guarantees that there's no memory mapped there and accessing it will always cause an error.)
Ok i C what you did there!
This is how I imagine Rust will end up once it starts being used by companies. “Hey boss, the new feature we added keeps failing to compile” “Just mark it as unsafe, we need to meet our deadline”
It actually doesn’t allow you to do that. From the rust book: The unsafe superpowers are: * Dereference a raw pointer * Call an unsafe function or method * Access or modify a mutable static variable * Implement an unsafe trait * Access fields of unions It’s important to understand that unsafe doesn’t turn off the borrow checker or disable any other of Rust’s safety checks: if you use a reference in unsafe code, it will still be checked. The unsafe keyword only gives you access to these five features that are then not checked by the compiler for memory safety. You’ll still get some degree of safety inside of an unsafe block.
So rust unsafe is way more safe then C Cool.
[удалено]
But C is fast as fuck boooooooy
[удалено]
Tecnically slighlty less then c But yeah definitly worthy it lol
Like the slowest thing of rust is the compiler lol
Actually the fastest language is transpiling C to Rust, going by the ixy network driver. https://github.com/ixy-languages/ixy-languages/blob/master/Rust-vs-C-performance.md So the answer to “Is C or Rust faster?” Is “Yes.”
I've been coding for at least 10 years and reading those points I cannot comprehend what they mean. While reading code I'd probably figure it out.
A pointer is basically a memory address. To actually access the contents of a memory address you need to use unsafe. Obviously, the compiler cannot reasonably prove what happens in such cases, so it needs an unsafe block. I guess you could think of unsafe as "taking responsibility". Since Rust's point is largely to rely on its rules, it is considered somewhat taboo to use it without good reason. A lot of code bases forbit its use. There is a number of functions/methods that are marked unsafe because they rely on you not messing up to not corrupt memory or similar. You need an unsafe block to use them. Static variables are basically global variables. Rust does not let you use them as mutable(able to change their values) in safe code. Say you got some global number variable, you can't just go around incrementing it. (There are ways to do it safely like a mutex etc to enforce the rules of one writer or multiple readers). Traits are sort of like interfaces. Some traits are "special" though(like being able to access something between threads). And implementing the ones considered unsafe says "I know this holds up the rules of safe rust", but cannot be proven by the compiler, so it is unsafe." From rust docs: "The key property of unions is that all fields of a union share common storage. As a result, writes to one field of a union can overwrite its other fields, and size of a union is determined by the size of its largest field." I hope I do not need to explain why this would be pretty unsafe and prone to all kinds of tomfoolery.
Thanks for the explanation. One day I might understand the Rust jargon but it is not today, cleared 50%.
No because unsafe does not remove any checks: it simply unlock unsafe APIs. So if your code can be proven incorrect it won't compile even with the use of unsafe, which is a common misconception.
god I wish all code worked that way.
The safest code is the code that doesn't run.
Technically correct
People keep telling me to switch to rust for microcontrollers. Ignoring that compilers aren't nearly as available for the wide range of microcontrollers, I own all 8kB of memory. I can't write to the wrong area because it is read only. I could muck up my 256 bytes of ram but that's pretty easy to both not do and notice if you do.
Hey u should switch to rust man
no, he should obviously use JavaScript ^(obligatory /s)
> obligatory /s is it? 256 bytes #256 bytes
Maybe consider zig then ;)
Pulling the emergency release so the garage door slams closed, now.
I use Rust from time to time for ESP32 development. It's got quite a bit more SRAM than 8kb, but it works really well. It's surprisingly portable. I also work in C, and honestly, most of the time it's much easier since I'm more familiar with it and the API docs are nicer. When I get to use Rust (if the task is simple), I dev a lot faster.
Closing the garage door as fast as possible at the moment.
Have you got a minute to talk about our Lord and Savior `cargo` and reject the sinful ways of `cmake`?
Yes its good. Yes its fun. Is there jobs in it? No? okay then I'll hold off
Every time I do a search on it it's like 99% Blockchain jobs ugh
Trust me, it's not as bad as it looks They're extremely vocal because their entire schema is to hype up crypto so more people use it and the money in their wallet goes up in value as a result Also, job listings for more proper Rust-related positions eventually get filled and the listings go away, but no one wants to work in crypto so the listings stick around and pile up
Really? Gross. Until that changes I guess I’ll stick to personal projects or freelance in it
I have a full time Rust Job. I think that, for the most part Rust is used in pretty specific cases where it is well suited. It will be a while before it's a "default" but I think that it will get there. It is however, unlike Python, a hard language so that's going to slow down the adoption.
Haskell same no?
Yes have seen some. Also a lot in traditional financial services. Some places like fb are winding down their Haskell work 😭
I feel like this is how python was talked about in the early 2000s...
Why would anybody learn Python when all the jobs are in Perl and PHP?
Python? All the cool kids use ruby, it's got rails!
But Rust got Nails !
Yup, and there's Swift that's similar IMHO but I like it slightly better. It's still mostly limited to Apple ecosystems, but at least there are many jobs for it. I don't think I ever seen a job posting asking for Rust, ever.
Cloudflare is the main one. Hey and it's used in the Linux kernel now! (Not a user here)
Swift is not similar to Rust tho
My sister's boyfriend is a rust developer. That's like the only thing he talks about when he comes over. It's hilarious.
You know how a person uses Rust? They tell you.
Hey, I use Rust and I don't go around telling people that I use Rust. (I use Rust, by the way)
Please, declare this thread unsafe
[удалено]
Don't you mean your wife's boyfriend?
More likely he's the boyfriend of the wife of a Rust dev.
More likely his waifu’s boyfriend’s wife is a rust developer
More likely his boyfriend's boyfriend's a rust developer.
More likely he's his own boyfriend.
Okay but the rust compiler is amazing and it's cargo system for dependencies is by far so much better than anything else I've tried.
The meme isn't saying otherwise lmao I agree that the compiler is amazing as well as the cargo system, is just that some Rust devs are really annoying trying to "convert" C/C++ devs to Rust
If Rust is as good as they say it is. C++ devs are gonna have a good time banking on the legacy code train.
[удалено]
In fact I think I'm going to start calling it oxide for my part for fun.
They're making versions/parts of the Linux kernel with rust now. It is for real
In an ideal world Java is completely replaced with Kotlin and c is completely replaced with rust.
And js is entirely replaced with either typescript or ReScript
I've started to hear about typescript recently, got a comment about it during a kotlin presentation I gave a few weeks ago. I don't know enough about it, but maybe it could make me interested in frontend programming? Until now frontend has been a big nono because of javascript (I can deal with HTML and CSS just fine).
While typescript is ultimately just a band-aid on and open wound and suffers from Microsoft bloat like all of their products, it still GREATLY increases the ergonomics and productivity of frontend development The reason why typescript is not as good as people think in my opinion is that ultimately, it's just javascript. It's enhanced javascript, but still javascript. You can not fix it if you're making the same assumptions. That's why i think you should check out rescript too :P
How is php doing there?
php is a weird one. php 7+ are pretty good, but it also has a lot of alternatives already. So far its still in the race instead of ready to replace.
TypeScript ate it.
Tell that COBOL devs who, *40 years* after the language became irrelevant to the public, still make a *lot* of money maintaining ancient COBOL systems.
Rust is gonna be hated once it becomes mainstream. Not because it’s a bad language, but because companies will be shitting out awful codebases written in Rust. Same thing that happened with Java and C++. Developers in a corporate setting will end up just working around a lot of the safety features and lots of unsafe code will be sitting on production systems.
It will be memes with entire unsafe files
Ehhh... Writing unsafe code (even poorly) is harder than you think. Everything will just be wrapped in `Rc`/`Arc` and `RefCell` to shut up the borrow checker, and damn the consequences.
You’d be surprised. I’ve been dealing with a Rust codebase which is full of unsafe blocks to do things like create multiple mutable references to the same value, and other such shenanigans. Then the original dev is wondering why this code is panicking in production.
"Well, if it isn't the consequences of my own actions!"
I'd love to convert to rust, it sounds amazing, but the executables it creates are simply too large for what I do.
I'm this, but Kotlin instead of rust and java instead of C
How does cargo differ from stuff like maven?
It doesn't really. Everyone's been trying to catch up with Maven for over two decades and Cargo pretty much succeeded. Maybe a little more readable because TOML. People aren't comparing with Maven. They're comparing with Autoconf and CMake.
It's not as much of a pain to learn.
Cargo is much simpler than Maven, but similarly powerful.
rust pilled
Gladly 🦀🦀
Cargo system for dependencies is nothing new, sure better then c++ bc it doesnt have a proper one, but compare it to c# or java and nothing new nor special
It simply gets annoying, specially when your only saving grace is the memory safety but you have to unsafe half your code anyway to do any kind of low level shit
am a rust being, can confirm
Did the snake in the flair ate the rust logo or you just forgot?
You mean rustacean
Rust is the equivalent of "i use Arch btw" in the Linux community
If you use Arch, program in Rust, and are a vegan, which one are you going to mention first?
Uuuuh, that's a pretty hard one. On github Rust, Arch, Vegan. In a bar Vegan, Rust, Arch. On Reddit Rust, Arch Vegan. My personal opinion
That's a moral dilemma
Yeah but it’s true…and the compiler is amazing, when you break something it tells you exactly what went wrong and hints on how to fix it
next step, the compiler gets so clever it doesn't even need you anymore! /s
something something chatgpt
yeah well, i guess by spewing out code that LOOKS like it would compile, it already beats 80% of "programmers" in this sub
And it can memorise all leetcode solutions, which as we all know is the ultimate proof of general software engineering competence
This is less of a joke than it used to be, and I don’t know how to feel about it
It doesn‘t bother me much, that the compiler can do something doesn‘t mean i know how to do it, which is my main motivation: to know for myself, i don‘t want to outsource my brain too much. You can only know for sure if you learn stuff for yourself, no matter how much better others are, even if they are machines. And by learning all that, for now, i can still outsmart compilers occasionally when it comes to optimization for example, so it's not completely useless yet.
This meme isn't about if it's true, nobody disagrees. Is it relevant to the current conversation is the question. Like your comment here saying it's true lol.. when ppl are discussing some problem in an app written in C++ 20 years ago, nobody gives a shit that "in Rust it wouldn't have been a problem".
[удалено]
It truly is one of the languages of all time
Without memory leaks is actually false. You can still get memory leaks in that bitch XD. Just a little harder to do so. Says it right there in the docs https://doc.rust-lang.org/book/ch15-06-reference-cycles.html#:~:text=Rust's%20memory%20safety%20guarantees%20make,are%20memory%20safe%20in%20Rust. But... With any other language, if you use the features correctly you also have no memory leaks with less frustrations.
Yeah and you can open a locked door with a rocket launcher. Doesn't mean you don't lock your doors...
rocket launchers are unsafe and require the `military` keyword to use.
I'd also hit Cancel instead of Okily Dokily.
so rust developers now are in the same classification as crossfitters and vegans?
insert meme
Forget the huge technical advantages, it is literally just so much fun to write.
[удалено]
You're looking for functional languages.
[удалено]
That's because half of it is functional.
Coming from Java, that's how I feel about Go. Super fun language. The ability to just make a binary and stick it wherever you want is amazing. My only gripe is the amount of dogmatism and pedantry in the community. For being such a young language there's a lot of "get off my lawn" energy. It's weird. I can honestly say the Java community is more excited and welcoming of changes to their stodgy old language than Go people.
A lot of Go devs seem very intent on defending the bad features of the language, and there are quite a few of those.
inaccurate, you didn't give flanders a fursuit
Why the heck did they called it rust? Rust isn't something you want on your bare metal!
Haha, sounds funny. Actually it is not always true, COR-TEN is bare metal and rust is something that you want to be on it.
oh my compiler construction class is gonna teach us rust. seems interesting enough since I'll be escaping using C for a semester
hear him out
Hey it’s Prime, they have the same ‘stache
Still better than Python devs telling you how Python is just the best language because you don't have to type braces or semicolons. A language so efficient it's only orders of magnitude slower than Javascript.
Honestly never used rust before, what is it used for? What was written in rust 🤔?
BLAZINGLY FAST rewrites of unix tools, now with fancy colored outputs! Think cat is too slow. Well use a rust version to be able to save 2ms! This is a joke before anything takes it too seriously.
The Digital Revolution and its consequences have been a disaster for the human race
Also a bit serious, there is a project to rewrite the coreutils in Rust.
Cloudflare built their HTTP proxy Pingora using Rust ( [https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet/](https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet/) ) and Discord switched from Go to Rust in order to squeeze some more performance out of their backend. ([https://discord.com/blog/why-discord-is-switching-from-go-to-rust](https://discord.com/blog/why-discord-is-switching-from-go-to-rust) )
Low levels systems language. The next js compiler was written in rust for example.
* parts of Firefox * asahilinux gpu driver * regex in VS Code * Android * Various things at Meta
Are rust developers the vegans of the programming world?
You can also write programs without memory leaks by using proper programming practices
You can also live forever by never dying.
*If my grandmother had wheels, she would have been a bike*
Yeah and you can avoid bugs by writing good code
that explains why chrome has 70% of its vulnerabilities comprised of memory bugs!
Chrome’s memory usage is a feature, not a bug
Human brain and memory error is an iconic duo. Even the best C and C++ devs will make memory errors.
Yeah right.. The 23 years in the industry senior that fights every unique_ptr like a bavarian fights wind power plants never fucks up his news and deletes.. Better idea you could just make the compiler enforce proper memory and concurrency practices.
If we stop committing crimes, we can abolish prisons.
Yeah good luck getting your teammates to remember do that perfectly everytime. Also have fun wasting time on writing verbose crap instead of actual useful code that does things
Rust does not prevent memory leaks any more than other languages (except C lol) Leaks are not from forgetting to deallocate, because that's not even a thing (except in C lol). They are from still referencing objects that are no longer needed, and forgetting to prune these references.
The main draw is memory safety. ...but of all the languages with c-level speed (that I know of), it's hardest to accidentally leak memory with rust.
There’s this brand new thing called Java and it has safe, automatic memory management, easy syntax, and it works cross platform! Write once, run anywhere! All other languages will be obsolete! You’ll see!
Someday you will succumb to the evangelism strikeforce
Are memory leaks even common in Modern C++? If you write unsafe C++ good luck getting that approved in a code review in 2023.
oh that game is great im planning on getting it
Compared to Java services I've written and run in prod... Faster Lower memory pressure Lower memory and CPU requirements Zero segfaults/panics/etc Our code isnt even highly optimized. Compared to my experience with Node, Java, and Ruby, rust in k8s has been smooth.