虎⚡ (@esivilmillion) header
虎⚡ (@esivilmillion) profile picture

虎들

Joined February 2025
Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)Photo by 虎⚡ (@esivilmillion)
虎⚡ 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,跟这个就差一丢丢。 到这里,我们就用一次整数减法和一次移位,搞出了一个粗糙的近似值。 但粗糙不够用啊,游戏还是会穿帮。
69
269
19
1,979
217,012
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
13
12
4
98
2,522
Replying to @zzzzzzzikkkkk
오늘은 여기다 윽윽윽윽윽은윽ㅇㆍㅅㅈ
1
3
105
캐디 하면 이 썰이 ㅈㄴ 강렬해서 안잊혀짐 갑자기 그라데이션분노해서 불타서날아가심
골프장 연예인 썰(feat. 캐디 15년차) ㅅㅈㄱ 이혼 슬픔을 골프로 달랬나??
6
2,071
151
5,539
613,917
A: 비트코인 왜 써요? B: 제 돈을 남의 허락 없이 쓰려고요. A: 은행 쓰면 되잖아요. B: 은행이 거래를 막으면요? A: 잘못한 게 없으면 상관없죠. B: 그럼 집에 CCTV 설치해도 되겠네요. A: 그건 사생활 침해잖아요. B: 씨발 잘못한 게 없으면 상관없다면서요. 그냥 죽어.
8
6
3
67
3,538
야잌ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
77
361
131
1,389
183,635
세상에서 가장 귀한 자원은 시간과 에너지다 인간이 만들어내는 모든 재화와 서비스는 결국 이 두 가지에서 비롯된다 그렇다면 그 가치를 담아내는 돈 역시 시간과 에너지로부터 탄생해야 마땅하지 않은가 비트코인은 바로 그 시간과 에너지를 대가로 탄생하는 돈이다. 오직 비트코인만이 그러하다
2
3
1
36
1,650
虎⚡ retweeted
New crypto project raised $14.1b Holy shitt
278
320
69
5,720
266,350
ロボメカド素人で恐縮なんだけど、コクピットを尻(尾)に設定すると、ハシゴみたいに下ろして搭乗者を比較的ラクに乗降させる事出来ない? 股関節付近に操縦席用意すると揺れも少なくなりそうだし
288
7,577
388
36,516
1,565,222
댓글 중 하나가 "이게 내가 민주주의를 싫어하는 이유" 라면서 엄청 공감 받고 있는데, 백이십만명 넘게 투표한 결과에 오답이 과반수... 바로 이해 됨
6 ÷ 2 (1 + 2) =
48%9
52%1
1,384,352 votes • Final results
21
5
15
79
36,260
People beg me for a Bitcoin price prediction, so it's finally time to give it to you: Kiyosaki once pushed me for a number on a 10 to 15 year timeframe, so I said millions of dollars per Bitcoin in the 2030s. People find that unimaginable and crazy. What they don't take into account is the hyperinflation of the US dollar, which is underway right now, as it is with all fiat currencies, all the time. Anyone who's ever opened a history book knows that paper currencies unbacked by commodity money like gold or silver must end in hyperinflation. There's every incentive to print it into worthlessness, and no safeguard against such printing. They're either conquered and replaced, or they hyperinflate. That's literally the only thing that ever happens, without exception. As Charlie Munger says, show me the incentive and I'll show you the outcome. If you create a currency that can be printed ad infinitum with no restrictions, and it rewards the printer for printing it, what do you think is going to happen? They print the thing until it goes to zero. Of course. The dollar is a fiat currency shitcoin. So when you denominate Bitcoin in dollars, Bitcoin trading in the millions and tens of millions is as certain as the dollar being printed into worthlessness. I know that sounds scary if you're used to the dollar working. But you've got to zoom out. As Schopenhauer said, every man takes the limits of his field of vision for the limits of the world. Don't make that mistake. Study the fate of fiat currencies and you'll understand. This could be a multi-decade, multi-generational game. But directionally, I can say with a very high degree of certainty: Bitcoin number go up, US dollar number go down. So my prediction is that the Bitcoin price will go up forever.
79
143
15
1,413
96,105
가상자산 과세 재유예!
1
2
5
194
The reason it's hard for people to buy Bitcoin is because they have to admit they were wrong.
21
12
4
146
3,957
프랑스 사회학자 피에르 부르디외는 인간이 가진 자본을 4가지로 분류했다. 1. 경제적 자본 : 돈, 부동산, 주식 등 물질적 재산 2. 문화적 자본 : 학력, 지식, 세련된 취향, 교양과 안목 3. 사회적 자본 : 인맥, 학연, 지연, 권력 집단과의 네트워크 4. 상징자본 : 위 자본들이 사회적 정당성을 얻어 '존경받을 만한 명예와 신용'으로 탈바꿈한 최종 형태 부잣집 자식들이 마르크스주의자가 되려는 진짜 이유가 뭘까? 바로 이 '상징자본'을 얻기 위해서다. 현대의 정치인이나 정치적 인플루언서들도 마찬가지다. 대중 앞에서는 세상 가장 청렴한 척, 약자를 위하는 척하며 도덕적 상징자본을 게걸스럽게 챙긴다. 하지만 정작 본인의 이권이나 자식 문제가 걸리면? 불법과 탈법, 추악한 위선을 그대로 드러낸다. 진짜 심각한 문제는 그 다음이다. 일반적인 인플루언서라면 위선이 들통나는 순간 매장당하겠지만, 정치판은 다르다. 그 모순을 보고도 눈을 감은 채 "물고 빨고 후원하는" 맹목적인 추종자들이 존재하기 때문이다. 결국 그들은 퇴출당하기는커녕, 팬덤의 비호 아래 더 강력한 세력을 형성하며 괴물이 되어간다. 도덕마저 독점한 지배계급과, 그 위선에 자발적으로 눈을 감아주는 대중. 이것이 지금 우리가 마주한 가장 씁쓸한 현실이다. 여기서 가장 웃픈(웃기고 슬픈) 코미디가 발생한다. 통장에 1억도 없는 사람들이, 자기보다 수십 배는 더 부자인 정치인들을 보며 "불쌍하고 애처롭다"고 눈물을 흘리며 후원금을 보낸다.
강남 좌파는 대체 왜 생겨나는지 이해하지 못했는데 이거 보고 이해했습니다.
7
17
958
Los que se reían de PHP esta mañana, revisad vuestro Node.js. Node.js ha parcheado hoy 4 vulnerabilidades de gravedad alta. El mismo día que PHP. Aquí no se libra nadie. La más grave, CVE-2026-111497, está en el decodificador Brotli y, según Node.js, permite ejecutar código en remoto. Pero la que más me preocupa es otra: dos fallos permitían saltarse la comprobación del nombre de host en TLS. Tu aplicación puede dar por bueno un certificado que no es del servidor con el que habla. El candado sigue ahí, pero ya no garantiza nada. Si tienes algo en Node.js: ➡️ Ejecuta node -v. Si es anterior a la v22.23.4, la v24.22.1 o la v26.12.1, actualiza ➡️ Si despliegas con Docker, reconstruye la imagen. Actualizar tu equipo no cambia lo que está en producción ➡️ Si sigues en Node.js 18 o 20, no hay parche para ti: toca migrar
64
714
87
3,772
359,816
虎⚡ retweeted
50
364
33
3,069
76,430
I think of money as stored time. Every dollar you save is a slice of your life. Hours you sold, frozen for later use. In 2016, $1,000 held 47 hours of median-wage work. Today it holds 32. Fifteen hours. Gone. You didn’t spend them. You didn’t blow them at the casino. You didn’t buy a boat. They evaporated while the money sat in your account doing exactly what you told it to do. That’s not saving. That’s a slow-motion robbery called inflation. Store your time in something they can’t print. Bitcoin
8
20
3
120
3,454
“Feminist, Facing the Consequences of her Actions” Oil on canvas France, 2026
🤖 Made with AI
580
3,999
138
38,609
273,148
You supported mass Muslim migration and called anyone who warned you a racist. Now they’re looting your stores and burning your cities in Paris. Congratulations. You got exactly what you asked for. Suicidal empathy will be the death of your own culture.
1,226
10,740
319
34,599
220,022
최근 커뮤니티에서 공감을 얻고 있는 문구 "멍청한 사람들이 기분 나빠하지 않도록 똑똑한 사람들이 침묵당하는 시대에 살고 있다." 합리적인 비판이나 진실 추구보다 '정치적 올바름'과 '개인의 불쾌감'이 우선시되면서 점차 대화가 단절되는 현대 사회를 가장 날카롭게 지적한 한 줄인 듯.
8
11
1,415