• 0 Posts
  • 27 Comments
Joined 2 months ago
cake
Cake day: 12 June 2025

help-circle


  • Ubuntu works just fine. But Canonical has an iffy track record.

    Some years ago they bundled an Amazon app with the plain install. For a while it also integrated with the system search by default. So if you searched for a file on your machine, then your search query would also be sent directly to Amazon. You could opt-out but it was enabled by default. Later it was changed to be an opt-in, and I believe it’s entirely removed today.

    Besides that they often push technologies that isn’t really fostering the community. When Wayland was slowly gaining traction, Canonical suddenly announced and aggressively pushed Mir, instead of collaborating on Wayland, the preferred making their own alternative.

    These days they are pushing their Snaps pretty hard. So back in the day if you apt-get install firefoxyou would get a regular native Firefox install. Today if you do the same it will instead install a Snap of Firefox. Snaps are also a bit funny… Flatpak was gaining traction, and suddenly Canonical decides to build their own alternative instead of contributing to Flatpak.

    So all in all, Canonical is making some dodgy business partnerships. The add a good bit of bloat in their regular install, and they constantly build their own (inferior) alternatives to all sorts of stuff.

    I’m all for having alternatives and choices, but in Canonical’s case, they generally don’t give you much choice, they just force you to use their alternative. This of course leads to fragmentation, which is unfortunate.




  • The idea is that you could have your data stored encrypted, such that the entity that is storing your data can’t read any of your data, but can still make calculations or updates to your data without ever learning anything about your data.

    The use cases seems rather narrow to me, but there are probably many that I just can’t think of at the moment.

    One idea could be something like a VPN service that wants to store as little data about the customer as possible. They could keep the account balance in an encrypted format. When you then add money to the balance, they can increment your balance by however much you paid, without knowing what your old balance was or what the new balance is. And they could then have another homomorphic function that can check whether your balance is positive. If your balance is positive you are allowed onto the service, if it’s not positive you don’t get access. And the company wouldn’t be able to know whether you had $5 in your account or $5000, just that your balance is currently positive.

    So yeah fundamentally it’s just being able to store and update some data, while the data is fully encrypted, never decrypting the data, to ensure some form of privacy or confidentiality



  • Damn… The more I hear about stuff like this the more I like the Danish police and traffic laws… They certainly aren’t perfect, but man is most of the rest of the world a shit show when it comes to that.

    In Denmark 3 km/h above the limit can get you a ticket. 30% above will get you a “point” to your drivers license and a much larger fine. 60% above and you will immediately lose your license and a large fine or potentially prison.

    A “point” stays on your license for 3 years, and it you get 6 cuts, you lose your license.

    I haven’t heard of anyone keeping their license “because they needed it”… You just have to bike, or take public transport.

    You also get a point for many other offenses, such as using a handheld phone, crossing on red, tailgating, driving the wrong way, or many other things.

    The first 3 years after getting your license, the limit is lower at 4 points, and if you lose your license and get a new license the limit is only 3 points.





  • I have been on Arch , and I’m now running NixOS as my daily driver… IMO NixOS is less of a hassle to set up, and nearly maintenance free compared to Arch… Twice a year when the channel updates there’s a bit of stuff, but every change I need to make is usually explained in the output of my nixos-rebuild… If something suddenly breaks in an update, I just boot into my previous generation, roll back my flake.lock and wait a few days for a fix to be available…




  • Unittest in Python, enjoy! If you pass it with a function like the one in OPs picture, you have earned it.

    import unittest
    import random
    
    class TestOddEven(unittest.TestCase):
        def test_is_odd(self):
            for _ in range(100):
                num = random.randint(-2**63, 2**63 - 1)
    
                odd_num = num | 1
                even_num = num >> 1 << 1
    
                self.assertTrue(is_odd(odd_num))
                self.assertFalse(is_odd(even_num))
    
        def test_is_even(self):
            for _ in range(100):
                num = random.randint(-2**63, 2**63 - 1)
    
                odd_num = num | 1
                even_num = num >> 1 << 1
    
                self.assertTrue(is_even(even_num))
                self.assertFalse(is_even(odd_num))
    
    if __name__ == '__main__':
        unittest.main()
    

  • I have an education in compsci, and I have worked in software engineering and platform engineering for 8 years now… And I only know of one programming language that makes use of “=/=” which is Erlang. Every other language or scientific papers I know of make use different operators.

    Prolog comes close with “==”, and Haskell too with “/=”, but every other language has either used “!=”, “~=” or “<>”. The papers I have read that go for a more pseudo-code or mathematical notation has always used “≠”.


  • To some extent the SQL syntax also kind of makes sense… It’s a combination of both “greater than” and “smaller than” operators, which is kind of a different way of saying something is not equal.

    The “!=” comes from most programming languages using the “!” character for negation. Negating something is usually read and pronounced “not”. So it literally reads “not equal” if you are reading the symbols.