• 1 Post
  • 51 Comments
Joined 1 year ago
cake
Cake day: June 28th, 2023

help-circle






  • They’re both pretty on par for the most part. If it’s too much of a hassle, there’s no real need to switch.

    Now that Gitea is owned by a for-profit company, people are afraid that they’ll be making anti-user changes. This, Forgejo was born. It pulls from Gitea weekly, so it’s not missing anything. It’s also got some of its own features on top, but they’re currently pretty minor. Also, most of the features end up getting backported back to Gitea, so they’re mostly on par with each other. However, many features find themselves in Forgejo first, as they don’t have the copyright assignment for code that Gitea does. Additionally, security vulnerabilities tend to get fixed faster on Forgejo. They are working on federation plans, however, so we’ll see how that pans out.

    Overall, there’s no downside of switching to Forgejo, and you’ll probably be protected if Gitea Ltd. makes some stupid decisions in the future. However, at the moment, there’s no immediate advantage to switching, so you can stick with Gitea if you’d like.






  • Mine does some, then waits, then does some again, until you open it. Terrible because there’s enough silence to ignore it, but the beeps are still often enough to be annoying, so your stuck in a constant indecision between getting up and opening the door, and just staying and working since it’s quiet now.



  • IIRC Hindus invented this number system (with glyphs for 0-9), and then the Arabs starting using it. Eventually the west started using them and credited the Arabs.

    As for how they are written, everyone used the same shapes, and then they probably just ended up changing over time (“Hmm…how do I write that number again? Oh whatever I’ll just make it up”)

    Feel free to do your own research though.


  • I’ll point to how many functional languages handle it. You create a type Maybe a, where a can be whatever type you wish. The maybe type can either be Just x or Nothing, where x is a value of type a (usually the result). You can’t access the x value through Maybe: if you want to get the value inside the Maybe, you’ll have to handle both a case where we have a value(Just x) and don’t(Nothing). Alternatively, you could just pass this value through, “assuming” you have a value throughout, and return the result in another Maybe, where you’ll either return the result through a Just or a Nothing. These are just some ways we can use Maybe types to completely replace nulls. The biggest benefit is that it forces you to handle the case where Maybe is Nothing: with null, it’s easy to forget. Even in languages like Zig, the Maybe type is present, just hiding under a different guise.

    If this explanation didn’t really make sense, that’s fine, perhaps the Rust Book can explain it better. If you’re willing to get your hands dirty with a little bit of Rust, I find this guide to also be quite nice.

    TLDR: The Maybe monad is a much better alternative to nulls.