HomeVideos

Open Source might change forever

Now Playing

Open Source might change forever

Transcript

329 segments

0:00

Last week, Anthropic released this

0:01

marketing video in which they're like,

0:02

"Hey, we built a C compiler from

0:05

scratch." You know, like we just walked

0:06

away and two weeks later was like poof,

0:08

C compiler and everything worked. I

0:10

could build Linux. It was easy peasy.

0:13

Engineering's over. Now, of course, this

0:15

led a bunch of people to kind of

0:16

actually say, well, hey, it wasn't

0:17

really from scratch. He used a bunch of

0:19

test suites and everything. But

0:20

Cloudflare, when they saw that, they

0:22

said, well, wait, wait, wait a second.

0:24

Hold my beer. I got an idea. And they

0:26

decided they're going to rebuild Nex.js,

0:28

JS, which is if you don't know anything

0:30

about Nex.js, just imagine a framework

0:32

and you put a framework in a framework.

0:34

That's effectively what Nex.js is. They

0:37

call it a meta framework. Okay, very

0:39

metaphysical. Okay, I actually I don't

0:41

even get that joke. And they make

0:43

outrageous claims about it. 57% smaller

0:46

client bundles, 4x faster builds. All

0:49

right, so we're going to obviously have

0:51

to go over this. We're going to talk

0:52

about these claims. We're going to

0:54

actually kind of understand the whole

0:56

purpose to everything. And even more so,

0:58

we should probably talk about the

1:00

implications of this. But first, I don't

1:02

know if you know this, March 27th, I'm

1:04

going to be in San Francisco. I'm going

1:05

to be doing an event for Century. If you

1:07

want to come sign up, the link will be

1:08

in the description. It's going to be a

1:09

lot of fun. A lot of founders and

1:11

engineers are all going to be hanging

1:12

out at the Chase Center. Sports ball. Am

1:14

I right, boys?

1:16

Yeah. You know me and that sports ball.

1:18

Hey, but if we're talking pickle ball,

1:20

dog, I'll see you on the court. Anyways,

1:23

link will be in the description. Come

1:24

hang out. It's going to be awesome. So,

1:26

first to kind of understand what's

1:27

happening, if you don't know anything

1:28

about Nex.js, it's chronically been

1:30

known on the internet as a very

1:31

difficult thing to host if you're not on

1:33

Versel. Open next right here, which was

1:35

created, of course, by Dax. Look at Dax.

1:37

Look at all that money on him. Classic

1:38

DAX right there. It was created with the

1:40

sole purpose of making hosting Nex.js

1:43

not on Versel easier. And there's a lot

1:45

of reasons why this is difficult. No

1:47

need to go into them. Just know that

1:48

there's some hurdles one has to jump

1:50

over to make this easy. Now, what makes

1:52

this really interesting is if you

1:53

remember with Anthropic,

1:55

they used the 37 years of engineering

1:57

test to be able to produce a C compiler

2:00

that they probably already had memorized

2:01

in the weights. But this one is is

2:03

different because Cloudflare used the

2:05

1700 viest tests and 380 playright

2:08

endtoend test to effectively recreate

2:11

Nex.js, JS, but instead of having kind

2:13

of the proprietary or the turbo pack or

2:15

whatever you would call that kind of

2:17

build style, instead it was something

2:18

that'd be a lot more friendly to say

2:20

Netlfly or Cloudflare. And in one week,

2:22

they were able to actually like get it

2:24

to work. Now, this part actually right

2:26

here terrified me. We've been working

2:28

with the National Design Studio, a team

2:29

aiming at modernizing every government

2:31

interface on their beta sites, cio.gov.

2:34

They're already running Vinex in

2:35

production. Okay. Hey brothers. I mean,

2:38

hey, Cloudflare, I love you, but

2:39

[laughter]

2:40

let's not use experimental frameworks on

2:42

the government. Oh my gosh, what are we

2:45

doing, dude? It's a fun time. Hey, we

2:47

all get to laugh during the SL

2:49

apocalypse. Okay. Uh, actually, I have

2:50

to interrupt myself uh, quickly. A

2:52

couple hours later, I was doing some

2:53

more reading on this and I realized that

2:54

I kind of misrepresented stuff right

2:56

here. 94% of the NextJS 16 API surface

3:00

sounds very intense, but if you go and

3:02

look at how much of the actual Next.js

3:04

JS test coverage this Cloudflare port

3:06

actually has it's 13% dev 20% end to end

3:10

and 10% production. There are 13,78

3:14

test cases and there's only 17380

3:17

end to end ones. So very interesting.

3:20

One week of having an agent go hog wild.

3:22

I mean it's impressive it's made it this

3:23

far and people are actually using it.

3:25

Still a little worried about that

3:26

government thing though. Okay. I just

3:28

just throw that out there. Okay, so

3:30

let's talk about the claims. 4x faster

3:32

