Bun1.1 Released!

ThePrimeTime
3 Apr 202430:28

Summary

TLDRThe transcript discusses the release of Bun 1.1, a JavaScript package manager and runtime, highlighting its improvements in speed, reliability, and new APIs. It addresses the number one feature request, Windows support, and compares Bun's performance with other package managers like npm and Yarn. The speaker expresses skepticism about the performance metrics presented and raises concerns about potential security and maintenance issues. The summary also touches on the addition of module mocking, simplified stack traces, and Bun's efforts to build trust through transparency and compatibility.

Takeaways

  • 🎉 Bun 1.1 has been released, bringing significant updates including performance improvements and new features.
  • 🚀 Bun aims to simplify JavaScript by making it faster, more reliable, and more enjoyable to work with.
  • 🔧 The new version offers optimized APIs and reduced memory usage, enhancing the overall developer experience.
  • 💻 Bun 1.1 introduces Windows support, aiming to provide a consistent development experience across different operating systems.
  • 📈 The update claims that Bun's package installation is significantly faster than other package managers like Yarn and npm.
  • 🔍 Bun has improved its Node.js API performance, with FS reader being 58% faster on Windows compared to Node.js.
  • 🌐 The introduction of cross-platform shell capabilities allows for scripts written in Bash syntax to work on any platform.
  • 🛠️ Bun's developer experience has been enhanced with features like module mocking, which supports both CommonJS and ESM.
  • 🐞 Over 900 bugs have been fixed in Bun 1.1, emphasizing the team's commitment to stability and reliability.
  • 📋 Bun now supports dependency lifecycle scripts, allowing more control over package behavior and security.
  • 🔗 The Bun team encourages community involvement and contribution, inviting developers to report issues and join their efforts.

Q & A

  • What is the primary goal of the bun update mentioned in the transcript?

    -The primary goal of the bun update is to make JavaScript less complicated, more fun, and more productive by making bun faster, more reliable, and reducing memory usage while adding new APIs.

  • How does the speaker describe the voice of Jared?

    -The speaker describes Jared's voice as sassy and sweet baritone that unexpectedly came trickling in.

  • What is the claim about bun's installation speed compared to yarn and npm?

    -The claim is that bun's installation is 18 times faster than yarn and npm.

  • What performance improvements have been made to nodejs APIs in bun 1.1?

    -In bun 1.1, the FS reader is 58% faster compared to nodejs on Windows.

  • What new feature has bun 1.1 addressed that was the number one request from users?

    -Bun 1.1 has addressed the number one feature request which is window support.

  • How does the speaker feel about the claim that bun's APIs are up to 20 times faster than popular node sver package?

    -The speaker is skeptical about the claim, expressing doubt about the accuracy of the performance testing method used.

  • What is the speaker's concern about the cross-platform compatibility feature of bun?

    -The speaker is concerned that the cross-platform compatibility feature could lead to maintenance nightmares, security issues, and performance overhead.

  • What is the new API added in bun 1.1 for matching strings and files using glob patterns?

    -The new API added in bun 1.1 for matching strings and files using glob patterns is called 'bun glob'.

  • What is the speaker's suggestion for developers who only use JavaScript?

    -The speaker suggests that developers who only use JavaScript should try out other languages like Zig, Go, Rust, or Elixir to understand different systems and broaden their perspective.

  • What does the speaker emphasize as important for building trust with users?

    -The speaker emphasizes that explaining the reasons behind bun's performance improvements and differences is important for building trust with users.

  • What is the main reason for the speaker's skepticism towards some of the performance metrics presented in the bun update?

    -The main reason for the speaker's skepticism is the lack of clarity on how exactly bun achieved these performance improvements and whether the metrics are based on fair and accurate testing methods.

Outlines

00:00

🚀 Introduction to Bun 1.1 and its Features

The paragraph introduces the release of Bun 1.1, highlighting its improvements in speed, reliability, and new APIs. It emphasizes the effort to make JavaScript less complicated and more enjoyable to work with. The speaker expresses skepticism about the presented statistics on speed improvements, questioning their authenticity and relevance. The discussion also touches on the challenges of cross-platform compatibility and the potential drawbacks of integrating bash syntax into JavaScript.

05:00

🛠️ Enhancing Developer Experience in Bun 1.1

This paragraph delves into the specific enhancements made in Bun 1.1 to improve the developer experience. It mentions the optimization of node.js APIs, the introduction of new features like autosave on file changes, and the improvements in command execution speed. The speaker also addresses the annoyance of the 'terminate batch job' prompt and how Bun 1.1 has made strides in addressing this issue. Additionally, the paragraph discusses the cross-platform capabilities of Bun, allowing the use of bash syntax across different operating systems, and the potential security and maintenance concerns this might bring.

10:01

🔧 Performance Optimizations and New APIs in Bun 1.1

The focus of this paragraph is on the performance optimizations and the introduction of new APIs in Bun 1.1. It highlights the faster startup times for various command line tools and the improvements in node HTTP server performance. The speaker expresses doubts about the presented performance metrics and questions the security implications of certain optimizations. The paragraph also introduces new APIs like 'bun glob' for string and file matching and 'bun sver' for parsing and sorting semantic version strings, emphasizing their speed advantages over existing solutions.

15:03

📦 Package Management and Dependency Lifecycle in Bun

