Key takeaway: Consider your /etc/shadow to be containing essentially plain text passwords.
-> Don't reuse Linux login passwords for anything else
-> Encrypt your system partition (and be sure to configure a sensible key derivation function when setting it up using cryptsetup, I don't think they use sensible defaults yet. In other words: Tell cryptsetup to use Argon2id and optimise --iter-time and --pbkdf-* to be as slow and memory consuming as acceptable)
Today: Have you ever looked at the semantics of "round" in your programming language. Look at JavaScript and Python for example.
Just found some interesting code in jemalloc's implementation of a mutex:
if (ncpus == 1) {
goto label_spin_done;
}
Microsoft just open sourced their STL implementation! https://devblogs.microsoft.com/cppblog/open-sourcing-msvcs-stl/
"Smooth GNOME experience in a wie variety of devices" https://www.youtube.com/watch?v=qAjPRr5SGoY&feature=youtu.be
Mozilla-Survey about JavaScript evolution: https://hacks.mozilla.org/2019/05/javascript-and-evidence-based-language-design/
I published my first rust library: https://crates.io/crates/adjacent-pair-iterator
But #bash can also do it in 46ms
#/usr/bin/env bash
for string in 1{,+,-}2{,+,-}3{,+,-}4{,+,-}5{,+,-}6{,+,-}7{,+,-}8{,+,-}9; do
result=$(($string))
if [[ $result == 100 ]]; then
echo $string
fi
done
Then I came up with a solution in #bash that took me ~5 minutes to write but with an execution time of 20s.
Expressions that evaluate to 100
123+45-67+8-9
123+4-5+67-89
123-45-67+89
123-4-5-6-7+8-9
12+3+4+5-6-7+89
12+3-4+5+67+8+9
12-3-4+5-6+7+89
1+23-4+56+7+8+9
1+23-4+5+6+78-9
1+2+34-5+67-8+9
1+2+3-4+5+6+78+9
At first I came up with a solution in JavaScript.
time spent: 22min
execution time: ~170ms
loc: 21
At todays C++ meetup I was told a programming quiz:
Given the digits 1-9 (in that order), you can combine them with either '+', '-' or nothing.
Now find all of these mathematical terms, that evaluate to 100.
You can use any programming language and library you like and you have 1 hour to complete the task.
This looks like it's worthwile supporting: https://www.kickstarter.com/projects/alecaddd/akira-the-linux-design-tool?ref=discovery&term=akira #design #linux
In the meantime: Why not help me with finding better wordlists (less obscene and garbage words) for https://fsmaxb.github.io/correcthorsebatterystaple