builds and 57% smaller. So, we'll get to

3:35

the second one in just a moment. The

3:37

first one, I can understand why this

3:39

happens. First off, they have just

3:41

different build systems, so maybe roll

3:42

down just truly is that much more

3:44

performant than say Turbo Pack. I'm not

3:46

saying which one's actually better here,

3:48

but let's just pretend like that is a

3:49

real thing. But there's a lot of things

3:51

that it doesn't do. So, this is a very

3:52

important part. this V next or whatever

3:55

they're calling it uh this this new

3:57

Nex.js Cloudflare edition. It doesn't do

3:59

quite everything that Next.js does right

4:02

here. Vex does not support static

4:04

pre-rendering at buildtime. In Nex.js,

4:06

pages without dynamic data get rendered

4:08

during next build and served as static

4:10

HTML. If you have dynamic routes, you

4:12

use generate static params to enumerate

4:14

which pages to build ahead of time. Vext

4:16

doesn't do that yet. It's obviously

4:19

doing less work, but that's not quite

4:21

the whole story. This I actually find

4:23

this part to be super interesting.

4:24

Introducing trafficaw aare

4:26

pre-rendering. Next.js pre-renders every

4:28

page listed and generates static params

4:30

during the build. A site with 10,000

4:33

product pages means 10,000 renders at

4:35

build time even though 99% of those

4:36

pages may never receive a request. Build

4:39

scales linearly with page count. This is

4:41

why Nex.js sites end up taking 30 minute

4:43

builds. Okay, I ever been there. I

4:45

didn't know about this. I have been in

4:47

places where there are 45minut

4:49

Typescript builds. I do get this. So, we

4:51

take traffic aare pre-rendering TPR. By

4:54

the way, front-end people love

4:57

abbreviations. We already I mean, they

4:58

just got done saying ISR just just a

5:01

little bit ago. Okay, they're all about

5:02

these things. So, we built traffic aware

5:04

pre-rendering. It's experimental today

5:06

and we plan to make it the default once

5:08

we have a more real world testing. The

5:10

idea is simple. Cloudflare already is a

5:12

reverse proxy for your site. They

5:13

already know everything that's being

5:14

visited. So, why not use that

5:16

information and just build the things

5:18

you need? And as you can see right here,

5:20

12,000 unique paths, 184 pages cover 90%

5:24

of the traffic. Actually, pretty cool.

5:26

Pretty based, I'd say. All right, so the

5:27

next two parts I'm actually very excited

5:29

to talk about. So, the first one being

5:30

the 57% smaller. Okay, I I'm just going

5:34

to throw this out there. I don't believe

5:35

you. And hold on, just let me just let

5:37

me just let me just back that up for a

5:39

second. Okay, I've been around the block

5:40

for a while and I've seen a lot of

5:42

performance claims and I have been a

5:44

part of grand rewrites and I've seen

5:46

things be super fantastic and then

5:48

become well equal if not worse than the

5:51

other one. So, there's only a couple

5:53

possibilities that we're seeing. First,

5:55

we are seeing the early days of V Next,

5:58

meaning that not all the features are

6:00

there, not all the things that made uh

6:02

Next.js big are there. So, as time goes

6:05

on, size will go up and then they'll

6:07

become much closer, like within 5% of

6:09

each other. I think this is probably the

6:11

most likely answer is that Vinex is just

6:14

not doing things and that saves them a

6:16

lot because the only other answer is

6:18

that Next.js has so thoroughly screwed

6:22

up. They're sending effectively 2x more

6:25

than they need to. And honestly, I

6:28

refuse to believe that. Like, just a no

6:31

way. I did corner a uh Cloudflare

6:34

engineer and I did ask them uh many a

6:36

times and at the end of the conversation

6:38

he's like it's real and I was like I

6:40

don't believe you. That was my only

6:42

answer. I just no you can't just do you

6:45

can't just have 50% smaller and

6:48

everything else the same. I just not

6:50

believe in it but in the small chance

6:52

that it's actually true. That's

6:53

incredible. What did MaxJS do to screw

6:57

this up? But the performance does seem

7:00

to be like something's going on because

7:02

if you look right here, this slop fork

7:04

is faster and smaller. You can see right

7:07

here, people's P99 times are actually

7:10

dropping. Okay, so there's a there

7:13

there. I have no idea the validity of

7:15

the data or anything. But if this is to

7:17

be believed by this Cloudflare employee,

7:20

which again, I mean, that's trusting,

7:22

you know, the old fox with the hens as

7:24

they say. But if this is to be uh true,

7:26

then then oh my gosh, that's actually a

7:28

dramatic improvement. But the most

7:30

important topic is what are the

7:32

implications from this? Because the C

7:33

compiler was just like, oh, we all kind

7:35

of laughed at anthropic because of how

7:37

much they just misrepresented it.

7:38

Whereas the Cloudflare one, they're