This paragraph discusses Bun's package management capabilities and the introduction of dependency lifecycle scripts. It explains how Bun simplifies the migration from other package managers like npm or yarn and introduces a trust-based security model for package execution. The speaker comments on the significance of being in the top 500 most depended upon packages on npm to be automatically trusted by Bun. The paragraph also touches on the importance of developer experience and the efforts made by the Bun team to ensure a smooth transition for developers switching to Bun.

20:04

🐞 Bug Fixes and Improved Stability in Bun 1.1

The paragraph highlights the commitment of the Bun team to stability and bug fixes in the 1.1 update. It mentions the resolution of over 900 bugs since the 1.0 release and the prioritization of stability. The speaker reflects on the potential impact of early version releases on adoption and credibility, advocating for a more cautious approach. The paragraph also invites users to report bugs and join the Bun team, emphasizing the ongoing nature of Bun's development and the importance of systems engineering in refining JavaScript tools.

25:04

🌐 Bun's Future and the Broader JavaScript Ecosystem

In this final paragraph, the speaker contemplates the future of Bun and its place within the JavaScript ecosystem. It acknowledges the efforts made by the Bun team but also encourages a broader perspective among JavaScript developers. The speaker suggests that developers should explore other languages to gain a better understanding of different programming paradigms and the trade-offs inherent in JavaScript. The paragraph ends with a call for more transparency and trust-building in the presentation of new tools and technologies.

Mindmap

Keywords

💡Bun 1.1

Bun 1.1 refers to a significant update of the JavaScript environment and package manager, Bun. It is designed to make JavaScript less complicated, more fun, and more productive. The update focuses on improving speed, reliability, and memory usage, as well as introducing new APIs. In the context of the video, the speaker discusses the features and improvements of Bun 1.1, comparing it to other package managers and JavaScript environments.

💡JavaScript

JavaScript is a high-level, often just-in-time compiled language that conforms to the ECMAScript standard. It is primarily used for enhancing web pages to provide for interactive and dynamic content for users. In the video, JavaScript is the core language that Bun is designed to support and optimize, aiming to simplify its complexity and enhance productivity.

💡Package Manager

A package manager is a system that automates the process of installing, updating, and removing software packages. In the context of JavaScript, package managers like npm, yarn, and Bun handle the dependencies required for a project, making it easier for developers to manage libraries and tools.

💡Windows Support

Windows Support refers to the compatibility and functionality of a software or tool on the Windows operating system. In the video, it is mentioned as the number one feature request for Bun, indicating the demand for cross-platform compatibility among developers.

💡APIs

APIs, or Application Programming Interfaces, are protocols and tools for building software applications. They define the methods and data formats that allow different software components to communicate with each other. In the context of the video, Bun has added new APIs to improve the developer experience and make JavaScript development more efficient.

💡Performance

Performance in the context of software refers to the efficiency and speed at which a program or application operates. It is a critical aspect of user experience and can significantly impact the adoption and success of a technology. The video discusses the performance improvements in Bun 1.1, comparing it to other package managers and highlighting its faster execution and reduced memory usage.

💡Compatibility

Compatibility refers to the ability of different software, systems, or components to work together effectively without conflicts or issues. In the video, the speaker discusses Bun's efforts to improve compatibility with npm packages and its support for cross-platform development, which is crucial for developers working on projects that need to function across various operating systems.

💡Developer Experience

Developer experience encompasses the tools, processes, and environments that developers interact with when writing, testing, and maintaining code. It focuses on making the development process as efficient, smooth, and enjoyable as possible. In the video, the improvements to developer experience in Bun 1.1 are highlighted, including features like syntax highlighting for error messages and simplified stack traces.

💡Optimization

Optimization refers to the process of making something function more effectively and efficiently. In software development, this can involve improving code to run faster, use less memory, or handle more concurrent tasks. The video discusses various optimizations Bun 1.1 has implemented to make JavaScript development faster and more reliable.

💡Cross-Platform

Cross-platform refers to the ability of software to function on multiple operating systems or platforms without requiring significant modification. It is an important consideration for developers aiming to reach a broad user base. In the video, the cross-platform capabilities of Bun 1.1 are emphasized, particularly its support for Windows, which is crucial for a more inclusive development environment.

Highlights

Bun 1.1 is introduced as a significant update to make JavaScript less complicated, more fun, and more productive.

Bun has become faster, more reliable, and has reduced memory usage in the new update.

New APIs have been added to Bun, enhancing its capabilities and utility for developers.

Bun now supports Windows, expanding its reach to a broader developer base.

The installation process for Bun is claimed to be 18 times faster than its competitors like yarn and npm.

Bun's developer experience is designed to be as seamless as possible, with efforts to optimize the speed of rerunning tests and saving files on each keystroke.

Bun has addressed the number one feature request, which is Windows support, improving its cross-platform compatibility.

The update includes optimizations for Node.js APIs, with FS reader being 58% faster on Bun compared to Node.js on Windows.

Bun's developer experience aims to match the expectations set by macOS and Linux, ensuring consistency across platforms.

The update has fixed the annoying 'terminate batch job' prompt when sending control C to the process in Bun.

Bun 1.1 now functions as a cross-platform shell, similar to bash, allowing scripts using bash syntax to work on any platform.

The introduction of string templating in the API allows JavaScript variables to be used within bash scripts.

Bun has made significant progress towards better Node.js compatibility, with various web standard APIs now working in Bun 1.1.

Performance improvements in Bun 1.1 include faster startup times for command line tools like TSC, and the node HTTP server being 29% faster than in Bun 1.0.

Bun glob is a new API for matching strings and files using glob patterns, which is claimed to be up to three times faster than similar popular npm packages.

Bun sver is a built-in API for parsing and sorting sver strings, which is up to 20 times faster than popular node sver packages.

Bun has added module mocking, supporting both CommonJS and ESM, and has made it easier to switch from npm or yarn.

Bun's trust in dependencies is managed through a 'Trusted Dependencies' list in the package.json, initially including the 500 most depended on packages on npm.

The Bun team has fixed over 900 bugs since Bun 1.0, emphasizing stability as a top priority.

Transcripts

play00:00

I have heard that this is very cringe

play00:04

let's get ready to cringe together as

play00:06

one happy family bun 1.1 is finally here

play00:10

and it's a huge update can we just take

play00:12

a second really quickly and just say

play00:13

that Jared has has a great voice were

play00:16

you were you expecting this this sassy

play00:19

and sweet baritone to just come

play00:20

trickling in anyone JavaScript is

play00:23

complicated bun exists to make

play00:25

JavaScript less complicated more fun and

play00:28

more productive we've made bun faster

play00:30

more reliable and reduced memory usage

play00:32

but we've also added new apis and after

play00:34

many months of hard work we've addressed

play00:36

the number one feature request window

play00:41

support when are we going to as as as a

play00:44

whole as a group of everybody just just

play00:47

let Windows be windows and ignore them

play00:50

um by the way you know just like the the

play00:52

the the Devon human software engineer a

play00:55

Bunger you know I don't know about this

play00:57

cutesy thing okay I like it really

play01:01

excited for Windows developers to see

play01:03

the speed and developer experience of

play01:05

bun bun install is 18 times faster than

play01:09

yarn and pmpm and 30 times fast is this

play01:13

one of those fake stats that we're

play01:14

getting hit with right now or is this a

play01:16

real one cuz remember last time we got

play01:18

hit with one of these people are just

play01:20

like yo bro you didn't run it with these

play01:21

two things and you're not actually

play01:22

giving us real ones but but can we just

play01:25

be can we also take one more like just

play01:27

step back if installing your

play01:29

dependencies takes 565 milliseconds a

play01:31

that means they're literally all cached

play01:33

and on your system okay you ain't

play01:35

downloading your npm you're not

play01:38

downloading your node dependencies in

play01:40

500 milliseconds okay because there's

play01:42

literally a thousand separate projects

play01:43

that are going to be coming down so

play01:45

first off that's just not H that's just

play01:47

it's literally not happening so this is

play01:48

all cash install uh and second off if

play01:51

your cash install is taking a difference

play01:52

between 31 milliseconds and 565

play01:55

milliseconds for an install I don't

play01:57

think this is like a wi winning metric

play01:58

okay you install once you work for a

play02:01

while when your project quits working

play02:02

and you have no idea why you delete your

play02:04

node module folder you reinstall so it's

play02:06

like you only do that like three times a

play02:08

day so I don't know if that's like a

play02:10

real big win or not okay does that make

play02:17

sense yeah than mpm on Windows and Bon

play02:22

run and Bon X are over 11 times faster

play02:25

than mpm run on Windows oh oh nice okay

play02:29

so this is an npm run they say right

play02:30

here it's actually npx run

play02:33

npx runs npm and npm runs node and then

play02:40

node does node things and then it

play02:44

runs right

play02:46

so I believe it's a little bit more

play02:48

right is that what happens or what does

play02:49

npx do no npx doesn't invoke npm does

play02:52

npx does npx invoke

play02:54

npm I can't remember but either way you

play02:58

can't say those two things cuz you're

play02:59

saying npx and npm right like those

play03:02

aren't those aren't real we've also

play03:05

implemented optimizations for nodejs

play03:07

apis FS reader is 58% faster on bun

play03:11

compared to no js on Windows you got to

play03:14

memorize your line so it doesn't look

play03:15

like you're reading by the way you're

play03:18

looking over here at the script the

play03:21

script's like the script is over

play03:23

here you only got one line let's let's

play03:25

make it happen boys let's make it happen

play03:27

just just memorize your lines it's

play03:30

called acting Bon on Windows has the

play03:32

same great developer experience as you

play03:34

would expect on Mac OS and Linux here

play03:37

we're saving a file on each keystroke

play03:39

and you can see how fast bun is

play03:41

rerunning the changes to the test we've

play03:43

also fixed that annoying turn can we

play03:46

take a quick can we take a quick second

play03:48

here can we look at the random Keys

play03:50

being pressed bun is rerunning the

play03:52

changes to the test oh my goodness I'm

play03:54

trying to pause it we oh I almost had it

play03:58

I almost had it

play04:00

developer experience as you would expect

play04:02

on M Comm

play04:08

here there we go we're going to get

play04:10

there okay look at that p a o k d p o k

play04:16

DP what layout is that what layout are

play04:19

we getting flexed on right

play04:21

now palansky query but

play04:28

how hold on

play04:30

