1,173 karma · joined June 14, 2021
Aometimes it feels like a super power because it takes away the "starting anxiety" and makes everything a trivial sequence of "following simple steps"
In advanced cases, you'd need dependent types, but the only place where that almost shows up is in the "amount <= balance" assertions. That's also silly because if you typed "amount" and "balance" correctly, then "balance -= amount" has to produce a runtime error because the resulting balance would be negative and not a valid value for the type. So, it's a very natural place anyway to force the programmer to properly handle errors anyways.
"Contracts" has been around a long time and has not caught on. That's usually a good sign that better approaches are prevailing.
In other words: refinement types are a better solution.
I like this framing a lot. I'm a huge fan of tiered abstractions. Ideally, you start with the highest level where it's cleanest and you work your way down to lower levels as required. Automated expansion for a lower level.
C is horribly and unfixably broken. We've known that for many decades. Just let it die already!
Let's move on.
Rabin Fingerprinting is one of my favorites of his contributions. It's a "rolling hash" that allows you to quickly compute a 32-bit (or larger) hash at *every* byte offset of a file. It is used most notably to do file block matching/deduplication when those matching blocks can be at any offset. It's tragically underappreciated.
I've been meaning to write up a tutorial as part of my Galois Field series. Someday..
Thank you again!
Personally I think it's mostly a proxy vote against bigtech/social-media. People are pretty fed up with their practices but don't have power to act at a national level. But, they DO have power at the local level to show up to town council and talk directly (in-person) to their representatives.
I think the other side of this is that there's this old idea (mostly correct) that municipalities partnering with businesses is good for the community because it brings positive side-effects: jobs, more cashflow in the local economy, etc. This is much less true for data centers. It's just a building that uses power and produces heat/by-products. Generally, employment gains are tiny compared with the old "automaker" labor model of the 1960s-1980s
People recognize this and they're not happy. They don't think it's a good deal for their communities.
In this particular case it means that you end up with really bad ad targeting. I'm happy with that, it's much easier to dismiss and roll your eyes at scam junk ads than ones that actually know how to manipulate you...
Amusing to me how wrong this is... I don't know how you can determine such characteriatics from a photo in any direction. I will admit that my appearance though tends to throw mixed and incorrect signals (not an accident). I find the entire concept of appearance signaling pretty off-putting so I guess this is a great result.
The only thing Google Lens has succeeded at for me is age, race, and location. Basically everything else has been very wrong.
Occasionally, someone mentions RSS as a solution. That's only a small component of the solution.
The distinction of stack vs heap objects is an old distinction that is deeply encoded in the semantics of C. It's not obvious that's the right choice.
It's worth pointing out however that you do want to have control sometimes. When you're coding for performance, etc it can be very important to control exactly where objects live (e.g. this must be on the stack with a certain layout). I feel like sometimes it's underappreciated in modern PL design that low-level coding needs this kind of control sometimes.
I think there exists a happy medium solution ultimately though.
I don't personally have a solution to propose to this problem. I generally appreciate their caution and long-term considering. It's refreshing coming from C++. I suppose one could argue that they've overcorrected in the other direction. Unclear.
Deeper than that, I think there's a philosophical dispute on whether languages should or shouldn't even evolve. There are people with C-stability type thinking that would argue that long-term stability is so important that we should stop making changes and etch things into stone. There is some merit to that (a lot of unhelpful churn in modern programming). But, failure to modernize is eventually death IMHO. I think C is slowly dying because of exactly this. It will take quite a while because it is critical computing infrastructure. But, few people remain that defend it's viability. The arguments that remain are of the form "we simply don't have a viable replacement yet".
Perhaps you can even take the view that this is the lifecycle of programming languages. They're not supposed to live forever. That could be a reasonable take. But then you really have to confront the problem of code migration from old languages to new languages. That is a very very hard unsolved problem (e.g. see: COBOL).
Language evolution is foundationally a hard problem. And I'm not unhappy with Rust's approach. I think no one has managed to find an ideal approach.
I'm not sure what the right answer for Rust is, but I'm fairly convinced that these type system ideas are the future of programming languages.
Perhaps it can be added to rust in a reasonable and consistent way that doesn't ultimately feel like a kludgy language post-hoc bolt on. Time will tell. There is a serious risk to getting it wrong and making the language simply more complicated for no gain.
But, these ideas are really not obscure academic stuff. This is where programming language design is at. This moment is like talking about sum-types in the 2010s. These days that concept is normalized and expected in modern programming languages. But, that's a fairly recent development.
I suspect that Linear types, refinement types, etc will follow a similar trajectory. Whether new ideas like this can be reasonably added to existing languages in a good way is the age old question.
Hopefully Rust makes good choices on that road.
This will indeed be very hard, but I'd urge you to take a long-term and positive forward looking approach.
It sounds to me like you don't have the best family/friends social structure to depend on. I'd focus on building that. It will take time ... and it won't happen on your schedule. The cold hard fact is that you have to put yourself out in the world in social spaces and be open and vulnerable. This is often why shared hobbies are recommended. But the hobbies aren't entirely the point. The point is that you're engaging in the real world with real people and learning to be open and vulnerable in that environment. If you embrace that (truly embrace), the friends and relationships will eventually come. But, it may take a long time. It's a long game. But its worth it.
In the short-term, you can find ways to cope. For me, I got REALLY deep into ultra-running after a bad breakup. It helped. But, it was seriously just a cope for not having the foundational social structures that everyone needs.
In summary: find healthy short/medium term coping methods, and invest in building longer-term social connections. And expect it to take some time. Give yourself grace. You're doing a hard thing. It's okay for it to be a struggle. Just keep working on it and you'll get through it. I've been through this. It gets better, I promise!
Good luck. I'm rooting for you!
https://xorvoid.com/otcc_deobfuscated.html https://github.com/xorvoid/otcc_deobfuscated
(Source: I'm also a climber. Not remotely close to Alex's level. But frequent exposure significantly changes how your brain processes these situations)