1,706 karma · joined Dec 9, 2019 (6y ago) · 623 submissions
comment 3y ago · link · parent
I'm just so over having to guess what a function might accept or return. Life is too short to spend it constantly reverse engineering code because people can't be arsed to write proper documentation.
comment 3y ago · link · parent
IME this kind of "magic" very quickly loses its appeal when you have to debug it. The author's idea of libraries wrapping this stuff up so users don't have to care about it just doesn't pan out at all in my experience.
comment 3y ago · link · parent
I never even mentioned anything that even relates to runtime types, I don't know why you'd bring them up?
And saying that classes, inheritance and overriding are orthogonal is bizarre. They're intricately linked and at the heart of OOP. It doesn't even make sense to define overriding without inheritance.
>In the end OO and FP are anyway the same thing at the core. You can mechanically translate one into the other:
Coinductive types have destructors so they look a bit OO-ish, but that's it. The key part of OO isn't having fields, but inheritance.
comment 3y ago · link · parent
Inheritance is so nightmarish to me because people tend to use it in such a way that I often don't have the slightest clue what I'm actually dealing with, buried under layers of indirection that seem to serve absolutely no purpose. If I have an object of class X, is that actually an X, or something that just looks like it and actually behaves differently because someone decided to override a method in a subclass?
Interfaces tend to be much less monstrous IME, so I don't think the issue is with abstractions themselves. Especially when people use interfaces to abstract over common behavior between data types, rather than trying to future proof for something that never occurs.
comment 3y ago · link · parent
Other than that, the difference is mainly in infrastructure/libraries and community.
comment 3y ago · link · parent
>claiming that automobiles are really the same as bicycles, just faster. Except automobiles resulted in major shifts in both behavior and policy, and there’s a reason people don’t ride bicycles on the autobahn.
But speed (and weight) is the key difference. If cars were just really fast and heavy bikes, would anything change? I don't think so. It's purely quantitative, rather than qualitative.
It might be that the quantitative differences make generative systems harmful (though I'm not convinced), but that's not substantiated by claims about it not actually being learning.
comment 3y ago · link · parent
As a more obvious example, if you want to modify a.b.c.d.e (which isn't unrealistic), you'll need to call the constructors of A, B, C and D. If you don't use lenses, this is the code that will be duplicated. You can spread it between the classes or do all that in a method of A, but if you want to also modify a.b.c.d.f, you'll need to duplicate all that code (add another method to A, B, C, D that each calls the constructor).
With lenses, you define once how to access d from a and then any modification of d can happen through that. If the structure changes, you only need to do the changes once by modifying the lens.
comment 3y ago · link · parent
comment 3y ago · link · parent
And you're close, it's about using immutability to make value equality cheap by making reference equality a proxy for it. If you don't use mutations, value equality implies reference equality and is thus equivalent (since reference equality already normally implies value equality). That means you can get away with just a single pointer comparison in comparison to completely traversing both structures. This is e.g. what React does to determine whether arguments of a component have changed.
(Well, at least I also struggle to think of a scenario where both types of equality are semantically important).
comment 3y ago · link · parent
Lenses are "smart" in the sense that they only copy what's necessary.
comment 3y ago · link · parent
Now, rewriting everything, including all the legacy drivers? Yeah, never happening even if Rust succeeds utterly.
comment 3y ago · link · parent
[1] https://www.pcgamer.com/if-dwarf-fortress-sells-millions-on-...
comment 3y ago · link · parent
Saying that it just looks like P(text|internet) is a tautology, it's a text predictor trained on the internet. This doesn't tell you anything about why phenomena like the above occur, or why it occurs only in large language models and only in some of them.
comment 3y ago · link · parent
Due to being written in C++, mods are quite restricted in what they can do (especially in comparison to more recent games like Rimworld that are trivial to decompile due to using C#). Especially frustrating because performance really isn't up to par - a lot of the old generational forts from a decade+ ago are really only possible now if you tailor your gameplay to account for performance issues.
comment 4y ago · link · parent
[1] https://en.wikipedia.org/wiki/Perverse_incentive#The_origina...