here let me oh I don't even have I don't

play04:33

I actually can't enable qut on my

play04:35

machine two hands

play04:37

okay here can someone do it for me I

play04:39

can't even enable it well yeah because

play04:41

there's the a there's the

play04:43

ASDF yeah see I don't think so I don't

play04:46

think that's query I don't think that's

play04:48

query because where look a s d where's

play04:50

the F okay so you're only using three

play04:52

you're only using three ASD ASD okay so

play04:55

ASD and then

play04:58

P okay

play05:00

a I don't know just seems a little

play05:03

strange a file on each keystroke and you

play05:06

can see how fast bun is rerunning the

play05:08

changes to the test we've also fixed

play05:10

that annoying terminate batch job prompt

play05:12

when you send control C to the process

play05:15

in bun this yeah that's pretty nice you

play05:19

know the hard part is is that sometimes

play05:21

I like control I don't have node on this

play05:23

computer so if I were to open up node

play05:25

pretend I opened up node if I had node

play05:27

on this computer and I opened it up and

play05:29

I started typing and then I didn't want

play05:30

to do something I could hit control C

play05:32

and the first contr C doesn't exit I

play05:34

kind of like that you know what I mean I

play05:35

kind of like that I know a

play05:38

little bit of a Chad just works to

play05:42

install bun on Windows run the following

play05:44

command in your

play05:50

terminal just run that just put just put

play05:53

it in your just put it in just put it in

play05:56

bro in bun 1.1 bun is now a

play06:00

crossplatform shell like bash different

play06:03

shells have slightly different syntaxes

play06:06

rules and commands on Windows rm-rf

play06:10

doesn't work instead you have to

play06:12

download the rim Raff mpm package and

play06:15

invironment variables don't work on

play06:16

windows before the command to fix this

play06:19

you have to download and install the

play06:20

cross M mpm package with the Bushell the

play06:24

need for these dependencies is gone you

play06:26

can just write a script using bash

play06:28

syntax and expect to work on any

play06:31

platform and you can use the shell

play06:33

directly from JavaScript the API uses

play06:36

string templating which means you can

play06:38

use JavaScript variables is I still

play06:41

don't know if I like

play06:44

this also isn't this uh this is a syntax

play06:48

error right this is an

play06:49

error oh no array buffer must be array

play06:52

buffer must return out of Promise um

play06:54

okay uh but either way I don't I really

play06:58

don't

play07:00

I really don't like this yeah bash is

play07:02

awful but bash is useful like the thing

play07:04

is is if you think that bash is great

play07:07

you you you just like I don't know what

play07:09

kind of lead poisoning you received as a

play07:11

child but that's insane okay we all

play07:14

agree bash is not like it's it's not

play07:17

it's it's not great okay this is not a

play07:20

good useful language okay I know bad cop

play07:24

is crying sorry bad cop but bash is also

play07:27

great to have bash has its own place and

play07:29

you use it up until you need an array

play07:31

the moment you're going into like

play07:33

treating your string as an array or

play07:35

doing array operations you've jumped the

play07:37

shark just use go just use Zig just use

play07:39

Russ just use JavaScript use anything

play07:41

but bash at that point okay python I

play07:43

don't care just don't keep doing that uh

play07:47

pretty simple pretty simple um rule I

play07:51

think works for most

play07:53

people but having bash in JavaScript I

play07:57

just don't I foresee nothing but

play07:59

headaches I just feel like like a

play08:02

problem I have is that you're going to

play08:03

like here's something that I'm going to

play08:05

that I'm going to see is you're going to

play08:06

have a bunch of lines that are a bunch

play08:07

of bash calls like what's going on

play08:09

underneath here are they spawning a new

play08:11

process is it a child process how are

play08:13

they getting all this information out it

play08:14

just feels like a black hole of

play08:16

performance on top of that they're doing

play08:18

some sort of manipulation and reading

play08:20

these things to be able like TJ and I

play08:22

talked about this how how do they change

play08:23

an rm-rf to be into the windows version

play08:27

of the exact same Command right there's

play08:29

like a lot of overhead and stuff they

play08:31

have to do to it to be able to make sure

play08:33

it works and like that's just so much

play08:37

like effort and time into it I just I'm

play08:39

just not I just don't think it's a great

play08:42

idea oh you put a space in the Boolean

play08:44

expression yeah you have to recreate The

play08:46

Bash uh The Bash uh what's it called The

play08:50

Bash tokenizer and execution uh all the

play08:53

analysis tools we have to check bass

play08:55

scripts are going to need to be rendered

play08:56

completely useless yeah I know any

play08:58

security that uses some sort of check

play09:00

for bash stuff is now going to have to

play09:02

be even more crazy cuz with string

play09:03

templating you can generate The Bash

play09:05

commands right so now you have to like

play09:07

do the string templating and then you

play09:10

have to see what is generated and then

play09:12

you're going to have to figure out if

play09:13

you're doing something that's a little

play09:15

bit terrifying just just reject it yeah

play09:17

okay XZ exploit Vector created I know

play09:20

this is just this is literally just an

play09:22

XZ exploit Vector incoming is arguments

play09:25

in your commands it's great for writing

play09:27

quick scripts in your project where you

play09:29

don't want to worry I also would love to

play09:31

ask the question is what who who are

play09:33

