uncurry
but what I actually need is uncurry4
and I don't have that
I don't want to use whatever random library that happens to include the relevant functions, might as well cheat and write one--cheating
uncurry4 f (a, b, c, d) = f a b c d
because f, a, b, c, and d are all big big stinky❯ cat main.cpp
#include <fstream>
#include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
ifstream input("input.txt");
vector<int> lhs, rhs;
int left, right;
while (input >> left >> right) {
lhs.push_back(left);
rhs.push_back(right);
}
unordered_map<int, int> rhsCounts;
for (int num : rhs) {
rhsCounts[num]++;
}
long long score = 0;
for (int num : lhs) {
score += (long long)num * rhsCounts[num];
}
cout << score;
}
❯ cat main.cpp
#include <fstream>
#include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
ifstream input("input.txt");
vector<int> lhs, rhs;
int left, right;
while (input >> left >> right) {
lhs.push_back(left);
rhs.push_back(right);
}
unordered_map<int, int> rhsCounts;
for (int num : rhs) {
rhsCounts[num]++;
}
long long score = 0;
for (int num : lhs) {
score += (long long)num * rhsCounts[num];
}
cout << score;
}
-O2
to my flags it runs like 5x faster
I guess GHC is smart enough to realize that it should not be creating a list of a million elements just to filter out the vast majority of them5120e79
fix spectate closest - TsFreddie
51ff510
Update Simplified & Traditional Chinese translations for upcoming 18.8 - ASKLL-STAR
ada887c
Fix hook collisions preview string not being localizable - Robyt3
7294013
Revert "remove self from spectate selector" - TsFreddie
0f1b253
fully allow clicking on yourself to spectate - TsFreddieerror
has difference values
on mysql works fineqq/don't()<Enter>d/do()<Enter>df)q
and then repeat the macro until the end of input to filter out the parts we don't want
honestly agree that 11 min isn't too hot lol (edited)error
has difference values
on mysql works fine SET STATEMENT optimizer_switch='derived_merge=off' FOR SELECT ...
(edited)cl_enable_self_spectate
config defaulting to off.
Again, I strongly believe in behavioral consistency, so I argue against different behaviors between left clicking and menu selector.
From what have been discussed on discord: