I've been doing programming for ~31 years in total and ~22 years professionally and at this point I have lost all hope that programmers at large will ever gain these mythic qualities called "self-reflection" and "introspection". Truth is, these people are simply afraid for their cozy jobs, that's all there is to it. Derivative states of mind like Stockholm Syndrome and Sunk Cost Fallacy are quite normal to appear in…
This is one possibility. Have you considered the other, that you're the old-man-yells-at-cloud variety of narcissist? Hence why you choose to interpret things as everyone (except you) is defective. Everyone (except you) is laughable, completely lacking in self-awareness, refusing to adapt and be and do as they should (according to you of course). Because they're all lesser than you! That's why. You write Rust. So obv…
"No way to prevent this" say users of only language where this regularly happens
281–290 of 342 posts
Re: "No way to prevent this" say users of only language where this regularly happens
#282Earlier quoted context omitted.
Exactly this. It's all about trade-offs. You need to pick the right tool for the job. Sometimes the right tool is dangerous. Knives are dangerous tools, but you need them if you want to cook a meal.
I love one comparison to hole hawg[0] (used for unix vs windows&mac), which is usable here. Memory safe languages are like a fancy electric drill from target. They get the job done, but if you want some more serious drilling they die on you instead of doing something dangerous. C is like one of those drills which are comprised of engine and a handle (cheap, changeable piece of steel pipe). They are designed to do one…
This “sometimes you need a knife" argument just doesn’t make sense. You can have the power and the safety. Stop cutting off your fingers.
Re: "No way to prevent this" say users of only language where this regularly happens
#283Earlier quoted context omitted.
With all the language features I agree. However, if you reduce the language surface it is possible to have something safe and simple enough (IMHO). For instance, you can say no async, no custom traits and only {Debug, Display, Eq, PartialEq, ...} are allowed for your structs and generics. From limited personal experience that takes away more than half of the complexity of navigating rust code.
The more you take away, the closer you are to a simple but unsafe language. If you remove the "unsafe" keyword, many things you can't solve easily nor optimally. You might be able to outsource some complexity to external libraries, but integrating libraries is itself a major headache, and it can lead to security issues too.
You don’t need to outsource complexity anywhere. Rust is fully capable.
Re: "No way to prevent this" say users of only language where this regularly happens
#284Earlier quoted context omitted.
Here's my thinking. It's fair to say C99 isn't that much more complicated than C89, which formalizes various things that are a bad idea such as "volatile", as well as numerous good ideas like hey we should let you define a variable where you use the variable - however C99 adds more of the bad like "restrict". In both those cases the K&R C model was very simple. You could decide you love how simple this model is, and…
So you're focusing on the memory model. To which I'll say, it's not the language but it's the _machines_ that have SMP so effects will be visible out of order. The machines provide you with escape hooks to serialize read and write effects, and the language must give you access to these hooks because if the language opts to keep up the illusion of all sequential effects even in the face of SMP, it has to do so by seri…
"Faster but wrong" isn't really faster it's just wrong.
> That code doesn't appear to be sequential from other threads is not the language's fault. It's just a fact of reality.
What other threads? In a sequential programming language we certainly can't have "other threads".
> You can still write "sequential programs" like it's K&R.
"You can just not use the bits you don't like" is how we got C++ dialects that C++ proponents love to pretend don't exist. If the language is "simple" except for all the new bits that are complicated it's not simple.
Re: "No way to prevent this" say users of only language where this regularly happens
#285I bet this person felt really smart posting about this problem that surely nobody has ever thought of before
B) It's a spin on The Onion headline about school shootings.
Re: "No way to prevent this" say users of only language where this regularly happens
#286I bet this person felt really smart posting about this problem that surely nobody has ever thought of before
A) "surely nobody has ever thought of [this] before]" says person who hasn't read https://xeiaso.net/shitposts/no-way-to-prevent-this/ B) It's a spin on The Onion headline about school shootings.
B) I know, it still sounds smug and condescending
Re: "No way to prevent this" say users of only language where this regularly happens
#287Earlier quoted context omitted.
What’s missing from Rust? I don’t care if you use C, but don’t pretend like there isn’t another option
My problem with Rust is that it’s a hammer, and every nail is memory safety. If I’m writing a TLS library or kernel module, yes, memory safety is paramount. But if I’m writing pretty much anything else, Rust isn’t worth the slog.
Re: "No way to prevent this" say users of only language where this regularly happens
#288Earlier quoted context omitted.
The lack of memory safety is a property of C implementations, not the language itself. You can have an implementation that reliably crashes on memory errors if you want, though it does get easier if you leave out a few features like casting pointers to ints and back.
There is a multiple decade long history of coaxing a memory safe C embodiment. If it was possible to simply implement memory safety without fundamentally changing the language, you would have a compiler flag that would give to you, requiring no source modifications. No compiler gives you that memory safety flag (aside from very specific security features, ex. -fstack-protector) because it's not possible in C.
You can also run with ASan on, or compile into WebAssembly and run that… obviously not perfect though.
Re: "No way to prevent this" say users of only language where this regularly happens
#289Earlier quoted context omitted.
This isn't as clear cut of a case as you make it out to be. Britain's recently been on a path of overregulation bordering tyranny and limiting free speech. Canada is on a similar path. German green and red party politicians recently caught flack for trying to criminalize unpleasant critique. Press freedom and press independence are actively getting worse and Europe is setting course on a path of nationalism and conse…
American take: - UK sociopolitical problems caused by lack of guns - Canada sociopolitical problems caused by lack of guns - German sociopolitical problems caused by lack of guns I think I can complete the rest of the thinkpiece on my own, with the help of ChatGPT. My prompt starts with, "You are a gun"
Have a nice day.
Re: "No way to prevent this" say users of only language where this regularly happens
#290Earlier quoted context omitted.
`this` was mostly prevented in JS with the introduction of arrow function expressions
I had someone on Reddit r/webdev try to convince me that 'this' was not a mistake but a powerful language feature. A small glimpse into the mind of JS fans.