[-] [email protected] 16 points 6 months ago

Not the creator, just posting

[-] [email protected] 16 points 7 months ago

This is why Bobby Tables mom needs her Github account suspended.....

[-] [email protected] 16 points 10 months ago* (last edited 10 months ago)

The problem is that C is a prehistoric language and don't have any of the complex types for example. So, in a modern language you create a String. That string will have a length, and some well defined properties (like encoding and such). With C you have a char * , which is just a pointer to the memory that contains bytes, and hopefully is null terminated. The null termination is defined, but not enforced. Any encoding is whatever the developer had in mind. So the compiler just don't have the information to make any decisions. In rust you know exactly how long something lives, if something try to use it after that, the compiler can tell you. With C, all lifetimes lives in the developers head, and the compiler have no way of knowing. So, all these typing and properties of modern languages, are basically the implementation of your suggestion.

18
submitted 10 months ago by [email protected] to c/[email protected]
38
submitted 10 months ago by [email protected] to c/[email protected]
25
submitted 1 year ago by [email protected] to c/[email protected]
11
Rust Analyzer Changelog #241 (rust-analyzer.github.io)
submitted 1 year ago by [email protected] to c/[email protected]
[-] [email protected] 16 points 1 year ago

Comment about image

[-] [email protected] 15 points 1 year ago* (last edited 1 year ago)

I learend it in the 90s, and was working on a large Perl codebase 2005 and a couple of years forward. And 20 years, it still started to feel dated, and 15 years ago it was just so out dated it hurt. So, starting to learn Perl 20 years ago would not have been great :) However, the things making Perl horrible, is pretty much threre in Python also with the addition of significant whitespace... so technically, going from Python to Perl might actually be a step in the right direction.... Now, if you excuse me, I will hide behinde this huge rock for a while to let the incoming projectiles settle.

14
Rust Analyzer Changelog #240 (rust-analyzer.github.io)
submitted 1 year ago by [email protected] to c/[email protected]
29
submitted 1 year ago by [email protected] to c/[email protected]
97
submitted 1 year ago by [email protected] to c/[email protected]

Found this on Mastodon https://fosstodon.org/@dpom/112681955888465502 , and it is a very nice overview of the containers and their layout.

15
Rust Analyzer Changelog #239 (rust-analyzer.github.io)
submitted 1 year ago by [email protected] to c/[email protected]
23
submitted 1 year ago by [email protected] to c/[email protected]
18
Rust Analyzer Changelog #238 (rust-analyzer.github.io)
submitted 1 year ago by [email protected] to c/[email protected]
79
Announcing Rust 1.79.0 (blog.rust-lang.org)
submitted 1 year ago by [email protected] to c/[email protected]
34
submitted 1 year ago by [email protected] to c/[email protected]
[-] [email protected] 16 points 1 year ago

That is the boring part when projects gets more mature...

[-] [email protected] 17 points 1 year ago* (last edited 1 year ago)

Yes, that was the first that came to my mind when I saw the TIL post.... which also was why I felt the need to see if that rant is still valid, or if modern libraries could handle that.

[-] [email protected] 16 points 1 year ago

Well, if the only thing you need from reflection is the name of a type, so then yes. But I wouldn't really call this reflection since it is very limited.

[-] [email protected] 16 points 1 year ago

It starts by presenting it self as an Comedy AI, that implies more than deep fake.

[-] [email protected] 14 points 2 years ago* (last edited 2 years ago)

No ads disguised as search results. Actually, no ads at all. Great search results. Lenses.

Also, there is a solution for incognito mode. And ad supported, in practice means tracked by advertisers, and hence you are the product.

[-] [email protected] 16 points 2 years ago

Until Eric is caught cheating on his girlfriend with Alice....

[-] [email protected] 15 points 2 years ago

The core problem I see with Inheritance is that the abstractions tend to fall apart and no longer be true. Lets use the Animal example. It is easy, when you have Animal -> Cat and Animal -> Dog. But as soon as we become more specific like Animal -> Mammal -> Cat, Animal -> Fish -> Hammerhead Shark, Animal -> Bird -> Bald eagle, we risk of getting in trouble. Because now for all purposes we assume things about the Fish, Birds and Mammals, like fish is in the sea and mammals are live on land. We know that this is not strictly true, but for everything we need it works. Later we need to handle a dolphin.... should that be a fish, or do we need to restructure the whole program. If we treat it like a fish, then we might be even deeper in trouble later if we would need to handle birth. And even if we restructure our program to be correct to handle birth, we might stil forget that some mammals lay eggs like the Platypus, so then things break again if we need to handle that. We tend to see Inheritance as a rigid fact based structure, but the core problem is that it is just a bunch of assumptions we dictate in a very rigid way that is hard to change.

Composition have no problem with specifying the platypus as a mammal that lays eggs and have a beak.

view more: ‹ prev next ›

snaggen

0 post score
0 comment score
joined 2 years ago