Build Your Own Text Editor
It’s about 1000 lines of C in a single file with no dependencies, and it implements all the basic features you expect in a minimal editor, as well as syntax highlighting and a search feature.
https://t.co/LK8FtK45vk
The cycle is complete: now you can turn a docker container into an executable, so the user downloads an executable, and inside the executable there's a docker image.
the reason i don't like traveling is because i crush myself under my own expectations. i'm extremely cognizant of the fact that there are 19 year olds that can code circles around me. i'm looking at a statue of palmer luckey who sold oculus at 22, with tears in my eyes
I just pushed a new update for https://t.co/V5DMW8NQJW
✨New intro page!
Lots of people didn’t like being redirected to the login page directly. Now the user gets to see the dashboard, but with some info in a nice Bento grid that showcases the AI + they can sign up!
👇1/2
Things React should rename
"use server" -> "use action" (it used to be this lol)
"use client" -> "use interactive"
React.cache -> React.dedupe
useEffect -> DO_NOT_USE_EFFECT_OR_YOU_WILL_BE_FIRED
# HVM-CUDA: Global Memory implemented!
Perf: 44,955,377,088 Interactions Per Second (IPS)
## What is HVM/HOC, why it matters?
HVM is a new way to "do computing" which, I argue, will eventually replace CPUs and GPUs. That's because it is based on a new model of computation, the Interaction Net, that is *physically optimal* in a very precise and fundamental sense, and in a way that supersedes Turing Machines and λ-Calculi. I think it is a matter of time until we start seeking for ways to overcome the Vonn Neumann bottleneck, and INs are, almost by definition, a compelling solution.
In simple terms - HVM is how aliens make computers.
To validate that hypothesis, I started the Higher Order Company (HOC) in 2023, and successfully raised a $4m round to develop our first stable release. And bring this alien tech to Earth!
## What is HVM-CUDA?
Before diving into the complexities of chip design, our first short-term goal is to demonstrate HVM's potential by accelerating conventional languages (like Haskell and Python) on conventional hardware (like CPUs and GPUs). HVM-CUDA is just our first implementation of HVM on GPUs.
Imagine writing the dumbest Python program you can think of, and compiling it to run *directly* on GPUs? No messing with CUDA kernels, no manual thread spawning, no locks, no mutexes. Just write the formulas/algorithms in their cleanest forms, and get a massively parallel executable, ready to run on 20k+ NVIDIA Blackwell cores with near-ideal speedup? That's what HVM-CUDA might offer to you.
## What is IPS?
Interaction Per Second (IPS) is like our FLOPS, except it is more about "pattern-matching" and less about "floating-point operations". All that you need to know is that it corresponds directly to how fast a program runs, and is a great measure of the performance of an IN implementation.
## Today's progress: 45 billion IPS on RTX 4090!
About two weeks ago, I started developing a new approach to run HVM on GPUs. Since the previous CUDA prototype reached 6.7 billion IPS after many optimizations, I was surprised to find that the new approach, which exploited shared memory in a novel way, peaked at 100+ billion IPS on NVIDIA RTX 4090. That said, it was a controlled run, with no warp divergence and local memory only. The main question was: how much could we sustain in realistic scenarios?
Today, I've finally finished global memory integration, which allowed me to run a simple, but complete, JavaScript program on it. I'm glad to announce that, on this first full test, HVM-CUDA officially sustained 45 billion IPS. This is much better than I expected, and enough to make a decisive case for GPUs being vastly superior than CPUs for Interaction Net evaluation.
For a perspective, running this program on V8 (the fastest JS engine) took about 2 minutes (100x slower), versus only 1.5s on HVM. Unlike CPython, V8 is actually a fast, competitive runtime (basically the entire web runs on it). Yet, even if it could auto-parallelize like the HVM does, AND use all cores like HVM does, AND reach 100% ideal speedup; that'd still 5x times slower. Quite a number!
## Conclusion
Over the lat years, we improved the performance of the SOTA Interaction Net implementation from 30 million (Optlam - 2015), to 2 billion (HVM1 - 2022), all the way to, seemingly, 40+ billion (HVM2 - soon) IPS. It went from a niche toy, to an interesting demo, all the way to a full-fledged engine that might soon power all sorts of high-level languages, from Python to Haskell, at unprecedented speeds.
I was planning to release HVM2 this month, but the new GPU architecture (which was not in the plans yet) is absolutely insane, and I'd like to include it in this release. This could take an additional time, or not. Regardless, I'll keep you all updated here. If you have any questions, feel free to DM or ask in our Discord (on comments).
That's it for now. See you!