these people that when they write a A

play09:36

bash script are needing to run on

play09:38

Windows Mac and Linux like almost

play09:42

exclusively I only like I I I typically

play09:45

I typically find very few cross-platform

play09:49

devs I find

play09:51

extremely extremely few game development

play09:54

build pipelines and you think game

play09:56

development build pipelines are going to

play09:58

be using bun like that that that's is

play10:01

that is that is that your target market

play10:03

cuz I hate to tell you

play10:05

something let's pretend you're right on

play10:08

what you just said I'm gonna go with a

play10:11

how about no how about no Scott okay

play10:13

because that's not I don't I I just

play10:14

don't think

play10:15

so I just I again I know maybe I'm a

play10:18

little jaded on this on this feature I

play10:20

just don't I I honestly all I foresee is

play10:22

just a maintenance nightmare like that's

play10:24

it I just foresee a maintenance

play10:25

nightmare I I I foresee a security black

play10:28

hole and that's it and it's going to be

play10:31

a huge distraction because all these

play10:33

little bugs are going to be constantly

play10:34

reported about the parser about how it

play10:36

handles this situation how it handles

play10:37

this situation all these different

play10:38

little cross-platform issues it's just a

play10:41

Time sync and a security Nightmare and a

play10:43

maintenance nightmare I have no idea why

play10:46

I do that anyways sorry okay we we'll

play10:49

I'll stop letting this section trigger

play10:50

me about things like compatibility

play10:53

issues and it's faster than the existing

play10:55

Shell by the way the best part about

play10:58

this is when there is a compatibility

play11:00

issue you're literally stuck dead in the

play11:02

water until they fix it while bun has a

play11:05

lot of new apis we've also made

play11:07

significant progress towards better

play11:08

nodejs compatibility in bun 1.1 the

play11:12

following mpm packages now work in bun

play11:15

we've also added and fixed various web

play11:17

standard apis in bun 1.1 websocket now

play11:21

passes the industry standard autobond

play11:22

performance test suite and I had the

play11:24

pass that site when I wrote uh

play11:26

televisions all new televisions run my

play11:28

websocket implementation uh for tvi and

play11:31

I had to pass all the autobond tests

play11:34

Auto Bon's a great by the way Autobon is

play11:35

a great great program it's super new if

play11:38

you haven't seen Autobon it's it's good

play11:40

it's a good time it just has like all of

play11:42

the uh it just has everything you need

play11:44

for websockets it's one of the greatest

play11:46

like test Suites of all time just

play11:49

absolutely fantastic Autobon is great

play11:51

yeah Autobon is fantastic can drop fast

play11:53

on a two Autobots with Decepticons wait

play11:57

what what is now stay T if you find an

play12:00

mpm package that doesn't work in bun

play12:02

please let us know by opening an issue

play12:04

in Bun's geta repository if it works in

play12:06

node.js but not in bun it's a bug in bun

play12:09

bun is fast in bun 1.1 we've made it

play12:12

even faster command line tools like TSC

play12:16

start two times faster than in bun one

play12:20

man you're going to save that extra

play12:21

you're going to save that extra 30 to 80

play12:25

milliseconds to then use TSC which will

play12:27

take 40 seconds to check your larger

play12:29

project a minute and a half 2 minutes

play12:32

have you ever ran TSC on like a large

play12:34

ass project it it can literally take

play12:37

minutes upon minutes I'm not sure if I

play12:40

I'm not sure if I'm

play12:42

purchasing that yes it's agonizing yeah

play12:45

it is agonizing no thankfully yeah every

play12:47

day

play12:53

yeah 1.0 es build starts 11 times faster

play12:58

and wait someone was saying someone was

play13:00

saying something did I miss something

play13:01

here oh you're just running TSC help

play13:04

getting the help screen

play13:06

[Music]

play13:08

out hell yeah hell yeah TSC help this

play13:14

thing this thing this thing is going to

play13:16

give you the tsse help faster than

play13:18

anybody else now me normally I would go

play13:20

in here and go tsse help but I can't run

play13:22

it cuz I don't even got

play13:23

node start two times faster than in bun

play13:27

1.0 es build starts 11 times faster and

play13:31

V and prettier both start faster in bun

play13:34

1.1 we've also optimized a ton of

play13:37

node.js apis I mean startup by the way

play13:40

start so the thing that makes startups

play13:42

so

play13:43

important probably not for you as a

play13:46

developer and this is probably where

play13:48

they're failing to kind of really sell

play13:50

this is that if you got to remember what

play13:53

is the what is the play of bun at least

play13:54

my assumption the play of bun is that

play13:56

bun and I'm I'm pretty sure

play13:59

this is all public knowledge I have no

play14:01

Insider knowledge or anything like that

play14:02

but I I assume the play of bun is to

play14:04

offer you some sort of edge-based

play14:06

JavaScript environment in which can be

play14:08

the fastest industry startup time and so

play14:12

these these cold startups and all that

play14:14

is is is all for edging right it's not

play14:15

really for you you know what I mean it's

play14:18

not really for you to be the

play14:21

ones enjoying this it's much more

play14:23

important in aggregate for servers we

play14:26

love edging yeah I'm call me Bill Gates

play14:29

Edge Lord over here okay Edge

play14:33

Lord in bun 1.1 the node HTTP server is

