I generally like #rustlang but I think every project developer should be forced to use it on a Raspberry Pi with 4GB RAM... had to build Vaultwarden (https://github.com/dani-garcia/vaultwarden) on one, and man,,, after 15 minutes compilation is no longer running because the device went OOM and now is so hot the fan is louder that a datacenter server...
Just to be clear, I think this is a Rust problem, not a project problem.
In eine Diskussion von der Seite einsteigen, unsachlich argumentieren, C und C++ im selben Wort zusammenfassen, einen Informatikprofessor mit mehreren Ehrentiteln beleidigen und direkt nach der Antwort die Gesprächsteilnehmer blocken.
@markuswerle Ja, mein letzter Stand ist C++20 und den Hauptteil meiner Arbeit habe ich mit C++17 gemacht. C++23 bin ich nicht mehr drin, das ist richtig.
@markuswerle Es gibt einfach viel zu viele Details, die man beachten muss und fallstricke, die einem im Weg liegen. Wenn man nur einen davon übersieht, dann hat man auf einmal so ein Problem drin. Besonders Übel wird es, wenn man multithreading betreibt.
Und gerade von C wurde sehr viel UB geerbt. Z.B. das Thema mit signed integer overflow.
Man kann sich dann auch kaum noch auf das zu lösende Problem konzentrieren weil man ständig damit beschäftigt ist nicht ausversehen UB zu produzieren.
"If I understand correctly, what you are arguing for is a passive freedom, which is the absence of obligations; I am arguing for a positive freedom, which is the guarantee of rights."
Most succinct rebuttal I've come up with yet to those who view permissive licenses as more free than copyleft
@drewdevault I guess one of my bigger issues with most copyleft licenses in use is how incompatible they often are with each other and themselves. Especially the GPL... or any later version thing.
Note also that the "or later" is basically a CLA to the Free Software Foundation, which could make a GPLv4 whenever they want and put whatever they want in there.
"JSON Patch is a format for describing changes to a #JSON document. It can be used to avoid sending a whole document when only a part has changed. When used in combination with the #HTTP PATCH method, it allows partial updates for HTTP #APIs in a standards compliant way."
@janriemer yeah, that is the good one. There is also JSON Merge Patch which is unable to represent a whole lot of diffs, which can lead to broken data if you're not aware.
@mjg59 I was just asking because I enjoyed reading "The blind watchmaker" and "The selfish gene" and am not in a position to verify what he's saying. B
ut those are from quite a while ago I guess. Not sure what he's currently up to tbh.
I know Rust has an extremely strict compiler and is designed from the ground up for memory safety, but what evidence is there for it being truly bulletproof in that regard? I feel like a lot of people read the phrase "written in Rust" and see "immune to exploits," but that certainly isn't the case, right? How safe is Rust, really? Obviously it's no contest if you're comparing to like, C++ or Java or whatever else, but is it really the end-all-be-all of secure low-level programming?
@bamboombibbitybop It is certainly not bulletproof, there is no formal proof that rust is memory safe, in fact it has been proven that it isn't in 100% of cases.
That said, getting memory safety violations without using unsafe is considered a serious bug and whereas some of them have popped up over time, they are extremely unlikely to the point where you really won't hit them unless you're actively trying. It's much more likely to have memory unsafety from an unsafe block or C bindings.
@kornel Yeah, I know about Polonius and the new trait solver. Although it's hard for me to gauge where they're at in terms of progress of switching over to them.
@bagder Literally the only reason I was preferring wget in the past was not having to write the -O parameter. Nowadays I usually try curl first, but switch to wget if it isn't installed on the system I'm on (which does happen, as unbelievable as it sounds).
Let’s talk tags on clothing. I hate them and they annoy me to no end. And even if I cut them off, the tiny bit remaining always manages to touch me and I hate it. 😩
Hm...I'm getting the impression that #Rust is increasingly met with a refusal by some people (it's an almost hateful attitude sometimes).
I wonder why. Of course there are a lot of layers to it, but one is definitely that Rust has gotten a lot more exposure to people and so there are just a lot more potential matches that lead to Err(()) and that's Ok(()) (sorry, pun intended).
But I wonder, if there's more to it than what meets the eye (feeling excluded/alienated/left behind?).
@janriemer One big criticism comes from the way code is distributed being different from the classical C/C++ software while targetting the same space. So basically Linux distros etc. are suddenly forced to adapt as some packaged software migrates to Rust. That together with there being no LTS version and many packages being on latest stable, which is incompatible with the traditional LTS distribution model.
Also the (often overstated) support for platforms that LLVM doesn't support.
@khalidabuhakmeh Using .unwrap() or .expect() in production code. If something really can't happen, use unwrap_or_else with unreachable!(..) instead. Carrying around optional fields that shouldn't be able to be optional (usually happens with code generated from API definitions, but also in places where an enum would have been better than different combinations of Option). Lot's of ifs where one exhaustive match would have been better. Using an asynchronous mutex (It's almost never what you want)
@kate I disagree. Enforcing null checks before accessing a method is great and all, but it's not worth a lot if you can't encode in the type system that this check was already done elsewhere!
Because if you can't encode it in the type system, you need to do that same check over and over again.
Note that e.g. Swift is ok here, because the optionals are encoded in the type system, just not as a library type but built into the language directly.
@kate Also I can't come up with a useful scenario for Option<Option<T>>, you usually want to collapse this into a single option, because what is the semantic meaning of Some(None) supposed to be? Although it can happen in generic contexts, but you should flatten it as soon as possible.
If you do have an actual use case, introduce your own type instead and give the use-case a name!
@clementd@kate Yes. I was just mentioning Swift, because it has optionals that are builtin instead of being a library type like in Rust.
Both encode the nullability in the type system and both allow for non-nullable types, which is important.
My point is that the linter described above which just checks that you can't call methods without checking first is not an acceptable equivalent of what Swift and Rust provide.
And AFAIK, you can't nest optionals in swift, not sure though.
@fasterthanlime well at least there are tools like ls in there and you didn't have to input them by redirecting echo of an escaped binary to a file. Also what to do without chmod to make it executable 🤔
Our microwave oven is a sensory nightmare for me. I always try to stop it before it reaches zero and begins beeping. I get extremely anxious over this.