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...
FrederikNJS
The right tool for the right job ¯\(ツ)/¯
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.
Last time I used EndeavourOS, I managed to get the graphical installer to install BTRFS on LUKS, it did require custom partitioning in the graphical installer, snapper just worked after that.
Zram (or was it Zswap?) was pretty easy to enable after installatiok
The bootloader might be beyond what the graphical installer can do though... I never really bothered switching...
You are correct about the miscommunication bit.
But when you lease a car, do you get told when the lease ends?
When you buy a license for a game, do you get told when that license ends?
I gotta ask, what is it you want that the installer doesn't provide?
You are correct for regular hash functions, but a cryptographic hash function has stronger requirements.
MD5 was supposed be a cryptographic hash function, but it was found to be flawed all the way back in 1996, and has been discouraged ever since... Now it's too weak to be used in a cryptographic setting, and too slow to be used in non-cryptographic settings.
This is why hashes like xxhash is considered a non-cryptographic hash function, while SHA-256 is considered a cryptographic hash function.
Oh shit! You are completely correct... I looked up my math, and apparently I put a mutiplication sign instead of a power-of sign...
That's horrifically wrong, but as you mention, still not strong enough...
I have struck out the parts where I was wrong.
Upper lip or lower lip?