한날 retweeted
This is insane. Poverty is the default state of nature, it is not an invention of capitalism. Poverty predates capitalism.
It is not difficult to explain why poverty exists. Man first came into existence with nothing. We are born naked.
The greater question is why does wealth exist, and socialists do not have a coherent answer to that question. It seems to me they believe wealth simply exists by default and capitalism is merely the act of concentrating it into fewer hands.
최근 《표준국어대사전》 웹사이트에 변화가 있었다. 먼저, 도메인이 kdict.korean.go.kr로 바뀌었다. 그런데 그보다 더 유용한 변화가 하나 더 있다. 표제어가 고유 URL을 갖게 된 것이다. 예를 들어, 다음 링크는 【오서⁴】(鼯鼠) 표제어를 가리킨다.
kdict.korean.go.kr/standard/…
한날 retweeted
Hoy en día el CGI lo resuelve todo a base de presupuesto, pero en 1997 Robert Zemeckis nos metió el mejor gol visual de la década usando una cámara, un espejo y mucha cabeza.
Fíjate bien en este plano de Contact. A simple vista no hay nada raro, una niña corre desesperada por un pasillo hacia el baño para buscar las medicinas de su padre mientras la cámara retrocede delante de ella.
El problema es que esa toma es físicamente imposible.
Cuando la mano entra en plano para abrir el botiquín, tu cerebro sufre un cortocircuito, todo lo que acababas de ver no estaba ocurriendo en el pasillo, sino dentro del reflejo del cristal.
Lo que más me fascina de esta escena no es el truco, sino la disciplina que exige engañar así al ojo sin un solo corte.
Tuvieron que rodar tres tomas distintas (la carrera con Steadicam, el baño con una pantalla azul en el armario y el reflejo inverso) y coserlas clavando al milímetro la velocidad de la cámara para que no hubiera saltos de escala.
Y aquí viene el detalle enfermizo que hace que esto aguante el paso del tiempo. En el microsegundo en que los dedos tocan el pomo del espejo, las capas chocaban. Tuvieron que reconstruir y animar sus dedos digitalmente fotograma a fotograma para que el contacto pareciera real.
Semanas de planificación matemática y retoques invisibles para apenas unos segundos de película que casi nadie del público notó. Ese nivel de obsesión es lo que echamos de menos hoy en el cine.
한날 retweeted
I’LL SAY IT AGAIN:
Streaming didn’t kill Movie Theaters. It started with $25 popcorn and a $12 bottle of water.
한날 retweeted
1999年,《雷神之锤3》发布。
画质炸裂,但奇怪的是,破电脑也能跑得很流畅。
几年后源代码开源,全世界程序员冲进去扒拉。
想看看id Software到底用了什么黑科技。
然后大家就发现了这么一段东西:
```
float Q_rsqrt(float number) {
long i;
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y = number;
i = *(long*)&y;
i = 0x5f3759df - (i >> 1); // what the fuck?
y = *(float*)&i;
y = y * (threehalfs - (x2 * y * y));
return y;
}
```
我当时看完这段代码,愣了好一会儿。
这函数干嘛的?算 1/√x,平方根的倒数。
你可能会问,这有啥难的,调个sqrt再除一下不就行了?
问题是,那个年代CPU算浮点开方慢得要死,一次要几十上百个时钟周期。
而3D游戏里算光照、算反射,每帧要归一化几万个向量,每次都要求这玩意儿。
按正常写法,直接卡成幻灯片。
然后就有人整出了上面这段代码。
核心就一行:i = 0x5f3759df - (i >> 1)
看到这你肯定懵逼——把浮点数的二进制当整数读出来,右移一位,再用一个莫名其妙的常数去减它,结果居然就是平方根倒数的近似值???
这不是玄学,是数学。让我给你掰扯清楚。
首先你得知道浮点数在内存里长啥样。
一个32位float,内存里分三块:1位符号、8位指数、23位尾数。表示的值是:
(1 + 尾数/2²³) × 2^(指数-127)
比如8.0,就是 1.0 × 2³,指数存130(就是3+127),尾数存0。
现在来个骚操作:把这个浮点数的二进制直接当整数读出来。
你会得到一个整数 I = 指数×2²³ + 尾数。
关键来了。
浮点数的真实值取个对数,大概是:
log₂(value) ≈ I/2²³ - 127
换句话说,浮点数的"整数形式"和它的对数基本成正比。
这个性质太重要了。因为我们要算的是 y = x^(-0.5),取对数就是 log(y) = -0.5 × log(x)。
对数之间是线性关系!那我直接用整数运算不就能算对数运算了吗?
具体推一下。设 Ix 是 x 的整数表示,Iy 是 y 的整数表示:
Iy/2²³ - 127 ≈ -0.5 × (Ix/2²³ - 127)
解出来:
Iy ≈ 1.5 × 127 × 2²³ - 0.5 × Ix
≈ 0x5f400000 - (Ix >> 1)
诶,算出来是 0x5f400000,但代码里用的是 0x5f3759df,咋回事?
因为上面的推导有近似误差。0x5f3759df 是有人通过数值方法调出来的,能让最大误差最小。
后来有数学家专门写论文算过,理论最优值是 0x5f375a86,跟这个就差一丢丢。
到这里,我们就用一次整数减法和一次移位,搞出了一个粗糙的近似值。
但粗糙不够用啊,游戏还是会穿帮。
한날 retweeted
잘 모르는 사람을 위한 추가 설명
남아공은 아파르트헤이라는 정책을 시행하고 있었음
피부색에 따라 거주지, 교육, 투표권, 대중시설 이용까지 제한하는 광범위한 인종차별 정책임
이러다 보니 남아공이 국제 사회에서 고립됨
이것을 해결하고자 자국에 이로운 아시안 국가에 '명예 백인'을 제안함
Korea rejected the offer of "Honorary White" in 1961, which would have opened up trade with South Africa at a time when Koreans were desperately poor. That generation became height stunted from starvation.
Korea rejected it on moral grounds.
Japan and Taiwan accepted.
Korea didn't establish diplomatic ties with South Africa until after the end of apartheid, in 1992.
한날 retweeted
『患者の命を救うのは、献血した人の血液であって、献血しない人のご立派な精神性ではない』
ほんこれ。
SNSではしばしば、「グッズ目当ての献血は不純でダメだ」といった言説が見られる。
炎上覚悟で言えば、これは「何も行動していないくせに、精神性だけは一人前のつもりのクズ」が、献血でグッズをもらう人たちに「お前らはグッズ目当ての精神性の低い連中だ」とレッテルを貼って攻撃し、他人を貶めることで自分を相対的に立派に見せようとする、涙ぐましい努力の一環に過ぎないと思っている。
実際のところ、血液製剤の安定供給には継続的な献血が欠かせず、一人でも多くの人に献血してもらえることがありがたいというのが医療現場の実情だ。
献血をする人は「自分の貴重な時間を使って、他人の健康や生命のためになることをしている」わけで、グッズ目当てだろうが何だろうが、その行為は尊いと言わざるを得ない。
患者の命を救うのは、献血した人の血液であって、献血しない人のご立派な精神性ではない。
한날 retweeted
You play doom with a CPU.
This guy plays doom with CPU usage.
You are not the same.
[🎮 Max Holt]























































