Anamitra Upadhyay (@anamitrax) header
Anamitra Upadhyay (@anamitrax) profile picture
Joined November 2025
Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)Photo by Anamitra Upadhyay (@anamitrax)
This should be the no. 1 propaganda
31
Anamitra Upadhyay retweeted
New mathematical problems will arise because of the new tools, analogously to straightedges, compasses, sun-dials, lenses, telescopes, antennas, etc. By far not all of the new problems are going to be accessible to the then current state of the AI (e.g. because of interfaces).
An example: I predict that there is going to be an analogue of Numerical Analysis for the novel AI-assisted proof-search. Each of 1) iterative solution-search-algorithms 2) condition of a problem 3) forward- and backward-error-analysis have meaningful analogues for proof-search.
2
10
2
69
1,578
Anamitra Upadhyay retweeted
Look what a beauty I have founded!!
16
35
4
515
8,833
Anamitra Upadhyay retweeted
Salvatore Sanfilippo (antirez), the creator of Redis, wrote a tiny custom hash function in under 20 lines of C it mixes bytes using XOR and bit rotations to produce a 32-bit hash
14
35
1
665
28,035
Bayes' Theorem is a fundamental concept in data science. But it took me 2 years to understand its importance. In 2 minutes, I'll share my best findings over the last 2 years exploring Bayesian Statistics. Let's go.
7
59
5
491
22,100
Anamitra Upadhyay retweeted
Linus Torvalds showed a clever way to remove a node from a linked list instead of handling the head separately, he used a pointer to a pointer the result? the same code handles every node, including the head
46
100
21
2,391
174,325
Anamitra Upadhyay retweeted
a lighting trick from John Carmack's Quake is still used in Half-Life: Alyx, over 25 years later a simple string of letters controls how lights flicker, with each character representing a brightness level
83
369
48
8,883
568,184
Anamitra Upadhyay retweeted
RAM prices are so high that Red Hat engineers are looking at SSDs to hold part of your virtual machines' memory. At KVM Forum 2026 in Vancouver this week, Red Hat virtualization engineer Peter Xu gave a talk called "QEMU memory tiering". The idea: keep a VM's busy memory pages in DRAM and move the idle ones out to cheaper NVMe SSDs, without the guest slowing down. "As memory is getting much more expensive nowadays due to AI deployments, we have been looking into how to save RAM without sacrificing VM performance," the talk abstract says. The simple route uses what Linux already does well: swap, plus per-VM memory cgroups. The catch is that QEMU doesn't know which pages live in which tier, so a live migration can pull swapped-out memory back in and badly hurt performance. Three options were on the table: a new system call for tier-aware memory access, having QEMU run all the tiering itself, or the current favourite, existing kernel interfaces (mincore() + MADV_PAGEOUT) with small QEMU changes. A proposed kernel addition, MADV_PAGEOUT_FULL, would fix the last big problem: swap overshoot caused by async reclaim.
20
91
12
648
34,347
Anamitra Upadhyay retweeted
Graph theory and linear algebra are not two separate branches of mathematics. They are the exact same subject wearing different costumes.
8
41
3
342
12,774
Anamitra Upadhyay retweeted
Found a 1990 Byte magazine. 286 with 2Mb RAM $1995 Due to volatility of the DRAM market, all prices subject to change 🤣🤣🤣 What a time to live 🫣 – at Masdenverge, España
23
63
4
456
16,424
Anamitra Upadhyay retweeted
I got my PDP-11 browsing the live web! I backported Mikuláš Patočka’s open-source Links browser to 2.11BSD, adapting it for 16-bit code, overlays, tight memory and the VT100 terminal. It can now search @ActionRetro1's FrogFind on real PDP-11 hardware, surf Wikipedia, and so on. And it has a menuing system... Not a browser written from scratch, but a classic browser backported to an incredibly limited 64K architecture! The headline is 15 overlays and two separate 64 KiB address spaces. The final build contains about 223 KiB of code, but only the resident base and one overlay occupy instruction space at a time. The harder constraint is the other 64 KiB: static data, the page, links, screen buffers, heap and stack all have to coexist there! Getting FrogFind working meant fixing 16-bit arithmetic bugs, a linker problem, and several memory spikes: oversized wrapped lines, duplicated page buffers and a whole-screen redraw buffer. I also moved UI strings out of resident data and trimmed optional features. So I don't know how -practical- it is, but it works. Code will be on my GitHub shortly! If you read this far, thanks! Check out tmog.org for a free download of Task Manager TMOG.
24
27
8
453
17,053
Anamitra Upadhyay retweeted
Binary search stops working the moment your data has two coordinates. In 1D, on a line, a point has a left and a right, so a balanced tree finds the nearest value in logarithmic time. On a map, there is no left and right. Split by x alone, and two points 500 km apart can end up together, while two points 1 km apart can get separated. The solution is as brilliant as it is simple: split by alternating the direction. First a vertical line, then a horizontal, then again vertical. You get a binary search tree with a fancy comparison method on its keys. But the region a point falls in only tells you where to start looking. The closest point is not always in the closest box, so you draw a circle around your target and go back up the tree, skipping every branch whose split line is farther than your best so far. Full article this week on @EngPolymathic
The 199th issue of the Polymathic Engineer is out. This week, we introduce kd-trees: - One dimension is easy - Why the obvious extension blows up - Cycle through the dimensions - Search and insert - Nearest neighbor: descend, then backtrack Link: newsletter.francofernando.co…
5
6
56
3,313
Anamitra Upadhyay retweeted
Book - Computer Networks: A Systems Approach 7th edition preview is around. 7e.systemsapproach.org/
Free video lectures - Computer Networking: a Top Down Approach by J.F. Kurose and K.W. Ross (check all the chapters from the link below) gaia.cs.umass.edu/kurose_ros… The foundations for quoted explorations are possible by these amazing resources - thank you to the authors 🙌
37
236
5,339
Anamitra Upadhyay retweeted
Minsky's 1972 circle algorithm draws almost-perfect circles using additions and bit shifts it was originally discovered while experimenting with a display hack
10
104
9
1,914
68,644
Anamitra Upadhyay retweeted
Porting drivers to #OpenBSD isn't just about writing code and fixing bugs. Testing on real hardware is a must. I own every device supported by rtwn(4) and urtwn(4).
18
102
1,817
Anamitra Upadhyay retweeted
I’m writing a simple 15-line function on a hot path in C++ Opus 5.5 suggested an implementation. I pushed back on every single line and had to rewrite it manually. Spent 2x more time on this.
32
9
3
401
21,362
Anamitra Upadhyay retweeted
I know this is pedantic, but instead of comparing to the square root, square the factor. So instead of (x < sqrt(y)) do (x*x < y) Much faster. It assumes non-negatives, though.
integer square root in pure c this classic algorithm finds the square root using only bit shifts, subtraction, and comparisons without floating-point math or library calls. still useful in embedded systems and low-level code
19
14
253
13,652
C是最适合手写的语言,手写C简直是一种苦行艺术。你会把程序的一切安排得妥妥当当,就连 `*(int*)((char*)ptr + offsetof(struct foo, bar) + 3)` 都看上去赏心悦目。 一旦你开始手写C,你就再也无法接受AI写的C slop和vibe performance了。 真正的C程序员会沉醉在自己的内存秩序里。先算好对齐和padding,再手动布局结构体,然后是 `malloc` / `realloc` / `free` 的配对、指针算术、类型双关、`#pragma pack`、flexible array member、以及在栈上用 `alloca` 或手动 VLA 开缓冲区。一个简单的 `get_user`,必须经过 `struct user*` → `void*` 转换 → 手动序列化 → 缓存行对齐的环形缓冲区 → 自定义 arena allocator → 指针 tagged 后存进链表 → 最后用 `memcpy` + `offsetof` 完成字段提取,全程不依赖任何标准库容器。 一旦习惯了这种精确,就再也无法接受AI写的C了。AI C是对裸金属秩序的亵渎。
cpp是最适合手写的语言,手写cpp简直是一种艺术品,你会把程序的一切安排得妥妥当当,就连template都看上去赏心悦目。一旦你开始手写cpp,你就再也无法接受AI写的cpp slop和vibe performance了。review手写cpp像是在脑海重建整个逻辑的秩序,而review AI写的cpp,你只会有手动重写的冲动。AI cpp是对艺术品的亵渎。
14
29
8
420
21,138
Да, вы не ошиблись, это аргументы функции
34
3
5
115
23,114
Anamitra Upadhyay retweeted
Replying to @xiongchun007
NetBSD is the platform on which IPv6 was developed.
1
4
1,197
Anamitra Upadhyay retweeted
procedure is called rgba it returns argb It's actually bgra in memory order (because we are on little endian machine). Got I love graphics programming!
38
40
13
1,771
73,655