• 2 Posts
  • 302 Comments
Joined 11 months ago
cake
Cake day: July 31st, 2023

help-circle

  • To offer a differing opinion, why is null helpful at all?

    If you have data that may be empty, it’s better to explicitly represent that possibility with an Optional<T> generic type. This makes the API more clear, and if implicit null isn’t allowed by the language, prevents someone from passing null where a value is expected.

    Or if it’s uninitialized, the data can be stored as Partial<T>, where all the fields are Optional<U>. If the type system was nominal, it would ensure that the uninitialized or partially-initialized type can’t be accidentally used where T is expected since Partial<T> != T. When the object is finally ready, have a function to convert it from Partial<T> into T.








  • At this point, it’s an unsolvable problem.

    The only way to begin preventing lobbying interests from overtaking voter interests would be to have anti-lobbying politicians, and enough of them to actually get something done without being blocked by both the Democrats and Republicans. That would only happen after multiple decades of anti-lobbying presidents being elected, and that itself will never happen because the RNC and DNC are both paid off by corporate interests, so they’ll never nominate a candidate that goes against their masters. And, on top of that, it’s highly unlikely that a third-party candidate will ever succeed when they’re both illigitimized by the media and put in an extreme disadvantage by the electoral college.




  • I think, in hindsight, I was very wrong about this.

    If months of pussyfooting around dropping support for the Israeli government in spite of public outcry and Democrat voters’ desires hasn’t done anything, maybe we’re not actually something that Biden cares about. I don’t think Israel holds that much value in military intelligence that it’s worth risking both tarnishing the United States’ global reputation and being hated by his own voter base over.

    Either he’s expecting to win, just by virtue of his opposition being worse, and doing what he wants because of it (which you pointed out), or he’s doing what his party was paid to do by lobbyists. It doesn’t make sense for someone who is supposed to be representing his voters to go through so much effort to avoid listening to them unless there are greater interests at play. Either way, something is very fucked up about this election cycle, and it’s going to have some nasty consequences for the future.



  • pivot_root@lemmy.worldtoLinux@lemmy.mlSSH as a sudo replacement
    link
    fedilink
    arrow-up
    5
    arrow-down
    2
    ·
    6 days ago

    The problem is that they’re trying to frame it as a better replacement for sudo when it’s really not.

    In some respects, it’s safer by not using a setuid binary. In other respects, it massively increases the surface area by relying on the correctness of three separate daemons: systemd, dbus, and polkitd. If any one of those components are misconfigured, you risk an unauthorized user gaining root privileges.

    With sudo, the main concern is the sudo process being exploited through memory safety bugs since it runs at root automatically.

    Don’t get me wrong, sudo has a lot of stupid decisions and problems. There’s a ton of code in sudo for features that almost nobody uses, and there’s bound to be bugs in there somewhere. It needs to be replaced with something simpler, but run0 is not that.