play14:37

29% faster than in bun 1.0 I don't I

play14:41

don't like this uh performance test at

play14:43

all uh it it is very unfair some of the

play14:46

bun stuff I I don't know how complete

play14:48

their implementation is yet so I'm very

play14:49

curious if they would speak on this but

play14:51

with node you can run things like data

play14:53

dog and be able to get all this extra

play14:54

information out about every single

play14:56

request and all that cuz they have a

play14:57

bunch of async hooks where last time I

play14:59

checked that wasn't true with bun now

play15:01

they may have changed things if they

play15:02

both allow all the same async Hooks and

play15:04

all the different promise like the async

play15:07

resolvers and all that that exist and

play15:10

they're faster like that's absolutely

play15:12

incredible great work but if they still

play15:14

don't if they're not in parody with node

play15:17

then it's kind of like a fake ass

play15:18

exercise you know what I mean it's not

play15:19

real it's not actually doing anything

play15:21

you know what I mean it's not actually

play15:25

uh you know and using FS re to list

play15:29

files in a directory is 22 times faster

play15:33

than in OJs but we didn't just make fun

play15:35

faster and Bun 1.1 we've added new apis

play15:39

to make your life easier as a developer

play15:41

I'm still struggling with how baritone

play15:43

his voice is I've met him in person and

play15:45

all

play15:45

that and I've heard him talk but it's

play15:48

never really struck me they just have a

play15:49

really whatever microphone they're using

play15:52

just really captures that that those

play15:54

deep sassy

play15:56

tones just so well bun glob is a fast

play15:59

API for matching strings and files using

play16:01

glob patterns it's similar to popular

play16:04

npm packages like Fast glob except it

play16:07

could match up to three times

play16:09

faster we've

play16:11

also also uh this feels like a crazy

play16:16

this feels like a crazy performance

play16:20

comparison I don't know if you guys

play16:22

caught that that's not an M that's an

play16:26

N that's crazy

play16:29

performance testing I would I I uh I am

play16:32

I I am doubt let's just say I'm doubting

play16:35

I'm doubting hard

play16:37

[Music]

play16:39

doubting because uh I don't even like I

play16:43

just am not convinced it is accurate

play16:45

enough whatever testing method you're

play16:47

using to be able to test specifically

play16:49

for

play16:52

that we've also added bun sver a buil

play16:55

API for parsing and sorting sver strings

play16:58

bun sver is up to 20 times faster than

play17:01

the popular node sver package again

play17:03

microc seconds I mean this is again it's

play17:05

very hard for me to to buy a lot of this

play17:08

stuff okay I have a feeling there's a

play17:10

security hold yeah again uh feeling

play17:13

there's a security hold performances

play17:14

usually comes with the security hole you

play17:15

know you're you're right because

play17:17

typically to the the easiest way to be

play17:19

faster than somebody else or to be

play17:22

faster as a project is to just not do as

play17:25

much like that's that's the that's the

play17:27

only way to truly make Real Performance

play17:29

win is just don't do as

play17:32

much especially when it comes to jabber

play17:34

script be fast don't do it really

play17:37

slowdown comes with from all the back

play17:39

doors that's how you know you've been

play17:41

back doored is when bun slows

play17:43

down how is Zig compared to C++ honestly

play17:46

stupid argument uh if someone tries to

play17:48

make that as an argument it's a dumb

play17:49

argument here's the simple reason why uh

play17:53

zigg and C++ both manage memory right

play17:57

they're both at the tip of the triangle

play17:58

for performance performance right you're

play17:59

going to see rust in here uh you're

play18:01

going to see C in here you're going to

play18:03

see any other language it does not have

play18:05

a runtime so there is no um there is no

play18:09

a garbage collector all of these don't

play18:11

have garbage collectors they don't have

play18:13

any of that they're just in their Odin

play18:15

would be in here as well right it's all

play18:16

that kind of stuff so they're at the tip

play18:19

of the Pyramid of performance right so

play18:21

don't ever like it's it's a dumb it's

play18:23

like it's a dumb comparison to make

play18:25

because it's very very hard it it really

play18:28

it it's skill issues who writes the

play18:29

slowest and who writes the fastest

play18:31

especially if they're all compiling with

play18:33

llvm then you're just like well who who

play18:36

did who does that the bestest right I

play18:39

think Zig has a non llvm build if I'm

play18:41

not mistaken so therefore maybe they

play18:43

have some sort of like hey we have some

play18:45

sort of

play18:46

better build optimization that's not

play18:50

llvm therefore we we're the winner like

play18:53

okay then maybe yeah maybe there's a

play18:54

there there but for now if they're all

play18:56

compiling to the same intermediate Lang

play19:00

Ang it's just like it's not that it's

play19:03

it's it's really not a very interesting

play19:05

it's not

play19:06

a it's it's yeah surely performance

play19:09

difference between these lower level

play19:10

language is negligible absolutely it is

play19:12

one of the ways we validate that bun is

play19:14

efficient and correct is by using its

play19:15

built-in testr runner in bun 1.1 we've

play19:18

made it even easier to switch from just

play19:21

by the way I do think this is great I I

play19:23

really truly think this is a great

play19:27

iteration of of java script is put

play19:29

bringing in test test stuff into the

play19:33

into the runtime itself can we all agree

