Joined December 2009
392 Photos and videos
@heapwolf retweeted
7 Feb 2025
Programming is understanding. If you don't understand what you are doing, you are not programming. You are generating text.
228
1,622
14,260
428,227
@heapwolf retweeted
If LLMs are good for anything it's probably making total fucking noobs finally realize that Programming was never about Typing Text. :)
14 Nov 2024
Yes. Programming is not Bottlenecked by Typing Text. If yours is, you're not doing Programming. You're just Typing Text. It's not about remembering What Text to Type. It's about Understanding the Problem you are Solving.
59
156
3,493
137,147
13 May 2025
ship something valuable using only AI
1
4
309
@heapwolf retweeted
14 Apr 2025
Join us tomorrow at 7pm for what I am sure will be a fascinating conversation about the future of Software development . x.com/i/spaces/1rmGPypdEDVJN
1
6
14
1,802
17 Mar 2025
patterns > libraries/frameworks
2
200
@heapwolf retweeted
11 Mar 2025
Linus is under a unique requirement that the vast majority of web developers have never encountered: His code has to work.
11 Mar 2025
What is it about really really smart people that make them completely oblivious to how incredible AI is?
100
2,228
35,706
1,263,676
@heapwolf retweeted
I wrote a doc that has examples of Fil-C pointer (mis)use. It's a great way to learn how Fil-C pointers work and what you can (and can't) do with them! github.com/pizlonator/llvm-p…
2
8
49
8,413
19 Feb 2025
Found a way to say yes to people who ask us to build their @socketruntime apps.
1
8
415
26 Jan 2025
many people don't realize this, but ffmpeg already did most of what deepseek does, you just need to know the right flags.
2
11
863
@heapwolf retweeted
25 Jan 2025
To people who think "China is surpassing the US in AI" the correct thought is "Open source models are surpassing closed ones" See ⬇️⬇️⬇️
483
1,183
11,862
1,231,632
@heapwolf retweeted
I think that the way that VMs do safepointing is the most underappreciated aspect of modern multithreaded VM/GC tech. It forms the foundation of Fil-C's accurate stack scanning, safe signal handling, and safe forking. It also forms the foundation of accurate GC, debugging, and profiling in modern JVMs. What does it do? It's a lightweight synchronization mechanism that allows threads in a VM to make assumptions about the VM's state. For example, it allows threads to assume that a pointer loaded from the heap will point to a live object even if the pointer hasn't been registered as a root yet (so it prevents mutator-load/GC-sweep races). It also enables the VM to snapshot thread state at any time. And it enables Fil-C's signal handling shenanigans. Here's a brief braindump on how I implement it. Other implementations are either functionally equivalent or only subtly different (not everyone is aiming for the same tradeoffs). - Each thread has a lock and condition variable controlling the thread's state. Additionally, each thread has a status byte controlling the thread's state. The status byte can be modified by CAS by the thread that owns it. The status byte can be read using a relaxed read by the thread that owns it. All other threads are required to modify the status byte with CAS *and* while holding the lock. - The status byte has to indicate at least: if a pollcheck is requested (more on that below) and whether the thread is "entered" (aka has VM access, aka has heap access - different folks call this different things). That's two bits. - An entered thread is guaranteed to run a pollcheck (a check to see if a pollcheck was requested) on a regular cadence (roughly, every O(1) instructions executed). So, locking the thread's state, then CASing the handshake requested bit, and then waiting for the thread to respond is a O(1) operation. Pollchecks are cheap: load the thread's status byte using a relaxed (i.e. not atomic) load, and branch on its bits. There is a ton of literature on how to make pollchecks even cheaper than this. - An exited thread won't run pollchecks. The exited state is good for making syscalls or calling out of the VM (hence why I call it "exited" - you've exited the VM). Requesting a pollcheck of an exited thread means doing the work that the pollcheck would do on the thread's behalf while holding the thread's lock. - Threads exit and enter by CASing on the fast path. The fast path of exit/enter is: assert that the thread has no pollchecks requested, and then change the state from entered to exited (or vice versa). If a pollcheck was requested, the thread takes slow path and grabs the lock, potentially servicing the pollcheck or notifying (using the condition variable) that the thread is exiting. That's most of the story. There are more shenanigans to do with thread start and stop (need to make sure that someone trying to request pollcheck of all threads doesn't miss threads that were just started). Additional shenanigans are needed if you want to support stopping the world (a special kind of pollcheck request that causes all threads to wait on their condition variables until the world is resumed). Fil-C hooks into this for signal handling. When the OS delivers a signal, and the thread is entered, the Fil-C runtime's signal handler just raises the signal requested bit (another bit in the status byte not unlike the pollcheck requested bit), and the next pollcheck will run the signal handler. This ensures signal handlers run at well-defined points that the runtime understands, which allows signal handlers to safely allocate GC memory (needed for stack allocations in Fil-C; and as a byproduct it means that Fil-C's malloc is signal-safe). If the thread is exited, then the signal is delivered immediately. This is a super old technique! There are lots of variations on it in different VMs. The most sophisticated and mature implementations tend to be in JVMs (in my experience). Fil-C's implementation is quite complete though; you can see how it works by looking at filc_pollcheck/filc_enter/filc_exit in filc_runtime.c.
5
15
86
12,376
27 Dec 2024
i wouldn't respond either. The last thing i want at my company is someone unpaid or without equity — incentives aren't necessarily aligned, the relationship ambiguous and difficult to manage.
1
4
428
@heapwolf retweeted
Fil-C is safer than Rust. Fil-C has no `unsafe`. You can do memory-safe doubly-linked lists and other cyclic data structures in Fil-C. Even Fil-C's libc/libc are memory safe.
18
18
219
46,401
10 Dec 2024
Damn. My Twitter account is older than half the people on here. #MyXAnniversary
2
178
4 Nov 2024
Finally, #P2P won't need any kind of runtime, it will just work in the world's most ubiquitous browser! chromestatus.com/feature/639…

1
7
22
1,720
4 Nov 2024
This was a good stop gap for getting p2p into production especially on mobile, but getting real sockets in the browser changes *everything* and opens up a huge world of possibilities.
1
1
2
362
4 Nov 2024
what does this mean for @socketruntime? well, we have some very big news on the way. 😎
1
1
8
337