В 1999 году вышла Quake III Arena. Пока одни разработчики пытались заставить компьютер не сдохнуть от трёх полигонов, ребята из id Software вытворяли с математикой такое, за что в приличном университете могли бы вызвать экзорциста.
Игра летала даже на довольно скромном железе. В 2005 году открыли её исходный код, и программисты всего мира полезли выяснять, какой именно договор разработчики подписали с дьяволом.
И обнаружили вот это:
i = 0x5f3759df - (i >> 1);
Причём в оригинальном коде рядом красовался комментарий:
// what the fuck?
То есть даже исходный код заранее сформулировал реакцию человека, который будет его читать.
Эта хреновина вычисляла обратный квадратный корень: 1/√x.
Казалось бы, возьми квадратный корень, раздели единицу на результат и не еби людям мозги.
Но в те времена процессоры выполняли такие операции относительно медленно. А в трёхмерной графике постоянно требуется нормализовать векторы. Освещение, отражения, геометрия. Таких вычислений может быть огромное количество.
И вот вместо того, чтобы честно считать квадратный корень, какой-то математический психопат решил взломать сам принцип хранения чисел в компьютере.
Число с плавающей точкой хранится в формате IEEE 754: знак, экспонента и мантисса. Если посмотреть на те же биты как на обычное целое число, внезапно обнаруживается, что полученное значение приблизительно пропорционально двоичному логарифму исходного числа.
А обратный квадратный корень в логарифмическом пространстве превращается в умножение на −0,5.
То есть вместо сложной математической операции можно сдвинуть биты вправо, вычесть результат из специально подобранной константы и получить довольно приличное приближение.
Константа эта:
0x5f3759df
Выглядит как пароль от Wi-Fi в психиатрической больнице, но за ней стоит вполне серьёзная математика.
Максимальная погрешность первоначального приближения составляет около 3,44%.
Многовато? Не вопрос.
Прихуячиваем одну итерацию метода Ньютона:
y = y * (1.5 - 0.5 * x * y * y);
И погрешность падает примерно до 0,175%.
Ещё одна итерация, и остаётся около 0,00046%.
Всё. Никаких квадратных корней. Никакого деления. Никакого шаманства с покупкой нового процессора.
Особенно забавно, что алгоритм появился задолго до Quake III. Его происхождение связывают с Грегом Уолшем и разработками конца 1980-х. А позднее математик Крис Ломонт нашёл чуть более точную магическую константу.
Люди буквально занимались научными исследованиями, выясняя, из какого именно шестнадцатеричного числа лучше вычитать половину другого числа, чтобы компьютер перестал тратить время на квадратный корень.
Сегодня процессоры имеют специальные аппаратные инструкции для подобных вычислений, поэтому этот трюк во многом утратил практическое преимущество.
Но сама инженерная философия прекрасна.
Когда компьютер не успевал считать, программисты оптимизировали математику.
Когда математика оказалась недостаточно быстрой, они полезли в устройство чисел.
Когда и этого оказалось недостаточно, они заставили представление числа в памяти выполнять часть вычислений.
А теперь представьте современное совещание по оптимизации программного обеспечения:
«Может, оптимизируем алгоритм?»
«Нахуя? У пользователей же 32 гигабайта оперативной памяти. Добавьте ещё один фреймворк».
Вот и вся разница между двумя эпохами программирования.
There's something profoundly strange about a civilization that worships a God whose angels carry flaming swords, yet increasingly treats the very idea of defending boundaries as a moral defect. We condemn prisons, recoil from enforcement, and imagine that compassion alone can restrain men who possess none. Scripture never promised a world without evil. It warned us what happens when good men refuse to confront it.
Microsoft already ran this play. Now the same people want to run it on all of AI. Here's how the scam works, piece by piece.
May 1991. Bill Gates writes an internal memo about software patents. He admits that if people had patented the ideas the industry was built on, everything would be at a standstill. His conclusion isn't "let's fix the system." It's: patent as much as we can. Because a startup with no patents of its own will have to pay whatever price the giants decide.
Read that again. The richest man in the world describing a weapon, and choosing to use it.
Fast forward to May 2023. Microsoft's president walks into Washington and asks for a new federal agency and a licensing regime for powerful AI models. Even the data centers that train them would need a license.
A company begging to be regulated. Ever seen a wolf ask for a fence?
It makes perfect sense once you understand the four pieces.
Regulation is a fixed cost. Writing the rules costs nothing to the people who write them. Complying costs millions. Microsoft bragged it had nearly 350 people working on AI governance. A garage startup has three people, total. Same rule, same paperwork, same audits. For Microsoft it's a rounding error. For you it's death.
Licensing is a permission slip. Before: you build, the market judges. After: you ask, a committee judges. And that committee will be staffed by people who used to work for the incumbents and will work for them again.
Compliance is the bill. Lawyers, auditors, reports, "independent evaluations." The bigger you are, the cheaper it gets per dollar of revenue. The smaller you are, the more it becomes a tax on existing.
Lobbying is the steering wheel. The incumbents sit in the room where the rules get written. They make sure the threshold lands just above where they already stand. Then they pull the ladder up behind them.
Put the four together and you get the most profitable product in tech: a moat paid for by taxpayers, enforced by the state, branded as "safety."
That's not capitalism. Capitalism is: you build something better, you win. Someone builds something better than you, you lose. This is crony capitalism. You stop competing on product and start competing on access to power. The state becomes your bouncer.
And it's perfectly legal. No law broken, nobody goes to jail. That's what makes it the perfect scam: the victims are companies that never got the chance to exist. Nobody marches for a startup that was never founded.
Now look at the Paris Call. Voluntary today. No deadlines, no sanctions. That's always how it starts. A pledge. Then a "standard." Then "best practice." Then a law that copies the standard word for word. And who wrote the standard? The ones who signed first.
Europe has seen this movie. We missed search, social, cloud, smartphones. Same pattern every time: Americans built, we regulated, and we called it sovereignty. GDPR didn't weaken Google and Meta. It made them stronger, because they were the only ones who could afford the compliance army.
If we make the same mistake with AI, we stay what we've been for thirty years. Customers. Tenants. Their bitches.
AI is the first technology since the early internet where five people in Paris or Lorient can go head to head with a trillion-dollar company. That window is open right now. Licensing is how they close it.
So next time someone tells you AI needs a license, ask one question: who wrote the exam?
The sound that clears an African waterhole fastest is a human being talking calmly, and it beats a lion's growl by a distance.
In 2023 researchers hid speakers at waterholes across the Kruger and played recordings to whatever came to drink. Lions snarling. Gunshots. Dogs barking. And men and women chatting in an ordinary voice.
Giraffe, zebra, leopard, hyena, rhino, warthog. They were twice as likely to bolt from the conversation as from the lions, and they cleared out 40% faster.
In Kenya, elephants can tell a Maasai man's voice from a woman's or a boy's, and they bunch up and back away only for the man. He is the one who carries the spear.
In California, pumas walk away from a fresh kill at the sound of talk radio.
In Britain, badgers are more frightened by a recording of people reading aloud than by a bear.
None of these animals has seen a dietary guideline. They are working from 2 million years of experience, and the experience says the upright one with the quiet voice is the most dangerous thing that has ever lived.
No animal has ever fled a gorilla eating celery.
Every species at the waterhole knows exactly what you are. The only one still unsure is holding an oat latte.
University debate: "Beef is the most wasteful food on earth."
Vegan: "It takes 25 kilos of feed to make one kilo of beef. Any other machine that lost 96% of what went into it would be scrapped."
Farmer: "25 kilos of what?"
Vegan: "Feed."
Farmer: "Grass. How much of it can you eat?"
Vegan: "None. That isn't the point."
Farmer: "It's the whole sum. A gold mine shifts a tonne of rock for five grams of gold. Nobody stands at the gate complaining about the waste of rock."
Vegan: "Rock isn't food. That land could feed people directly."
Farmer: "Two thirds of Britain's farmland is grass. Most of it is too steep, too wet or too thin to be anything else. You're welcome to try it with a spoon."
Vegan: "They're fattened on grain at the end."
Farmer: "Mine finish on silage and what the brewery throws out. The barley made your pint first."
Vegan: "Even so, 25 to one is indefensible."
Farmer: "A wheat plant is roots, stalk, chaff and grain. You eat the grain. That's about half of it wasted before the miller starts. I don't see a motion about bread."
Moderator: "Closing lines, please."
Vegan: "A hungry world can't afford a food that takes 25 in to get one out."
Farmer: "25 kilos of something you can't eat, off land you can't plough, for one kilo of the best food there is. I'd call that the only free lunch in farming."
I don't know who made this chart, but it's brilliant.
Government agencies that get less money than the CBC.
- CSIS
- Parks Canada
- Stats Canada
- Canada food inspection agency
Serious question. What benefit does the CBC actually provide to Canadas that someone else doesn't already provide??
🚨 Google has discovered hackers using AI to turn SOFTWARE UPDATES into working cyberattacks, without a human directing the process.
The system spots a newly released patch, compares the old and new code, figures out which vulnerability was fixed, then builds and tests an exploit against systems that haven't updated yet.
All AUTOMATICALLY.
Google says it has observed this happening in real-world operations for the first time.
Think about that. A company releases a security fix, and attackers can have AI reverse-engineer it into a weapon before customers even install the update.
The race between hackers and defenders is moving from human speed to MACHINE speed.
Source: @clashreport / Writer: Oliver