play19:36

that like this is good this is really

play19:39

good it's it's crazy that we're this far

play19:42

and it's only starting to happen right

play19:43

now A buns apis are super nice yeah I'm

play19:45

sure they are but this is a good this is

play19:47

a good first step okay every other

play19:50

normal language in the

play19:52

universe has it it's terrible I do not

play19:55

see how it's terrible I see that this is

play19:57

this is only a win

play19:59

can you explain to me how that's

play20:02

terrible I feel like you've been

play20:04

JavaScript pilled too long for for it to

play20:06

be terrible if you think it's terrible

play20:08

my guess is that you only exist in the

play20:10

land of jav JavaScript expect matchers

play20:13

we've also added module mocking which

play20:15

supports both commonjs and esm Bun is

play20:18

able to update mock very very nice I

play20:20

Mock's great or uh mock Library within

play20:23

bun fantastic absolutely happy about

play20:25

that the work between commonjs and esm

play20:27

very very good uh mocking though

play20:35

um that's how I feel about mocking when

play20:38

you're

play20:40

mocking remember you're testing your

play20:43

feelings about how the universe should

play20:46

work just remember that just remember

play20:49

that all right people are saying W take

play20:51

bertron okay what what' you

play20:53

say uh pon pon pon

play20:59

reasons [ __ ] okay okay I gosh I just

play21:04

don't even know what that you are

play21:05

mocking uh future you Corgi just hold on

play21:09

Corgi before you can run code you need

play21:12

to install dependencies that's why bun

play21:14

is also a package manager in bun 1.1 we

play21:17

added support for dependency life cycle

play21:19

scripts unlike npm can we just take a

play21:25

second and just say one of the biggest

play21:27

failures

play21:31

of node is not as having npm as some

play21:34

like separate but required

play21:37

thing like where does where does node

play21:39

start and where does npm end right

play21:42

they're like they they are the same

play21:45

thing I know people want to be like no

play21:47

that's not true it's like is it is it is

play21:52

it not

play21:55

true am I being April fooled or is it

play21:58

your birthday

play22:02

uh the bun logo is his

play22:11

head it's not funny okay that's not

play22:14

funny we're

play22:20

not flip take it out flip take flip take

play22:23

that out flip take it

play22:27

out

play22:31

get it together all

play22:32

right bun will only run scripts from

play22:35

packages that are in The Trusted

play22:36

dependencies list in your package Json

play22:39

the 500 most depended on oh that's nice

play22:42

that's nice you can you can say which

play22:44

ones that allow scripts to be ran that's

play22:46

cool I like that I like it from packages

play22:51

that are in The Trusted dependencies

play22:52

list in your package Json the 500 most

play22:54

dependent on packages on npm like es

play22:56

build are already trusted by bun and

play22:58

we'll

play23:00

just security

play23:11

[Laughter]

play23:15

defeated it only needs to be in the top

play23:18

500 that's it I

play23:21

mean the fact that dude I mean I know I

play23:25

know it's not funny it's not funny

play23:29

but the fact that it t that we have a

play23:32

top 500 as like a reasonable number is

play23:35

hilarious considering most thing I mean

play23:38

what the hell are we how are we doing

play23:41

500 500 what how many dependencies do

play23:45

you

play23:46

need happy birthday thank you

play23:49

Corgi work we've also made it even

play23:52

easier to migrate from npm install to

play23:54

bun install when you run bun install for

play23:56

the first time in a repository bun

play23:58

automatically migrates from package lock

play24:00

Json to Bun's lock file bun lock b we

play24:03

want developers who use npm or yarn to

play24:05

feel at home when they switch to bun

play24:08

bun. that's a good move also by the way

play24:10

that's a really good move uh by doing

play24:12

that that is uh you're kind of ensuring

play24:14

your Supremacy because really what you

play24:16

want what you truly want is that you

play24:19

want developers to start using bun in

play24:21

nonb buun projects so that way it just

play24:25

feels like that's the default one you

play24:28

actually use you don't actually use node

play24:29

like no developer actually uses node we

play24:31

just use we we we use bun and so like

play24:34

that's that's that's that that's a huge

play24:36

that's a huge

play24:38

W I understand 500 depenses is not a lot

play24:41

for a node project but it's a lot for

play24:43

every other language in the universe it

play24:45

feels crazy okay it personally

play24:48

like it feels

play24:50

crazy okay to me that that you'd have

play24:54

500

play24:56

dependencies okay

play25:01

wild made a lot of improvements to Bun's

play25:04

developer experience we've simplified

play25:06

stack traces so it's easier to find the

play25:08

context that matters most to you on

play25:11

we've simplified stack traces so it's

play25:13

easier to find the I don't know if I

play25:15

like that I kind of like because a big

play25:17

problem I have with this is that

play25:20

sometimes you have this problem where uh

play25:22

where an actual

play25:24

issue does exist within their stuff and

play25:27

you kind of want to be able to peruse

play25:30

verbose is always better I I would I

play25:32

would stag traces so it's easier to find

play25:34

the context that matters most to you

play25:37

long as that's an opt-in feature I don't

play25:38

see that's a

play25:40

problem I don't think that's a problem

play25:43

if it's an opt in

play25:46

feature we've also added syntax

play25:48

highlighting to the snippet of code

play25:50

