Тёмный

Bun Is Better Than I Hoped 

Theo - t3․gg
Подписаться 309 тыс.
Просмотров 126 тыс.
50% 1

I...yeah. Wow. Great work to the Bun team. I am so impressed.
BUN VIDEO: • Bun 1.0 is here
BUN ARTICLE: bun.sh/blog/bun-v1.0
ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links
S/O Ph4seOne for the awesome edit 🙏

Наука

Опубликовано:

 

7 сен 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 293   
@user-yx1ot3jf3z
@user-yx1ot3jf3z 10 месяцев назад
If you're worried about disk space on Mac OS you could run a script that deletes node_modules for projects you've not used in a while. When Bun is so much faster it's not a big deal to reinstall that project you didn't work on for a week anyway.
@t3dotgg
@t3dotgg 10 месяцев назад
This is lowkey genius
@cameronadams4366
@cameronadams4366 10 месяцев назад
🐐
@DatNguyen-vj1ro
@DatNguyen-vj1ro 10 месяцев назад
There is a project for that. It's npkill
@Mempler
@Mempler 10 месяцев назад
​@@DatNguyen-vj1rolet's rename it to bunkill
@julienben
@julienben 10 месяцев назад
Truly a missed opportunity not calling it npfree
@chyldstudios
@chyldstudios 10 месяцев назад
I was ignoring Bun, but after this release it actually looks pretty impressive. They may have a new convert.
@ricoaw500
@ricoaw500 10 месяцев назад
isn't normal to ignoring under 1.0 product?
@andyzhou9850
@andyzhou9850 10 месяцев назад
@@ricoaw500I agree, definitely hold out on it for now, play around with it, but don't transitoin your entire codebase just yet imo. Wait until the product is more stable, because there WILL be major changes and items being deprecated in future releases (meaning you have to remove and change all of your codebase again).
@sanjeevdandin9350
@sanjeevdandin9350 10 месяцев назад
For my personal projects I will go with 1.0 But with team based or my company related projects I would prefer 2+ or 3+ version with more than sizeable community to even consider it.
@pranishbhujel3083
@pranishbhujel3083 10 месяцев назад
@chyldstudios bro can you guide me in my career
@WillViles
@WillViles 10 месяцев назад
All the performance benefits are great, but if it frees us from esm/cjs hell, that could be the most compelling feature.
@JonasLekevicius
@JonasLekevicius 10 месяцев назад
Actually, bun shouldn’t use more disk space than pnpm on macOS. On APFS, clonefile is “copy-on-write” but otherwise acts like link. As long as you don’t modify node_modules content, it’s same disk usage as pnpm.
@avid459
@avid459 10 месяцев назад
This is one of those videos that come once in a thousand years where I agree with Theo
@daleryanaldover6545
@daleryanaldover6545 10 месяцев назад
aside from tailwind yes
@trappedcat3615
@trappedcat3615 10 месяцев назад
Mainly because Theo won't be on RU-vid for a Thousand years.
@hasanjafri135
@hasanjafri135 10 месяцев назад
@@trappedcat3615 💋🐴
@randerins
@randerins 10 месяцев назад
@@trappedcat3615 Yes he will. Ever heard of immortal.js?
@RegalWK
@RegalWK 10 месяцев назад
Lol I disagree with him in this one (and many more), benchmarking proves nothing since it has nothing to do with real world apps
@Archheret1c
@Archheret1c 10 месяцев назад
The ability to run both cjs and esm at the same time is a major selling point to me. In big ecosystems, this can be surprisingly painful.
@ycombine1053
@ycombine1053 10 месяцев назад
1000%. I've spent wayyy too much time tweaking tsconfigs and package jsons trying to get modules to work the way I want them to. Having a "it just works" solution is a huge benefit.
@wliaputs
@wliaputs 10 месяцев назад
⁠yea man, why did they make import incompatible with require 😢
@zeocamo
@zeocamo 10 месяцев назад
yea, i was saying back then that node.js should added it like this. but "noo we will never be able to drop require then", for what i say the Date object is foobar too, the fix is add new syntax, so why can't we do it for import too.
@mickolesmana5899
@mickolesmana5899 10 месяцев назад
@@wliaputs that's simply because ES standard vs Node Standard, the right question to be asked is, why the hell module is introduce very late in the language
@akam9919
@akam9919 10 месяцев назад
I agree. Additionally, the fact that everything is splintered in first place for very little in terms of real world benefits is atrocious. Even if there was a benefit of sorts, there is no real reason why I shouldn't be allowed to just use both module types, at least on the backend. There is no benefit to treeshaking on the server unless you have a million dead packages in your node_modules. However, if you have that, you are probably doing something wrong or have implimented a build step to elminate all that dead code, in which case, how you import still means nothing.
@Niki2k1
@Niki2k1 10 месяцев назад
Bun even can compile to an single executable (+ you can embed files into it which is insane). This is going to improve my deployment to customer servers so much
@raphaeljaggerd3585
@raphaeljaggerd3585 10 месяцев назад
Is this in their docs. Im trying to build something like pocketbase for fun
@shadowangel-ou6bg
@shadowangel-ou6bg 10 месяцев назад
Where is this ? I see in build you can build to a bun target which optimizes a build but i don't think it's like hermes that compiles java-script statically.
@Dev-Siri
@Dev-Siri 9 месяцев назад
​@@shadowangel-ou6bg you are correct it doesn't work like hermes. It packages the Buntime and JavaScript source files in the binary which is then run by Bun when it is executed
@napapt
@napapt 10 месяцев назад
The cached installation wth Bun was so fast that I perceived is as an exception was thrown, my experience has been like: "If the logging finishes too fast it's because something went wrong"
@Slink1
@Slink1 10 месяцев назад
I have replaced Pnpm with Bun completely in the last few months and it completely transformed how I develop.
@coderaiders-yt
@coderaiders-yt 10 месяцев назад
I love that Bun was built with Zig
@UliTroyo
@UliTroyo 10 месяцев назад
I bought into bun wholesale from the beginning, and following its progress has been amazing. My workflow has gotten so much faster.
@SzaboB33
@SzaboB33 10 месяцев назад
What an eye opener how much CPU time we waste all the time. I chuckled when you said "it's sad to see", no, ITS AWESOME, it was 24x faster than the fastest solution we had so far :D What a time to be alive
@matheuspegorari1094
@matheuspegorari1094 10 месяцев назад
Employers already asking for 3 years experience in bun.
@PatrickSteger
@PatrickSteger 10 месяцев назад
Psssh 3 is for entry level devs. 8 for seniors!
@10e999
@10e999 10 месяцев назад
Let's go Ziggggggg ! Love seeing this focus on performance and usability.
@codesandtags
@codesandtags 10 месяцев назад
Man!! That last part amazed me 😮 . Hopefully deployment tools start supporting Bun, that’s usually one of the main blockers for organizations that have a lot of restrictions in their tools and tech stack
@danielkakai-bw7tc
@danielkakai-bw7tc 10 месяцев назад
Release of the year, great work by the Bun team.
@RhysSullivan
@RhysSullivan 10 месяцев назад
Bun looks so good, the moment it's a bit more stable for Windows I'm moving over to it. While the speed improvements are nice, the biggest thing for me is being able to just write Typescript and have it work without having to fight with configs. I'm hoping after their core is more stable they'll also take a look into improving the linting world of Javascript
@dmitriidemenev5258
@dmitriidemenev5258 10 месяцев назад
It feels like having it on WSL 2 is going to be faster than the alternatives
@seannewell397
@seannewell397 10 месяцев назад
You done much on WSL2 yet? I've seen things be faster there than windows.
@palyanytsia
@palyanytsia 10 месяцев назад
Oh yeah, linting out of the box would be great
@martiananomaly
@martiananomaly 10 месяцев назад
why not just use WSL?
@MatiasMeno
@MatiasMeno 10 месяцев назад
To be fair, Deno has supported this for quite a while now.
@caiopeluti2669
@caiopeluti2669 10 месяцев назад
I've tried bun on some projects a while ago and it was missing a lot of stuff that I needed. Nowadays it seems it got everything I should need, so I'm thinking of giving it a try again.
@hugazo
@hugazo 10 месяцев назад
Thanks for the birthday present, gonna try it soon, it solves most of my pain points with pnpm with a few nice bonuses
@w01dnick
@w01dnick 10 месяцев назад
8:45 isn't macos' `clonefile` behave like Linux btrfs `cp --reflink` ? So it doesn't really takes a space thanks to CoW (unless you're changing one of the copies)
@kytechnelson
@kytechnelson 7 месяцев назад
I think so, from what a quick search into the subject is yielding, so long as the drive is using APFS, since HFS does not support CoW, but APFS does, so any more recent mac should get the space savings as well.
@thfsilvab
@thfsilvab 10 месяцев назад
It's nice to see a new project with such a huge scope like bun, that proves that things can be simple yet crazy fast. Glad to see so many improvements in the JS ecosystem!
@wlockuz4467
@wlockuz4467 10 месяцев назад
Finally some real innovation in this field. Super hyped for Bun.
@anesmemisevic3360
@anesmemisevic3360 10 месяцев назад
exactly. this was missing for ages!
@xyangst
@xyangst 10 месяцев назад
I am become bun the destroyer of node
@oscarljimenez5717
@oscarljimenez5717 10 месяцев назад
Is incredible that Theo consider himself a open source mantainer, while having Mark and Julius do all the work 🤣
@seannewell397
@seannewell397 10 месяцев назад
He opened a great PR to turbo recently.
@hkalisvaart
@hkalisvaart 10 месяцев назад
Open source manager.
@hl7297
@hl7297 10 месяцев назад
that's funny
@MajorBreakfast
@MajorBreakfast 10 месяцев назад
Project management is tedious, don‘t underestimate it
@justthatoneguynicolai
@justthatoneguynicolai 10 месяцев назад
@@MajorBreakfast He doesn't manage it
@joshuanance664
@joshuanance664 10 месяцев назад
I think it'd be cool to see a video on benchmarks. I see a lot of back and forth about this stuff: how useful they are, how they should be interpreted, what makes for a good benchmark, etc.
@sortof3337
@sortof3337 10 месяцев назад
import and require works, wtf. I am sold. I am a bunny now.
@athepeanut4
@athepeanut4 10 месяцев назад
8:10 Under "Installation strategies": you can use the --backend flag to specify how to "copy" into node_modules, and force hardlinks even on macOS. But clonefile is copy-on-write, so it isn't really needed.
@daleryanaldover6545
@daleryanaldover6545 10 месяцев назад
this is nice to know
@pacifico4999
@pacifico4999 10 месяцев назад
True, clonefile copies only the metadata. "The cloned file (dst) shares its data blocks with the (src) file but has its own copy of attributes, extended attributes and ACL's which are identical to those of the named file" I love COW filesystems. I wonder if Bun does something similar in Btrfs.
@martiananomaly
@martiananomaly 10 месяцев назад
Bun's speeds are just absolutely insane. That too in practical usecases.
@berk473
@berk473 10 месяцев назад
Yes, please share future insights on buns real performance difference!
@spetz911
@spetz911 10 месяцев назад
Wow! This sounds very cool. Let’s see how it works with bigger more realistic projects
@bphilsochill
@bphilsochill 10 месяцев назад
Bro, it's just websites man.
@Chris-se3nc
@Chris-se3nc 10 месяцев назад
Sounds like bun has been baking to perfection since the last time I looked at it. Think it’s time I visited the bakery.
@F4T4LFL4W
@F4T4LFL4W 10 месяцев назад
Bun - "JavaScript so fast it's written in Zig"
@dothuan6630
@dothuan6630 10 месяцев назад
It's amazing, Bun provides the cool features of JS ecosystem in a single tool. I really urious how they can make these features in a very short time compared to other tools that took many years to be matured.
@andynn6691
@andynn6691 10 месяцев назад
But, but.. we were told NodeJS was "fast enough". Good stuff, this could be a great time saver.
@JordanShurmer
@JordanShurmer 10 месяцев назад
Theo: justifies not using bun in order to save disk space Als Theo: I just can justify not using it
@oliverhughes169
@oliverhughes169 10 месяцев назад
Thanks for such an insightful video, I share your excitement! I'm wondering how easy it would be to move a ViteJS app and test performance gains.
@larsartmann
@larsartmann 10 месяцев назад
Thank you for making me waste 3 days trying to get it running. It's not ready!
@lamprospitsillou6325
@lamprospitsillou6325 10 месяцев назад
I think tmux has a feature to send keys at the same time to panes, no nees to switch and click
@hyposlasher
@hyposlasher 10 месяцев назад
Apple’s webkit is finally getting appreciation
@quintencabo
@quintencabo 10 месяцев назад
Its soo fast and nice. The file api is also very nice to use. I upgraded a websocket server yestday to use bun. There was one incompatible dependency syncfile read but I could actually remove this dependency because bun has the build in prompt function which is very nice. I could throw away a lot of code actually and it starts up like 4 times faster. Great!
@JaredFL
@JaredFL 10 месяцев назад
Very interesting. Would like to see more Bun vids
@xBiggs
@xBiggs 10 месяцев назад
Just added bun to my workflow and its been great so far
@yiannis_p
@yiannis_p 10 месяцев назад
Good news! Awesome video!
@clearove4699
@clearove4699 10 месяцев назад
bun is just awesome for library devs easy setup
@KWerder92
@KWerder92 10 месяцев назад
Thanks!
@DishantKaushik
@DishantKaushik 10 месяцев назад
Can you make a video about running bun on an existing project and see how the transition from webpack to bun-dler is? Thanks!
@coscorrodrift
@coscorrodrift 10 месяцев назад
This looks really interesting, some of the features would make it a node killer for beginners too because of all the frictions and headbanging stuff that makes the developer experience for those users really painful, if it weren't for the Windows thing which probably many beginners are using.
@ivanjermakov
@ivanjermakov 10 месяцев назад
I was quite sceptical of another JS runtime, after not getting much benefit from Deno. But run/build/install times with Bun blew my mind, especially with typescript.
@seannewell397
@seannewell397 10 месяцев назад
Gonna try this with a game engine 👀
@dirty-kebab
@dirty-kebab 10 месяцев назад
I've followed you for at least the last two years! You've become so mature, and I'm glad to say I respect you a lot for it!
@thekwoka4707
@thekwoka4707 10 месяцев назад
It's wild that this started as Jared just thinking "esbuild is cool, lets see if I could make that in zig"
@akshitgupta4749
@akshitgupta4749 10 месяцев назад
i was waiting for your vid after 1.0 dropped
@JLarky
@JLarky 10 месяцев назад
But Bun allows you to just remove your node_modules and install them again in a fraction of the second once you get back to the project to save on disk space :)
@rickdg
@rickdg 10 месяцев назад
Waiting for some websocket benchmarks. Supposedly they have a faster version of express?
@zeMasterRuseman
@zeMasterRuseman 10 месяцев назад
I was just at the bun website, I thought let me watch some videos on youtube on it, open youtube and this video is at the top.
@aloufin
@aloufin 10 месяцев назад
best hairstyle yet
@slavenDj
@slavenDj 10 месяцев назад
Does vercel have plants to add Bun as runtime option?
@gamingwolf3385
@gamingwolf3385 10 месяцев назад
Hi theo , thanks for this beautiful video , but i want to know if nextjs is compatible with bun , currently nextjs uses node and webpack (turbopack soon)
@frontend_ko
@frontend_ko 10 месяцев назад
nice new challenger!
@mk4dea
@mk4dea 10 месяцев назад
Would love to know any limitations it has when using it for a NextJS project.
@nikilragav
@nikilragav 10 месяцев назад
Is there any version of bun runtime for serverless functions similar to cloudflare's isolates?
@danielcaldas3682
@danielcaldas3682 10 месяцев назад
I would like to see if you can adopt just parts of Bun not the whole thing. For example, would it be viable to use just the built-in test runner to write tests in an existing Node based project? Great video btw
@youneshenni5417
@youneshenni5417 10 месяцев назад
wow. just wow !!!!
@aggranular
@aggranular 10 месяцев назад
Can you share link to the project you tested install speed on? I’d like to test it with yarn 4 in pnp mode with global cache (which I guess you didn’t use in the comparison) as it’s cached instal is super fast
@zeMasterRuseman
@zeMasterRuseman 10 месяцев назад
just tried to run my nextjs project with bun and it just worked ™ I think node is done.
@mrlectus
@mrlectus 10 месяцев назад
Does hot reloading works, cause it doesn't work for ne
@samconran
@samconran 10 месяцев назад
Well, seems like I'm moving to bun...
@chaoky
@chaoky 10 месяцев назад
it defaults to fast copy, but that's configurable, you can choose to use hardlinks anyway
@Muescha
@Muescha 10 месяцев назад
is it not a vendor login when I have to use build-in functionality like bun.write or bun.serve?
@Nitr4Oo
@Nitr4Oo 10 месяцев назад
Important note, bun on windows wont be as performant as it will get in the future as jarred decided he doesnt have enough time before releasing 1.0 to understand how to write fast I/O windows code, so they for now use libuv (what nodejs uses for the I/O)
@AustinCameron
@AustinCameron 10 месяцев назад
Does it support NTL? Node task list is my all time favorite add on
@ZiggyJFox
@ZiggyJFox 10 месяцев назад
How hard would it be to move from yarn to bun in an existing large codebase?
@dixztube
@dixztube 10 месяцев назад
ive been doing this now for about 6 years, and in the js, go, and rust world. i can't believe how many things are in js. i started w/ js so i thought this was normal but it is true some package is released like every month lol. this looks great but how do we know this will be around in 5 years
@yumeyuki1944
@yumeyuki1944 10 месяцев назад
8:09 hopefully they'll add a `--force-symlink` flag then or a global config (for people that'd prefer disc space over speed)
@randerins
@randerins 10 месяцев назад
bun intended haaaaaaaa
@maacpiash
@maacpiash 10 месяцев назад
I'd definitely switch to Bun for my full-stack applications when they support Solid-Start. As of now, Bun can initialize a Solid-Start project but cannot run it. Node.js runs under the hood, even when I type `bun run dev` command.
@beepmcjeep5527
@beepmcjeep5527 10 месяцев назад
I've run into similar issues with `bun create preact`. This is the same sort of issue I've always run into getting Bun to work on projects since it was first announced. Some key step is just outright missing or incompatible, and the workaround is to tear apart the `npm install` or other such process to track it down and "fix" it. This is just to init a toy project. It's really disappointing. It all sounds great if you're building without a template from scratch (maybe) or if Bun-specific templates are created in the future, but I figured the whole point was to not have to get "Bun-specific" with everything.
@andreicalegari1837
@andreicalegari1837 10 месяцев назад
you need `--bun` flag there
@MichaelLazarski
@MichaelLazarski 10 месяцев назад
it looks like bun is not checking for updates on the second create? pnpm is. just a simple pnpm i or bun i for me is the same speed..
@blackpurple9163
@blackpurple9163 10 месяцев назад
Are there any videos which use bun entirely instead of node?
@owenwexler7214
@owenwexler7214 10 месяцев назад
Time for some prototyping….
@ukaszjonasiak382
@ukaszjonasiak382 10 месяцев назад
Back in the day we had a project that could reload once for 2.5 minutes. Now people consider using something that instead of 6 seconds installs something in 1 second.
@sep1ol
@sep1ol 10 месяцев назад
can i really trust Bun to send apps to production?
@thejonte
@thejonte 10 месяцев назад
Sweet!
@medbenbrahim3246
@medbenbrahim3246 10 месяцев назад
Bun is showing us what javascript could be if every API is implemented natively But at the end of the day, normal js code will still be slower, it's just not slow enough to ditch it
@andreicalegari1837
@andreicalegari1837 10 месяцев назад
still way faster than Python.
@steveoc64
@steveoc64 10 месяцев назад
Killer feature is the easy way you can write the hard stuff in zig, and import it as an esmodule to use in a scripting language. Has the potential to overtake python in machine learning. Faster and safer than Rust, with a much better dx
@davidt01
@davidt01 10 месяцев назад
How is it safer than Rust?
@steveoc64
@steveoc64 10 месяцев назад
@@davidt01 yeah well that’s potentially a very long conversation that can go sideways quickly. If rust’s concept of safety works for you, then go for it. There are alternative opinions though.
@davidt01
@davidt01 10 месяцев назад
@@steveoc64 Well from my understanding, Zig has manual memory management, which is inherently not as safe.
@andreicalegari1837
@andreicalegari1837 10 месяцев назад
@@davidt01 while it may have manual memory management, it has a lot of in-code ways to help you making it safe, and the compiler alerts if there's a memory leak.
@khalled95
@khalled95 10 месяцев назад
I tried yesterday to add two private registrys It's a nightmare The documentation is so bad
@davevanhoorn
@davevanhoorn 10 месяцев назад
Did you figure it out?
@bren.r
@bren.r 10 месяцев назад
Great now we just have to wait until 2040 before AWS supports bun in beanstalk.
@electribe7
@electribe7 8 месяцев назад
anyone use it in production already here and would recommend it?
@MailsonWei
@MailsonWei 10 месяцев назад
so we can throw away npm, nodejs, sql? no need to use those on the project?
@user-of6ls2ng5l
@user-of6ls2ng5l 10 месяцев назад
Bun love ❤
@BrunoSetteOficial
@BrunoSetteOficial 10 месяцев назад
Can we use Bun in Vercel?
@tech3425
@tech3425 10 месяцев назад
Shit I can't wait to use bun on my next project. 100%sure bun from now on
@zeyadkenawi8268
@zeyadkenawi8268 10 месяцев назад
they took blazingly fast seriously
@wnichols6671
@wnichols6671 10 месяцев назад
But looks amazing for anyone who doesn't want to learn how to wrangle the other bundlers but occasionally wants to use JavaScript for simple pages
@samnayakawadi
@samnayakawadi 10 месяцев назад
How they managed to do this?
@markclynch
@markclynch 10 месяцев назад
Bun seems tk just work tm
@m4rt_
@m4rt_ 10 месяцев назад
I hate JS, but bun still managed to make me exited, and create some test projects to see how it works
@TheBlackmanIsGod
@TheBlackmanIsGod 9 месяцев назад
Why are my Bun files hidden? How do I get the files to my web server?? When I use GUI and navigate to the folder or directory there’s nothing there, I can’t see any files, but when I navigate there in command line then I see all my .tsx, and beginning files… Why can’t I see my files so I can copy them over to my web server or how do I do this??
@aarong2374
@aarong2374 10 месяцев назад
Also helps it has a cute name. Love the vid
@cg219
@cg219 10 месяцев назад
Wonder if Node will catchup. Its looking like a head to head against Bun and Deno
@wisdomelue
@wisdomelue 10 месяцев назад
let's tell ourselves the truth, many people aren't actually using Deno tbh
@a-yon_n
@a-yon_n 10 месяцев назад
@@wisdomelue And more people are giving up Deno.
@bigs2469
@bigs2469 10 месяцев назад
Well it took NodeJS like half a decade to add built-in Fetch support... so they have a lot of catching up to do
@jarredsumner5983
@jarredsumner5983 10 месяцев назад
@nuvotion-live
@nuvotion-live 10 месяцев назад
Elephant in the room: Electron. Think of how much you are losing by leaving that behind. If you care about using your existing codebase as a feature complete desktop app, it's a dealbreaker. I don't see any path forward for this either :/
Далее
The Truth About Bun
13:35
Просмотров 197 тыс.
Bun 1.0 Release | Prime Reacts
17:36
Просмотров 202 тыс.
Maybe i need to add instructions @popflexactive
00:14
UI Libraries Are Dying, Here's Why
13:28
Просмотров 285 тыс.
Bash? Nah, I Have Bun.
12:38
Просмотров 72 тыс.
Panda is better than you think
23:37
Просмотров 6 тыс.
The Truth About HTMX
12:27
Просмотров 168 тыс.
The purest coding style, where bugs are near impossible
10:25
This UI component library is mind-blowing
8:23
Просмотров 629 тыс.
SFNode Meetup: Bun with Jarred Sumner
22:41
Просмотров 20 тыс.
10 Things I LIKE About BUN JS
9:33
Просмотров 8 тыс.
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
ОШИБКИ НА ANDROID 2
5:13
Просмотров 28 тыс.
Здесь упор в процессор
18:02
Просмотров 393 тыс.