now don't worry you don't have to be amazing uh here should we get chat in here do we want like a little bit of chat on the bottom that way they can have their they can have their really bad opinions as well there we go sure I like I like the really bad opinions there we go that kind of seems nice that way you can still see what they have say oh they're hearing what you're saying now you're not mut I I haven't been muted once this entire time awesome yeah yeah because I use two different I I use two different obs's so I have a wrapper so all of your voices and our voices are all independent of this so if I just close down this thing and completely destroy this whole thing everything continues to work and everyone can hear me and that way if I turn off my computer all that you know like I have layers of protection to not screw myself like I have many many times I'd be so paranoid about that if I was doing what you're doing you know that's why I have multiple instances open for this exact reason um all right actually I don't like chat chat you're gone sorry just doesn't look good you know it just doesn't look there's not enough room I'd have to kind of come up with a new way to do that uh that makes more sense all right anyways good call I know all right so we're going to get started on this thing I'm going to turn on this for those let's see there we go so we're going to start off all right are you guys ready awesome all right the P99 conference is a highly technical virtual conference on all things performance there are 60 plus engineering talks on low latency engineering topics like rust zigg ebpf database optimizations observability Cloud infrastructure and more there's Michael Stonebreaker Brian cantril uh Andy palvo or Pavo Gunner morling and more and I'm going to throw a link in the chat for you to be able to register if you want to go check out this conference it's all free it's all online and this is kind of like the first talk it's going to be October 23rd and 24th and we're going to be doing kind of like the inaugural Talk of the P99 conference to get out the word to have people understand what the conference is all about and then hopefully just to give everybody like a good time when it comes to rust and zigg for those that have not that do not know on my top I have globber Costa CEO of uh turo and a longtime fan of both rust and zigg correct that is right in fact you in fact you motivated Pekka to learn about Zig right I I kind of forced him it's yeah and then you also forced him to do Rust too right no I mean a lot of people in our company already have uh experience with rust so we have one of the maintainers of Tokyo uh that works with us we have other people that are really skilled with rust uh and in fact the Tokyo guy also wanted to do it in Zig the stuff that we we had to do like Becca was the stubborn one uh that is fighting for rust I understand you read his article in stream today so you I hope I'm not spoiling anything Becca being my co-founder uh and and CTO but we look we uh we've done a little bit of Zig in the past as well we look very seriously into that we still do uh but most of our stuff is been is in Rust and it's been in rust from the start right yep and then Jared you are the Creator the original creator of BUN and now uh the leader and still probably number one contribut to bun and probably number one contributor for a long time and Bun is written in Zig to begin with correct yeah yeah um though we do have a lot of other people working on bun now too um Y and I'm trying to not write as much code successfully or unsuccessfully still writing not as much code like I still write a lot of code but but not as much as I was like two years ago jar what do you mean by you don't write a lot of code in comparison I didn't I didn't say that I I tried to write less code okay there's a c that's less than one now to writing a lot of code that's attached to it it's it's smaller but not it's still a lot comparatively probably to the average person uh you seem to produce a lot of code yeah Zig is really productive agreed and then uh by the way and for those that don't know bun is kind of like the it's it's if node were to be created in today's modern world I would say it has typescript support it has package management it has all the things you'd kind of expect from a modern programming experience except for its uh compatible with things like node right yeah so we designed bun as a drop in replacement for nodejs um we have a a type transpiler A bundler A package manager a testr runner um most of this is just ridden almost entirely from scratch um uh yeah in Z all right and then finally we have Pekka Pekka are you CT of turo what is your exact role because I know GL keeps trying to fire you so I'm very confused as to what your exact role is well it's because globber you know secretly wants to be the CTO but yeah for those who don't understand company Dynamics the CEO can only be fired by the board but I can fire everybody else so that's fine all right so today we are gonna be talking about why use rust and why use Zig uh Pekka I think you're probably in the strongest use rust category can you give me like a good maybe one or two minute pitch on why someone should choose rust for a systems level or high performance programming language yeah absolutely I I don't know if it's going to be that long so basically if you're doing systems programming you don't have a lot of options um you know so and just to give you the background I'm a long you know I'm long-term C programmer I love C uh but but it's just not a viable option you know to to build today's uh infrastructure software so basically yeah so rust is is is from my perspective you know the the language that know much of this infrastructure will be built and I think that you know that the bottom of it is basically memory safety uh and and rust really has been able to sort of get through this ceiling and and you know I I actually went and and looked at the stats uh and you know there's roughly 7 million C++ developers in the world today there's you know one to two million rust developers so I think and and rust is right now uh even accepted in the Linux kernel Microsoft is doing stuff with rust so I'm just going to say rust is the safe and and boring choice for for infrastructure software that's that's the short pitch all right and uh Jared sense you're probably the most Pro Zig person here you want to give like a good Pro reason for using Zig it's zig is really good when every detail matters because there's no hidden Behavior you can't do things like operator overloading or uh uh like it's it's very easy to figure out what is going on because there's no Constructors or destructors um so uh when every detail matters and uh you still want some like as much as of the safety features as as you can get out of the box while still having that level of control um uh it's it's really good for when you care about performance agreed uh so so I guess what I really have I I'd really like to hear kind of the thoughts on is that Pekka you you you didn't give a really good comprehensive overview as to why you think comp time sucks uh you say that you don't like it and you'd prefer C preprocessor text expansion which just feels like a that feels like a Miss in my book so I am very curious as to why you would uh want something along those lines comparatively to to comp time like what is bad about comp time and why why don't you like it so globber explained to me that I don't understand comp time so that's probably it but so so I'm going to give you a quick um sort of story around why I maybe I don't understand comp time but I didn't like it very much so a year ago uh actually inspired by U Prime I I started a new uh secret project called ligma which was me basically trying to write some parts of site in Zig and actually did spend uh roughly three months uh trying to do it well know so I managed to do something around it but eventually with comp time I just ended up basically having it everywhere right so I don't know you know if this is me I was looking at Tiger b or code base as well you know it's just it just feels like a you know a rabbit hole of of of magic and you know as much as everybody hates see macros I'm not realistically suggesting that modern languages should should do it like that typically what you do with those types of macros is you it's a really limited set of of of things that you implement with them and then you know you have a little bit of magic but it doesn't really propagate everywhere so that's that's my Takeaway on comp time so but but you you'd have to minimally agree that rust's answer to this is by far more complicated the macro system or yes either declarative or procedural well you know I'm I'm not a huge fan of frust macros either so so that's that's fair I think so to drill drilling a little bit more into like I think zig's type system is kind of simplistic you know in the so in the spirit of c and by the way just that you understand I like Zig a lot uh and I was just trying to in the blog post make the point point why I was not ready to switch to it yet but I think it's just BS down to the fact that you don't have a lot of powerful type system in in in in Zig and that's why you end up using comp time a lot okay uh Jared do you have a kind of a counter that because it seems at least to me that comp time is the answer to the powerful type system is that that's what enables the powerful type system is comp time as opposed to generics or even their more complicated type system yeah um comp time is just comp time is great uh like we use it in bun all like everywhere um a concrete example is like we have a a lookup table we generate at comp time uh for for decoding VQ VQ is um uh is part of source Maps it's like the the line number it's like how you map line number columns it's like a base 64 thing for like variable length integers um uh and and like that's there's a lot of things which would ordinarily be these kind of hacky build scripts that are really difficult to maintain those are just like a SC in in in a file that that just gets re it just gets recompiled on every build and it's fine um uh that's like so like comp time is both the types but also it replaces a lot of the build system um uh or what would normally be the build system so J just to so first of all I think comp time is really great for that type of code generation so no no disagreement about but what I ended up and again you know I I you know obviously didn't spend the time on Z as you did but what I was trying to do a so know basically I was trying to do this tiger beetle style IO Loop uh with with callbacks and stuff like that so you ended up actually having in the so when IO is ready you want to call a completion so all of that ended up being comp time every just everything became comp time so do I just suck with comp time or is that a you know idiomatic way to to do Z and you know do you see any ISS isues with um I I bun initially had an IO model that was initially we actually just copy pasted their their code and then I ended up uh a little bit later like not I but like we ended up rewriting a lot of it because it wasn't quite a good fit for buns use case it's really the the threadpool their thread pool implementation is great um that which we still use um but uh I think the completion model doesn't is like kind of hard to do um like and then make it like easy code that's easy to understand understand um uh what we end up doing and and also I think in a lot of cases it ends up being slower because you sort of are forced to wait extra microtask uh not microtask but like tasks in the event Loop that are actually totally unnecessary um uh very frequently you want to end up sorry your question was about uh was about type the question is do I have a skill issue or is there is there really like so I think it kind of is a skill issue to be Hest because uh and I mean that nicely uh but like the because I think like basically um you can I there there's so like I think I think that but I also I think that uh there are some things you can do which are which make it a lot easier like you can do uh Union enum and you can have a bunch of different types on Union enum a pattern we do in buns codebase a lot is we have a a pointer tag Union so basically um uh we have a a the the upper eight or so bits uh of of a pointer are unused um and so we use that as a tag and then uh we for whatever the option is we want to do um we we um uh we we look at the tag and then we we call the function um and then uh that is ALS that is a way to actually in this case that kind of avoids a lot of comp time for for that specific use case um but uh it means that it's very it it doesn't cost anything extra because you don't need to have these extra completion objects you just use the tag type and then you have uh they're we don't have quite completions in M we have promises but they're sort of similar um uh yeah yeah absolutely so so Prime sorry to jump in but but I think this would be a nice segue into how the hell do you learn Zig because there was one of my other compl yes I I I was going to say we should probably give a little bit of light into what are these completions are because I haven't perused through the tiger be so I'm actually kind of I think the rest of us are a little bit looking in I was trying to I was trying to unmute myself on the icon here on on the top because you muted me but uh there is one in the bottom that works the question I have for this about com time before we talk about like what those completions are peka you know you seem obsessed with like how can I use fewer comp times so is this a ski issue I cannot use less of them but my main question is like so what because looks C time yeah absolutely so so so the the issue was that you you end up like as you're writing the code you're just constantly fighting the compiler that's the you know maybe I should have been explicit about whoa whoa whoa Russ guys complaining about fighting seems a little strange yes well it's not strange like this is so it's okay if you fight the borrow Checker you can fight a compiler so I think it's like your first like I think my my first like three weeks I would say of of writing Zig um it definitely felt like that um uh and then you just learn the errors and then there actually aren't that many of them um because their the language isn't like doesn't actually have a lot so then you end up uh it it ends up just like you just get used to it and then and then you're no longer fighting them and then you sort of just learn so look I don't I don't have as much hands-on experience with Zig than than any of you here honestly especially Jerry but like C time was the first thing that I saw about Zig that I had this ho yes moment uh in fact I wanted to censor the and ended up saying something equally bad but uh uh because any other system any other language like C++ rust any other language that tries to do the same ends up with a language within the language right which is like now you're dealing with two languages you've got rust and then you have this bizarre which actually find the micro system of R quite powerful especially procedural ones the type system let's not even talk about like typescript type system because of a different category like you try to you try to do something around Let's do let's try to move some of those things to static time you end up with a language within a language the thing I love about com time is that it's just Zig uh so so what that you keep that that you use a lot of com time right so I don't see the problem uh it it seems to me like yeah if you overuse anything you can have some practical problems if overuse memory allocations you can have practical problems and then you do like profiling and and and try to find the balance uh but I just don't see why using a lot of com time is a problem so it's not a ski issue in the sense that I don't acknowledge the problem right well it was a problem for me so but but but again so so I would you know so we can all agree that it's a skill issue for for me I still don't like comp time but uh but but I think I think that bring maybe brings up to the more important point so I like I I have no idea how I would would learn to to write s in some say amount of time actually I make this comparison to to to rust as well so I think for me Sig is probably in this sort of situation rust was you know roughly five years ago so just to to to give you context I was probably using rust already in 2015 or whatever right and and constantly fighting the borrow Checker and really took a lot lot of time for me to actually you know sit down and and figure that I'm going to spend the time to go through this this pain uh and and maybe maybe comp time for example is is is an example I do find that Zig is uh there I am 100% on your team that Zig is harder to learn in the sense that the resources are quite sparse so for me to really understand comp time I have found that I just look for examples and try to like use my effectively just use all of my willpower of of logical reasoning to kind of push through and go okay this must be how this thing works but I guarantee you that I myself also have a bit of some gaps throughout the comp time just because I haven't used it enough I'm not using it quite a bit and and I also find that when you're doing really practical programming with few types or like you're not trying to do a lot of like could be items you do very few comp times and so the more you try to interface things out or try to make it into such a way that uh you need you need generics then then you need a lot more comp time and I think you run into this issue a lot more as of right now i' I've gotten pretty far through a pretty simple game and I've used almost no comp time just because I am just programming the thing I'm not programming what it could be or where I could have to extend it I'm just programming the thing and it's it does make it a lot easier in that sense oh know Jared Jared where did you find all of your resources other than just struggling or is struggling the only way to learn z uh I just like read a lot of code U like I read a lot of the standard Library um I learned a lot about like system calls and stuff by just reading the zig standard Library um it it's it's really cool how it like lays out here's every error that we're going to handle um uh and then like that plus like reading the the reading the The Man pages of for all the various ones that are in use um uh and I think uh yeah I mostly just read a lot of code and then I also also the zig Discord is really helpful um I asked a lot of questions I probably would have given up on Zig uh if I hadn't been for the people on that Discord being so helpful um when I was learning uh uh but yeah it's mostly just reading lots of code and trying stuff yeah that's probably not the best way to like if I were trying to sell a language that would probably be besides with the Discord part very happy about the Discord being very very helpful but the rest of that does not sound like uh quite the win to have to read the standard library to understand it and that might be just from me I actually so I think for buns 's case it it was a win and the reason why is because it means that like we it means that bun like we deeply understand how pretty much everything works in Bun's codebase and for the kind of product that bun is uh that's important for like system software you need to understand how everything works every detail really matters but for a database as well for a database is also important yeah yeah so so that's actually something so I don't know Prime if you have but but so so I also got so the the zig Discord is fantastic um you know I I even you know managed to to bother the the founder of tiger beetle and you know so I I got the all the help I could possibly get get and and again like I I did manage to get stuff done I just never know crossed the point where I felt uh productive but but this this U this thinking of understanding or or having control over all the things no 100% agree this is critical for system software but I don't know if I agree that you cannot get that level of control with rust so I think that's maybe also something uh worth talking about because uh so so obviously with my of Linux background I have understanding of the you know what happens under the hood um rust has this sort of unfortunate thing that they are abstracting you know maybe a little bit too much I think Sig is also to to some extent you know has this like they have this and most modern languages do this they they don't really expose the the the lipy or system call interface they they they build something on on top of that but I've I've yet hit an situation where I wouldn't be able to get that level of control in Rust although Al though I have to admit in Sig uh especially because if it's of its C interoperability you know the code ends up being nicer but but I haven't yet had an issue with rust for lack of it's just really easy in Zig to to use C libraries um we we use we use a number of C libraries and as well as just like the lip C stuff and what's nice about that too is it it does end up kind of compensating a lot of the time for like the immaturity of like the standard Library docs because you can just like you can you can see but there's tons of examples of of of C libraries and and lipy and all of that knowledge translates did Pekka just dropped because he was really ashamed of his opinions now he is clearly uh ashamed of his opinions and he just had to leave look the the reason just uh then here here he is uh just to give people a little bit of context uh we we at turo we have a fork of cly called lubo and that fork uh is again our idea like we're very non-committal with that like we want to keep compatibility and we want to be compatible with cite at the file format level we want to be compatible with cite at the API level we add things to that we added Vector search recently we had a bunch of other cool stuff as well uh but look there are a variety of things in in site that are pretty hard to to change uh so we embarked on this journey of like you know maybe we should have at least a long-term Horizon to rewrite it and and and have something that is a complete reimplementation cite is not that big of a code base it's a fairly dated code Base by now uh so we have this thing that in in the company uh that is experimental project that at the moment is like what would what would this look like if we rote it and and what kind of gains can we get from that and this is the thing that we're looking into like Zig and and and rust the main thing I wanted Zig for is that my experience with building rust is terrible uh in in the sense that it's not it's not just the compiler uh you know the compiler you get used to it and and and call it the Bor check or whatever after a while like and and look it's the same experience that that Jared's been describing with Zig as well every language will have this uh this curve uh shorter longer doesn't matter fast forward once two years in the future you don't care about that but but like Zig is really really really good at generating binary for everything that depends on nothing uh and run everywhere uh you can do this with rust but the only tools that I've seen that actually do this use Zig for part of the build process uh they they are really complicated uh and and it's just harder so for uh the the push for me was like look yeah sure I mean it may be harder it will have disadvantages like everything in life but we're GNA end up with something uh that is just easier to build and distribute which I consider to be an advantage right again there are disadvantage managers but this was for me my main motivation to to look into that how hard is it actually to do that in Rust like because you say one to two years you don't care anymore uh you know throwing in those one to two years a build process to make sure that you can build for Everything feels like that's not too bad so why would I care about that feature if you're putting years as the time scale yeah yeah and fair point which is why I'm I'm not forcing uh this this decision I think like a uh it's just like the every time you need to add a new Target for example the the problem comes again so I don't think it's a problem that has an end right just uh you you you you do your build for Linux and then you build for Windows and then but but it's also there's another part of that that I don't know and could be a SK issue uh I don't know if there is an easy way of ever Distributing those Ross binaries like that because uh the binaries that that Zig generate that are actually go does this very well as well are fully self-contained you can pass them around you can run them everywhere you depend on nothing um rust is not like that if you if you do anything that Imports a shared Library if you use SSL or or or anything like you will end up with the dependency the static pills are very complicated uh and and you end up with symbols that that you have to resolve uh so it it's harder to just ship the binary right uh and I don't think this is something now for something like cly you end up with very few dependencies so maybe this is manageable but like I I already mentioned one that unlike cite we're not going to have the Restriction of writing everything ourselves and not depending on anything open SSL uh it's pretty hard to integrate with with the rust builds right you have rust TLS uh but you know for a lot of systems open SSL is better so you have to be very careful with the dependencies that you have in your system because they may impact the the the final how distributor how easy it is to distribute the final binary and and Zig this is just to Breeze me I don't even to be honest I don't even understand fully how Zig can do it go away understand uh because again Zig also reads into uh but but somehow he does and and and and the build systems in Zig tend to be a lot better and generate better artifacts right Jared did you have the same thing because I know window support was a big part of the bun Journey what was it I'm not sure how many releases ago did you have the same experience that globber is talking about or is this I think it's I think we we could have if we were less particular about everything um but we kind of spend a lot of time on platform specific performance optimizations like kind of an absurd amount of time uh and that's inherently means that we we trade portability um it makes our life difficult but it makes one fast can can you uh kind of double tap into that what what what do you mean like what are some examples that makes it it particularly difficult to poor to do to Performance optimizations yeah so um in NOS uh there's a fs. copy fs. yeah. copy file function and uh for Linux we have three different no we have four different implementations uh like four different ways of copying a file uh based on the types of the files uh and uh and like and a few other things and like what the the thing supports and that's just Linux and then Mac we have like two no we have three ways of copying and then on Windows we currently only have we have two on Windows yeah we have two on Windows um and that's just like one function um uh and we do this pretty much everywhere um like another example is in uh in in the in bun. serve the HTP server um there's a we use uh on Linux we use send file if you pass it a bond off file in the response object and then that avoids reading the file in our memory instead it does it in the kernel um uh but these kinds of things our trade-off like platform uh like we could just use this like the easy way easiest way to do this would be to just use the Z standard Library um and it would abstract away a lot of that for us well look you decided to write the code for the platform but I bet you didn't have problems building for the platform and distributing for the platform which is we it's um it's it's we we do all the the zig build step happens uh actually on for all the platforms on uh on Linux machines instead of like it doesn't need to it doesn't at all need the the specific platform to build for that platform for just the zig set we do have a every single thing in our CI we need to go look for like GitHub Runners for Mac OS Mac OS uh uh that's not fully true it's it's because we suck uh but so so first of all I have toled because we're not using cargo disc and cross that much right and the points Clover made um you know obviously are valid so the more dependencies you have that the harder it becomes but like I I I I I don't share the sentiment with clobber that the building with rust is somehow impossible it's not but absolutely Sig you know has a has a really great cross compilation story for sure well it's not it's not impossible I'm just saying that this is a huge Advantage for zig it makes a lot of things at the distribution layer a lot simpler I don't know for for Linux it's also really easy to not use libc um uh like in bun we use a lot of a lot of the time we use the Linux system call interface directly instead of going through libc and that means that uh we have a lot fewer issues with incompatible with with like depending on a super new G GBC features by accident um we still have had to do a couple workarounds for that but like because we we can just use the Linux system call Api for most things it's really easy yeah and Global so for for building for Distributing for Linux is is terrible right it's there's no like well unless you do what J does but I don't know if everybody wants to use the system call interface but uh but again so for for for rust like I'm not saying it is smooth sailing it's not it's typically painful but you set it up you know you spend the time to set it up and you know unless you start ramming a lot of you know weird dependencies Ty open is not weird and open is already one yeah and you sol it once right so you know it's you're making it sound like I you need to be doing really edge things and and and complicated stuff and it's not the pro the I I'm not saying it is insurmountable I'm I'm making the point that this problem shows up really early and really frequently and you have to be very mindful of what you're using and how you structuring the code to avoid a distribution problem which in magical just doesn't exist absolutely but if you so so so so first of all I think so and and this is for sure a point where rust needs to improve no no question about that but like you know I I don't think this is a game changer in terms of selecting the the language I think that maybe the other productivity things that Jared pointed to you know would be more interesting I don't I I don't I don't share this sentiment about distribution all right well to kind of switch gears a little bit I do want to talk a t touch about traits and interfaces because this feels like a part that naturally is difficult and naturally hurts when you're going to Zig from any other language right so my transition period it was going from rust I then went to go and then after learning go and using go to build a decent sized project I then went and jumped into Zig and I had this really difficult time because all I wanted to ever do was build interfaces because I'm just so used to that type of thinking how how do you kind of get around this I guess this would be probably more targeted for Jared since you use Zig the most because there is no interfaces if you want an interface you have to effectively create your own V table and hand roll your own function calling and passing around any pointers or any Ops or however you wish to do that how do you kind of get around this and is that just because I've had too much time in the go world or is the interface problem of Zig a real problem I think it is a real problem but I also think zigg is early enough and there's it seems I can't obviously I can't speak for Zig at all um but uh I think it feels like this is something that they'll probably end up adding to the language in some form um just because there's enough uh but but for now basically what we do is uh um mostly we rely on comp time uh uh we use any type uh where either we use any type or we do like the trick where you pass it the type uh as a first argument and then you say the the second argument is that type um uh and I'm not sure if I'm even familiar with that move um you've definitely used it I I just don't know what the right name for it is it's that it's like how in like std. m. index of you pass it the the first argument is the the type and then the second argument is like a slice of that type um uh uh so so um and then the the the the downside to that is that then you don't get good autocomplete for it um uh but I also think that like they could there is a version there was a really good uh blog post some time ago on like what would a what would a different version of like the the a different approach to like the the Z language server look like where you could rely on all these really cool things about comp time to have like a a a really good way to to generate types for things that a human wouldn't actually be able to do by just reading the code without having to like run the code themselves in their head if that makes sense um uh and I think basically this is like a more of a tooling problem I I would say than a language problem uh uh and that like the language will mature and the tooling will get a lot better do you think the tooling is a problem right now I guess Pekka like with you're just starting to learn you coming from rust which has very excellent uh developer tooling experience how do do you think that the tooling of Zig is going to inhibit its growth do you think that that is going to be a major contributing factor I think right now it does a little bit but I also think uh I think it's going to they're they're getting it seems like they're getting pretty close to to shipping like incremental uh like basically like hot reloading for Sega applications um and I think that's going to it's it's a really it's a kind of a big bet because there's a lot of infrastructure that goes into making that actually work um and I think that's going to that and then later with the tooling after that that that I that like once the that will compensate I think a lot because if you just have a really fast development iteration cycle time then you people put up with so much like that's actually probably the most important thing is like how fast can I get stuff done and if I can get that if I can if I see my errs really quickly like if I can just recompile really fast then it kind of doesn't matter as much that that is nice but rust is notorious L bad with compilation time and people still put up with that right is it actually bad enough in Practical speaking like especially as you guys do database pack with all the database stuff that you're doing right now is the compile time actually bad enough absolutely not so it's not great like so what I love about Sig definitely is this the fast compart but I think Glover is getting old and he he's forgetting how long it takes to to build something built with C++ uh so I think rust is is is amazingly fast in comparison but yeah I don't like it's so and I don't want to be here defending or or saying that trust is in it's all all great I'm so I'm more looking at this from the perspective if I pick something you know is that going to be a long-term bet and I think s you know for sure is a long-term bet but I think rust is also uh something that that you know I I feel that the ecosystem and everything is there and the sort of compation times so what Jed said about the the you know finding the errors as quickly as possible I think that's really spot on and rust hasn't been that great in that area but in practice if you're using you know not neovim but vs code for example with the rust extension like even the ID quickly identifies the issues that you have pretty pretty well so like I don't really feel like I have a you know development cycle speed problem with rust nowadays okay whoa whoa whoa I hope you know that vs code and neovim used the same process and I can identify errors just as fast as you can they're tough guys okay we both used rust analyzer we're about to shut down the stream after such a ridiculous statement like that did you know that I was actually a long not Neo VR user right and then I switched to something more modern because you know as you grow up you you know you have to you know you know what I understand that that's why I switched to neim a more modern version I don't know about sounds I didn't know you you were a shill for Microsoft it crazy you like them spying on your system what else do you use copilot Plus+ for your desktop and have him take pict desktop absolutely everything I can yes absolutely you you open the stream surprise are you really the CTO because globber keeps asking think saying that he's gonna fire you and stuff like that do you understand why now yes I Now understand this whole Neo this anti- neovim sentiment among a CTO is just distaste distasteful all right but I I do want to actually switch a little bit of Gears to something that I did not tell you guys I we were going to do we just had on yesterday on the show Chris Ladner and if you're not familiar with Chris lner which I'm sure all of you guys are very very familiar with him but creator of llvm clang uh Swift and now uh Mojo and Mojo is kind of positioning itself actually as a systems level language style what do you think the future of system levels languages are and do you think things like Mojo actually have a place to really take over and make it so that system language programming or system level programming is actually approachable for everybody cuz Python's easy that's what I mean Python's super super easy and anybody can program python do you know what Mojo is yeah I know that this there's a idea that I don't think it fully replaces python because it allows you to import your python stuff directly into that right uh ex but look the bar of improving Python's performance is really low uh so so so we need to start there as well uh I I I I don't know I mean I just I think the the bat that every python really found its nich in machine learning and it's been like that for for a while uh it seems to be the direction that uh that he is going with that uh so I haven't looked maybe I'm just you know just Prejudice on that because of my previous experience but I just don't imagine myself writing system softare in the level of abstraction that python has uh and you know just because so often in it's not just about the speed and the performance is that so often you need to do such radically different things and this is why by the way in the Linux Kel we used a lot of assembly uh because there is no way that the C compiler will generate the code that that you need to generate for those specific functions like for example uh replacing the page table of the process it's just not something that that an application needs to do uh so when you're doing systems programming very often you need to run into those things like look uh no compiler will ever generate the code for this because this is not just what they're designed to do you're just doing something extremely specific and again assembly I don't think it shows up in in a database I I haven't seen them mean usually this is in the kernel but Jared just gave us an example where it was advantageous for him to bypass the lip C and go straight into the system into the system call level and again it does that does happen in databases all the time as well uh and it happens in systems so I I don't know I think and you know rust will allow you to do this very easily Zig will allow you to do it very easily um I don't know if this is a thing that Mojo will allow to do maybe yes maybe no but I think this will be the thing that I will be looking for because the normal abstraction that that the python syntax will give you is just too high uh now for machine learning will be trans transformative because you know for some reason python got stuck into that ecosystem uh and it's an ecosystem that is very power hungry and P python is really terrible with that so I I hope they succeed but I I I I'm skeptical that it can take over like the whole field of systems programming I do want to throw in one thing that Mojo is actually faster than rust I know hold on I had the I made the exact same expression hold on yeah so so I I think it's just that so first of all I'm actually kind of bullish on Mojo so I don't know if it's going to take over everything but uh so so Mojo is not python it is just um you know stealing python syntax and it has a borrow Checker so what is there not to love about it but I think the big bet they're making is essentially you know compute becoming more GP GPU based and then that's the whole U you know simd type of thing although I did learn that Zig also has something around this as well so so so maybe is gonna give some some competition for the but yeah I I am I am bullish on on Mojo I didn't say I was not I'm just saying that I think it's very clear to me how they will take over the machine learning field uh which is the field where python is already present uh and I'm skeptical that he that he can do the rest not you know can do the rest as well as as as Zan Russ but yeah I I think the the the Sim thing is going to be something that every language every want language that wants to be like a a good like a the the next the big the next big systems language is going to copy um like Z has the lvm vector types and I think Mojo's version of it right now is better than than zig's version but I also think zig's version is going to change uh based on or at least it looks like based on like the issues um uh but but it is also really nice because we use the in in in Zig we we use that the lvm vector types A lot um for like like we use it in the JavaScript parser we use it in the uh uh we use it for like parsing pretty much all kinds of data uh and uh it's great at like uh the thing it's great for is that it works both on arm64 and on x64 usually you have to write a bunch of architecture specific code to have simmed yeah I I actually tried to do simmed in glomo which is the async executor that I wrote for rust in 2021 uh I tried to do some Sim in there and and it was really complex I haven't looked ever since I don't know if Russ got better but Russ was pretty terrible with Vector types so I guess the the final question because we're we're going to need to wrap up here is why not just just use C++ right it has unique pointers it has shared pointers why go to all these new languages when you could just use C++ have you use C++ yeah I didn't I hate but I just want to hear your answer I think so so in Bun's case we do actually use a lot of C++ because JavaScript core uh is is is in C++ and we have to write bindings for it in Zig and see and Zig is kind of just a better language for writing parsers has kind of been my experience um is really productive for writing parsers um and things that look like parsers um it's uh and I think a lot of the uh in the memory allocator patterns are just much much better for performance um uh and and that is ends up being a thing pretty much everywhere um I think C++ is hidden Constructors and destructors that are constantly running and unnecessary mutexes and all that other stuff that's impossible to understand uh makes it less compelling so I I think Prim I think it's just boils to to me it boils down to development speed essentially because you know you can you know obviously C++ still is is much bigger uh in terms of you know what kind of software was built with that but but I think so memory safety obviously one of those things uh and and then also you know despite people think thinking that rust is a complicated language you know it it it's nothing compared to to C++ in terms of just the language you know what the language allows you to do so I think development speed through these different uh you know simplifications which I you know I believe borrow Checker is a simplification essentially to the language I think that's the that's the key part why we any new thing is probably going to be done with with rust or Z or or maybe Mojo in the future for me it's two things the number one is that like I in fact earlier we were discussing tooling uh and I don't think tooling is an addendum to the language I think Tooling in practice at its best it's uh feels like a part of the language uh and tooling tooling for C++ is just terrible like a make files and cake and stuff like that four different ways of building a project that none of them actually truly work uh so so it magnifies the the this problem that I do think is is quite important so that's number one uh the thing that I fell in love with uh when I started doing rust was the tooling it was just cargo like and cargo is a part of rust and and and so so that that alone I think it should take you in in the direction of of rust versus C++ uh if those are your two choices but also uh another thing is that C++ before C++ 14 is a disaster uh all all of those things that that you quoted like that share pointers and unique pointers and all the safety features of C++ they started with C++ 11 uh were truly ready with C++ 14 back then I wrote a database in C++ 14 which is Sila so Sila was fully written in in C++ uh and a lot of those things that Jared was referring to like hidden mices and stuff that you don't understand we actually had our own version so we ended up rewriting a lot of the the libraries anyway uh to make sure that we didn't have those things so first of all a lot of development speed that they were losing there but also every time you interface with with code that didn't write that code was probably not written in C++ 14 or 11 the code is older uh and it's objectively terrible and then you end up suffering the consequences right because you know just the if if if you write something like sqlite that is super self-contained in C++ you or Sila for that matter Sila had very few dependencies uh yeah you you write the entire code you're fine but every time you have to go and and look into the broader ecosystem uh you have that stream of manure that comes from the prec C++ 11 era uh that that is really just completely unsafe uh so this is for for me the the you know the ecosystem and the tooling so for me I actually kind of come I I agree with the tooling part of part of it which is that compile commands. Json I never quite got to actually work correctly I don't know what it is I don't know maybe my ninja build was off but I've tried everything to make that thing actually work on a large project well and so besides for tooling something that I think that hurts rust and C++ is looking at the standard Library code both of those codes feel I mean obviously C++ is incomprehensible code to look at the standard Library I'm not even sure what's happening when you jump to definitions I it's it's like impossible one thing that I love about Zig is that almost all Zig is readable I can jump into almost any point and go I can just read this with like very low effort I totally get this I can jump to the array list I can jump from the array list you know item to the array list list fixed sized and jump into the next one and actually understand every single part of it all the way through and so it feels very comprehensible and for me I think that that is like such a big win is that a language that has a very comprehensible standard uh or easily to comprehend standard makes it such a win because when I want to see how do the big boys do it how do the people who write this fulltime write this type of code I can go and look at it I I just cannot understand rust easily without like a a significant amount of like okay I'm going to really look at this for some parts of it and that just comes down to obviously the you know the dance between async lifetimes traits and all that that just make it so that you have to have a PhD and rust to really get it especially when it comes to the procedural macros that's where things get excessively difficult but my point about comp time not being a language within the languages just Zig everything is just Zig yes I know comp time because I happen to know Zig I don't have to know you know I don't have to learn the sin crate and I don't have to learn the goofy declarative macro syntax and what each one of those t's and E's and all those different things mean all right uh but now we're kind of we're going to we're going to wrap up this talk with one last thing which is that this is obviously for the conference P99 uh P99 is a conference dedicated to the low latency uh enthusiasts to those people that live on the edge of the requests that kind of go up and become really really intense at the very very end uh so it's a conference that's just filled with performance talk after performance talk why we should use certain languages all that so hopefully everyone has enjoyed this and for me uh I don't know if you've had the time globber to review any of the talks there's actually a person who I reviewed one of their papers a long time ago uh shadra uh she did 1 billion uh row Challenge and go Lang and so I'm actually looking forward to that talk because I actually know about what she did and she kind of goes step by step using the go profiler to really take down allocations and everything and make it super super fast and this is going to be on October 23rd and 24th and I also see that you are talking as well globber and Pekka I'm I'm not this year I I I talked at the previous uh two former editions of the conference look uh by far my favorite conference ever uh and and the reason for that is that look uh uh it's an online conference uh so I attended I think it's the fourth year I attended the first and third edition as a speaker uh and I was very bearish to be honest because like online conferences tend to suck but they found a way to make it very very interactive so the speakers the speakers are required like you so you pre-record the talk uh you don't have any live uh surprises or anything like that but the speakers are required to be in the room during the talk in chat so there's a chat going on about the talk with the speaker during the talk so that makes it very interactive there's a lounge as well that you can hang out with the speaker after the talk uh so it's a format that that really really works and and uh there there's not even our I mean our talks are always very technical uh we spoke about very technical things before Becca does have a talk this year about latency he actually in fact wrote the book about latency uh and Brian Kent is always one of the people that I'm dying to see so Brian Kent I think spoke at almost every edition if not every edition of the P99 conference so far uh you know he's a guy whose career I follow for a long time and it's always the one that I'm excited to see the most nice yeah and so thank you very much uh P99 for sponsoring this talk for getting this out there and uh if you want to use the link I will have the link in the chat and I'll have it on the video thank you again globber CEO of turo Jared creator of bun Pekka still CTO of of of turo great also Pekka you wrote a book i' I've um I've thrown it a bunch in the chat and other people have latency book uh this is on my list of reading because this is a very very interesting and exciting read I think so it's not written yet ful it's in the Early Access program but uh yes it's a fun fun thing to to write absolutely fantastic well thank you everybody for taking the time to join me really do appreciate that my pleasure thanks everybody thanks you and and also we're hiring Zig engineers at bun uh so uh uh so if you go to bun. hcareers uh please apply uh I actually probably have somebody that I could bother right now that I think is excellent at Zig that I'll throw your way awesome he teaches me a bunch of stuff he always says Whispering me I think he I think he even knows in the in the chat right now who he is he's always given me all the dirt on okay you're using this wrong here's the best way to use it please send them my way absolutely thank [Music] you let's go let's go hey that was pretty fun I like that you know for not having like a oops I going to stop the recording