This would normally seem obvious, but given current trends I see on this app it might as well be said:
Be like Jean-Luc Picard. An articulate, thoughtful, responsible, assertive commander who wakes up every day thinking about the wellbeing of the people on his ship and their mission.
Not Anakin Skywalker. An emo, selfish, violent person who couldn’t for the life of him articulate what he’d do ahead of time or why, and asks for more power. The fact that he’s trending now says something about those trending him.
Cultures have many differing views of morality, but all around the world and for thousands of years, being truthful is arguably the most common one.
A culture cannot long persist on falsities. On open lying.
This cycle ends only when truth becomes principal currency again.
This is funny.
What if you invested in the S&P 500 every time CNBC had a "Markets in Turmoil" special?
Well... your average return after one year would be 40%, with a 100% success rate.
In today's episode of programming horror...
In the Python docs of random.seed() def, we're told
"If a is an int, it is used directly." [1]
But if you seed with 3 or -3, you actually get the exact same rng object, producing the same streams. (TIL). In nanochat I was using the sign as a (what I thought was) clever way to get different rng sequences for train/test splits. Hence gnarly bug because now train=test.
I found the CPython code responsible in cpython/Modules/_randommodule.c [2], where on line 321 we see in a comment:
"This algorithm relies on the number being unsigned. So: if the arg is a PyLong, use its absolute value." followed by
n = PyNumber_Absolute(arg);
which explicitly calls abs() on your seed to make it positive, discarding the sign bit.
But this comment is actually wrong/misleading too. Under the hood, Python calls the Mersenne Twister MT19937 algorithm, which in the general case has 19937 (non-zero) bits state. Python takes your int (or other objects) and "spreads out" that information across these bits. In principle, the sign bit could have been used to augment the state bits. There is nothing about the algorithm that "relies on the number being unsigned". A decision was made to not incorporate the sign bit (which imo was a mistake). One trivial example could have been to map n -> 2*abs(n) + int(n < 0).
Finally this leads us to the contract of Python's random, which is also not fully spelled out in the docs. The contract that is mentioned is that:
same seed => same sequence.
But no guarantee is made that different seeds produce different sequences. So in principle, Python makes no promises that e.g. seed(5) and seed(6) are different rng streams. (Though this quite commonly implicitly assumed in many applications.) Indeed, we see that seed(5) and seed(-5) are identical streams. And you should probably not use them to separate your train/test behaviors in machine learning. One of the more amusing programming horror footguns I've encountered recently. We'll see you in the next episode.
[1] https://t.co/srv1ZBlDsi
[2] https://t.co/qpnKdvfVNS
Calling c the "speed of light" completely misses the point. Rather, c is the "spacetime exchange rate": how many units of space you can exchange for one unit of time.
In actuality, everything travels at the "speed of light", just not necessarily through space alone... (1/4)
CEO of Palantir, $PLTR, Alex Karp: “The West is obviously superior. We had a pagan religion infiltrate our universities and our society, and that religion basically said that everything good about America and everything that has actually worked… is bad.”
A Gaullist French government demonstrated how to rapidly decarbonise the grid of an industrial economy in the 70s using nuclear energy, and this was demonised by environmentalists. Tesla showed it was possible to extend this decarbonisation to ground transportation, and people are now vandalising their cars.
It’s almost like politically partisan people don’t actually want to solve the problems they claim to be motivated by.
More whites were brought as slaves to North Africa than blacks brought as slaves to the United States or to the 13 colonies from which it was formed. White slaves were still being bought and sold in the Ottoman Empire, decades after blacks were freed in the United States.
Disinformation is indeed rampant online, but the antidote to it isn't censorship.
The antidote is teaching and promoting critical thinking skills at a deep societal level.
Lots of political noise coming your way soon. A few points for the friends over dinner:
Neither political party is good at sound spending. Deficits up under both. And rising. Debt, too.
Trumps tariff idea will probably increase inflation.
Trumps “tax cuts” actually raised taxes for those who have high deductions.
No, Biden didn’t lower inflation. 2021 spending and PPP grants spiked inflation. The Fed countered it with raising borrowing costs. The White House had nothing to do with it.
Much of America was fully open and booming in late 2020/early 2021.
Inflation isn’t down. The pace of price hikes (inflation) has slowed. You’re still paying more.
The rich don’t pay a lower tax rate than you. Top 1% pay 46% of all federal income taxes. 25% rate v 3.3% for half the nation.
Middle class tax federal income tax rates have never been lower.
The government wastes hundreds of billions a year in fraud and erroneous payments.
Half of the richest counties in America circle D.C. Federal spending only goes up.
(PS I love Virginia, go Hokies)