7:40

like, no dog, we're running this in

7:42

production. Yeah, people are just using

7:43

it. Okay, so this one's a bit more real.

7:46

And they did the exact same strategy.

7:48

The tests were open. They took

7:50

everything. They are effectively able to

7:52

brain drain it like Silicon Valley. And

7:54

boom, they have their own version. It

7:56

makes me start thinking that maybe

7:58

something like SQLite is what we're

7:59

going to start seeing. So SQLite, for

8:01

those that don't know, part of their

8:03

quality assurance is this test harness

8:05

number three. Now test harness number

8:06

three or TH3 uh is the test suite is a

8:10

private set of test cases used by the

8:12

SQL light to 100% MC/DC in an asd

8:16

delivered configuration. The TH3 sources

8:19

are served on the same server as the

8:20

other SQLite repositories but differ

8:23

from the others in being proprietary.

8:26

The TH3 code is only accessible to

8:29

SQLite developers. So think about that.

8:32

SQLite keeps a large part of their test

8:34

private. Now, for a long time, did this

8:37

make a lot of sense? Honestly, I don't

8:38

really understand why they did that.

8:40

That's not the only thing they keep

8:41

private. They also have some other

8:43

things that they keep private, such as

8:44

this lib fuzzer. It's to kept private,

8:46

so we do not want hackers gaining access

8:47

to that technology. Sounds like I don't

8:50

know what's going on there, but that

8:51

sounds like Batman level going on.

8:53

And the name of it looks just like a

8:54

typo. Like, I mean, that looks

8:56

fantastic. I want whatever's going on in

8:58

there. But any this actually has kind of

8:59

an interesting impact, right? Do you

9:01

think we're going to see the day where

9:03

say companybacked open source no longer

9:06

like makes public any sort of testing

9:08

because one can imagine that if you have

9:10

a sufficiently large project, you can't

9:12

just simply just say, "Hey AI, go make a

9:14

copy." It'd be very very difficult. Will

9:16

we just start seeing kind of a large

9:18

change in open source? Because what's

9:19

the purpose of producing all this stuff

9:21

if somebody else can just say, "Hey,

9:23

that's mine now." or even more

9:24

importantly, your competitor can just

9:26

say, "Oh, hey, that's mine now."

9:30

Interesting. At least interesting to see

9:31

what's going to happen over the course

9:32

of the next couple years. I think we may

9:34

end up seeing perhaps the end of making

9:38

money off of open source by having a

9:40

company also do something special with

9:41

the open source because people so easily

9:44

can now copy that. It's a very

9:45

interesting future because this fork

9:47

that they have created, I wonder how

9:49

maintainable is it? Is it are they

9:50

permanently just required to live in

9:53

this slop universe until someone can

9:55

finally wrangle their head around it?

9:57

Because the attempt to rewrite Nex.js to

9:59

be able to work on other platforms has

10:01

been tried multiple times and has been a

10:03

failure quite a few times. Cloudflare

10:05

even mentions that they have attempted

10:07

multiple times. And so what do you do

10:09

with this just steaming hot pile of code

10:12

that you've now been delivered? I don't

10:14

know. There's a lot of just like weird

10:16

world implications in this. We are

10:18

seeing truly for the first time a major

10:22

technology that's going to be used by a

10:23

lot of people in which I don't think any

10:26

individual can reason about what it's

10:28

actually doing currently. The name

10:34

well

10:40

I don't even have a joke. I don't I I

10:42

don't even have a joke to make. Okay.

10:43

The name's the premigen. That's it.

10:45

That's all I got for you. A gen. Hey, is

10:48

that HTTP? Get that out of here. That's

10:50

not how we order coffee. We order coffee

10:52

via SSH terminal.shop. Yeah, you want a

10:55

real experience. You want real coffee.

10:58

You want awesome subscriptions so you

10:59

never have to remember again? Oh, you

11:01

want exclusive blends with exclusive

11:04

coffee and exclusive [music] content?

11:06

Then check out Cron. You don't know what

11:08

SSH is?

11:10

>> Well, maybe the coffee is not for you.

11:13

[singing]

11:14

>> [music]

11:15

>> in hand.

11:17

Living the dream.

Interactive Summary

The video discusses Cloudflare's project "Vinex," a re-implementation of Next.js, inspired by Anthropic's claim of an AI-built C compiler. Cloudflare used existing Next.js tests to quickly create a version optimized for their platform, initially claiming 4x faster builds and 57% smaller bundles. While faster builds might be partially attributed to a new traffic-aware pre-rendering system and fewer implemented features, the smaller bundle claim is met with skepticism, especially given Vinex's currently limited test coverage. The project raises crucial questions about the future of open-source software, particularly whether companies will begin privatizing their test suites to prevent competitors from easily replicating their work using AI-driven tools, citing SQLite's private testing approach as an example.

Suggested questions

9 ready-made prompts