@Pasha's banner p

Pasha

Defend Kebab

1 follower   follows 4 users  
joined 2022 September 05 06:58:22 UTC

				

User ID: 481

Pasha

Defend Kebab

1 follower   follows 4 users   joined 2022 September 05 06:58:22 UTC

					

No bio...


					

User ID: 481

Yep.. I am not that young and I was a kid back then sorry

This is indeed possible, "correctness" was one of the only openly voiced objections. Although I have never come across chatgpt using language wrongly, and it explains things much better than native speakers.

I just got severely downvoted with a lot of angry replies in a (specific small European language’s) language learning subreddit for suggesting chatgpt as a useful tool to explain weird grammar constructs and help with reading and study in general. This is just insane to me but also darkly amusing. I honestly haven’t realised or taken seriously the extent of reaction to this technology before. And after all the responses I am not even sure what these people are actually objecting to. I am tempted to ask chatgpt

Have seen only the first avatar movie as a kid. Would you recommend the second one?

Backend infra work. Efficiency was important, so we ended up having to use pointers

This is wild for me. I work in HFT and almost never have to touch pointers even in cases where latency/performance is important to absurd levels. I know you said you don't work anymore, but passing pointers around threads like what you are describing is not even a good C++ practice: https://floooh.github.io/2018/06/17/handles-vs-pointers.html. Pointers are too big on 64 bit systems and will mess up your cache locality and you will often get horrible assembly because aliasing (more details on that below).

Rust relies on third-party libraries to solve a LOT of its design flaws, like tokio for async stuff

What design flaw is tokio solving? It is quite inherent in Rust that the language doesn't ship with a default runtime, so there is experimentation around this. And tokio is a really fantastic piece of software. Maybe you are thinking of libraries like async-trait? It can be annoying to find gaps like this in the language that takes years to close, but they have been going down in numbers rapidly, and it is quite nice that different solutions can be tested as macro libraries before being baked into language design. Definitely beats a committee hashing out nonsense which then cannot be changed forever because muh backwards compatibility.

With Rust's version of "&mut" - which despite the lying name (and horrible syntax) actually just means "exclusive reference"

Yes and this is fantastic design because aliasing. If you ever stared at absolutely horrible assembly because gcc couldn't prove two pieces of memory are not overlapping, you understand why this language design exists. It is not for political reasons or giving an illusion of progress over C++. Godbolt guy's recent compiler optimizations video is a decent primer: https://youtube.com/watch?v=PPJtJzT2U04?si=kZ3CFZKlzDCeSRxX. mut is much superior to const for this reason alone. Crazy that C has the reserved keyword to address this problem, but C++ doesn't even have this. (also it is a correct choice to make the default non-mut, makes reasoning about code much easier). I think you have a point about interior mutability confusing this relationship though. You win some you lose some.

Here's a C++ object: MyStruct. Here's the read-only version of that C++ object: const MyStruct. You'll forgive me for not being impressed that this common safety pattern can be done in "like 10 lines" in Rust by implementing your own Mutex wrapper.

I am not very knowledgable about this subject, but if const MyStruct contains a pointer in it, you can simply mutate the pointed data right? Chatgpt seems to think so. Then this is the exact same problem you are complaining about with Rust Refcell/Mutexes. Your const MyStruct doesn't guarantee anything at all not already guaranteed by Rust shared reference or Rc/Arc without interior mutability.

does putting wrappers around everything feel natural to Rust developers

Yes the newtype pattern is extremely standard in Rust and I do it all the time.

Which means you need to do type conversions for every get and put operation

Usually when you newtype something, you are doing so because you don't want the inside type to be accessible as it is anymore, but only through a certain limited interface. In most use cases you should be writing the newtype in a way that the user can do everything they need through the newtype. It is pretty trivial to define arithmetic operations on your newtype for example

I have to interact with some Python code at work once in a while, and the mentioned Astral tools make me slightly happy to touch Python for the first time in my life. It got adapted very quickly in my company.

That is an interesting opinion I have never encountered before. What makes Rust unable to "properly manage memory" in a way that C can? Or did you have another language in mind when you wrote this? You know you can just malloc and shuffle pointers around in Rust just like C right?

Professional Rust developer here.

First of all, congratulations on getting paid to write Rust code without actually liking it. In my experience this was quite difficult to achieve so everyone around me really likes Rust a lot.

Borrow checker is honestly one of the hot topics about Rust that always confuses me, because I almost never have problems with it apart from some very small edge cases. Meanwhile people online seem to base half their Rust experience on the borrow checker. May I ask you what sort of programming did you do?

I will fight you to death about the mut keyword. It is absolutely fantastic and it pushes you in a more functional way of programming.

which means that there's no actual way to get, say, a reference to a mutex with the guarantee that you will not modify the object it points to.

But this can be achieved easily with like a 10 line wrapper type around Mutexes in your codebase?

Anyway I used to write C code and switched to Rust without brushing much with C++ so it has been a gigantic improvement in all ways. But honestly I fail to see why anyone would prefer C++ at this point for new projects (except for gamedev where shipping something buggy and fun trumps correctness by a lot).

This is actually an argument I had a couple of times in groups of new parents, almost every single time with American expatriate families. They seem absolutely terrified of SIDS in a way that none of the other Europeans or 3rd worlders I know are. And it sucks because some of the "precautions" make it very difficult to take care of a small baby sometimes.

You don't need to be "famous". I know of one girl I went to uni with who started doing porn. She isn't really famous or big (although I am sure she has a decent income with some business acumen), but pretty much every common acquaintance seems to know about this. Especially very difficult to escape if you make content in any other language than English since such markets are rather small.

Cryptonomicon

I read Snow Crash recently and thought it was wacky but quite fun. Also metaverse. Is this a similar book?

As parent of a child who will start school in a couple years, this started to worry me. Any good resources from mottizens to learn about what traps to look out for when checking out schools?