You can rewrite typescript in rust for $420k
Read full transcript 34 segments
-
Announcing TSC RS aka Typescript Rust. Announcing TSC RS aka Typescript Rust. My complete rewrite of the TypeScript My complete rewrite of the TypeScript My complete rewrite of the TypeScript compiler, Type Checker, and LSP all in compiler, Type Checker, and LSP all in compiler, Type Checker, and LSP all in Rust. This is a project I've had agents Rust. This is a project I've had agents Rust. This is a project I've had agents working on for 5 months now. I burned working on for 5 months now. I burned working on for 5 months now. I burned $400,000 of codeex tokens and got $400,000 of codeex tokens and got $400,000 of codeex tokens and got nowhere. I burned $20,000 of Opus 5.5 nowhere. I burned $20,000 of Opus 5.5 nowhere. I burned $20,000 of Opus 5.5 and I got there in 2 weeks. An important and I got there in 2 weeks. An important and I got there in 2 weeks. An important note, I have not read a single line of note, I have not read a single line of note, I have not read a single line of code. If you've been around for a bit, code. If you've been around for a bit, code. If you've been around for a bit, you probably know I've been using this you probably know I've been using this you probably know I've been using this TypeScript Rust rewrite as my favorite TypeScript Rust rewrite as my favorite TypeScript Rust rewrite as my favorite little playground for trying out new little playground for trying out new little playground for trying out new models and seeing where capabilities are models and seeing where capabilities are models and seeing where capabilities are going. I did that because I was looking going. I did that because I was looking going. I did that because I was looking for things that just seemed impossible for things that just seemed impossible for things that just seemed impossible for the models to do. The reason I first for the models to do. The reason I first for the models to do. The reason I first started the TypeScript Rust project was started the TypeScript Rust project was started the TypeScript Rust project was because I had a crazy amount of because I had a crazy amount of because I had a crazy amount of inference with the early access testing inference with the early access testing inference with the early access testing for GPT56 soul and it was crushing for GPT56 soul and it was crushing for GPT56 soul and it was crushing everything I threw at it. So, I decided everything I threw at it. So, I decided everything I threw at it. So, I decided to reach for something a bit bolder. Not to reach for something a bit bolder. Not to reach for something a bit bolder. Not a bit bolder, like just impossible. It a bit bolder, like just impossible. It a bit bolder, like just impossible. It didn't seem viable to just rewrite all didn't seem viable to just rewrite all didn't seem viable to just rewrite all of TypeScript in Rust. It seemed like a of TypeScript in Rust. It seemed like a of TypeScript in Rust. It seemed like a meme and it was the furthest I got using meme and it was the furthest I got using meme and it was the furthest I got using OpenAI models was roughly 84% OpenAI models was roughly 84% OpenAI models was roughly 84% compatibility. And while like impressive compatibility. And while like impressive compatibility. And while like impressive that it could get that far, didn't that it could get that far, didn't that it could get that far, didn't really seem like it was going to get really seem like it was going to get really seem like it was going to get much further because at that point the much further because at that point the much further because at that point the last 16% is way harder. And as you get last 16% is way harder. And as you get last 16% is way harder. And as you get closer and closer, the edges that are closer and closer, the edges that are closer and closer, the edges that are left get worse and worse. Which is why left get worse and worse. Which is why left get worse and worse. Which is why it feels extra insane that not only is it feels extra insane that not only is it feels extra insane that not only is TS Rust now out and available for people TS Rust now out and available for people TS Rust now out and available for people to use with a real package on npm, more to use with a real package on npm, more to use with a real package on npm, more importantly, it's way faster when importantly, it's way faster when importantly, it's way faster when compared to TypeScript v6, which was the compared to TypeScript v6, which was the compared to TypeScript v6, which was the last version written in TypeScript and last version written in TypeScript and last version written in TypeScript and JavaScript itself. It is 12.5 times JavaScript itself. It is 12.5 times JavaScript itself. It is 12.5 times faster. When compared to TSGO, which is
-
faster. When compared to TSGO, which is faster. When compared to TSGO, which is TypeScript v7, the version that the TypeScript v7, the version that the TypeScript v7, the version that the official folks at Microsoft built, it's official folks at Microsoft built, it's official folks at Microsoft built, it's around two times faster. We're not the around two times faster. We're not the around two times faster. We're not the only ones who did this. Bun also dropped only ones who did this. Bun also dropped only ones who did this. Bun also dropped bun check which is a rewrite of the bun check which is a rewrite of the bun check which is a rewrite of the typescript checker in Rust that is also typescript checker in Rust that is also typescript checker in Rust that is also way faster and I'll be real is even way faster and I'll be real is even way faster and I'll be real is even faster than what we built with PS Rust. faster than what we built with PS Rust. faster than what we built with PS Rust. But there are catches to all of this But there are catches to all of this But there are catches to all of this from how I built it to how I verified it from how I built it to how I verified it from how I built it to how I verified it to the secret reasons I actually wanted to the secret reasons I actually wanted to the secret reasons I actually wanted this to exist which believe it or not this to exist which believe it or not this to exist which believe it or not aren't just RAM usage and how long it aren't just RAM usage and how long it aren't just RAM usage and how long it takes to run. I have one very takes to run. I have one very takes to run. I have one very interesting secret reason I wanted to interesting secret reason I wanted to interesting secret reason I wanted to build this and I actually have a demo of build this and I actually have a demo of build this and I actually have a demo of it working now. This little vibe coding it working now. This little vibe coding it working now. This little vibe coding demo here is a lot cooler than it might demo here is a lot cooler than it might demo here is a lot cooler than it might seem initially. I want to talk about all seem initially. I want to talk about all seem initially. I want to talk about all of this from how much it cost to how it of this from how much it cost to how it of this from how much it cost to how it worked to why I care so much about this worked to why I care so much about this worked to why I care so much about this project and most importantly what does project and most importantly what does project and most importantly what does this mean for engineering going forward. this mean for engineering going forward. this mean for engineering going forward. But after burning $420,000 But after burning $420,000 But after burning $420,000 of tokens, I hope you can forgive me for of tokens, I hope you can forgive me for of tokens, I hope you can forgive me for a real quick break for today's sponsor. a real quick break for today's sponsor. a real quick break for today's sponsor. How the heck did we get here? AI models How the heck did we get here? AI models How the heck did we get here? AI models are capable of rewriting pretty much any are capable of rewriting pretty much any are capable of rewriting pretty much any piece of software from scratch in piece of software from scratch in piece of software from scratch in whatever language you want. But trying whatever language you want. But trying whatever language you want. But trying to find the right three rows in your to find the right three rows in your to find the right three rows in your database using an agent is nearly database using an agent is nearly database using an agent is nearly impossible. Once the data isn't impossible. Once the data isn't impossible. Once the data isn't perfectly structured and doesn't have perfectly structured and doesn't have perfectly structured and doesn't have the exact keywords the model's looking the exact keywords the model's looking the exact keywords the model's looking for, it's not going to find it. This is for, it's not going to find it. This is for, it's not going to find it. This is why good vector search and retrieval why good vector search and retrieval why good vector search and retrieval systems are so important. And today's systems are so important. And today's systems are so important. And today's sponsor, Quadrant, has it absolutely sponsor, Quadrant, has it absolutely sponsor, Quadrant, has it absolutely figured out. I'm going to quickly figured out. I'm going to quickly figured out. I'm going to quickly mention two things to make the haters go mention two things to make the haters go mention two things to make the haters go away. It's fully open source and also away. It's fully open source and also away. It's fully open source and also written in Rust. You can use the cloud written in Rust. You can use the cloud written in Rust. You can use the cloud if you want or you can self-host. Both if you want or you can self-host. Both if you want or you can self-host. Both are incredible. My team's been using the are incredible. My team's been using the are incredible. My team's been using the cloud version a bunch and the things cloud version a bunch and the things cloud version a bunch and the things we've been building are genuinely super we've been building are genuinely super we've been building are genuinely super useful. For example, let's look for
-
useful. For example, let's look for useful. For example, let's look for videos where I talk about my agent MD. videos where I talk about my agent MD. videos where I talk about my agent MD. When I do basic keyword search, I get 10 When I do basic keyword search, I get 10 When I do basic keyword search, I get 10 results that aren't really good fits for results that aren't really good fits for results that aren't really good fits for what I was looking for. But on Quadrant, what I was looking for. But on Quadrant, what I was looking for. But on Quadrant, I'm getting ranked results based on how I'm getting ranked results based on how I'm getting ranked results based on how well my question actually matches the well my question actually matches the well my question actually matches the content. And obviously, the video on the content. And obviously, the video on the content. And obviously, the video on the right here is a much better fit than the right here is a much better fit than the right here is a much better fit than the one on the left. I can even get more one on the left. I can even get more one on the left. I can even get more vague and search for something like vague and search for something like vague and search for something like anti-claude. And what's funny here is anti-claude. And what's funny here is anti-claude. And what's funny here is the video that was recommended on the the video that was recommended on the the video that was recommended on the left is the same as before, because this left is the same as before, because this left is the same as before, because this is basic keyword search, like what your is basic keyword search, like what your is basic keyword search, like what your agents do by default. on the right with agents do by default. on the right with agents do by default. on the right with the vector search, we get videos that the vector search, we get videos that the vector search, we get videos that are very much me being anti-anthropic. I are very much me being anti-anthropic. I are very much me being anti-anthropic. I didn't plan this one ahead. I did not didn't plan this one ahead. I did not didn't plan this one ahead. I did not think this gap was going to be so big. think this gap was going to be so big. think this gap was going to be so big. That's hilarious. The more vague the That's hilarious. The more vague the That's hilarious. The more vague the query, the more valuable it is. For query, the more valuable it is. For query, the more valuable it is. For example, I can have it go through all of example, I can have it go through all of example, I can have it go through all of my issues and PRs on GitHub for T3 Code my issues and PRs on GitHub for T3 Code my issues and PRs on GitHub for T3 Code and ask something vague like T3 Code is and ask something vague like T3 Code is and ask something vague like T3 Code is making my whole Windows PC lag even when making my whole Windows PC lag even when making my whole Windows PC lag even when it's sitting idle. I fire this, I get no it's sitting idle. I fire this, I get no it's sitting idle. I fire this, I get no results from the keyword search, and I results from the keyword search, and I results from the keyword search, and I get eight relevant results from get eight relevant results from get eight relevant results from Quadrant. This makes dduping and finding Quadrant. This makes dduping and finding Quadrant. This makes dduping and finding similar issues so much easier. We're similar issues so much easier. We're similar issues so much easier. We're even using it now to index all the faces even using it now to index all the faces even using it now to index all the faces I use in my thumbnails. I can search for I use in my thumbnails. I can search for I use in my thumbnails. I can search for shrugging with both hands out and shrugging with both hands out and shrugging with both hands out and immediately get results that are good immediately get results that are good immediately get results that are good matches for that request. Or I can matches for that request. Or I can matches for that request. Or I can search something like angry and get all search something like angry and get all search something like angry and get all the thumbnails where I looked kind of the thumbnails where I looked kind of the thumbnails where I looked kind of mad. There's a reason companies like mad. There's a reason companies like mad. There's a reason companies like Canva, Discord, and more have been Canva, Discord, and more have been Canva, Discord, and more have been moving to Quadrant. Give your agents moving to Quadrant. Give your agents moving to Quadrant. Give your agents search that feels magical at search that feels magical at search that feels magical at swive.link/quadrant.
-
swive.link/quadrant. swive.link/quadrant. I'm gonna do everything in my power to I'm gonna do everything in my power to I'm gonna do everything in my power to not make this video two to four hours not make this video two to four hours not make this video two to four hours long, which is tough because I have so long, which is tough because I have so long, which is tough because I have so much to say about this, but I think we much to say about this, but I think we much to say about this, but I think we should do a brief history lesson to should do a brief history lesson to should do a brief history lesson to explain what this is and why it exists. explain what this is and why it exists. explain what this is and why it exists. Typescript is a language kind of. The Typescript is a language kind of. The Typescript is a language kind of. The point of Typescript is to build a system point of Typescript is to build a system point of Typescript is to build a system on top of JavaScript so that we can have on top of JavaScript so that we can have on top of JavaScript so that we can have more confidence about the behaviors of more confidence about the behaviors of more confidence about the behaviors of our JavaScript apps. The main thing that our JavaScript apps. The main thing that our JavaScript apps. The main thing that we're talking about today is TSC, the we're talking about today is TSC, the we're talking about today is TSC, the TypeScript compiler. The point of the TypeScript compiler. The point of the TypeScript compiler. The point of the TypeScript compiler is of course to turn TypeScript compiler is of course to turn TypeScript compiler is of course to turn the TypeScript that is in your editor the TypeScript that is in your editor the TypeScript that is in your editor into JavaScript that your browser can into JavaScript that your browser can into JavaScript that your browser can run because your browser doesn't know run because your browser doesn't know run because your browser doesn't know how to deal with TypeScript. If you have how to deal with TypeScript. If you have how to deal with TypeScript. If you have a function like function user name a function like function user name a function like function user name string console.log string console.log string console.log user.name. Wow, we're writing code. Such user.name. Wow, we're writing code. Such user.name. Wow, we're writing code. Such advanced stuff. Been a while, right advanced stuff. Been a while, right advanced stuff. Been a while, right guys? Wait, there's even a code button guys? Wait, there's even a code button guys? Wait, there's even a code button there. Look at that. If you took this there. Look at that. If you took this there. Look at that. If you took this function and ran it in Chrome or Node or function and ran it in Chrome or Node or function and ran it in Chrome or Node or any other JavaScript runtime, it will any other JavaScript runtime, it will any other JavaScript runtime, it will immediately fail an error because the immediately fail an error because the immediately fail an error because the syntax for the type definition here syntax for the type definition here syntax for the type definition here where I describe user as a parameter where I describe user as a parameter where I describe user as a parameter that is of type object with a name key that is of type object with a name key that is of type object with a name key that's a string. This is not valid that's a string. This is not valid that's a string. This is not valid JavaScript syntax. You can't just do JavaScript syntax. You can't just do JavaScript syntax. You can't just do this there. Also, the function needs a this there. Also, the function needs a this there. Also, the function needs a name. So, log user. You get the idea, name. So, log user. You get the idea, name. So, log user. You get the idea, though. This would not be valid though. This would not be valid though. This would not be valid JavaScript because of this guy here.
-
JavaScript because of this guy here. JavaScript because of this guy here. Turning this into valid JavaScript is Turning this into valid JavaScript is Turning this into valid JavaScript is actually quite easy. You can go through actually quite easy. You can go through actually quite easy. You can go through and trim out all of the TypeScript isms and trim out all of the TypeScript isms and trim out all of the TypeScript isms in the JavaScript code. And once you've in the JavaScript code. And once you've in the JavaScript code. And once you've done that, you can just run it and it done that, you can just run it and it done that, you can just run it and it works. So the first important thing to works. So the first important thing to works. So the first important thing to understand here, turning TypeScript understand here, turning TypeScript understand here, turning TypeScript files into JS files is easy, borderline files into JS files is easy, borderline files into JS files is easy, borderline trivial, and there have been lots of trivial, and there have been lots of trivial, and there have been lots of cool tools doing this for a while now. cool tools doing this for a while now. cool tools doing this for a while now. In particular, one blew up a few years In particular, one blew up a few years In particular, one blew up a few years ago and kind of changed how we think ago and kind of changed how we think ago and kind of changed how we think about webdev. ESB build. ES build was about webdev. ESB build. ES build was about webdev. ESB build. ES build was built by Evan W who was the CTO of Figma built by Evan W who was the CTO of Figma built by Evan W who was the CTO of Figma because he wanted to make it faster to because he wanted to make it faster to because he wanted to make it faster to get updates when you change files in get updates when you change files in get updates when you change files in your editor to see them in your UI and your editor to see them in your UI and your editor to see them in your UI and running all of your code through running all of your code through running all of your code through JavaScript just to remove some things JavaScript just to remove some things JavaScript just to remove some things from it so you can put it in the browser from it so you can put it in the browser from it so you can put it in the browser was not efficient. So ESB build was was not efficient. So ESB build was was not efficient. So ESB build was built to do a lot of those steps, not built to do a lot of those steps, not built to do a lot of those steps, not just the turning typescript to just the turning typescript to just the turning typescript to JavaScript, but also a lot of the other JavaScript, but also a lot of the other JavaScript, but also a lot of the other steps like bundling in the CSS, creating steps like bundling in the CSS, creating steps like bundling in the CSS, creating the other assets needed, turning it all the other assets needed, turning it all the other assets needed, turning it all into one file the browser could actually into one file the browser could actually into one file the browser could actually receive instead of all of these files receive instead of all of these files receive instead of all of these files scattered around your codebase. All the scattered around your codebase. All the scattered around your codebase. All the things you need to bundle the app to get things you need to bundle the app to get things you need to bundle the app to get it ready for your browser written in Go it ready for your browser written in Go it ready for your browser written in Go so that it could be as efficient as so that it could be as efficient as so that it could be as efficient as possible reasonably without having to possible reasonably without having to possible reasonably without having to like reinvent the universe and manage like reinvent the universe and manage like reinvent the universe and manage all your memory yourself. and ESB build all your memory yourself. and ESB build all your memory yourself. and ESB build was incredible, but it was missing was incredible, but it was missing was incredible, but it was missing something. We're just talking about something. We're just talking about something. We're just talking about turning TypeScript into JavaScript.
-
turning TypeScript into JavaScript. turning TypeScript into JavaScript. That's an easy part. The actual hard That's an easy part. The actual hard That's an easy part. The actual hard part is checking the TypeScript, making part is checking the TypeScript, making part is checking the TypeScript, making sure the types are valid and being used sure the types are valid and being used sure the types are valid and being used and honored correctly throughout your and honored correctly throughout your and honored correctly throughout your application. I'm going to be so real application. I'm going to be so real application. I'm going to be so real with y'all. Doing the translation, with y'all. Doing the translation, with y'all. Doing the translation, turning TS into JS was so easy that even turning TS into JS was so easy that even turning TS into JS was so easy that even just doing it in JS wasn't that big of a just doing it in JS wasn't that big of a just doing it in JS wasn't that big of a deal. Checking the TypeScript to make deal. Checking the TypeScript to make deal. Checking the TypeScript to make sure it's correct, way harder, and also sure it's correct, way harder, and also sure it's correct, way harder, and also way slower. This ended up being where way slower. This ended up being where way slower. This ended up being where most of the time was spent. As a result most of the time was spent. As a result most of the time was spent. As a result of this, the maintainers of lots of big of this, the maintainers of lots of big of this, the maintainers of lots of big code bases split their transpolation and code bases split their transpolation and code bases split their transpolation and typeecking compilation paths separately. typeecking compilation paths separately. typeecking compilation paths separately. I remember how bad the hot reloading was I remember how bad the hot reloading was I remember how bad the hot reloading was initially at Twitch. I would run the dev initially at Twitch. I would run the dev initially at Twitch. I would run the dev command, it would take 2 minutes to command, it would take 2 minutes to command, it would take 2 minutes to start up, and then I would go and edit a start up, and then I would go and edit a start up, and then I would go and edit a file, save, and it would take 30 seconds file, save, and it would take 30 seconds file, save, and it would take 30 seconds to a minute to appear in the browser. I to a minute to appear in the browser. I to a minute to appear in the browser. I was so hyped that we got it under 5 was so hyped that we got it under 5 was so hyped that we got it under 5 seconds by making it so the path that seconds by making it so the path that seconds by making it so the path that puts it in the browser is separate from puts it in the browser is separate from puts it in the browser is separate from the path that is type checking the code the path that is type checking the code the path that is type checking the code to make sure it's correct in its type to make sure it's correct in its type to make sure it's correct in its type definitions. Something like ES build let definitions. Something like ES build let definitions. Something like ES build let you go even further for those hot you go even further for those hot you go even further for those hot reloads from saving to seeing it in the reloads from saving to seeing it in the reloads from saving to seeing it in the browser, but it doesn't give you enough browser, but it doesn't give you enough browser, but it doesn't give you enough info to know something like did the info to know something like did the info to know something like did the types check correctly. And as you've types check correctly. And as you've types check correctly. And as you've probably seen if you've watched my old probably seen if you've watched my old probably seen if you've watched my old videos, the TypeScript type system is videos, the TypeScript type system is videos, the TypeScript type system is incredibly complex and flexible. It's a incredibly complex and flexible. It's a incredibly complex and flexible. It's a touring complete system. Here's a fun touring complete system. Here's a fun touring complete system. Here's a fun throwback. One of my friends actually throwback. One of my friends actually throwback. One of my friends actually ported all of Doom into Typescript's ported all of Doom into Typescript's ported all of Doom into Typescript's types, not Typescript, the language.
-
types, not Typescript, the language. types, not Typescript, the language. Typescript, the type system. Insane Typescript, the type system. Insane Typescript, the type system. Insane project. Highly recommend watching that project. Highly recommend watching that project. Highly recommend watching that video if you haven't seen it before. The video if you haven't seen it before. The video if you haven't seen it before. The point I'm trying to make here is that point I'm trying to make here is that point I'm trying to make here is that TypeScript's type system is complex. And TypeScript's type system is complex. And TypeScript's type system is complex. And it's complex because it can represent it's complex because it can represent it's complex because it can represent all the things you do in JS. Therefore, all the things you do in JS. Therefore, all the things you do in JS. Therefore, rewriting the checker in a rewriting the checker in a rewriting the checker in a non-JavaScript language would inherently non-JavaScript language would inherently non-JavaScript language would inherently suck because of all the weird things suck because of all the weird things suck because of all the weird things that JavaScript does inherently, like that JavaScript does inherently, like that JavaScript does inherently, like the way you can change what variables the way you can change what variables the way you can change what variables types are as you execute your code. The types are as you execute your code. The types are as you execute your code. The way that objects inherent traits and the way that objects inherent traits and the way that objects inherent traits and the way all of the prototyping systems work way all of the prototyping systems work way all of the prototyping systems work and all the the weirdness of JavaScript and all the the weirdness of JavaScript and all the the weirdness of JavaScript that TypeScript faithfully encodes is a that TypeScript faithfully encodes is a that TypeScript faithfully encodes is a lot easier to encode when the language lot easier to encode when the language lot easier to encode when the language encoding it is the same language as the encoding it is the same language as the encoding it is the same language as the one you're encoding. A sillier way to one you're encoding. A sillier way to one you're encoding. A sillier way to explain this is that it's much easier to explain this is that it's much easier to explain this is that it's much easier to explain how English works in English explain how English works in English explain how English works in English than it would be to explain how English than it would be to explain how English than it would be to explain how English works in Spanish. Just imagine that works in Spanish. Just imagine that works in Spanish. Just imagine that complexity, but like times a 100. That's complexity, but like times a 100. That's complexity, but like times a 100. That's what makes this so hard is all the what makes this so hard is all the what makes this so hard is all the weirdness of JS has to be encoded weirdness of JS has to be encoded weirdness of JS has to be encoded faithfully in whatever thing you choose faithfully in whatever thing you choose faithfully in whatever thing you choose instead. But that was not enough to stop instead. But that was not enough to stop instead. But that was not enough to stop Microsoft, which is why Microsoft Microsoft, which is why Microsoft Microsoft, which is why Microsoft decided to rewrite TSC. They wanted it decided to rewrite TSC. They wanted it decided to rewrite TSC. They wanted it to be native and super fast to make to be native and super fast to make to be native and super fast to make these compilation and type check times these compilation and type check times these compilation and type check times way better, which is why they picked Go.
-
way better, which is why they picked Go. way better, which is why they picked Go. You might be confused. In fact, I'll You might be confused. In fact, I'll You might be confused. In fact, I'll switch over to chat and see how people switch over to chat and see how people switch over to chat and see how people feel about their choice for Go. What feel about their choice for Go. What feel about their choice for Go. What language do you guys think they should language do you guys think they should language do you guys think they should have chosen? Jai, C++, C. C's a funny have chosen? Jai, C++, C. C's a funny have chosen? Jai, C++, C. C's a funny one cuz the creator of Typescript's also one cuz the creator of Typescript's also one cuz the creator of Typescript's also the creator of C#. I have the hot take the creator of C#. I have the hot take the creator of C#. I have the hot take that Go is the right language for this. that Go is the right language for this. that Go is the right language for this. I know everybody else has opinions, but I know everybody else has opinions, but I know everybody else has opinions, but let me explain why. I recently got let me explain why. I recently got let me explain why. I recently got dunked on for these tweets, and I think dunked on for these tweets, and I think dunked on for these tweets, and I think they're relevant here more than ever. I they're relevant here more than ever. I they're relevant here more than ever. I posted in February of 2024, "Go is posted in February of 2024, "Go is posted in February of 2024, "Go is probably the right language for most probably the right language for most probably the right language for most JavaScript build and dev tooling." I JavaScript build and dev tooling." I JavaScript build and dev tooling." I followed up with the following. Tweeting followed up with the following. Tweeting followed up with the following. Tweeting this now for reference in 3 years when this now for reference in 3 years when this now for reference in 3 years when we realize we up going allin on we realize we up going allin on we realize we up going allin on Rust. This take aged poorly, but not for Rust. This take aged poorly, but not for Rust. This take aged poorly, but not for the right reasons. I need to explain the the right reasons. I need to explain the the right reasons. I need to explain the Go one first because this almost Go one first because this almost Go one first because this almost directly contradicts with my other takes directly contradicts with my other takes directly contradicts with my other takes on Go. For example, here where I'm on Go. For example, here where I'm on Go. For example, here where I'm making fun of Melky, saying, "I suddenly making fun of Melky, saying, "I suddenly making fun of Melky, saying, "I suddenly understand why you think Go is a good understand why you think Go is a good understand why you think Go is a good language. I'm notoriously a Go hater. I language. I'm notoriously a Go hater. I language. I'm notoriously a Go hater. I just never liked the language much. I I just never liked the language much. I I just never liked the language much. I I get where its benefits are. I just makes get where its benefits are. I just makes get where its benefits are. I just makes you feel like a monkey more than an you feel like a monkey more than an you feel like a monkey more than an engineer from being real. So why did Go engineer from being real. So why did Go engineer from being real. So why did Go make sense here? Go's biggest strengths make sense here? Go's biggest strengths make sense here? Go's biggest strengths compared to something like Rust are its compared to something like Rust are its compared to something like Rust are its flexibility because it's not trying flexibility because it's not trying flexibility because it's not trying anywhere near as hard to be like super anywhere near as hard to be like super anywhere near as hard to be like super type safe and memory safe. Its type type safe and memory safe. Its type type safe and memory safe. Its type system is a meme. Its system is a meme. Its system is a meme. Its concurrency stuff built in is awesome.
-
concurrency stuff built in is awesome. concurrency stuff built in is awesome. Like Go's concurrency model has its Like Go's concurrency model has its Like Go's concurrency model has its issues. like channels are stupid, but issues. like channels are stupid, but issues. like channels are stupid, but the like core parts in Go routines, the like core parts in Go routines, the like core parts in Go routines, there's some really cool stuff in there. there's some really cool stuff in there. there's some really cool stuff in there. And concurrency is one of the big things And concurrency is one of the big things And concurrency is one of the big things that the team wanted with the TypeScript that the team wanted with the TypeScript that the team wanted with the TypeScript rewrite so that they could take more rewrite so that they could take more rewrite so that they could take more advantage of your cores. It syntax was advantage of your cores. It syntax was advantage of your cores. It syntax was surprisingly similar to JS which made it surprisingly similar to JS which made it surprisingly similar to JS which made it easier to look at two functions from one easier to look at two functions from one easier to look at two functions from one and the other and understand what and the other and understand what and the other and understand what they're doing. But I would argue the they're doing. But I would argue the they're doing. But I would argue the biggest piece garbage collection. biggest piece garbage collection. biggest piece garbage collection. Garbage collection is one of the flaws Garbage collection is one of the flaws Garbage collection is one of the flaws in Go because it means that your memory in Go because it means that your memory in Go because it means that your memory isn't being managed by you and at some isn't being managed by you and at some isn't being managed by you and at some point it has to be cleaned up which point it has to be cleaned up which point it has to be cleaned up which means that the performance means that the performance means that the performance characteristics of your app are not characteristics of your app are not characteristics of your app are not reliable. Usually it will respond to a reliable. Usually it will respond to a reliable. Usually it will respond to a request pretty fast but sometimes if request pretty fast but sometimes if request pretty fast but sometimes if that request comes in when you happen to that request comes in when you happen to that request comes in when you happen to be out of memory and need to do garbage be out of memory and need to do garbage be out of memory and need to do garbage collection then you'll have these random collection then you'll have these random collection then you'll have these random latency spikes that suck. The benefit is latency spikes that suck. The benefit is latency spikes that suck. The benefit is that you get crazy concurrency and you that you get crazy concurrency and you that you get crazy concurrency and you have to think about memory constantly at have to think about memory constantly at have to think about memory constantly at the cost of garbage collection causing the cost of garbage collection causing the cost of garbage collection causing your latency to spike. So if you have a your latency to spike. So if you have a your latency to spike. So if you have a system that you care a lot about and system that you care a lot about and system that you care a lot about and like you want to make sure every request like you want to make sure every request like you want to make sure every request is resolved in under 25 milliseconds, Go is resolved in under 25 milliseconds, Go is resolved in under 25 milliseconds, Go might not be the right language because might not be the right language because might not be the right language because sometimes it will have to garbage sometimes it will have to garbage sometimes it will have to garbage collect and it will hold off on collect and it will hold off on collect and it will hold off on executing code until that garbage executing code until that garbage executing code until that garbage collection pass is done. To be clear collection pass is done. To be clear collection pass is done. To be clear here, JavaScript and Typescript, those here, JavaScript and Typescript, those here, JavaScript and Typescript, those are garbage collected as well. Go is an are garbage collected as well. Go is an are garbage collected as well. Go is an interesting language because it's both interesting language because it's both interesting language because it's both low-level and garbage collected. So why low-level and garbage collected. So why low-level and garbage collected. So why would you ever want to use this for a would you ever want to use this for a would you ever want to use this for a compiler then? Isn't that going to be compiler then? Isn't that going to be compiler then? Isn't that going to be super slow? No. If you have a 100,000 super slow? No. If you have a 100,000 super slow? No. If you have a 100,000 requests that all come in at 25 requests that all come in at 25 requests that all come in at 25 milliseconds and then you have to do GC milliseconds and then you have to do GC milliseconds and then you have to do GC and the thousand first request comes in and the thousand first request comes in and the thousand first request comes in at 300 milliseconds instead. That seems
-
at 300 milliseconds instead. That seems at 300 milliseconds instead. That seems horrible because that one request is now horrible because that one request is now horrible because that one request is now 10 plus times slower than all the other 10 plus times slower than all the other 10 plus times slower than all the other requests were. But if one out of a requests were. But if one out of a requests were. But if one out of a thousand requests is 10 times slower, thousand requests is 10 times slower, thousand requests is 10 times slower, the total time is like less than 1% the total time is like less than 1% the total time is like less than 1% slower, it's nothing. The impact of slower, it's nothing. The impact of slower, it's nothing. The impact of garbage collection on the scale of a garbage collection on the scale of a garbage collection on the scale of a long process with lots of things in it long process with lots of things in it long process with lots of things in it is much less than when you're timing is much less than when you're timing is much less than when you're timing each individual request. So if you're each individual request. So if you're each individual request. So if you're doing work that you want to have doing work that you want to have doing work that you want to have resolved in milliseconds, a garbage resolved in milliseconds, a garbage resolved in milliseconds, a garbage collecting language will have flaws you collecting language will have flaws you collecting language will have flaws you should work around. But if your average should work around. But if your average should work around. But if your average request is going to take more than a 100 request is going to take more than a 100 request is going to take more than a 100 milliseconds, like I don't know, milliseconds, like I don't know, milliseconds, like I don't know, multiple seconds because you're multiple seconds because you're multiple seconds because you're compiling a giant app, I don't care if compiling a giant app, I don't care if compiling a giant app, I don't care if you garbage collect one, two, three, 10, you garbage collect one, two, three, 10, you garbage collect one, two, three, 10, 100 times during that request because 100 times during that request because 100 times during that request because the garbage collection is going to make the garbage collection is going to make the garbage collection is going to make up such a small percentage of the up such a small percentage of the up such a small percentage of the runtime. It barely matters. It washes runtime. It barely matters. It washes runtime. It barely matters. It washes out. So if I was building a web service out. So if I was building a web service out. So if I was building a web service I wanted to have respond as quickly as I wanted to have respond as quickly as I wanted to have respond as quickly as possible, Go is not the right language. possible, Go is not the right language. possible, Go is not the right language. But if I'm trying to take something But if I'm trying to take something But if I'm trying to take something written in JavaScript that's really slow written in JavaScript that's really slow written in JavaScript that's really slow that takes minutes to run and shave the that takes minutes to run and shave the that takes minutes to run and shave the time down and get more concurrency, Go time down and get more concurrency, Go time down and get more concurrency, Go is one of the best languages to do this is one of the best languages to do this is one of the best languages to do this with. But it couldn't have been too hard with. But it couldn't have been too hard with. But it couldn't have been too hard to do the Rust thing, right? Cuz you had to do the Rust thing, right? Cuz you had to do the Rust thing, right? Cuz you had an agent do it in 2 weeks. Now I would an agent do it in 2 weeks. Now I would an agent do it in 2 weeks. Now I would like to introduce TS Rust. Writing all like to introduce TS Rust. Writing all like to introduce TS Rust. Writing all of Typescript from JS to Rust would not of Typescript from JS to Rust would not of Typescript from JS to Rust would not have been viable. I know this to be the have been viable. I know this to be the have been viable. I know this to be the case because of how much the other case because of how much the other case because of how much the other models I tried like 56 Soul and Astra models I tried like 56 Soul and Astra models I tried like 56 Soul and Astra struggled with this port. I think a lot struggled with this port. I think a lot struggled with this port. I think a lot of that was because going from of that was because going from of that was because going from JavaScript to Rust is not trivial with JavaScript to Rust is not trivial with JavaScript to Rust is not trivial with things as complex as TypeScript itself.
-
things as complex as TypeScript itself. things as complex as TypeScript itself. And this is where things start to get And this is where things start to get And this is where things start to get interesting with my TS Rust port. If we interesting with my TS Rust port. If we interesting with my TS Rust port. If we hop into the crates, a lot of things hop into the crates, a lot of things hop into the crates, a lot of things were done, many of which are uh I think were done, many of which are uh I think were done, many of which are uh I think questionable is a fair word for it. One questionable is a fair word for it. One questionable is a fair word for it. One of those things is this go std. This is of those things is this go std. This is of those things is this go std. This is the standard library from Go ported to the standard library from Go ported to the standard library from Go ported to Rust because the way Opus chose to do Rust because the way Opus chose to do Rust because the way Opus chose to do this wasn't to rewrite things from Go to this wasn't to rewrite things from Go to this wasn't to rewrite things from Go to Rust. It was to go through this Goport Rust. It was to go through this Goport Rust. It was to go through this Goport line by line and faithfully port line by line and faithfully port line by line and faithfully port it over to the Rust language. And the it over to the Rust language. And the it over to the Rust language. And the result of this was actually quite a bit result of this was actually quite a bit result of this was actually quite a bit slower than the Go version because when slower than the Go version because when slower than the Go version because when you have to reimplement things like Go you have to reimplement things like Go you have to reimplement things like Go routines, which is in here somewhere, I routines, which is in here somewhere, I routines, which is in here somewhere, I forgot which it's in. I think it's in forgot which it's in. I think it's in forgot which it's in. I think it's in the runtime RS. Yeah, runtime RS. This the runtime RS. Yeah, runtime RS. This the runtime RS. Yeah, runtime RS. This is Go routines ported to Rust. is Go routines ported to Rust. is Go routines ported to Rust. This happened because Go was a much This happened because Go was a much This happened because Go was a much better starting point for a Rust port better starting point for a Rust port better starting point for a Rust port than JavaScript is. The Microsoft team than JavaScript is. The Microsoft team than JavaScript is. The Microsoft team faithfully by hand went through every faithfully by hand went through every faithfully by hand went through every line of code in Typescript, ported it to line of code in Typescript, ported it to line of code in Typescript, ported it to Go, and then started refining it to make Go, and then started refining it to make Go, and then started refining it to make it better and faster in Go. My agents it better and faster in Go. My agents it better and faster in Go. My agents did the same thing from the Go version did the same thing from the Go version did the same thing from the Go version to Rust, and they succeeded. I didn't to Rust, and they succeeded. I didn't to Rust, and they succeeded. I didn't even know that my agents had done this even know that my agents had done this even know that my agents had done this until somebody else pointed it out on until somebody else pointed it out on until somebody else pointed it out on Twitter. And as soon as I saw that, I Twitter. And as soon as I saw that, I Twitter. And as soon as I saw that, I was like, "Oh, that's hilarious. That was like, "Oh, that's hilarious. That was like, "Oh, that's hilarious. That explains a lot." Because again, when explains a lot." Because again, when explains a lot." Because again, when TSGO RS was ready for its first run when TSGO RS was ready for its first run when TSGO RS was ready for its first run when Opus finished, it was two to three times Opus finished, it was two to three times Opus finished, it was two to three times slower than the Go version. So, I told slower than the Go version. So, I told slower than the Go version. So, I told it in a/goal, your objective is to make it in a/goal, your objective is to make it in a/goal, your objective is to make it at least two times faster in every it at least two times faster in every it at least two times faster in every way. And then I let it run for 2 weeks.
-
way. And then I let it run for 2 weeks. way. And then I let it run for 2 weeks. More importantly, I let it run on my six More importantly, I let it run on my six More importantly, I let it run on my six cla accounts. All of the work done in TS cla accounts. All of the work done in TS cla accounts. All of the work done in TS Rust with Opus 55, which effectively Rust with Opus 55, which effectively Rust with Opus 55, which effectively gave up on the old version and gave up on the old version and gave up on the old version and restarted, was roughly $24,000 restarted, was roughly $24,000 restarted, was roughly $24,000 of inference if I had paid full API of inference if I had paid full API of inference if I had paid full API prices. But, as you know, I didn't prices. But, as you know, I didn't prices. But, as you know, I didn't because I have subscriptions. So, I also because I have subscriptions. So, I also because I have subscriptions. So, I also tried pricing it out using all my logs tried pricing it out using all my logs tried pricing it out using all my logs to see how much of my utilization went to see how much of my utilization went to see how much of my utilization went to this. The equivalent in your sub to this. The equivalent in your sub to this. The equivalent in your sub usage for all the work I did here was usage for all the work I did here was usage for all the work I did here was between 925% and 983% of one account's between 925% and 983% of one account's between 925% and 983% of one account's weekly limit, which means about two and weekly limit, which means about two and weekly limit, which means about two and a half months of usage on a cloud code a half months of usage on a cloud code a half months of usage on a cloud code sub. When you consider that we got a sub. When you consider that we got a sub. When you consider that we got a free reset, this ends up being about free reset, this ends up being about free reset, this ends up being about $500ish give or take of subscription $500ish give or take of subscription $500ish give or take of subscription usage. And at that price, this is usage. And at that price, this is usage. And at that price, this is actually a good value to have built. I actually a good value to have built. I actually a good value to have built. I know it sounds insane, but $500 to have know it sounds insane, but $500 to have know it sounds insane, but $500 to have TypeScript in Rust, which is more memory TypeScript in Rust, which is more memory TypeScript in Rust, which is more memory efficient and faster, 2x faster than the efficient and faster, 2x faster than the efficient and faster, 2x faster than the Go version, is genuinely super useful. Go version, is genuinely super useful. Go version, is genuinely super useful. And I am to me, this is money well And I am to me, this is money well And I am to me, this is money well spent. And I know that seems insane spent. And I know that seems insane spent. And I know that seems insane because the 20,000 or the $420,000 because the 20,000 or the $420,000 because the 20,000 or the $420,000 headline number sounds crazy, but with headline number sounds crazy, but with headline number sounds crazy, but with the subsidization from a subscription the subsidization from a subscription the subsidization from a subscription and the fact that only the 20k of Claude and the fact that only the 20k of Claude and the fact that only the 20k of Claude mattered, this being 10 weeklys of usage mattered, this being 10 weeklys of usage mattered, this being 10 weeklys of usage is just hilariously good value in my is just hilariously good value in my is just hilariously good value in my opinion. So, if you were thinking, man, opinion. So, if you were thinking, man, opinion. So, if you were thinking, man, the Microsoft TypeScript team wasted so the Microsoft TypeScript team wasted so the Microsoft TypeScript team wasted so much money and time porting to Go, they much money and time porting to Go, they much money and time porting to Go, they could have just waited and let AI do it could have just waited and let AI do it could have just waited and let AI do it in Rust. No, I don't think the AI would in Rust. No, I don't think the AI would in Rust. No, I don't think the AI would have done this viably from JavaScript have done this viably from JavaScript have done this viably from JavaScript and TypeScript to Rust, but it was able and TypeScript to Rust, but it was able and TypeScript to Rust, but it was able to do it with Go relatively trivially.
-
to do it with Go relatively trivially. to do it with Go relatively trivially. And the result is a pretty much 100% And the result is a pretty much 100% And the result is a pretty much 100% drop in replacement for TSGO and TSC7. I drop in replacement for TSGO and TSC7. I drop in replacement for TSGO and TSC7. I know that for a very silly reason, the know that for a very silly reason, the know that for a very silly reason, the issues, there were five, there are now issues, there were five, there are now issues, there were five, there are now four. I audited these issues. Well, my four. I audited these issues. Well, my four. I audited these issues. Well, my agent and I audited these issues. And of agent and I audited these issues. And of agent and I audited these issues. And of the six issues that have been opened the six issues that have been opened the six issues that have been opened total so far, one of them was specific total so far, one of them was specific total so far, one of them was specific to TS Rust. The other five issues were to TS Rust. The other five issues were to TS Rust. The other five issues were problems that exist in TSC7, the problems that exist in TSC7, the problems that exist in TSC7, the specific version that we were targeting. specific version that we were targeting. specific version that we were targeting. So, these aren't things that are wrong So, these aren't things that are wrong So, these aren't things that are wrong with the rewrite. These are bugs in with the rewrite. These are bugs in with the rewrite. These are bugs in Typescript itself currently that were Typescript itself currently that were Typescript itself currently that were faithfully ported to my Rust version. faithfully ported to my Rust version. faithfully ported to my Rust version. And I think that is hilarious that not And I think that is hilarious that not And I think that is hilarious that not only did I port the intentional things, only did I port the intentional things, only did I port the intentional things, I ported the bugs, too, because this I ported the bugs, too, because this I ported the bugs, too, because this truly is a fully compatible drop-in truly is a fully compatible drop-in truly is a fully compatible drop-in replacement. I suppose now would be a replacement. I suppose now would be a replacement. I suppose now would be a good time to talk about the resulting good time to talk about the resulting good time to talk about the resulting performance. Since I started this before performance. Since I started this before performance. Since I started this before bun was even a thought from Jared, I was bun was even a thought from Jared, I was bun was even a thought from Jared, I was initially running all my numbers against initially running all my numbers against initially running all my numbers against Typescript 7. And for realworld projects Typescript 7. And for realworld projects Typescript 7. And for realworld projects like T3 code, we saw a 2x improvement like T3 code, we saw a 2x improvement like T3 code, we saw a 2x improvement from TS7 which is TSGO and as much as a from TS7 which is TSGO and as much as a from TS7 which is TSGO and as much as a 20x improvement on various things for 20x improvement on various things for 20x improvement on various things for TSC 6 which was the last TypeScript TSC 6 which was the last TypeScript TSC 6 which was the last TypeScript JavaScript based TSC. I started with the JavaScript based TSC. I started with the JavaScript based TSC. I started with the T3 code checks because I did something T3 code checks because I did something T3 code checks because I did something fun here. One of the things effect TS fun here. One of the things effect TS fun here. One of the things effect TS does and if you're not familiar effect does and if you're not familiar effect does and if you're not familiar effect is a popular library in Typescript to is a popular library in Typescript to is a popular library in Typescript to make building reliable concurrent make building reliable concurrent make building reliable concurrent systems more viable and composable as systems more viable and composable as systems more viable and composable as well. effect uses and abuses TypeScript well. effect uses and abuses TypeScript well. effect uses and abuses TypeScript so heavily that they've actually built so heavily that they've actually built so heavily that they've actually built their own fork of TypeScript their own fork of TypeScript their own fork of TypeScript effectively. It's a patch you apply to effectively. It's a patch you apply to effectively. It's a patch you apply to your TypeScript config and your your TypeScript config and your your TypeScript config and your TypeScript like package in your repo to
-
TypeScript like package in your repo to TypeScript like package in your repo to get more diagnostics and features from get more diagnostics and features from get more diagnostics and features from effect into the type checking. I built effect into the type checking. I built effect into the type checking. I built that directly into TS Rust because we that directly into TS Rust because we that directly into TS Rust because we rely on this a lot for things like T3 rely on this a lot for things like T3 rely on this a lot for things like T3 code. So for our use case in T3 code, code. So for our use case in T3 code, code. So for our use case in T3 code, not only are we way faster than TS7 with not only are we way faster than TS7 with not only are we way faster than TS7 with effects TSGO plugin, we're actually way effects TSGO plugin, we're actually way effects TSGO plugin, we're actually way faster, like fourish times faster than faster, like fourish times faster than faster, like fourish times faster than bun as well, not because bun check is bun as well, not because bun check is bun as well, not because bun check is slower. Bun check is super fast, but slower. Bun check is super fast, but slower. Bun check is super fast, but because we have to do the effect check because we have to do the effect check because we have to do the effect check on top of it after. And as soon as on top of it after. And as soon as on top of it after. And as soon as you're doing both, it just ends up way you're doing both, it just ends up way you're doing both, it just ends up way slower end to end. But this is just slower end to end. But this is just slower end to end. But this is just checking in T3 code. Let's check other checking in T3 code. Let's check other checking in T3 code. Let's check other projects. some real simple things like I projects. some real simple things like I projects. some real simple things like I don't know the entirety of TRPC server don't know the entirety of TRPC server don't know the entirety of TRPC server or centuries codebase or excaladraw and or centuries codebase or excaladraw and or centuries codebase or excaladraw and funny enough I was checking effect as funny enough I was checking effect as funny enough I was checking effect as well I actually think bun couldn't pass well I actually think bun couldn't pass well I actually think bun couldn't pass on the effect codebase if I recall bun on the effect codebase if I recall bun on the effect codebase if I recall bun also raised incorrect errors on sentry also raised incorrect errors on sentry also raised incorrect errors on sentry and tRPC so the bun checker while and tRPC so the bun checker while and tRPC so the bun checker while incredibly impressive and faster in a incredibly impressive and faster in a incredibly impressive and faster in a lot of cases does not have faithful lot of cases does not have faithful lot of cases does not have faithful enough checking for me to trust it in enough checking for me to trust it in enough checking for me to trust it in these types of big projects I think bun these types of big projects I think bun these types of big projects I think bun check fits well with like the other bun check fits well with like the other bun check fits well with like the other bun tools tools in that like if you start a tools tools in that like if you start a tools tools in that like if you start a new project with bun and you use it for new project with bun and you use it for new project with bun and you use it for everything, bun is a great solution. I everything, bun is a great solution. I everything, bun is a great solution. I actually honestly would recommend bun actually honestly would recommend bun actually honestly would recommend bun over ts rust for almost everything over ts rust for almost everything over ts rust for almost everything simply because I have higher faith it'll simply because I have higher faith it'll simply because I have higher faith it'll be maintained. But tsc my project ts be maintained. But tsc my project ts be maintained. But tsc my project ts rust is a way more faithful recreation rust is a way more faithful recreation rust is a way more faithful recreation and as a result it does not get weird and as a result it does not get weird and as a result it does not get weird errors in these projects. It works errors in these projects. It works errors in these projects. It works faithfully in projects like TRPC in faithfully in projects like TRPC in faithfully in projects like TRPC in projects like T3 code in projects like projects like T3 code in projects like projects like T3 code in projects like the effect repo itself. And the the effect repo itself. And the the effect repo itself. And the improvements we see here for most of
-
improvements we see here for most of improvements we see here for most of this stuff is 13x plus for going from this stuff is 13x plus for going from this stuff is 13x plus for going from TSC6 to TSC RS. And it's usually a 2x TSC6 to TSC RS. And it's usually a 2x TSC6 to TSC RS. And it's usually a 2x improvement from the Go version. But improvement from the Go version. But improvement from the Go version. But ready for the spicy take that's going to ready for the spicy take that's going to ready for the spicy take that's going to make all of this way more confusing. I make all of this way more confusing. I make all of this way more confusing. I didn't do this for performance. I did didn't do this for performance. I did didn't do this for performance. I did not make TypeScript Rust because I not make TypeScript Rust because I not make TypeScript Rust because I wanted something faster than TypeScript wanted something faster than TypeScript wanted something faster than TypeScript Go. So why did I do this? There is the Go. So why did I do this? There is the Go. So why did I do this? There is the silly reason and then the potentially silly reason and then the potentially silly reason and then the potentially groundbreaking one. And I'm going to groundbreaking one. And I'm going to groundbreaking one. And I'm going to start with the silly one. Silly reason start with the silly one. Silly reason start with the silly one. Silly reason is because LLMs couldn't do it. Models is because LLMs couldn't do it. Models is because LLMs couldn't do it. Models were not able to make these types of were not able to make these types of were not able to make these types of ports. It had become a meme. I got in ports. It had become a meme. I got in ports. It had become a meme. I got in flame wars with people for claiming they flame wars with people for claiming they flame wars with people for claiming they would be able to port TypeScript to like would be able to port TypeScript to like would be able to port TypeScript to like C++ and things in a month, which just C++ and things in a month, which just C++ and things in a month, which just obviously you couldn't do. And I got in obviously you couldn't do. And I got in obviously you couldn't do. And I got in a flame war with somebody, ended up a flame war with somebody, ended up a flame war with somebody, ended up getting blocked by them. It was a getting blocked by them. It was a getting blocked by them. It was a show. This is like back like the old show. This is like back like the old show. This is like back like the old 2020s, like early days of Typescript 2020s, like early days of Typescript 2020s, like early days of Typescript posting on Twitter before AI took posting on Twitter before AI took posting on Twitter before AI took over all of it. And I was getting in over all of it. And I was getting in over all of it. And I was getting in like heated fights about these things like heated fights about these things like heated fights about these things because it was obvious you couldn't just because it was obvious you couldn't just because it was obvious you couldn't just rewrite TypeScript in another language, rewrite TypeScript in another language, rewrite TypeScript in another language, which is why it was always my like reach which is why it was always my like reach which is why it was always my like reach goal, the impossible thing that like you goal, the impossible thing that like you goal, the impossible thing that like you could never actually have the unobtanium could never actually have the unobtanium could never actually have the unobtanium to an extent in the web dev world. And to an extent in the web dev world. And to an extent in the web dev world. And as such, it was a fun thing to throw as such, it was a fun thing to throw as such, it was a fun thing to throw practically unlimited tokens at. I had practically unlimited tokens at. I had practically unlimited tokens at. I had never tried an anthropic model on this never tried an anthropic model on this never tried an anthropic model on this task because they would burn my usage task because they would burn my usage task because they would burn my usage too fast. But with Opus 5.5, usage was too fast. But with Opus 5.5, usage was too fast. But with Opus 5.5, usage was burning so slowly and I had so much I burning so slowly and I had so much I burning so slowly and I had so much I said, "Fuck it. Let's see what happens."
-
said, "Fuck it. Let's see what happens." said, "Fuck it. Let's see what happens." and it was able to do it way more and it was able to do it way more and it was able to do it way more effectively than I ever could have effectively than I ever could have effectively than I ever could have guessed. I did it because I didn't think guessed. I did it because I didn't think guessed. I did it because I didn't think models could. And now that they can, I'm models could. And now that they can, I'm models could. And now that they can, I'm running out of things to throw the LMS running out of things to throw the LMS running out of things to throw the LMS at. Like I don't know what tasks an LLM at. Like I don't know what tasks an LLM at. Like I don't know what tasks an LLM would ever be able to do that are would ever be able to do that are would ever be able to do that are impossible for them now, but could be impossible for them now, but could be impossible for them now, but could be possible in the future. It's like hard possible in the future. It's like hard possible in the future. It's like hard for me to comprehend. Like I am out of for me to comprehend. Like I am out of for me to comprehend. Like I am out of engineering ideas that are like too much engineering ideas that are like too much engineering ideas that are like too much for the model. This was my too much for for the model. This was my too much for for the model. This was my too much for the model and now it's done it. But the model and now it's done it. But the model and now it's done it. But what's the real reason? What reason did what's the real reason? What reason did what's the real reason? What reason did I have to want a Rustbased version of I have to want a Rustbased version of I have to want a Rustbased version of Typescript when we already had a super Typescript when we already had a super Typescript when we already had a super fast go one? I got almost everything I fast go one? I got almost everything I fast go one? I got almost everything I wanted out of TSGO. Why did I want wanted out of TSGO. Why did I want wanted out of TSGO. Why did I want something else? There are small things something else? There are small things something else? There are small things like I wanted the effect stuff built in. like I wanted the effect stuff built in. like I wanted the effect stuff built in. I wanted to be a little easier to extend I wanted to be a little easier to extend I wanted to be a little easier to extend and play around with. But the main and play around with. But the main and play around with. But the main reason reason reason was this goes back to the garbage was this goes back to the garbage was this goes back to the garbage collection bit we talked about before. collection bit we talked about before. collection bit we talked about before. Garbage collection is an incredible way Garbage collection is an incredible way Garbage collection is an incredible way to take a burden off of engineers to to take a burden off of engineers to to take a burden off of engineers to allow them to ship software faster that allow them to ship software faster that allow them to ship software faster that is still really fast. But since garbage is still really fast. But since garbage is still really fast. But since garbage collection is a complex process that collection is a complex process that collection is a complex process that requires you to analyze memory and do a requires you to analyze memory and do a requires you to analyze memory and do a lot of memory management stuff, taking a lot of memory management stuff, taking a lot of memory management stuff, taking a Go app and bundling it into web assembly Go app and bundling it into web assembly Go app and bundling it into web assembly is not trivial because you can't just is not trivial because you can't just is not trivial because you can't just bundle the code the developer wrote. You bundle the code the developer wrote. You bundle the code the developer wrote. You also have to bundle all of the garbage also have to bundle all of the garbage also have to bundle all of the garbage collection. The the end result here is collection. The the end result here is collection. The the end result here is that it's pretty difficult to write a Go that it's pretty difficult to write a Go that it's pretty difficult to write a Go app and then bundle it as W was less app and then bundle it as W was less app and then bundle it as W was less than 10 megs and it's still going to than 10 megs and it's still going to than 10 megs and it's still going to have lots of weird performance issues have lots of weird performance issues have lots of weird performance issues because of that garbage collection because of that garbage collection because of that garbage collection aspect of it. This is why tools like ESB aspect of it. This is why tools like ESB aspect of it. This is why tools like ESB build struggled to get WSOM working for
-
build struggled to get WSOM working for build struggled to get WSOM working for so long. This was also one of the things so long. This was also one of the things so long. This was also one of the things we lost with TypeScript Go. Previously, we lost with TypeScript Go. Previously, we lost with TypeScript Go. Previously, since Typescript was all just JS in the since Typescript was all just JS in the since Typescript was all just JS in the end, you could throw it in the browser, end, you could throw it in the browser, end, you could throw it in the browser, you could throw it in a V8 isolate, you you could throw it in a V8 isolate, you you could throw it in a V8 isolate, you could run it in Node and it just worked. could run it in Node and it just worked. could run it in Node and it just worked. With TSGO, we kind of lost that. In With TSGO, we kind of lost that. In With TSGO, we kind of lost that. In fact, we lost a lot of the JavaScript fact, we lost a lot of the JavaScript fact, we lost a lot of the JavaScript APIs we use to interface with TypeScript APIs we use to interface with TypeScript APIs we use to interface with TypeScript compiler in the past. Why do I care that compiler in the past. Why do I care that compiler in the past. Why do I care that much though? We're all running our much though? We're all running our much though? We're all running our agents on our computers or someone agents on our computers or someone agents on our computers or someone else's computer, right? What if we're else's computer, right? What if we're else's computer, right? What if we're not in the future? Intelligence is not in the future? Intelligence is not in the future? Intelligence is expensive. People like Lauren aka Potato expensive. People like Lauren aka Potato expensive. People like Lauren aka Potato at Cursor and SpaceX are spending at Cursor and SpaceX are spending at Cursor and SpaceX are spending allegedly 132 mill. This number is allegedly 132 mill. This number is allegedly 132 mill. This number is I'll explain why in I'll explain why in I'll explain why in that other video. Subscribe if you that other video. Subscribe if you that other video. Subscribe if you haven't, by the way. That red button haven't, by the way. That red button haven't, by the way. That red button helps us a ton and you'll get to be helps us a ton and you'll get to be helps us a ton and you'll get to be around for this rant which will be fun. around for this rant which will be fun. around for this rant which will be fun. Ignoring the fact that those numbers Ignoring the fact that those numbers Ignoring the fact that those numbers aren't real, the rate at which prices go aren't real, the rate at which prices go aren't real, the rate at which prices go down is real. Flashbang warning for down is real. Flashbang warning for down is real. Flashbang warning for artificial analysis. I need to port this artificial analysis. I need to port this artificial analysis. I need to port this particular bench over and I haven't yet. particular bench over and I haven't yet. particular bench over and I haven't yet. This is the cost efficiency over time This is the cost efficiency over time This is the cost efficiency over time chart from artificial analysis. This chart from artificial analysis. This chart from artificial analysis. This takes a given score that models could takes a given score that models could takes a given score that models could get. So like DeepSync R1 getting a score get. So like DeepSync R1 getting a score get. So like DeepSync R1 getting a score above a 10 on their index in January of above a 10 on their index in January of above a 10 on their index in January of 2025 and it tracks how much the price 2025 and it tracks how much the price 2025 and it tracks how much the price for models of that level of intelligence for models of that level of intelligence for models of that level of intelligence goes up or down over time. Where things goes up or down over time. Where things goes up or down over time. Where things get really crazy is all the way over get really crazy is all the way over get really crazy is all the way over here on the right where we see models here on the right where we see models here on the right where we see models that are super smart like Opus 5, which that are super smart like Opus 5, which that are super smart like Opus 5, which broke into the 50 point range for the broke into the 50 point range for the broke into the 50 point range for the first time costing $5.86 per task when first time costing $5.86 per task when first time costing $5.86 per task when they ran it. And now we have models like they ran it. And now we have models like they ran it. And now we have models like 61 Soul that get the same score for 32.
-
61 Soul that get the same score for 32. 61 Soul that get the same score for 32. So it's already decreased by 10x in cost So it's already decreased by 10x in cost So it's already decreased by 10x in cost for that level of intelligence in just for that level of intelligence in just for that level of intelligence in just like four months. At a given level of like four months. At a given level of like four months. At a given level of intelligence, cost goes down absurdly intelligence, cost goes down absurdly intelligence, cost goes down absurdly fast. Like 10x a year is a conservative fast. Like 10x a year is a conservative fast. Like 10x a year is a conservative estimate here. If you take the 30 point estimate here. If you take the 30 point estimate here. If you take the 30 point range, which cost $2.50 in February of range, which cost $2.50 in February of range, which cost $2.50 in February of this year and got down to 3 by summer of this year and got down to 3 by summer of this year and got down to 3 by summer of this year, that is 8x per month this year, that is 8x per month this year, that is 8x per month decrease, averaging out to a,000x a year decrease, averaging out to a,000x a year decrease, averaging out to a,000x a year annualized. The rate at which prices for annualized. The rate at which prices for annualized. The rate at which prices for intelligence goes down is insane. But intelligence goes down is insane. But intelligence goes down is insane. But intelligence isn't the only thing we're intelligence isn't the only thing we're intelligence isn't the only thing we're paying for. When you're building apps paying for. When you're building apps paying for. When you're building apps with AI, you also have to pay to host with AI, you also have to pay to host with AI, you also have to pay to host it. You have to pay to store the data in it. You have to pay to store the data in it. You have to pay to store the data in the database. You have to pay for the database. You have to pay for the database. You have to pay for whatever like systems and providers whatever like systems and providers whatever like systems and providers you're doing. You have to pay Apple to you're doing. You have to pay Apple to you're doing. You have to pay Apple to distribute the app. You have to pay for distribute the app. You have to pay for distribute the app. You have to pay for all these other things. But there's one all these other things. But there's one all these other things. But there's one more thing you have to pay for that more thing you have to pay for that more thing you have to pay for that people don't think about a lot. You got people don't think about a lot. You got people don't think about a lot. You got to pay for the compute that your agent to pay for the compute that your agent to pay for the compute that your agent runs on. If you're one of those $5 VPS runs on. If you're one of those $5 VPS runs on. If you're one of those $5 VPS bros, now's your time to shine because bros, now's your time to shine because bros, now's your time to shine because we actually need to talk. One [snorts] we actually need to talk. One [snorts] we actually need to talk. One [snorts] of the cool things cursor does right now of the cool things cursor does right now of the cool things cursor does right now is the cursor cloud. When you spin up a is the cursor cloud. When you spin up a is the cursor cloud. When you spin up a cloud thread in cursor, it will run on a cloud thread in cursor, it will run on a cloud thread in cursor, it will run on a full VM with 32 gigs of RAM. I think it full VM with 32 gigs of RAM. I think it full VM with 32 gigs of RAM. I think it might be 16. I'm pretty sure it's 32 in might be 16. I'm pretty sure it's 32 in might be 16. I'm pretty sure it's 32 in Cursor's cloud with a real guey, real Cursor's cloud with a real guey, real Cursor's cloud with a real guey, real processor, real everything it needs in processor, real everything it needs in processor, real everything it needs in Linux so that it can spin up your app Linux so that it can spin up your app Linux so that it can spin up your app and test it with a real computer. Every and test it with a real computer. Every and test it with a real computer. Every thread gets its own computer. You spin thread gets its own computer. You spin thread gets its own computer. You spin up four threads, that's 128 gigs of RAM up four threads, that's 128 gigs of RAM up four threads, that's 128 gigs of RAM reserved to you for that bit. And right reserved to you for that bit. And right reserved to you for that bit. And right now, Cursor doesn't charge for that. So now, Cursor doesn't charge for that. So now, Cursor doesn't charge for that. So the problem now is that your inference the problem now is that your inference the problem now is that your inference is way more expensive than the VMs to is way more expensive than the VMs to is way more expensive than the VMs to the point where the VMs are almost a
-
the point where the VMs are almost a the point where the VMs are almost a rounding error, which is why giving you rounding error, which is why giving you rounding error, which is why giving you those free VMs is not really a big cost. those free VMs is not really a big cost. those free VMs is not really a big cost. But remember what I just said, the cost But remember what I just said, the cost But remember what I just said, the cost of inference is going down and it's of inference is going down and it's of inference is going down and it's going down rapidly. What about the cost going down rapidly. What about the cost going down rapidly. What about the cost of compute? What about the cost of VMs? of compute? What about the cost of VMs? of compute? What about the cost of VMs? See where I'm going here? The cost of See where I'm going here? The cost of See where I'm going here? The cost of renting a 16 or 32 gig box is going up renting a 16 or 32 gig box is going up renting a 16 or 32 gig box is going up steadily thanks to AI sweeping all the steadily thanks to AI sweeping all the steadily thanks to AI sweeping all the demand for RAM. The result is that VMs demand for RAM. The result is that VMs demand for RAM. The result is that VMs and compute that you want to run your and compute that you want to run your and compute that you want to run your agents on, not the compute running the agents on, not the compute running the agents on, not the compute running the models, the compute running the code models, the compute running the code models, the compute running the code that the model's editing. That compute that the model's editing. That compute that the model's editing. That compute has been slowly going up in price over has been slowly going up in price over has been slowly going up in price over time, but the inference compute is time, but the inference compute is time, but the inference compute is plummeting in price. So, one of these plummeting in price. So, one of these plummeting in price. So, one of these things goes up by 25 to 30% every year. things goes up by 25 to 30% every year. things goes up by 25 to 30% every year. the other goes down by 10 to 100x every the other goes down by 10 to 100x every the other goes down by 10 to 100x every year. We're going to quickly get to a year. We're going to quickly get to a year. We're going to quickly get to a point where inference is cheaper than point where inference is cheaper than point where inference is cheaper than the VM. With a model like GLM53 flash, the VM. With a model like GLM53 flash, the VM. With a model like GLM53 flash, running it for an hour straight is going running it for an hour straight is going running it for an hour straight is going to cost you a few dollars. The VM it's to cost you a few dollars. The VM it's to cost you a few dollars. The VM it's running on is likely more expensive than running on is likely more expensive than running on is likely more expensive than the model in the inference you're doing the model in the inference you're doing the model in the inference you're doing in that window. And as models of that in that window. And as models of that in that window. And as models of that price get smarter and as models at that price get smarter and as models at that price get smarter and as models at that tier get cheaper, this will be hit tier get cheaper, this will be hit tier get cheaper, this will be hit quickly. at which point compute will be quickly. at which point compute will be quickly. at which point compute will be a constraint for when we're building a constraint for when we're building a constraint for when we're building with agents. Right now we're being given with agents. Right now we're being given with agents. Right now we're being given the VMs for free, but that is not going the VMs for free, but that is not going the VMs for free, but that is not going to last. Even Cloud Code isn't doing to last. Even Cloud Code isn't doing to last. Even Cloud Code isn't doing this anymore. Cloud code now gives every this anymore. Cloud code now gives every this anymore. Cloud code now gives every subscriber a credit that they can use subscriber a credit that they can use subscriber a credit that they can use towards the cloud compute that they use towards the cloud compute that they use towards the cloud compute that they use if they use Claude's cloud product.
-
if they use Claude's cloud product. if they use Claude's cloud product. There's a lot of layers to why it works There's a lot of layers to why it works There's a lot of layers to why it works this way. The compute and the memory are this way. The compute and the memory are this way. The compute and the memory are expensive, so they have to like worry expensive, so they have to like worry expensive, so they have to like worry about that. The reason that it has to be about that. The reason that it has to be about that. The reason that it has to be reserved this way is because of how our reserved this way is because of how our reserved this way is because of how our agents work. Our agents expect to run on agents work. Our agents expect to run on agents work. Our agents expect to run on a real computer with a real terminal a real computer with a real terminal a real computer with a real terminal with real bash so that it can run with real bash so that it can run with real bash so that it can run commands. It can run rip grape. It can commands. It can run rip grape. It can commands. It can run rip grape. It can search through the codebase and find search through the codebase and find search through the codebase and find things. It expects to have native tools things. It expects to have native tools things. It expects to have native tools for editing, for checking how much CPU for editing, for checking how much CPU for editing, for checking how much CPU is being used, for searching for files, is being used, for searching for files, is being used, for searching for files, for moving files, for running git for moving files, for running git for moving files, for running git commands, for all these things. Our commands, for all these things. Our commands, for all these things. Our agents expect and are trained on real agents expect and are trained on real agents expect and are trained on real Linux boxes or Mac or whatever else. Linux boxes or Mac or whatever else. Linux boxes or Mac or whatever else. They're trained for real systems that They're trained for real systems that They're trained for real systems that they can do things on. And surely you they can do things on. And surely you they can do things on. And surely you can sandbox them some amount, but all of can sandbox them some amount, but all of can sandbox them some amount, but all of those additional layers cost additional those additional layers cost additional those additional layers cost additional resources. Sandboxing harder is not resources. Sandboxing harder is not resources. Sandboxing harder is not going to make the compute cheaper. If going to make the compute cheaper. If going to make the compute cheaper. If anything, it's going to make the comput anything, it's going to make the comput anything, it's going to make the comput and the memory more expensive. Which and the memory more expensive. Which and the memory more expensive. Which means we need a better abstraction means we need a better abstraction means we need a better abstraction layer. Ideally, in a future where agents layer. Ideally, in a future where agents layer. Ideally, in a future where agents are cheap and writing code is incredibly are cheap and writing code is incredibly are cheap and writing code is incredibly cheap because the models and inferred cheap because the models and inferred cheap because the models and inferred have gotten so cheap, the thing that have gotten so cheap, the thing that have gotten so cheap, the thing that they write them on and to test them on they write them on and to test them on they write them on and to test them on should not be this expensive.
-
should not be this expensive. should not be this expensive. Thankfully, this is a thing we have Thankfully, this is a thing we have Thankfully, this is a thing we have explored for a very, very long time in explored for a very, very long time in explored for a very, very long time in the industry. And this is a war you guys the industry. And this is a war you guys the industry. And this is a war you guys have heard from here. And we get to have heard from here. And we get to have heard from here. And we get to revisit an old war that we have not revisit an old war that we have not revisit an old war that we have not talked about in a while. We get to talk talked about in a while. We get to talk talked about in a while. We get to talk about big orange. Cloudflare. What is about big orange. Cloudflare. What is about big orange. Cloudflare. What is the word that y'all associate most with the word that y'all associate most with the word that y'all associate most with Cloudflare? Spam me chat. When you think Cloudflare? Spam me chat. When you think Cloudflare? Spam me chat. When you think Cloudflare, what do you think? Cost, Cloudflare, what do you think? Cost, Cloudflare, what do you think? Cost, cheap, free, cheap. There's like cloud cheap, free, cheap. There's like cloud cheap, free, cheap. There's like cloud and CDN. Most of them here are free. and CDN. Most of them here are free. and CDN. Most of them here are free. cheap cost related. A lot of what people cheap cost related. A lot of what people cheap cost related. A lot of what people associate with Cloudflare is cheapness. associate with Cloudflare is cheapness. associate with Cloudflare is cheapness. The reason for that is how Cloudflare's The reason for that is how Cloudflare's The reason for that is how Cloudflare's platform works. When I write code for a platform works. When I write code for a platform works. When I write code for a backend and I host it on Cloudflare, I'm backend and I host it on Cloudflare, I'm backend and I host it on Cloudflare, I'm not wrapping it in a Docker image that not wrapping it in a Docker image that not wrapping it in a Docker image that they deploy on a server. In fact, when I they deploy on a server. In fact, when I they deploy on a server. In fact, when I put code on Cloudflare, it's not put code on Cloudflare, it's not put code on Cloudflare, it's not deployed. It's not running. It runs when deployed. It's not running. It runs when deployed. It's not running. It runs when a request comes in. The request triggers a request comes in. The request triggers a request comes in. The request triggers Cloudflare to spin up a worker. A worker Cloudflare to spin up a worker. A worker Cloudflare to spin up a worker. A worker is an isolated JS process inside of V8, is an isolated JS process inside of V8, is an isolated JS process inside of V8, the JavaScript engine powering Chrome the JavaScript engine powering Chrome the JavaScript engine powering Chrome and a lot of other things. And that and a lot of other things. And that and a lot of other things. And that isolate isn't a kernel. It's not Linux.
-
isolate isn't a kernel. It's not Linux. isolate isn't a kernel. It's not Linux. It's not an OS. It is a isolated It's not an OS. It is a isolated It's not an OS. It is a isolated execution layer where your browser or execution layer where your browser or execution layer where your browser or whatever else can execute JavaScript. whatever else can execute JavaScript. whatever else can execute JavaScript. This is really useful in browsers This is really useful in browsers This is really useful in browsers because you can have different tabs because you can have different tabs because you can have different tabs doing different things and not have doing different things and not have doing different things and not have access to each other's stuff. or you can access to each other's stuff. or you can access to each other's stuff. or you can have one tab with four things running in have one tab with four things running in have one tab with four things running in it that are different that can it that are different that can it that are different that can communicate with each other but not communicate with each other but not communicate with each other but not interfere with each other. V8's interfere with each other. V8's interfere with each other. V8's isolation layer is incredibly powerful. isolation layer is incredibly powerful. isolation layer is incredibly powerful. It's not the most secure thing, but it's It's not the most secure thing, but it's It's not the most secure thing, but it's pretty secure. And what Cloudflare has pretty secure. And what Cloudflare has pretty secure. And what Cloudflare has done is taken those isolates, made them done is taken those isolates, made them done is taken those isolates, made them as secure as possible so that when a as secure as possible so that when a as secure as possible so that when a user goes to a website you built and user goes to a website you built and user goes to a website you built and deployed on Cloudflare, it can grab that deployed on Cloudflare, it can grab that deployed on Cloudflare, it can grab that code from storage, throw it on this code from storage, throw it on this code from storage, throw it on this isolate that's just sitting there isolate that's just sitting there isolate that's just sitting there waiting, execute it, then kill it. So on waiting, execute it, then kill it. So on waiting, execute it, then kill it. So on a platform like Verscell or Heroku or a platform like Verscell or Heroku or a platform like Verscell or Heroku or Hetsnner or any other traditional host, Hetsnner or any other traditional host, Hetsnner or any other traditional host, if you and I both host an app on that if you and I both host an app on that if you and I both host an app on that platform, we both have our own Linux platform, we both have our own Linux platform, we both have our own Linux instance effectively that is running instance effectively that is running instance effectively that is running with our code in it. On Cloudflare, your with our code in it. On Cloudflare, your with our code in it. On Cloudflare, your code and my code are executing in the code and my code are executing in the code and my code are executing in the same instance of Linux, just split same instance of Linux, just split same instance of Linux, just split higher up in the V8 layer instead of higher up in the V8 layer instead of higher up in the V8 layer instead of with VMs and Docker. Hopefully this all with VMs and Docker. Hopefully this all with VMs and Docker. Hopefully this all makes sense. If it doesn't, ask your makes sense. If it doesn't, ask your makes sense. If it doesn't, ask your agent. I'm not going to keep ranting agent. I'm not going to keep ranting agent. I'm not going to keep ranting about this. I've talked about this in a about this. I've talked about this in a about this. I've talked about this in a lot of my videos before. There are lot of my videos before. There are lot of my videos before. There are problems with this model, though. If problems with this model, though. If problems with this model, though. If we're running inside of a JavaScript we're running inside of a JavaScript we're running inside of a JavaScript isolate, we lose a lot of things like we isolate, we lose a lot of things like we isolate, we lose a lot of things like we can't read files from the file system can't read files from the file system can't read files from the file system because the file system isn't in the because the file system isn't in the because the file system isn't in the isolate and that would allow us to isolate and that would allow us to isolate and that would allow us to escape and screw with other people's escape and screw with other people's escape and screw with other people's stuff. We can't run native code because stuff. We can't run native code because stuff. We can't run native code because native code escapes the isolate and native code escapes the isolate and native code escapes the isolate and needs to run in the actual like system needs to run in the actual like system needs to run in the actual like system which we can't do here which means we which we can't do here which means we which we can't do here which means we can't run a lot of other languages in
-
can't run a lot of other languages in can't run a lot of other languages in Cloudflare workers. Means we can't do Cloudflare workers. Means we can't do Cloudflare workers. Means we can't do traditional persistent servers in traditional persistent servers in traditional persistent servers in workers. There's a lot of these things workers. There's a lot of these things workers. There's a lot of these things and Cloudflare has built lots of clever and Cloudflare has built lots of clever and Cloudflare has built lots of clever solutions to these problems, but the solutions to these problems, but the solutions to these problems, but the code that we're talking about, the code that we're talking about, the code that we're talking about, the JavaScript is running in this virtual JavaScript is running in this virtual JavaScript is running in this virtual layer above V8 instead of running at the layer above V8 instead of running at the layer above V8 instead of running at the VM layer. This makes Cloudflare an VM layer. This makes Cloudflare an VM layer. This makes Cloudflare an incredibly cost-effective and memory incredibly cost-effective and memory incredibly cost-effective and memory usage effective platform. And that's why usage effective platform. And that's why usage effective platform. And that's why it's so cheap. It's actually cheap to it's so cheap. It's actually cheap to it's so cheap. It's actually cheap to run. They're not just pricing things run. They're not just pricing things run. They're not just pricing things cheaper because they want to win. cheaper because they want to win. cheaper because they want to win. They're doing it because their platform They're doing it because their platform They're doing it because their platform allows them to and still have margin. In allows them to and still have margin. In allows them to and still have margin. In this sense, Verscell is not overpriced this sense, Verscell is not overpriced this sense, Verscell is not overpriced because they want to make more money because they want to make more money because they want to make more money than Cloudflare. They are charging than Cloudflare. They are charging than Cloudflare. They are charging probably similar margins, but it's probably similar margins, but it's probably similar margins, but it's higher cost to them, too. But since higher cost to them, too. But since higher cost to them, too. But since Cloudflare is just running in this Cloudflare is just running in this Cloudflare is just running in this JavaScript layer, you can't really run JavaScript layer, you can't really run JavaScript layer, you can't really run an agent in that because you can't write an agent in that because you can't write an agent in that because you can't write and read files. You can't run a dev and read files. You can't run a dev and read files. You can't run a dev server. You certainly can't run server. You certainly can't run server. You certainly can't run TypeScript Go to turn your TypeScript TypeScript Go to turn your TypeScript TypeScript Go to turn your TypeScript into JavaScript and get feedback on into JavaScript and get feedback on into JavaScript and get feedback on what's wrong to your agent. Oh, huh. what's wrong to your agent. Oh, huh. what's wrong to your agent. Oh, huh. Weird. It looks like I did exactly that. Weird. It looks like I did exactly that. Weird. It looks like I did exactly that. This is the demo I built in Astra, and This is the demo I built in Astra, and This is the demo I built in Astra, and it has some dumb decisions that are it has some dumb decisions that are it has some dumb decisions that are wasting a bunch of memory. So, I'm going wasting a bunch of memory. So, I'm going wasting a bunch of memory. So, I'm going to switch to this version that Opus made to switch to this version that Opus made to switch to this version that Opus made because it's a better representation of because it's a better representation of because it's a better representation of what I have in mind here. Before I can what I have in mind here. Before I can what I have in mind here. Before I can justify the chaos I'm about to show you, justify the chaos I'm about to show you, justify the chaos I'm about to show you, I need to show one last reference.
-
I need to show one last reference. I need to show one last reference. There's a library called Just Bash. Just There's a library called Just Bash. Just There's a library called Just Bash. Just Bash was created by Malta at Verscell Bash was created by Malta at Verscell Bash was created by Malta at Verscell and has become a pretty legit library. and has become a pretty legit library. and has become a pretty legit library. The point of just bash is to provide The point of just bash is to provide The point of just bash is to provide agents a full fake bash environment in agents a full fake bash environment in agents a full fake bash environment in memory in JavaScript so that you can memory in JavaScript so that you can memory in JavaScript so that you can import this bash from just bash and then import this bash from just bash and then import this bash from just bash and then execute most traditional bash commands execute most traditional bash commands execute most traditional bash commands with a fake file system, fake processes, with a fake file system, fake processes, with a fake file system, fake processes, fake everything, allowing for an agent fake everything, allowing for an agent fake everything, allowing for an agent to operate as though it is working to operate as though it is working to operate as though it is working within bash, even if it isn't. But in within bash, even if it isn't. But in within bash, even if it isn't. But in order for this to work, you also need to order for this to work, you also need to order for this to work, you also need to be able to compile and type check and do be able to compile and type check and do be able to compile and type check and do all the other things that you would do all the other things that you would do all the other things that you would do in a normal file system if you wanted to in a normal file system if you wanted to in a normal file system if you wanted to use this to build. If you set this up as use this to build. If you set this up as use this to build. If you set this up as a way for your agent to explore fake a way for your agent to explore fake a way for your agent to explore fake files to find content, awesome. But files to find content, awesome. But files to find content, awesome. But you're not going to build a real app you're not going to build a real app you're not going to build a real app with this. You need too many other with this. You need too many other with this. You need too many other things, including TypeScript Rust. Well, things, including TypeScript Rust. Well, things, including TypeScript Rust. Well, TypeScript Go or TSC traditional. But TypeScript Go or TSC traditional. But TypeScript Go or TSC traditional. But now with TypeScript Rust, we can do now with TypeScript Rust, we can do now with TypeScript Rust, we can do really stupid things like here where I really stupid things like here where I really stupid things like here where I had GBD61 Soul build a full app that is had GBD61 Soul build a full app that is had GBD61 Soul build a full app that is entirely functioning all in a V8 entirely functioning all in a V8 entirely functioning all in a V8 isolate. This one is running in node on isolate. This one is running in node on isolate. This one is running in node on a server technically, but this could a server technically, but this could a server technically, but this could just be run on your browser. There are just be run on your browser. There are just be run on your browser. There are some limitations, but not as many as some limitations, but not as many as some limitations, but not as many as you'd think. And this all just ran and you'd think. And this all just ran and you'd think. And this all just ran and worked and did its thing. And the worked and did its thing. And the worked and did its thing. And the entirety of utilization for this, entirety of utilization for this, entirety of utilization for this, everything that was used here, from the everything that was used here, from the everything that was used here, from the agent to the compute it ran on to the agent to the compute it ran on to the agent to the compute it ran on to the compute that the app itself is running compute that the app itself is running compute that the app itself is running on to the type checking and compilation on to the type checking and compilation on to the type checking and compilation and everything else just ran on my and everything else just ran on my and everything else just ran on my isolate and used under 260 megs of RAM.
-
isolate and used under 260 megs of RAM. isolate and used under 260 megs of RAM. and it peaked at like 4% CPU. and it peaked at like 4% CPU. and it peaked at like 4% CPU. Do you understand how cool this is? This Do you understand how cool this is? This Do you understand how cool this is? This will allow for you to have an agent will allow for you to have an agent will allow for you to have an agent build an app where both the agent and build an app where both the agent and build an app where both the agent and the compute it runs on, not the like the compute it runs on, not the like the compute it runs on, not the like compute for the inference, but the compute for the inference, but the compute for the inference, but the compute that it's running the code on compute that it's running the code on compute that it's running the code on and building on all together for and building on all together for and building on all together for pennies. And doing this with Go would pennies. And doing this with Go would pennies. And doing this with Go would suck because TSGO wastes a ton of suck because TSGO wastes a ton of suck because TSGO wastes a ton of resources simply because porting that to resources simply because porting that to resources simply because porting that to JS is not viable. WASM, but you get the JS is not viable. WASM, but you get the JS is not viable. WASM, but you get the idea. Web Assembly is not a good fit for idea. Web Assembly is not a good fit for idea. Web Assembly is not a good fit for Go. It is an incredible fit for Rust. Go. It is an incredible fit for Rust. Go. It is an incredible fit for Rust. And just to emphasize my point here, And just to emphasize my point here, And just to emphasize my point here, when I had Astra build this, it chose to when I had Astra build this, it chose to when I had Astra build this, it chose to use ESB for the bundler. And just use ESB for the bundler. And just use ESB for the bundler. And just sitting here idle, it's using 2x the RAM sitting here idle, it's using 2x the RAM sitting here idle, it's using 2x the RAM of the other version because the of the other version because the of the other version because the inclusion of a go-based package like ES inclusion of a go-based package like ES inclusion of a go-based package like ES build inherently just eats memory and build inherently just eats memory and build inherently just eats memory and resources and the data that has to be resources and the data that has to be resources and the data that has to be loaded in. Like we have to load way more loaded in. Like we have to load way more loaded in. Like we have to load way more in because of how much bigger the in because of how much bigger the in because of how much bigger the bundle is. I see people confused about bundle is. I see people confused about bundle is. I see people confused about how this would work on Cloudflare. Do how this would work on Cloudflare. Do how this would work on Cloudflare. Do you know what Cloudflare, Chrome, and you know what Cloudflare, Chrome, and you know what Cloudflare, Chrome, and Node all have in common? They're all Node all have in common? They're all Node all have in common? They're all using V8 isolates. The way these things using V8 isolates. The way these things using V8 isolates. The way these things work is that they are all using the same work is that they are all using the same work is that they are all using the same JavaScript engine. And when you load a JavaScript engine. And when you load a JavaScript engine. And when you load a Chrome extension or you load a new file Chrome extension or you load a new file Chrome extension or you load a new file or you have some process in Wom, those or you have some process in Wom, those or you have some process in Wom, those are all different isolate workers is the are all different isolate workers is the are all different isolate workers is the term for it. And they can communicate term for it. And they can communicate term for it. And they can communicate with each other if they're allowed, but with each other if they're allowed, but with each other if they're allowed, but they cannot interfere with each other.
-
they cannot interfere with each other. they cannot interfere with each other. What I built here isn't impressive What I built here isn't impressive What I built here isn't impressive because I rebuilt Bolt but used TS Rust. because I rebuilt Bolt but used TS Rust. because I rebuilt Bolt but used TS Rust. What I built here is impressive because What I built here is impressive because What I built here is impressive because I could turn my file system on read only I could turn my file system on read only I could turn my file system on read only and it still works. Nothing here left and it still works. Nothing here left and it still works. Nothing here left RAM. Nothing here left V8. I'm not doing RAM. Nothing here left V8. I'm not doing RAM. Nothing here left V8. I'm not doing anything on the system. This all exists anything on the system. This all exists anything on the system. This all exists within V8. The whole dev loop exists in within V8. The whole dev loop exists in within V8. The whole dev loop exists in V8. There isn't anything comparable. I V8. There isn't anything comparable. I V8. There isn't anything comparable. I see people mentioning like random like see people mentioning like random like see people mentioning like random like database companies and stuff that let database companies and stuff that let database companies and stuff that let you execute code of them. No, no, you're you execute code of them. No, no, you're you execute code of them. No, no, you're you're not getting it. And if you guys you're not getting it. And if you guys you're not getting it. And if you guys aren't getting it, you're my stream aren't getting it, you're my stream aren't getting it, you're my stream audience. I am not excited to see how audience. I am not excited to see how audience. I am not excited to see how others deal with this. Let's talk about others deal with this. Let's talk about others deal with this. Let's talk about how computers work really quick. At the how computers work really quick. At the how computers work really quick. At the bottom you have hardware, CPU, RAM, bottom you have hardware, CPU, RAM, bottom you have hardware, CPU, RAM, whatever else. Above that you have whatever else. Above that you have whatever else. Above that you have drivers. Drivers are provided by the drivers. Drivers are provided by the drivers. Drivers are provided by the thing above the kernel. The drivers are thing above the kernel. The drivers are thing above the kernel. The drivers are the method in which the kernel the method in which the kernel the method in which the kernel interfaces with hardware. Above this we interfaces with hardware. Above this we interfaces with hardware. Above this we have the operating system. Above this we have the operating system. Above this we have the operating system. Above this we have applications. I would argue have applications. I would argue have applications. I would argue actually we have file system kind of. actually we have file system kind of. actually we have file system kind of. Then you have applications. So let's Then you have applications. So let's Then you have applications. So let's figure out how something like Heroku figure out how something like Heroku figure out how something like Heroku Hetner or any normal cloud works. If we Hetner or any normal cloud works. If we Hetner or any normal cloud works. If we wanted to deploy a Docker image on AWS, wanted to deploy a Docker image on AWS, wanted to deploy a Docker image on AWS, we're not deploying it here because we're not deploying it here because we're not deploying it here because these things have to exist on AWS's these things have to exist on AWS's these things have to exist on AWS's hardware so that they can put more hardware so that they can put more hardware so that they can put more systems above. So what they'll do is in systems above. So what they'll do is in systems above. So what they'll do is in the application layer they'll put the application layer they'll put the application layer they'll put something like Docker and you know what something like Docker and you know what something like Docker and you know what you do after that you copy paste you do after that you copy paste you do after that you copy paste everything and do this.
-
everything and do this. everything and do this. This is how hosting on normal VPS This is how hosting on normal VPS This is how hosting on normal VPS providers works on top of the file providers works on top of the file providers works on top of the file system and operating system. You have an system and operating system. You have an system and operating system. You have an application, usually something like application, usually something like application, usually something like Docker, and it's not technically running Docker, and it's not technically running Docker, and it's not technically running a new kernel instance always. Usually, a new kernel instance always. Usually, a new kernel instance always. Usually, it's doing a shim kernel. So, I could it's doing a shim kernel. So, I could it's doing a shim kernel. So, I could claim like for this layer here that this claim like for this layer here that this claim like for this layer here that this is all like the like Docker hypervisor is all like the like Docker hypervisor is all like the like Docker hypervisor I don't fully understand it, I don't fully understand it, I don't fully understand it, but like docker shim to kernel, which but like docker shim to kernel, which but like docker shim to kernel, which makes the kernel stuff more efficient makes the kernel stuff more efficient makes the kernel stuff more efficient for sure. So this shim's there to allow for sure. So this shim's there to allow for sure. So this shim's there to allow you to skip steps when it makes sense you to skip steps when it makes sense you to skip steps when it makes sense to. And then you're building an OS on to. And then you're building an OS on to. And then you're building an OS on top, which is why on something like AWS, top, which is why on something like AWS, top, which is why on something like AWS, you can have one box that AWS is you can have one box that AWS is you can have one box that AWS is providing that has one person running providing that has one person running providing that has one person running Ubuntu, one person running Windows Ubuntu, one person running Windows Ubuntu, one person running Windows Server, and one person running, I don't Server, and one person running, I don't Server, and one person running, I don't know, Debian or something. That's all know, Debian or something. That's all know, Debian or something. That's all happening in the application layer of happening in the application layer of happening in the application layer of Docker on top of the operating system. Docker on top of the operating system. Docker on top of the operating system. Which means every one of these things Which means every one of these things Which means every one of these things takes RAM. This is why every time you takes RAM. This is why every time you takes RAM. This is why every time you spin up a new Docker container on your spin up a new Docker container on your spin up a new Docker container on your computer, it's using a bunch of computer, it's using a bunch of computer, it's using a bunch of resources. It takes resources to run resources. It takes resources to run resources. It takes resources to run operating systems in your operating operating systems in your operating operating systems in your operating system. Let's compare this to how system. Let's compare this to how system. Let's compare this to how JavaScript works. So, we have our whole JavaScript works. So, we have our whole JavaScript works. So, we have our whole stack here, but let's say the stack here, but let's say the stack here, but let's say the application is Chrome. Inside of Chrome, application is Chrome. Inside of Chrome, application is Chrome. Inside of Chrome, you have V8, which is the JavaScript you have V8, which is the JavaScript you have V8, which is the JavaScript runtime. And in V8, you have all of runtime. And in V8, you have all of runtime. And in V8, you have all of these isolates. And all of these these isolates. And all of these these isolates. And all of these isolates can execute different isolates can execute different isolates can execute different JavaScript files and functions at the JavaScript files and functions at the JavaScript files and functions at the same time. This is way more efficient same time. This is way more efficient same time. This is way more efficient because now every file or application if because now every file or application if because now every file or application if it fits in one of these isolates, it it fits in one of these isolates, it it fits in one of these isolates, it doesn't need to shim out to the kernel,
-
doesn't need to shim out to the kernel, doesn't need to shim out to the kernel, run an operating system, and steal a run an operating system, and steal a run an operating system, and steal a bunch of resources. Like, like, let's be bunch of resources. Like, like, let's be bunch of resources. Like, like, let's be real here. What takes more resources on real here. What takes more resources on real here. What takes more resources on your computer? A new Docker instance of your computer? A new Docker instance of your computer? A new Docker instance of Postgress or a new tab in Chrome? Tabs Postgress or a new tab in Chrome? Tabs Postgress or a new tab in Chrome? Tabs in Chrome, as slow as y'all might think in Chrome, as slow as y'all might think in Chrome, as slow as y'all might think Chroma is, obviously uses way less Chroma is, obviously uses way less Chroma is, obviously uses way less resources. Absurdly, comically, resources. Absurdly, comically, resources. Absurdly, comically, obviously. The reason why is the insane obviously. The reason why is the insane obviously. The reason why is the insane billions of dollars that Google has billions of dollars that Google has billions of dollars that Google has pissed into V8. They wanted to make this pissed into V8. They wanted to make this pissed into V8. They wanted to make this engine as efficient as possible so that engine as efficient as possible so that engine as efficient as possible so that the web could be a compelling platform the web could be a compelling platform the web could be a compelling platform so they could finally stop making shitty so they could finally stop making shitty so they could finally stop making shitty Windows apps. Google spent a billion Windows apps. Google spent a billion Windows apps. Google spent a billion dollars so that Chrome would be fast dollars so that Chrome would be fast dollars so that Chrome would be fast enough so they could stop making Windows enough so they could stop making Windows enough so they could stop making Windows versions of Google Earth and That versions of Google Earth and That versions of Google Earth and That was a lot of money and effort put in to was a lot of money and effort put in to was a lot of money and effort put in to V8. And this has benefited the whole V8. And this has benefited the whole V8. And this has benefited the whole ecosystem in ways that are hard to ecosystem in ways that are hard to ecosystem in ways that are hard to comprehend, including all of Cloudflare. comprehend, including all of Cloudflare. comprehend, including all of Cloudflare. Cloudflare's whole platform is built on Cloudflare's whole platform is built on Cloudflare's whole platform is built on the idea that virtualizing at the the idea that virtualizing at the the idea that virtualizing at the operating system level by putting an OS operating system level by putting an OS operating system level by putting an OS at the app layer is stupid and VH is a at the app layer is stupid and VH is a at the app layer is stupid and VH is a much better abstraction for putting much better abstraction for putting much better abstraction for putting applications that customers are hosting applications that customers are hosting applications that customers are hosting on top of. The catch is that these are on top of. The catch is that these are on top of. The catch is that these are just JavaScript. They don't have full just JavaScript. They don't have full just JavaScript. They don't have full system capabilities. You can't call the system capabilities. You can't call the system capabilities. You can't call the kernel because there's no kernel you kernel because there's no kernel you kernel because there's no kernel you have access to. You can't write files have access to. You can't write files have access to. You can't write files because there's no file system. It is because there's no file system. It is because there's no file system. It is just JavaScript. Anything that a Chrome just JavaScript. Anything that a Chrome just JavaScript. Anything that a Chrome tab can't do, a V8 isolate can't do with tab can't do, a V8 isolate can't do with tab can't do, a V8 isolate can't do with the exception of cores. I don't even the exception of cores. I don't even the exception of cores. I don't even talk about cores now, but remember all talk about cores now, but remember all talk about cores now, but remember all the problems here are you don't have a the problems here are you don't have a the problems here are you don't have a file system. You don't have native code file system. You don't have native code file system. You don't have native code access. You can't do the things you need access. You can't do the things you need access. You can't do the things you need to build. Isolates are a good place to to build. Isolates are a good place to to build. Isolates are a good place to put the code once it's built. They are put the code once it's built. They are put the code once it's built. They are not a good place to build. On Versel,
-
not a good place to build. On Versel, not a good place to build. On Versel, for example, Verscell sandboxes are the for example, Verscell sandboxes are the for example, Verscell sandboxes are the same compute and primitives as hosting same compute and primitives as hosting same compute and primitives as hosting on Verscell is. on Cloudflare. on Verscell is. on Cloudflare. on Verscell is. on Cloudflare. Cloudflare sandboxes suck because Cloudflare sandboxes suck because Cloudflare sandboxes suck because Cloudflare does not know how to make Cloudflare does not know how to make Cloudflare does not know how to make things work well with Docker because things work well with Docker because things work well with Docker because that's not their focus. Their focus is that's not their focus. Their focus is that's not their focus. Their focus is this isolate layer. So, Cloudflare this isolate layer. So, Cloudflare this isolate layer. So, Cloudflare sandboxes run on entirely different sandboxes run on entirely different sandboxes run on entirely different compute with entirely different compute with entirely different compute with entirely different platforms than Cloudflare's traditional platforms than Cloudflare's traditional platforms than Cloudflare's traditional like worker hosting. So, the thing I did like worker hosting. So, the thing I did like worker hosting. So, the thing I did here, the thing I enabled inspired by here, the thing I enabled inspired by here, the thing I enabled inspired by Just Bash because the thing that makes Just Bash because the thing that makes Just Bash because the thing that makes Just Bash special is it lies to agents Just Bash special is it lies to agents Just Bash special is it lies to agents living in this isolate layer. So they living in this isolate layer. So they living in this isolate layer. So they think they have access to the file think they have access to the file think they have access to the file system and to these other things. And system and to these other things. And system and to these other things. And that is what we have built here. If I that is what we have built here. If I that is what we have built here. If I was to flip a switch on the file system was to flip a switch on the file system was to flip a switch on the file system for the server running this demo to be for the server running this demo to be for the server running this demo to be read only. So I literally could not edit read only. So I literally could not edit read only. So I literally could not edit files on the computer. I could only do files on the computer. I could only do files on the computer. I could only do things in RAM in my V8 isolated node. things in RAM in my V8 isolated node. things in RAM in my V8 isolated node. This will still run exactly the same. This will still run exactly the same. This will still run exactly the same. That is what makes this demo cool. It That is what makes this demo cool. It That is what makes this demo cool. It would be fully possible to run this would be fully possible to run this would be fully possible to run this entire demo in a Cloudflare worker. So entire demo in a Cloudflare worker. So entire demo in a Cloudflare worker. So instead of needing half a gig of RAM and instead of needing half a gig of RAM and instead of needing half a gig of RAM and a bunch of reserved CPU, I can throw it a bunch of reserved CPU, I can throw it a bunch of reserved CPU, I can throw it in here and it costs nothing. Another in here and it costs nothing. Another in here and it costs nothing. Another thing to think about here is how CPU thing to think about here is how CPU thing to think about here is how CPU allocation works. If you have a VM that allocation works. If you have a VM that allocation works. If you have a VM that has two CPUs and I have a VPM that has has two CPUs and I have a VPM that has has two CPUs and I have a VPM that has two CPUs and both are idling, we're two CPUs and both are idling, we're two CPUs and both are idling, we're still wasting four vCPUs. There are some still wasting four vCPUs. There are some still wasting four vCPUs. There are some things that make it easier to like things that make it easier to like things that make it easier to like reallocate and have virtual like cores reallocate and have virtual like cores reallocate and have virtual like cores not be guaranteed the same way. But the not be guaranteed the same way. But the not be guaranteed the same way. But the way it's working on Cloudflare is with way it's working on Cloudflare is with way it's working on Cloudflare is with the built-in event loop where when your the built-in event loop where when your the built-in event loop where when your code isn't doing anything, it doesn't code isn't doing anything, it doesn't code isn't doing anything, it doesn't cost anything other than a bit of RAM.
-
cost anything other than a bit of RAM. cost anything other than a bit of RAM. So when you're waiting for the next So when you're waiting for the next So when you're waiting for the next token from an inference provider, that's token from an inference provider, that's token from an inference provider, that's not costing you any compute cuz the CPU not costing you any compute cuz the CPU not costing you any compute cuz the CPU is doing nothing. So that CPU is being is doing nothing. So that CPU is being is doing nothing. So that CPU is being used by others. When suddenly data comes used by others. When suddenly data comes used by others. When suddenly data comes in, it will execute the next task in, it will execute the next task in, it will execute the next task because your app, my app, and another because your app, my app, and another because your app, my app, and another person's app are all sharing the same person's app are all sharing the same person's app are all sharing the same event loop. We're all sharing the same event loop. We're all sharing the same event loop. We're all sharing the same scheduler effectively. So it becomes way scheduler effectively. So it becomes way scheduler effectively. So it becomes way more efficient for us to run things more efficient for us to run things more efficient for us to run things here. or even a long running task that here. or even a long running task that here. or even a long running task that takes hours probably spends most of its takes hours probably spends most of its takes hours probably spends most of its time idle. Now that only costs money for time idle. Now that only costs money for time idle. Now that only costs money for when a token comes in, not for the time when a token comes in, not for the time when a token comes in, not for the time between tokens. If inference continues between tokens. If inference continues between tokens. If inference continues to get cheaper, this type of building to get cheaper, this type of building to get cheaper, this type of building will become essential because this will will become essential because this will will become essential because this will enable us to build a gentic developer enable us to build a gentic developer enable us to build a gentic developer experiences that are cheap on all sides experiences that are cheap on all sides experiences that are cheap on all sides where running the agent is cheap and where running the agent is cheap and where running the agent is cheap and giving the agent compute to execute on giving the agent compute to execute on giving the agent compute to execute on is also cheap. I see some people in chat is also cheap. I see some people in chat is also cheap. I see some people in chat catching on here asking is this related catching on here asking is this related catching on here asking is this related to lakebed? I won't say more yet. I need to lakebed? I won't say more yet. I need to lakebed? I won't say more yet. I need to give you guys something to be excited to give you guys something to be excited to give you guys something to be excited about because I just wanted to focus on about because I just wanted to focus on about because I just wanted to focus on this. The fact that TS Rust is one of this. The fact that TS Rust is one of this. The fact that TS Rust is one of the final pieces I need to take a full the final pieces I need to take a full the final pieces I need to take a full endtoend TypeScript developer experience endtoend TypeScript developer experience endtoend TypeScript developer experience and do it in an isolate instead of doing and do it in an isolate instead of doing and do it in an isolate instead of doing it in a VM. For those who are curious it in a VM. For those who are curious it in a VM. For those who are curious and want to see the very complex prompts and want to see the very complex prompts and want to see the very complex prompts I use to build TS Rust, here you go. I I use to build TS Rust, here you go. I I use to build TS Rust, here you go. I told it to work in code sandbox ts on told it to work in code sandbox ts on told it to work in code sandbox ts on this computer. Read the agents MD and this computer. Read the agents MD and this computer. Read the agents MD and the type check or accountability uh the type check or accountability uh the type check or accountability uh files first. Those files included audit files first. Those files included audit files first. Those files included audit notes from the 16-hour run and asked for notes from the 16-hour run and asked for notes from the 16-hour run and asked for some things. Make the cargo job count some things. Make the cargo job count some things. Make the cargo job count configurable. Add script state and split configurable. Add script state and split configurable. Add script state and split yada yada. And then update the agency so
-
yada yada. And then update the agency so yada yada. And then update the agency so we can do more parallel work. To which I we can do more parallel work. To which I we can do more parallel work. To which I said, do it. Great work. I trust your said, do it. Great work. I trust your said, do it. Great work. I trust your judgment fully. Keep going and doing judgment fully. Keep going and doing judgment fully. Keep going and doing what you think is best to continue what you think is best to continue what you think is best to continue improving compatibility and performance. improving compatibility and performance. improving compatibility and performance. You can probably move to main soon as You can probably move to main soon as You can probably move to main soon as well. I did a follow-up at some point well. I did a follow-up at some point well. I did a follow-up at some point saying get whatever the best current saying get whatever the best current saying get whatever the best current state of the work is and set it as the state of the work is and set it as the state of the work is and set it as the main branch ASAP. I don't care how. I main branch ASAP. I don't care how. I main branch ASAP. I don't care how. I trust your judgment. Then later I did a trust your judgment. Then later I did a trust your judgment. Then later I did a slashef effort cuz I noticed I was on slashef effort cuz I noticed I was on slashef effort cuz I noticed I was on the wrong effort level. Actually, I I the wrong effort level. Actually, I I the wrong effort level. Actually, I I was on ultra code and it kept bumping me was on ultra code and it kept bumping me was on ultra code and it kept bumping me down to medium when it crashed because down to medium when it crashed because down to medium when it crashed because it was running out of memory and it was running out of memory and it was running out of memory and crashing systemd constantly, but once I crashing systemd constantly, but once I crashing systemd constantly, but once I like added some things at the OS level like added some things at the OS level like added some things at the OS level to fix this, I had to rerun/ef effort to to fix this, I had to rerun/ef effort to to fix this, I had to rerun/ef effort to put on ultra code again on XI and then put on ultra code again on XI and then put on ultra code again on XI and then the / goal of complete the port, get as the / goal of complete the port, get as the / goal of complete the port, get as close as possible to 100% compatibility close as possible to 100% compatibility close as possible to 100% compatibility with TSGO, and then also improve with TSGO, and then also improve with TSGO, and then also improve performance. Do the efforts in parallel. performance. Do the efforts in parallel. performance. Do the efforts in parallel. Multiple workflows and sub aents should Multiple workflows and sub aents should Multiple workflows and sub aents should be running at all times to maximize be running at all times to maximize be running at all times to maximize parallelism. Orchestrate how you need to parallelism. Orchestrate how you need to parallelism. Orchestrate how you need to keep them working independently all on keep them working independently all on keep them working independently all on this machine. And I noticed it was this machine. And I noticed it was this machine. And I noticed it was running out of compute all the time. So running out of compute all the time. So running out of compute all the time. So I took other machines I had in my fleet, I took other machines I had in my fleet, I took other machines I had in my fleet, configured them for SSH access, and told configured them for SSH access, and told configured them for SSH access, and told it you have SSH access to other machines it you have SSH access to other machines it you have SSH access to other machines now like Cup 2 and Alvin, two of my uh now like Cup 2 and Alvin, two of my uh now like Cup 2 and Alvin, two of my uh VPSs. I noticed it kept stopping because VPSs. I noticed it kept stopping because VPSs. I noticed it kept stopping because it like got full compat and then like it like got full compat and then like it like got full compat and then like would make one performance room and be would make one performance room and be would make one performance room and be like, look, I fixed performance. So it like, look, I fixed performance. So it like, look, I fixed performance. So it needed a better end state. So I told it needed a better end state. So I told it needed a better end state. So I told it with a new goal, our target is minimum with a new goal, our target is minimum with a new goal, our target is minimum 2x faster than the go build. Continue 2x faster than the go build. Continue 2x faster than the go build. Continue iterating until we get there. And then iterating until we get there. And then iterating until we get there. And then it did for two weeks and now we are it did for two weeks and now we are it did for two weeks and now we are here. So, as you see, I wrote some very here. So, as you see, I wrote some very here. So, as you see, I wrote some very complex prompts for all of this. Super complex prompts for all of this. Super complex prompts for all of this. Super super high IQ things I was doing here.
-
super high IQ things I was doing here. super high IQ things I was doing here. I'm a mega prompter. Real talk though, I'm a mega prompter. Real talk though, I'm a mega prompter. Real talk though, the things I did here were not around the things I did here were not around the things I did here were not around the prompts. It was around the the prompts. It was around the the prompts. It was around the environment and setup to allow it to do environment and setup to allow it to do environment and setup to allow it to do this stuff. So I like I had other this stuff. So I like I had other this stuff. So I like I had other threads going where I was auditing threads going where I was auditing threads going where I was auditing constantly figuring out where the constantly figuring out where the constantly figuring out where the blockers were, what's taking a while, blockers were, what's taking a while, blockers were, what's taking a while, what failure modes are happening again what failure modes are happening again what failure modes are happening again and again, and then updating the and again, and then updating the and again, and then updating the environment to allow agents to operate environment to allow agents to operate environment to allow agents to operate more effectively in parallel without more effectively in parallel without more effectively in parallel without stepping on each other. And after a bit, stepping on each other. And after a bit, stepping on each other. And after a bit, we built systems that allowed that to we built systems that allowed that to we built systems that allowed that to work and ended up shipping much faster work and ended up shipping much faster work and ended up shipping much faster once we did. But my energy was honestly once we did. But my energy was honestly once we did. But my energy was honestly similar to how I work as a manager where similar to how I work as a manager where similar to how I work as a manager where I wasn't spending my time in the I wasn't spending my time in the I wasn't spending my time in the trenches writing code. I was spending my trenches writing code. I was spending my trenches writing code. I was spending my time making sure that my team had time making sure that my team had time making sure that my team had everything they needed to be as everything they needed to be as everything they needed to be as effective as possible in finding where effective as possible in finding where effective as possible in finding where the slowdown was and helping them get the slowdown was and helping them get the slowdown was and helping them get around it so that the slowdown would around it so that the slowdown would around it so that the slowdown would stop happening. Ended up being really stop happening. Ended up being really stop happening. Ended up being really fun. And I know I was making a joke fun. And I know I was making a joke fun. And I know I was making a joke about being a mega prompter, but uh I about being a mega prompter, but uh I about being a mega prompter, but uh I have been politely requested to mention have been politely requested to mention have been politely requested to mention mega dev a bit more. I am finally doing mega dev a bit more. I am finally doing mega dev a bit more. I am finally doing a paid course for the first time ever. a paid course for the first time ever. a paid course for the first time ever. Feels weird and I want to be very clear Feels weird and I want to be very clear Feels weird and I want to be very clear about this. Any information that will about this. Any information that will about this. Any information that will help you get a job is not going in here.
-
help you get a job is not going in here. help you get a job is not going in here. It's just going on my channel for free. It's just going on my channel for free. It's just going on my channel for free. The point of this is for employed The point of this is for employed The point of this is for employed developers that want to maximize how developers that want to maximize how developers that want to maximize how much they use and abuse AI to ship real much they use and abuse AI to ship real much they use and abuse AI to ship real software in the real world. I'm working software in the real world. I'm working software in the real world. I'm working with three other incredible instructors, with three other incredible instructors, with three other incredible instructors, people who have helped me learn how the people who have helped me learn how the people who have helped me learn how the web and technologies work for years now. web and technologies work for years now. web and technologies work for years now. I'll do the sidebar so you can see I'll do the sidebar so you can see I'll do the sidebar so you can see Angie, who I love to death, Kent, who Angie, who I love to death, Kent, who Angie, who I love to death, Kent, who taught me half of what I learned about taught me half of what I learned about taught me half of what I learned about React back in the day, and John React back in the day, and John React back in the day, and John Linquist, the creator of Egghhead. If Linquist, the creator of Egghhead. If Linquist, the creator of Egghhead. If you have to pay for this with your own you have to pay for this with your own you have to pay for this with your own money, I wouldn't recommend it. But if money, I wouldn't recommend it. But if money, I wouldn't recommend it. But if you can get your boss to sign off on you can get your boss to sign off on you can get your boss to sign off on using internal like expenses for using internal like expenses for using internal like expenses for educational stuff for it, it'll be fun. educational stuff for it, it'll be fun. educational stuff for it, it'll be fun. And I'm going to do a live workshop with And I'm going to do a live workshop with And I'm going to do a live workshop with it as well, which should be very fun. So it as well, which should be very fun. So it as well, which should be very fun. So that's where I'll get to talk more about that's where I'll get to talk more about that's where I'll get to talk more about all of these chaotic strategies for all of these chaotic strategies for all of these chaotic strategies for maximizing what your agents are capable maximizing what your agents are capable maximizing what your agents are capable of, which should be fun stuff. What a of, which should be fun stuff. What a of, which should be fun stuff. What a journey this one was. I my AI psychosis journey this one was. I my AI psychosis journey this one was. I my AI psychosis was already pretty bad, but the fact was already pretty bad, but the fact was already pretty bad, but the fact that all these truly crazy ideas I've that all these truly crazy ideas I've that all these truly crazy ideas I've been thinking about for years now are been thinking about for years now are been thinking about for years now are actually doable. Like I've always wanted actually doable. Like I've always wanted actually doable. Like I've always wanted to have a full stack developer to have a full stack developer to have a full stack developer experience that runs purely within V8 experience that runs purely within V8 experience that runs purely within V8 back when Bolt was still stack blitz and back when Bolt was still stack blitz and back when Bolt was still stack blitz and they first put out their full like JS they first put out their full like JS they first put out their full like JS runtime thing inside of WASM. So you runtime thing inside of WASM. So you runtime thing inside of WASM. So you could have a full VS codeike experience could have a full VS codeike experience could have a full VS codeike experience with apps bundling in the browser. I was with apps bundling in the browser. I was with apps bundling in the browser. I was blown away. I wanted to go further with blown away. I wanted to go further with blown away. I wanted to go further with that with Cloudflare and I went as far that with Cloudflare and I went as far that with Cloudflare and I went as far as trying to reverse engineer Stack as trying to reverse engineer Stack as trying to reverse engineer Stack Blitz and like decode the JS binary and Blitz and like decode the JS binary and Blitz and like decode the JS binary and their WASM to figure out how they were their WASM to figure out how they were their WASM to figure out how they were doing it because they're there was so doing it because they're there was so doing it because they're there was so much cool stuff there. That's how I much cool stuff there. That's how I much cool stuff there. That's how I became friends with Eric back in the day became friends with Eric back in the day became friends with Eric back in the day and that stuff was so cool. I've always and that stuff was so cool. I've always and that stuff was so cool. I've always been a nerd about how the code we write
-
been a nerd about how the code we write been a nerd about how the code we write actually runs and executes and how these actually runs and executes and how these actually runs and executes and how these systems compose and operate. It's such systems compose and operate. It's such systems compose and operate. It's such fun stuff and now I get to try out my fun stuff and now I get to try out my fun stuff and now I get to try out my crazy ideas. Previously, the vast crazy ideas. Previously, the vast crazy ideas. Previously, the vast majority of this was just like majority of this was just like majority of this was just like imaginary. Like I was playing these imaginary. Like I was playing these imaginary. Like I was playing these games in my head, and if any of those games in my head, and if any of those games in my head, and if any of those ideas went far enough, I could maybe ideas went far enough, I could maybe ideas went far enough, I could maybe talk about it with a smarter person and talk about it with a smarter person and talk about it with a smarter person and maybe inspire them to build something maybe inspire them to build something maybe inspire them to build something kind of like it in 5 years in the kind of like it in 5 years in the kind of like it in 5 years in the future. Now, when I have one of these future. Now, when I have one of these future. Now, when I have one of these insane ideas, I tell Opus and then I see insane ideas, I tell Opus and then I see insane ideas, I tell Opus and then I see if it works or not. Even now, I wanted if it works or not. Even now, I wanted if it works or not. Even now, I wanted to see if this will actually run on to see if this will actually run on to see if this will actually run on Cloudflare. So, I just told Opus, "Go do Cloudflare. So, I just told Opus, "Go do Cloudflare. So, I just told Opus, "Go do it." And it probably will. Absolutely it." And it probably will. Absolutely it." And it probably will. Absolutely insane. I on one hand, the engineering insane. I on one hand, the engineering insane. I on one hand, the engineering we know and love is dead. And very, very we know and love is dead. And very, very we know and love is dead. And very, very much so. these types of YOLO projects much so. these types of YOLO projects much so. these types of YOLO projects should not be viable at all. Like you should not be viable at all. Like you should not be viable at all. Like you shouldn't even be able to get it to pass shouldn't even be able to get it to pass shouldn't even be able to get it to pass the tests, much less actually work as a the tests, much less actually work as a the tests, much less actually work as a drop in replacement for TypeScript. But drop in replacement for TypeScript. But drop in replacement for TypeScript. But yeah, if you still think AI dev isn't yeah, if you still think AI dev isn't yeah, if you still think AI dev isn't the future and isn't obviously where all the future and isn't obviously where all the future and isn't obviously where all of software dev is going, you deserve of software dev is going, you deserve of software dev is going, you deserve the lack of employment you'll have in 3 the lack of employment you'll have in 3 the lack of employment you'll have in 3 months because this is insane. It's months because this is insane. It's months because this is insane. It's actually hard to fathom how capable actually hard to fathom how capable actually hard to fathom how capable these tools have gotten. I think this is these tools have gotten. I think this is these tools have gotten. I think this is everything I had to say on this one. I everything I had to say on this one. I everything I had to say on this one. I was up till 6:00 in the morning prepping was up till 6:00 in the morning prepping was up till 6:00 in the morning prepping all of these demos and I'm so proud of all of these demos and I'm so proud of all of these demos and I'm so proud of what Opus and I were able to cook. Not what Opus and I were able to cook. Not what Opus and I were able to cook. Not because I think everyone should use because I think everyone should use because I think everyone should use this, but because I can find out if this, but because I can find out if this, but because I can find out if these ideas work or not in ways that are these ideas work or not in ways that are these ideas work or not in ways that are just hard to fathom. I actually feel just hard to fathom. I actually feel just hard to fathom. I actually feel like we're peering into the future with like we're peering into the future with like we're peering into the future with some of this stuff. And it's so cool to some of this stuff. And it's so cool to some of this stuff. And it's so cool to see. I cannot imagine where we will be see. I cannot imagine where we will be see. I cannot imagine where we will be next year. And I hope you guys are next year. And I hope you guys are next year. And I hope you guys are excited to go on this journey with me excited to go on this journey with me excited to go on this journey with me because it's only going to get more because it's only going to get more because it's only going to get more chaotic from here. And with that, until chaotic from here. And with that, until chaotic from here. And with that, until next time, peace nerds.
No summary available yet.
View original episode ↗