above errors for better readability no

play25:53

that's it that's bun 1.1 bun is faster

play25:57

more reliable

play25:58

and has tons of new apis and Bug fixes

play26:01

most importantly bun now supports

play26:03

Windows to get started with bun Ren any

play26:06

of the following install commands in

play26:07

your terminal we fixed over 900 bugs

play26:09

since bun 1.0 and stability is our

play26:12

number one priority nice if you

play26:14

encounter a I I really think that I mean

play26:16

personally I think bun jumped the shark

play26:18

or not jumped the shark jumped the gun

play26:20

on uh on not making more stability

play26:25

earlier uh meaning that they went 1.0

play26:28

but you're still getting seg faults and

play26:29

stuff and I I really think that that

play26:31

hurt Bun's initial adoption curve they

play26:34

should have remained in this beta stage

play26:36

a little bit longer and just had uh and

play26:39

just had enough time to make sure that

play26:40

it's really really there before they

play26:43

went that because it it is I think I

play26:45

think me personally it really hurt The

play26:47

credibility for

play26:50

me bug that we still haven't fixed don't

play26:53

forget to upload the GitHub issue or

play26:54

create a new one and if you want to join

play26:56

our team check out our careers page

play26:58

we're hiring system Engineers to help us

play27:00

shape the future of JavaScript bun 1.1

play27:04

is still just the

play27:07

beginning I do like the only way to make

play27:10

JavaScript remotely good is that you

play27:12

have to hire a bunch of people who are

play27:14

excellent at systems engineering and

play27:16

they have to do a mon a stupendous and

play27:18

monumentous amount of effort to

play27:21

get it to

play27:24

work it's an irony it's it's an irony

play27:27

for sure that those who write the things

play27:30

that allow you to write JS do not get to

play27:32

write

play27:33

JS there there's something funny there

play27:35

something funny something funny um trust

play27:39

is a bucket that fills one drop at a

play27:41

time and when it spills it empties

play27:42

completely that's a good way to put it

play27:43

that's a good way to put it uh I mean

play27:45

overall I think Bun's doing great stuff

play27:46

I hope you guys don't take that this

play27:47

video some like super negative viewpoint

play27:50

on bun it's not a negative viewpoint on

play27:53

bun it's just that I don't like fake

play27:55

like I don't like fake fake metrics I

play27:57

think that if it was framed as like you

play27:59

know since Bun's going this direction

play28:01

startup time's really important and this

play28:02

is why we love uh this is why we love

play28:05

this I think the other ones like the

play28:07

nanc comparison and the microsc

play28:09

comparison like I'm I'm like super doubt

play28:11

on that one like I'm I'm high skeptic

play28:14

like if there's a big win explain why

play28:17

it's a big win also I think something

play28:19

that really is needed explaining why

play28:21

you're different why are you faster like

play28:24

don't just say you're faster like why

play28:25

are you faster these are the reasons why

play28:27

we do it because if you you truly do

play28:28

have like a categoric hole in what you

play28:31

do not provide meaning you still don't

play28:33

have all those async libraries and utils

play28:35

that no no. JS provides then yeah like

play28:38

to say that I think is a really

play28:40

reasonable thing to do and it builds

play28:41

trust like if you can build trust it's

play28:43

very important and one of the best ways

play28:45

to build trust is to explain why you're

play28:47

different and why that makes you faster

play28:50

you know what I mean because if you

play28:52

don't do that and then people are like

play28:53

yeah you're faster but look at what you

play28:55

don't provide then it just looks like

play28:57

you're lying right right cuz I can only

play28:59

I can literally only take it that it's

play29:02

not out of ignorance that you're doing

play29:03

it

play29:04

maliciously right because you've already

play29:07

done this multiple times and people have

play29:08

already called you out multiple times so

play29:10

if you continue to do it it feels

play29:12

malicious you know what I mean so

play29:15

hopefully hopefully those are real

play29:18

metrics with real compatibility with

play29:20

real you know onetoone stuff uh would

play29:23

you prefer a JS as it is now with its

play29:26

problems or a metaverse system uh owned

play29:28

and operated by epic games or the like I

play29:31

don't

play29:32

know I don't know like the real talk I I

play29:36

just would prefer less I think everyone

play29:38

that writes JavaScript like they just

play29:41

need to go write something else for a

play29:42

while like if you've never written

play29:44

another language than JavaScript you

play29:45

should just try it out get good at

play29:47

anything try Zig why the hell not try

play29:50

Zig try go try rust try o camel try

play29:55

Elixir try

play29:57

anything just do something other than

play30:00

JavaScript for a little bit of time try

play30:02

a different system feel it out feel and

play30:04

understand why something is good

play30:06

something is bad understand some of the

play30:08

the maybe some of the holes that you

play30:09

you're in you don't realize you're in

play30:11

you know what I

play30:12

mean sometimes you don't realize that

play30:15

you you've you've created

play30:18

a a false perception of the world Elixir

play30:21

yeah

play30:23

Elixir anyways hey the name the name is

play30:26

bun 1.1 is out huh huh

Rate This

5.0 / 5 (0 votes)

Related Tags
JavaScriptBun 1.1PerformanceCross-PlatformAPI UpdatesDeveloper ToolsPackage ManagementWindows SupportSystems EngineeringSoftware Development