See all Lex Fridman transcripts on Youtube

youtube thumbnail

Brendan Eich: JavaScript, Firefox, Mozilla, and Brave | Lex Fridman Podcast #160

2 hours 59 minutes 18 seconds

🇬🇧 English

S1

Speaker 1

00:00

The following is a conversation with Brendan Eich, creator of the JavaScript programming language, co-founder of Mozilla, which created the Firefox browser, and now co-founder and CEO of Brave Software, which has created the Brave browser. Each of these are revolutionary technologies. JavaScript is 1 of the most widely used and impactful programming languages in the world. Firefox pioneered many browser ideas that we love today or even take for granted today.

S1

Speaker 1

00:31

And Brave is looking to revolutionize not only the browser, but content creation online and the nature of the internet to make it fundamentally about respecting people's control over their data. Quick mention of our sponsors, the Jordan Harbinger Show, Sun Basket Meal Delivery Service, BetterHelp online therapy, and 8 sleep self-cleaning mattress. Click the sponsor links to get a discount and to support this podcast. As a side note, let me say that there's a tension between theory and engineering that I've been thinking a lot about.

S1

Speaker 1

01:05

I tweeted something like, good execution is more important than a good idea, but 1 helps the other. I think the wording of that sucks, but what I mean is a good idea is a must. But in my experience, good ideas are in abundance. Good execution, on the other hand, is rare.

S1

Speaker 1

01:23

I think some mix of good timing, good idea, and good execution is essential. Getting that mix right is tough, and Brendan somehow, multiple times in his career, did just that. I'm starting to believe it's more art than science, like most interesting things in life. If you enjoy this thing, subscribe on YouTube, review on Apple Podcast, follow on Spotify, support on Patreon, or connect with me on Twitter, Alex Friedman.

S1

Speaker 1

01:48

And now, here's my conversation with Brendan Eich.

S2

Speaker 2

01:53

When did you first fall in love with programming?

S3

Speaker 3

01:56

I didn't program a lot when I

S4

Speaker 4

01:57

was in high school, but I

S3

Speaker 3

01:58

had a friend who had a Commodore

S4

Speaker 4

02:00

PET. And after we saw Star Wars, he said, hey, let's make a basic program that does the Death Star Trench run. And it was just simple 2D graphics. And I didn't know what I was doing, so I just helped him out on the math and stuff like that.

S4

Speaker 4

02:14

I was a math and science kid. I was really into the HP calculators of the early mid 70s. These were the RPN. They were really strongly built and as Art Goldfinger said of gold, divinely heavy.

S4

Speaker 4

02:27

There's probably some gold in them too, gold metalization. But They were awesome calculators and they had all the scientific functions, so I was really into that. So I aimed towards physics. I was

S5

Speaker 5

02:38

a little late for the, I think, the 20th century golden age, and I read a lot of science fiction, so I was like, yeah, it's on to hyperdrives and warp drives. And physics was not gonna get there quickly, And I started hacking on computers while I was studying physics as an undergraduate at Santa Clara University. And I dodged the Fortran bullet because I was in the science department instead of the engineering department where they still did Fortran, card decks.

S5

Speaker 5

03:05

I think they had an auto collator. But we were using Pascal and I got 1 of the first portable C compilers ports to the deck mini computers we were using. And I fell in love with programming just based on procedural abstraction, Pascal, just what now would be considered old school, like structured programming from the 70s. Niklaus Wirth, the creator of Pascal, was a good writer and a good pedagogue.

S5

Speaker 5

03:36

He always, at ETH, would do these courses where it's like build your own computer, build your own compiler, build your own operating system. From scratch. Yeah, kind of. And I know some people who are grad students under him and said he was, he would torture the students with things like this custom email system that had 25 word limit.

S5

Speaker 5

03:55

And things like that.

S2

Speaker 2

03:56

I unfortunately dodged both the Pascal and the Fortran bullets. Could you maybe linger on the Pascal, like what kind of programming language was it? What is it reminiscent of today?

S2

Speaker 2

04:08

Because it sounds like it may have had an impact on your own trajectory.

S5

Speaker 5

04:12

Yeah, it was in the Algol family, and Algol was the big successful language design and compiler project in the 60s. It had a successor called Algol 68, which was ambitious but not as successful. But Pascal was kind of a wordy procedures and functions language.

S5

Speaker 5

04:32

It distinguished between functions, which return a value, and procedures, which don't, which just compute. And you could say that whole Algol family went into Ada. Pascal had a second life, thanks to Borland with Turbo Pascal, which was hugely successful, I think in large part due to Anders Helsberg, who then went to Microsoft and did C Sharp and done that with his team there, and has done really well, doing TypeScript, type JavaScript. So yeah, there's a lineage here, But I was also interested in C and Unix by the time I was an undergrad because people were bringing Unix up on all sorts of hardware.

S5

Speaker 5

05:09

I had some friends who were doing their own wire wrapped computers,

S1

Speaker 1

05:12

6820

S5

Speaker 5

05:13

maybe. And I was wire wrapping for my engineering course, 1609 or something simpler, building a computer on a board. And I wanted to build a more ambitious 1 and port Unix to it, but I picked the wrong processor. I picked the National Semiconductor NS16032, which was this amazing CISC, Complex Instruction Set Computer, and not the reduced instruction set computers that were just being contemplated into the

S2

Speaker 2

05:42

mid 80s. And RISC ultimately won out.

S5

Speaker 5

05:45

RISC-I in some ways, it dissolved into, you have both now, you have these super scalar architectures where like Intel has kept probably too much backward compatibility at the instruction level, but that's just a, there's a front end that parses that into these, you know, these wide internal instructions. So, you know, the very long instruction word research that was also interesting at the time kind of became the microarchitecture inside the backward compatible Intel. But I picked a national semi-chip and it never got made successfully.

S5

Speaker 5

06:14

It was full of bugs and I never could have brought it up. But I went on out of physics after 3 years into math, computer science. And like I said, I did it because I saw, I was being sort of childlike and naive about physics and I thought, meanwhile the valley is go-go for computers. The Apple II, right, the PC, the Intel

S1

Speaker 1

06:36

8086,

S5

Speaker 5

06:39

8088-based PC, the IBM, you know, gave Microsoft the future for, you know, somewhat fishy deal.

S2

Speaker 2

06:46

So it was wide open in the computing space, but in physics, you were as optimistic about physics as

S5

Speaker 5

06:52

anybody. No, I mean, I was 1 of 3 brothers who were all in the same grade. I have a twin and a younger brother who skipped second grade and was with us the whole time after that. And he went on, he actually studied under Kip Thorne at Caltech.

S5

Speaker 5

07:07

But he also didn't, he ended up in software. He didn't talk about physics.

S2

Speaker 2

07:12

Does it make you sad that theoretical physics, even with string theory, hasn't really had any foundational breakthroughs in the latter part of the 20th century.

S5

Speaker 5

07:23

Yeah, in fact, I'd say the problem is theory over experiments. I would say we need more Aristotle and less Plato. Mathematics is not all physical.

S5

Speaker 5

07:33

There are lots of mathematics that cannot be realized as far as I know in this world. So to understand the world, you need to do experiments. You need to not just dream up inductive theories that could have lots of alternative theories competing with them, with no way to decide between them, except aesthetics, which is not a good guide, in my opinion.

S2

Speaker 2

07:52

I don't know if you are friends with, have a relationship with Elon Musk. Where's the, in terms of what you would love to see our society investing in building up. Is it closer to Elon or is it closer to Feynman and Einstein and those?

S5

Speaker 5

08:08

Well, those gentlemen are no longer with us and I think that's noticed. So, like I said, the real glory days of physics, the famous pictures from Germany before the second war were just a fantastic assembly of brains, Schrodinger and Einstein. Physics, I think, took a wrong turn that maybe all of, I would say, Western science took in going for models over reality, right?

S5

Speaker 5

08:33

You see this in all sorts of fields. Now, we can build models that are very predictive and generative and then we build actual devices or semiconductors, things like that. That's good, I'm not dismissing that. We need good models, we need to experiment and prove them and test them.

S5

Speaker 5

08:49

But the problem I've seen in physics, which you see certainly in economics, the dismal science, and you see surprisingly in other so-called hard sciences is models that don't really have to be tested against reality. They can instead become policy tools or they can become, like I said, 1 of a large family of alternate theories that could be as predictive, but Nobody's doing the winnowing out.

S2

Speaker 2

09:16

That's such an interesting tension in society. You see this in even the software scientists which I have a deep love for, like psychology. You see this in epidemiology, not with the virus.

S5

Speaker 5

09:27

Absolutely.

S2

Speaker 2

09:27

It's this tension of, you know, how much of the world can we understand through just a beautifully fit model? And then at the same time, my main work is in machine learning, where it's like there is no provable thing usually. It's just kind of you, It's all about just getting the right data set and getting tricks and so on.

S2

Speaker 2

09:49

And there's this tension, even in my own soul, of I grew up on theoretical computer science. I loved approximation algorithms, all of that different complexity classes, just those little puzzles. I mean, I don't know, to you, as somebody who was in math and computer science and then ended up going into places where you engineered some of the most impactful things in this world, Do you see the P versus NP, all that whole space, is interesting at all? Effectful?

S5

Speaker 5

10:22

Yeah, it's not that useful in practice, right? People are using it with sort of crypto analysis or asymptotic arguments about, you know, can we have a quantum resistant crypto algorithm, things like that, which may not be practical, right? If you follow Mikhail Diakonov or Gil Kalai, there are big questions about how quantum computing will scale up, how practical it will be.

S2

Speaker 2

10:46

Is that something that you think about quantum computing?

S5

Speaker 5

10:49

Not except for a spare time. Like you said, I'm not using this kind of computer science in practice because almost everything now is engineering and finding ways to get computers to be more useful for people, which goes from design problems, which are really kind of an art. Like Knuth said, anything you can't automate is an art.

S5

Speaker 5

11:09

Well, we can have machine learning compose music and it can imitate, you can train it, and it can sound kind of decent, but maybe lacking that je ne sais quoi. But user interface still, I think, requires human art.

S2

Speaker 2

11:23

So speaking of things that didn't follow a perfect theory and model, JavaScript. So there's 2 things. 1 had an impact on the world at a huge scale, obviously, and it also still is 1 of probably the most popular programming language in the world.

S2

Speaker 2

11:41

So can we go back to the origin story? Can you tell the story of how JavaScript was created?

S5

Speaker 5

11:47

Yeah, I was at Silicon Graphics after graduate school for 7 years, and it got to be big and successful and divisionalized and political, and I thought, kind of boring. And a friend who'd been there went to 1 of the last of the super companies, the super startups in the early 90s. There were several.

S5

Speaker 5

12:08

I suppose General Magic was a little after that or around the same time. But MicroUnity was that company that I went to and it was because my friend Jeff Weinstein had gone there from Silicon Graphics, he recruited me, and MicroUnity was doing everything. So this was like the ultimate sort of pretend grad school. It was doing a new fab, new semiconductor process, it was doing new analog and digital circuits on the same, very large but not wafer scale chip.

S5

Speaker 5

12:36

Originally it was 5 centimeters on a side. It was really hot too, so I needed a water cooler. It was a Crank killer and then they shrunk it and they tried to do a home sort of media processor that was essentially a barrel processor, but you could think of trying to do all the things that we now see in modern architectures with short vector instructions and sort of wide instructions for multiple issue. And doing a lot of the stuff in software, because the second iteration, the set-top box, was really for avoiding the cost to the cable company of rolling the trucks out to replace your garbage General Atlantic set-top box with a totally newer, less garbagey 1.

S5

Speaker 5

13:20

So if you could have software-gradeable set-top boxes, the cable companies thought they could save a lot of money and add features.

S2

Speaker 2

13:27

Is this assembly? Or which level of the software?

S5

Speaker 5

13:30

It was like, we were writing in, we were using GCC, we were writing C++ and C. Somebody I worked with there, really very smart guy, hired from a sort of Wall Street hotshot programming consultancy, did his own hardware design as well as software. And we were working on how to make not only short vector units, but general bit shufflers and permuters.

S5

Speaker 5

13:53

So you could do things like, you know, crypto algorithms efficiently, and you could do demodulation of the cable, you know, complex quadrature amplitude modulated signal. So you're basically taking A to D converters, dumping things in buffers, and then doing the rest in software. All the framing and the Reed-Solomon and Viterbi and all that error correction. So that was really great learning experience, but it was not gonna work.

S5

Speaker 5

14:16

It was doing too many risky things at once. As Jim Clark said to me when I hopped to Netscape after 3 years at MicroUnity, he said, oh yeah, you do 10 things, each 1 in 10 odds, it's gonna be 1 in 10 billion. The Multiplication principle. So Netscape was already a rocket and I passed the chance to go there in 1994.

S5

Speaker 5

14:36

I knew the founders because I worked at SGI Clark's company. Could

S2

Speaker 2

14:40

you pause for a second? Sure. And Netscape, when was the launch of this rocket?

S1

Speaker 1

14:45

94. 94

S2

Speaker 2

14:46

was the launch of Netscape?

S5

Speaker 5

14:47

And I went there in early 95 in April.

S2

Speaker 2

14:49

Okay, so you said you missed the launch.

S5

Speaker 5

14:52

Well, I missed the first floor employment opportunity, but the IPO was August 1995, so I was there for that.

S2

Speaker 2

14:58

How obvious was it that Netscape was world changing? What was the layout? Was Netscape 1 of the first big browsers?

S5

Speaker 5

15:06

Yes, so when I was at MicroUnity still in 93, we saw a browser called Mosaic. And up till then, we'd used email, and we'd used Usenet, the NNTP protocol, we'd used Newsreaders, we used FTP, we used all these old internet protocols, all relying on the DNS and TCP IP and UDP for that matter. When I was at Silicon Graphics, we brought up the whole stack, right?

S5

Speaker 5

15:28

We had to discover how to find the ethernet addresses on your network and then find IP addresses for them, ARP protocol, all that stuff. And it was great because nobody knew in the 80s what was gonna win. All the proprietary stacks like IBM, SNA, and DECnet and all these other protocols were saying, we're gonna do it or it's gonna be heterogeneous future. Instead it was Berkeley Unix and the TCP IP stack that dated back to the ARPANET that won.

S5

Speaker 5

15:54

And I think we knew it, we all knew it at SGI, but the salespeople didn't, and so they kept trying to get multiple network stacks interoperating, but in the end it won. And so that was the internet, and it was email and texty, and it was used in, very texty. And then Tim Berners-Lee did his thing, but I don't think I was paying attention. And I think the date when he first did it, or when he wrote the famous email, it's been pushed back to 89.

S5

Speaker 5

16:19

But I noticed a mosaic in 93, because 1 of the things that Mark Andreessen and Eric Bina did at NCSA was they innovated on the early HTML standard. In particular, Mark sent this email saying, hey everybody, we think you should be able to put an image in a page. And you know when he sent that, Eric Bean had already written the code. And I talked to Tim Berners-Lee more recently, just a few years ago, and he was like, oh, we had another way of doing it.

S5

Speaker 5

16:45

And it didn't work out, because Mark shipped his in Mosaic. And this convinced me of several things. 1, the internet meant there was a huge first mover advantage and being fast, getting on first, mattered a lot. And so, you know, Richard Gabriel of scheme and poetry fame has written about this.

S5

Speaker 5

17:02

The famous essay.

S2

Speaker 2

17:03

Poetry, what's poetry?

S5

Speaker 5

17:04

Well, he's a poet. Richard's a poet.

S2

Speaker 2

17:06

Oh, actual poetry. He's like, Doug Wilson, Van Sutten.

S5

Speaker 5

17:08

No, no, I mean, he's the founder of Lucid, which is where Jamie Zawinski worked before Netscape. And Lucid was doing compilers and Lucid Emacs, which was a fork of Emacs, famously Jamie fighting against Richard Stallman, Stallmax. And so Richard Gabriel, very brainy computer guy, but also a poet, but he wrote a nice essay that gets abused all the time.

S5

Speaker 5

17:28

In fact, Jamie's put a kind of warning in front of his version of it on his site, JWC.org, called Worse is Better. And this is about survival advantage of software in a networked world, in my opinion. It's about Unix, it started out being framed as Unix and Lisp, good news, bad news, because all the Lisp people, the MIT people were like, oh, the crown jewel scheme, this Fabergé egg, or Common List, this giant cathedral, of course we're gonna win, this is civilization. And those farmers in New Jersey, to borrow from the Sopranos, those hicks down at Bell Labs, they're just, there's nothing sound there, it's all hacking.

S5

Speaker 5

18:05

Well, guess what won?

S2

Speaker 2

18:06

Wow, so you're saying this is a fundamental principle of the internet is moving fast winds.

S5

Speaker 5

18:14

You could say in almost any network system, like in biological evolution, you see successful allele-sweep populations, and they don't always have, they aren't free of flaws, they can use a heterozygous advantage, right? You can get, both parents give you the gene variant, and you get sickle cell anemia, right? But if 1 of them does, you're more resistant to malaria.

S5

Speaker 5

18:34

And so this isn't a beautiful process, except at large scale. And then you realize that because it moves fast and can adapt, it can win. And People still struggle with this. I used to struggle with this, because JavaScript was done in such a hurry, and the force of web compatibility meant early mistakes couldn't be fixed.

S5

Speaker 5

18:55

And even the standards process injected new mistakes, as it will. But often standards bodies go back in making compatible changes. You can't do that with the web. It's more like, again, like biology.

S5

Speaker 5

19:05

You preserve what still works. You don't wanna break ATP metabolism or whatever. So you have to kind of resign yourself to the reality of worse is better being enshrined in actual design points you might not like. And that happened with JavaScript and I'm way over it, but it also, I think, was a huge advantage, which is why JavaScript has kind of swept a lot of programming domains.

S5

Speaker 5

19:33

People will say, oh, it's not because of merit. Well, you're right, but we also improved it over time in the standards body. I spent 20 years doing that. And you don't get that choice.

S5

Speaker 5

19:41

It's like, I'm not saying that that was the best language. I'm just saying that was the right time to do it. And I like to say the alternative was not to do it. I could have told Netscape, I can't do this, it's too rushed, and it would have been visual basic script.

S5

Speaker 5

19:56

And it would have been bad.

S2

Speaker 2

19:57

So that's a good way to present the alternative. But so it was a Netscape, and you have written it in how many days and why was it only that many days and what was the goal and the underlying principles in your mind at the time?

S5

Speaker 5

20:09

So the whole, I'm sort of describing Worse's better in a frenetic way because it fit the model of Netscape. When it was known that Jim Clark and Marc Andreessen were founding Netscape, and they did the first release in 1994, that browser took over from Mosaic. In fact, that's why Mozilla is called that.

S5

Speaker 5

20:27

It's the Mosaic killer. It's like the giant monster that kills Mosaic. And they knew that, you know, it wasn't that, again, it's not like you're doing advanced scientific research that is changing the world. You're more like taking down the last iteration of the browser Mark did, which had images, and you know, other affordances before he stopped working on it.

S5

Speaker 5

20:45

And you're making Netscape, the new thing that has images, plugins, which was the way to do video back in the day. It had something that's kind of died now for tiled windows called frames and framesets. It had HTML tables. That was new.

S5

Speaker 5

20:59

Eric Bina did tables in Netscape 4.1. So when I got there, they were heading toward IPO. Clark wanted to IPO early. I think his instinct was right.

S5

Speaker 5

21:07

And that kicked off the whole dot-com era, right? There was a recession in the US in

S1

Speaker 1

21:11

91.

S5

Speaker 5

21:13

You can see old Law & Order reruns where they talk about the recession and how hard it's hitting New Yorkers. And after that, Greenspan really goosed things at the Federal Reserve and technology had been sort of fermenting in a way that came together with the internet. And Netscape made it possible to do pets.com, to do eBay, to get people to recognize a URL on a billboard and then type it in when they get home.

S5

Speaker 5

21:35

And that was huge. That was so fast moving a rocket that Mark and the engineering team there thought, We need to make this a programmable browser, not just a document viewer, not just a video. It

S2

Speaker 2

21:50

was all HTML with images and tables and also like you said, frames.

S5

Speaker 5

21:55

Early plugins.

S2

Speaker 2

21:56

There's no dynamic element at all.

S5

Speaker 5

21:57

Yeah, the most dynamism we get was from a plugin, which there are a few of them then. Flash didn't exist at that point. It was, I think...

S5

Speaker 5

22:05

Java, Applet's it yet, or no? Well, that's the thing. We did the deal with Sun. In fact, I was recruited to go do Scheme in the browser.

S5

Speaker 5

22:12

Remember, guys stealing Gerald Sussman's beautiful Lisp variant? I was gonna do it in the browser because my friends from SGI thought, hey, we like Scheme, you like Scheme, and I'm like, I hardly ever use Scheme, it's not really used in industry except in sort of silos. But I like it. Okay, I'll come do Scheme in the browser.

S5

Speaker 5

22:29

I have a slide from my 2017 talk where I have Bruce Willis crawling through the duct in Die Hard.

S3

Speaker 3

22:35

He's like, come out to the coast, have a lot

S5

Speaker 5

22:37

of fun. Come on, do Scheme in the Browser. But when I got there, there was no Scheme in the Browser because they'd started a deal with Sun Microsystems.

S5

Speaker 5

22:45

And my best contact there was Bill Joy, who I admired as a Berkeley Unix founder and son founder. And Bill got the idea of making the browser programmable too. And so the main idea was to put the Java VM, which at that point was not really easy to embed, into Netscape, including the Netscape version of Windows that was still most popular, which was the 16-bit Windows

S1

Speaker 1

23:08

3.1,

S5

Speaker 5

23:08

which was going away. Microsoft was coming out with Windows 95 and everyone was afraid they were gonna do Internet Explorer, I guess, 2 at that 0.3 the next year. They already bought or invested in somehow Spyglass, this other company that shot out from NCSA at University of Illinois.

S5

Speaker 5

23:27

And in fact, Microsoft had tried to buy Netscape in late 94 before I got there. And I heard about this later, I heard they offered way too little money and so Jim Barksdale and Jim Clark said, get out of here, pound sand. But then they realized, oh, this is going to hurt us because now they're gonna copy us. Didn't happen right away.

S5

Speaker 5

23:46

I'm not sure when Gates' internet tidal wave memo was written, that's the famous memo he wrote when Bill Gates realized that Microsoft was going down this old copy AOL path or copy CompuServe path. A project called Blackbird, presumably after the SR-71, I don't know. But they were gonna make a dial-up service with a custom content language stack and custom rendering. It wasn't the web.

S5

Speaker 5

24:10

They could have content partners, they have a lot of money, but it still wasn't the scale of the web. It wasn't gonna be compelling. And Gates realized this and he turned the company on a dime and they couldn't buy Netscape. Again, I'm not sure of the timing, so they decided to copy it.

S5

Speaker 5

24:24

And once we realized that, everybody inside Netscape felt even more urgency and more of a frenetic mood. And so my chance to do Scheme disappeared when the Java deal started brewing. But there was still a chance to do a companion language to Java, because Java was a compiled, is a compiled language. It's evolved and improved quite a lot since then too, but it was for sort of serious advanced programmers that cost a certain salary or hourly rate.

S5

Speaker 5

24:51

And people observed, Bill Joy observed, and Mark Andreessen and I observed that in a mature stack like Microsoft, you really benefit from having a scripting language like Visual Basic, which became Visual Basic Script in IE3, but didn't take over and kill JavaScript, that you need 2 languages. 1 is for the component writers who are higher priced and more expert, and the other is for Scripters, certified public accountants, designers, graphic designers with some programming inclination, anybody. Amateurs, doesn't matter. There's a much more demotic approach there for programming the components together, gluing them together.

S5

Speaker 5

25:30

Some people say duct tape language, which I don't really like. But we saw, Bill Joy and Mark Andreessen and I, we saw the need for companion language. And the gleam in our eye was to call it JavaScript. I didn't like it, that was marketing's plan.

S5

Speaker 5

25:42

Mark called it Mocha, which I liked. And Netscape marketing, I think, didn't like that. So they said, oh, there's some trademark in some software somewhere that uses Mocha, so we can't use that. And they tried LiveScript in August, and that didn't last.

S5

Speaker 5

25:54

And then finally, we got the trademark license in December 1995. But the work I did to prove that it could be done was important because I came in in April and even the Netscape was growing so fast that they couldn't find an open hiring requisition in the client team for me so they hired me into the server team. And I worked for a month on server team on what became HTTP 1.1. So I was actually, I had done protocol work at Silicon Graphics with Greg Chesson, former Bell Labs intern, grad student intern, who knew all the Unix founders.

S5

Speaker 5

26:27

And Greg was very interested in taking protocols to the next level with VLSI, because he thought that CPUs wouldn't scale up. He was mistaken in that, unfortunately. Moore's law more than kept up, and you have gigabit ethernet running with conventional processors. But I worked on protocols at SGI, as well as Unix kernel hacking, and NFS, and things like that.

S5

Speaker 5

26:50

So I came into Netscape to work on the server side for a month, but I was thinking the whole time, what should this language be like? Should it be easy to use? Might its syntax even be more like natural language like HyperTalk, which is Bill Atkinson's language in HyperCard, if you've ever used HyperCard on an early Mac. And I thought, well, I'd like to do that, but my management is saying make it look like Java, which looks like C from a distance.

S2

Speaker 2

27:17

What does that mean? Is it braces? We're talking about visually?

S5

Speaker 5

27:20

Does it

S2

Speaker 2

27:20

mean like, what, management, do they understand what?

S5

Speaker 5

27:24

They don't, marketing didn't know, but management did, like Rickshell, the people in engineering knew. And we had a plan even, that was, if you have this companion language, you're going to glue things together between Java and JavaScript, so you're going to have commerce in memory, in the heap with data types. So you're gonna want some of the data types in Java to reflect in the JavaScript.

S5

Speaker 5

27:43

You're gonna want the primitive types that Java unfortunately severed from objects, so at least some of them number double, let's call it in Java's terms, from the C term for double precision, floating point, or strings, or booleans, and objects. And so right away there was this constraint that looking like Java meant kind of the C curly brace syntax but also some of the data types and objects.

S2

Speaker 2

28:09

Like objects and so on and all that kind of stuff.

S5

Speaker 5

28:11

Dotted columns.

S2

Speaker 2

28:12

Comparison operator.

S5

Speaker 5

28:13

Garbage collection, all that stuff. Even the bitwise operators and the shift operators, including the unsigned right shift, which Java had because it didn't have unsigned integer types. It said if you want to do unsigned operations, use an operator.

S5

Speaker 5

28:25

And that turned out to be important much later, I'll tell that story 5 times, but JavaScript inherited a set of operators, the expression grammar, the statement grammar, up to a point, from Java, but I wanted a functional language. I wanted a little bit of Scheme, even though it wasn't as clean as Scheme.

S2

Speaker 2

28:44

You had a love, sorry to interrupt, You had a love for Scheme and Lisp, that functional language.

S5

Speaker 5

28:49

Yes, I wanted first class functions because I saw the need for callbacks in the browser where it's a single threaded program. All the early browsers were single threaded and it's the right model for users. Most users weren't ready for mutual exclusion and threading.

S5

Speaker 5

29:01

So in a single threaded world, you cannot block the user interface. So you have to use a callback and run later. And without getting too fancy and trying to capture the continuation like call CC does in scheme, I thought I'll just make it easy to have fun arcs, first class functions you pass downward and it can be called back. And Java didn't have that at the time.

S5

Speaker 5

29:24

It took forever to get proper first class functions, lambdas now, into Java, Java 7 or 8, I think.

S2

Speaker 2

29:30

It did have concurrency, right? From the very beginning. But you were thinking that the JavaScript in the browser would not have the luxury of being concurrent.

S5

Speaker 5

29:39

That's right, and the reason was, Java was gonna run in a plugin, so it could fork threads and go to town. But The main action in the browser was in the single threaded program, the single Unix process on Unix or Windows. And it was where you had to service the event loop and then go do things, respond to the network, lay out some HTML, render it, turn widths into heights by filling containers, boxes, the early, what became the CSS box model, and run scripts to make the thing livelier, respond to user input.

S5

Speaker 5

30:11

And all that event-driven programming was in part like HyperCard because HyperCard had this on event name syntax. And so that's why you have in JavaScript on click run together as the name of the event handler. And there's some funny ones on mouse over and on mouse out. People still complain about those, but you know, there are many more events now over the years standardized, but it was a mix of event driven single threaded programming because it had to run in the main thread of the browser where the action is.

S5

Speaker 5

30:39

And Java never got there, which meant Java could not interact easily or quickly or in a nested way with the document, with the objects reflected from the HTML document, with the tables and forms and so on. And that is 1 of the reasons I think JavaScript survived and Java kind of died. Java was in this plugin prison. It essentially was confined to a rectangle, the applet rectangle.

S5

Speaker 5

31:00

And while we even built, next year, Nick Thompson, a friend from SGI, who was an intern grad student at CMU at the time, built the first version of LiveConnect to glue Java and JavaScript together to deliver on that vision where you do have commerce between the data types in the heap. Did it work? It worked, but Java was in charge, JavaScript was in charge, and Java was just these components, these helper objects.

S2

Speaker 2

31:24

You might as well do everything in JavaScript.

S5

Speaker 5

31:25

What happened over time, it's like an evolutionary filter, it just kind of, who needs the plugin? And in fact, Sun mismanaged Java as a plugin. They thought, oh Netscape was giving us the distribution vehicle and we don't care about the browser, it's just about getting Java out there.

S5

Speaker 5

31:39

And that was a big miscalculation. They then tried, because Microsoft's killing Netscape after a few years, they tried getting into Microsoft. And you may remember there was a Sun-Microsoft deal which famously blew up. And Microsoft kicked Java out of Windows.

S5

Speaker 5

31:54

And that's when they really pulled the trigger. I think they'd already evaluated it and liked it on Anders Helsberg's .NET and C sharp and decided we're gonna just not have Java. We don't want any of that Sun stuff. We don't want the patent risk.

S5

Speaker 5

32:07

We don't want, I'm not sure what the fights were about. There was some patent angle to it, I think. And up till then, Microsoft had been using Java components like in Outlook Web Access, which had a lot of JavaScript to be a webmail, like Hotmail, like user interface. They had to call the mail server through HTTP and they used a Java object to do this.

S5

Speaker 5

32:31

When they gave the boot to Sun, they suddenly other, you know, the left hand gave the boot and the right hand said, we better do something else in Outlook Web Access. What are we going to do? And they said, let's just add an ActiveX component, which is their own native way of embedding things in languages And we'll make it, it'll be what became XML HTTP request, which is now a web standard for calling asynchronously. And it's been replaced by the fetch API in HTML5 or HTML living document.

S5

Speaker 5

32:59

But this whole lineage goes back to Java being successively the loser and getting kicked out. And after Microsoft kicked it out, it was a plug-in and you would find it required for smart card banking in the Nordic countries where that was mandated by law but really didn't get used much. Or there were pilots who used it for flight information. But Flash, which Netscape could have bought, but fortunately didn't.

S5

Speaker 5

33:25

The early version. Yeah, we would have screwed it up. I mean.

S2

Speaker 2

33:28

What year are we talking about with Flash?

S5

Speaker 5

33:29

I think after the IPO, so it was probably late 95. Oh,

S2

Speaker 2

33:32

Flash was around, was it Adobe? No, it wasn't.

S5

Speaker 5

33:34

No, it was called Future Splash, and it was these brothers, Jonathan Gay, I think his name was, and he came knocking, and the marketing guy at Netscape who was screening the technology partners or wannabe acquisitions was brutal, and just everybody wanted to get in on the Netscape stock gravy train and he sent them packing and they ended up selling to Macromedia and Macromedia was where Flash was created. And the good thing about Macromedia was it was a tool company. So it invested in the best ideas, I think, which are still somewhat lost to us of Flash.

S5

Speaker 5

34:08

The timeline, animation is sort of an immutable function over time.

S2

Speaker 2

34:13

They had the tooling around that too, like the Dreamweaver, there's a Flash. Flash Director,

S5

Speaker 5

34:17

there were a bunch of them.

S2

Speaker 2

34:18

Yeah, I mean, yeah, that was a great.

S5

Speaker 5

34:20

Flash Builder was 1 of the last ones. These tools were used by real artists and special effects people and designers. All the restaurant websites around 2005 were done in Flash, which was, you know, we were trying to do HTML5 at the same time, that was the Firefox era, we were trying to make the web capable enough you didn't need Flash, but if you recall, you go to a restaurant, it's like, this is kind of like a game or something, it's like a Flash, all the font looks small.

S2

Speaker 2

34:44

You didn't like Flash from the beginning, You're like, this doesn't feel right.

S5

Speaker 5

34:47

Not really, I actually admire Flash's technology and I'm pretty pragmatic about these things. And I realized that it doesn't matter if your Delta bad hand, like JavaScript, was a rush job, or if you have Flash as a plugin and you can invest in the tools and make it pretty good. You should make it better for your users and grow it as best you can.

S5

Speaker 5

35:07

And what happened with the browser, due to Microsoft's monopoly abuse, for which they were convicted, and even after that, until I think Firefox and then Chrome, was people kept saying, oh, the web can't do X, can't do Y, we'll have to have a plugin, we'll have to have a new approach. We'll clean the slate and have a new web. And everyone who said that failed. And the reason they failed is because there's too much value in the web, this huge network, and the worse is better principle means that you can not only start bad, which they all sneer at, but get on first and get wide distribution, get sort of evolutionary advantage in priority of place, but you can also improve it over time.

S2

Speaker 2

35:49

And

S5

Speaker 5

35:49

so if you're gonna improve Flash, and for some reason Flash is now out of favor, Steve Jobs said you can't have Flash on the iPhone, that was probably the death knell, put your energy into JavaScript, and that happened, right? So we did things at Mozilla with Adobe to improve, which bought my Macromedia, to improve Flash and to improve the version of JavaScript that was in Flash. We tried to standardize that.

S2

Speaker 2

36:09

I'm

S5

Speaker 5

36:09

getting ahead of myself, but it was ES4. Yeah.

S2

Speaker 2

36:12

ES3. Can we just rewind to the magical, like, you know, it's a special moment in the history of all of computing. We'll talk about it later, but it's arguable, it's possible that the entirety of the world will run on JavaScript at some point. So like, it's like those days, It would be interesting if you could just describe actually zooming in on how the cake was baked from the several days that you were working on it.

S2

Speaker 2

36:41

What was on your mind? How much coffee were you drinking? Were you nervous? Were you freaking out?

S5

Speaker 5

36:47

I'll try to remember it. I mean, you're right, there are these pregnant moments you see in hindsight, maybe they're overrated, but like Hegel sees Napoleon on horseback at Jena and says, there's the world spirit on horse. And I knew that there was a chance to do it.

S5

Speaker 5

37:04

Mark knew, and he was my executive sponsor, and he was the 1 sort of brainstorming how the JavaScript should be right there in the page. That was important for him to say that, because I thought so too, but a lot of people were like, well, you can't write programming language in the middle of the markup. And indeed, there are problems. If you did it naively, you'd see the code laid out as like random gibberish.

S5

Speaker 5

37:24

So I had to figure out how to hide that. That was a challenge.

S2

Speaker 2

37:28

Is that a breakthrough idea? I mean, So you and Mark thinking about this idea that you just inject code in the middle of the markup. Of

S5

Speaker 5

37:35

the webpage, yeah, it was considered kind of heretical. There was an SGML guru, I forget his name, but he corresponded with me, and at first he was angry. He's like, you should have used a marked section.

S5

Speaker 5

37:44

Why didn't you use a marked section? And I said, well, SGML marked sections are not part of HTML, by the way, and they're not supported in the browser.

S3

Speaker 3

37:50

And

S5

Speaker 5

37:50

so I did some hack that was equivalent, and over time you could do the proper HTML thing. But eventually it came around, and it was again sort of evolutionary necessity. It was almost like introgression, like the idea which Lin-Margulis I think helped get across, that we have to consider mutualism biology, that maybe mitochondria were ancient prokaryotes that got into the cell and became beneficial.

S5

Speaker 5

38:17

Somehow the same sort of thinking applies. You have to embed JavaScript in HTML. It's gonna be a good virus.

S2

Speaker 2

38:24

It won't hurt you. So the code becomes data in the sense that it just gets carried along. But is there the side of the, so you were focusing on the Netscape at that time, doesn't the browser have to support, interpret correctly this mix of HTML and whatever code?

S2

Speaker 2

38:41

I had

S5

Speaker 5

38:41

to hide it from old browsers, including Netscape 1.1, which was predominant then. So I used an HTML comment, but inside the container that comment lived in, the script tag, which is a new element, I could make different semantics in Netscape too, where those HTML comment delimiters, instead of being multi-line brackets, became 1 line, or essentially 1 line.

S2

Speaker 2

39:00

So you wrote, so JavaScript was written, the programming language was written as a comment.

S5

Speaker 5

39:04

Yeah, comment for all browsers and a set of brackets that were ignored with real code for new. And it was this two-way comment hiding hack, as I called it, that was absolutely necessary for us to get off the ground. We couldn't have bootstrapped JavaScript without it.

S5

Speaker 5

39:17

We didn't have scripts that were loaded from a separate file. The only scripts in Netscape 2 were inline in the document.

S2

Speaker 2

39:22

What were the challenges here? Like what, you know, typing, what were the choices you were thinking about? Garbage collection.

S2

Speaker 2

39:30

Was it the simplest garbage collection? I didn't

S5

Speaker 5

39:31

have time to write a garbage collector, so I just, I didn't at first. So the thing was using essentially arenas or what GNU calls obj pools and just would run out of memory eventually. And I added reference counting in a hurry after the 10 days in which I hacked.

S5

Speaker 5

39:45

So after I was in the server team doing HTTP 1.1 and thinking about the language, I finally got transferred to the client team in early May. And that's when I got the go sign from Mark and it was like, we can't wait because people inside Netscape are doubting, even people inside Sun are definitely doubting. Bill Joy was the champion, but he was alone in that, in seeing there was a role for JavaScript as the, as I call it, the sidekick language, robbing the boy hostage. Frank Miller put it in the Dark Knight returns, that there was this silly little language that would be the glue language, and it could become important over time.

S5

Speaker 5

40:20

And you were better off having that complementarity, that pairing of languages, just like Microsoft stacked it with Visual C++ and Visual Basic.

S2

Speaker 2

40:28

So what was the big moment of I'm done?

S5

Speaker 5

40:32

So I had to do a demo. I forget the dates. I think I, for a history of programming languages paper that Alan Weirsprach did with my help, he did a lot of the writing.

S5

Speaker 5

40:42

I think it was the 10 days from like Thursday evening through to the following weeks, you know, the whole of that week and then into the Monday.

S2

Speaker 2

40:52

Did you get sleep?

S5

Speaker 5

40:53

Not enough, and I was really going fast because I'd already used a lot of C compiler and front-end compiler knowledge that I'd gained from undergraduate school. When I started getting into computing as a renegade physics major, people were formalizing more efficient bottom-up grammars, parsers for bottom-up languages. Really, LALR1 was the big thing.

S5

Speaker 5

41:19

And I studied all this and learned how to parse them. And in the end, if you're doing C languages, you often do what Dennis Ritchie did anyway, which is a recursive descent parser, you can hand code it. And I did that for JavaScript in a blazing hurry. Mostly got it right.

S5

Speaker 5

41:37

I didn't have precedence inversion problems or other bugs, but I copied a lot from Java and C. And I tried to keep things simple. Like the equality operator in those 10 days sprint between 2 objects of different dynamic type said, no, they're not equal, their types are different. And then after that, I had internal early adopters and they were using JavaScript to like match a number against a database field that had been stringized.

S5

Speaker 5

42:03

And they said, oh, can't we just have implicit conversion? Like an idiot, I agreed, I gave them what they wanted. I was trying to please them and get adoption. And that broke what equivalence relation nature there was to the double equal.

S5

Speaker 5

42:19

There's some edge cases with not a number that break that at 2, but it really broke it. Having implicit conversions in the operator is something that people still roast me over.

S2

Speaker 2

42:29

So Let's talk about 2 things. 1, it sounds like the comparison operator, the equality operator, is the thing that you regret. So maybe can you-

S5

Speaker 5

42:39

Making it sloppy. Making

S2

Speaker 2

42:40

it sloppy. So what is the biggest thing you regret in those 10 days and what is the biggest thing you're proud of?

S5

Speaker 5

42:47

So that making it sloppy came after the 10 days and my lesson there, which I've tweeted is, when people come to you saying, can you please make it sloppier, add this cute feature, the answer should be no. And I should have known that because I think Niklaus Wirth, 1 of my heroes said, the essence of design is leaving things out. But during the 10 days, I also, like I said, I was in such a hurry, I left out garbage collection.

S5

Speaker 5

43:08

Came back to haunt me, but I got reference counting in in time that people weren't running out of memory right away on long-lived JavaScript.

S2

Speaker 2

43:15

What happens when you don't have garbage collection and you have objects?

S5

Speaker 5

43:18

Well, you just run out of memory. And you know, at first you write a short script and the page doesn't last long or it doesn't do a lot, it's okay.

S2

Speaker 2

43:26

Oh, I see, yeah, yeah.

S5

Speaker 5

43:26

But if you're writing a game or something and you're doing event-based allocation, you run out of memory. And this was noticed in the summer of 1995 and people were like, what's going on? Oh yeah, I better go back and do reference counting.

S5

Speaker 5

43:38

And then the problem with reference counting is you're writing the language in the runtime in C, an unsafe language, and if you're reference counting and you overflow the counter, you mismanage it so it goes high, it gets stuck high, you leak memory again and you run out. If you underflow it, you pre-memory that's still in use. And even then, we knew what all the security hackers came to know, that you therefore have a, potentially a remote code execution vulnerability. Cause this was before things like non-executable heap memory and stack defenses against taking over memory.

S5

Speaker 5

44:14

So if You can, from the remote side, write some HTML and JavaScript that just happens to exploit a bug in memory safety, like it causes JavaScript to underflow a reference counter. And the script still has its hands on that object, and it's trying to call a method on it, and there's some kind of lookup function table in the object. But you've managed to stuff the heap with strings that forwards their own lookalike for the function table, you can call some other code. And this was a problem right away.

S5

Speaker 5

44:43

So security, you know, JavaScript up the ante. Java had this problem too, but in its own VM. And it just was a separate headache for Sun to worry about. We had this problem in Netscape right away.

S5

Speaker 5

44:55

So Netscape 2 came out after my 10 days and after these follow-on work to embed JavaScript better in the browser and to add garbage collection through reference counting, really, I call it reference counting, and get it shipped, we had a bunch of dot releases where we fixed security bugs like maniacs.

S2

Speaker 2

45:13

But what is the thing you're, you know, when you sit back on a porch and just look out into the sunset, what are you most proud of from those 10 days?

S5

Speaker 5

45:21

I think the first class functions shines. I think especially since Java didn't have it and it was somewhat unusual.

S2

Speaker 2

45:27

Scheme made it in somehow at the

S5

Speaker 5

45:30

end of the day. In spirit, I mean people complain because Scheme has minimalism. It has 6 or 7 special forms.

S5

Speaker 5

45:36

It has hygienic macros. It has call CC. It has sort of a beautiful, complete set of forms to make the lambda calculus pleasant to use in practice. And JavaScript is kind of a multi-paradigm or shambolic.

S2

Speaker 2

45:55

Just on a small tangent, you mentioned Mark Andresen. It sounds like, and Bill Joy, but staying on Mark, it sounds like he had an impact on you in that he sort of believed in what you were doing there. Can you talk about what role Mark had in your life?

S5

Speaker 5

46:11

Yeah, we would meet at the Peninsula creamery in downtown Palo Alto. And Mark was just fresh out of grad school or whatever he was doing, and he was a big dude, and he got fitter later. He had hair, he would order giant milkshakes and burgers, and we would meet there and brainstorm about what to do.

S5

Speaker 5

46:30

And it was very direct because we didn't have much time. Sort of we didn't talk about it, but the implication was Microsoft was coming after us. Mark was saying things boldly, pre-IPO, like Netscape plus Java kills Windows, right? This is- It's ambitious.

S5

Speaker 5

46:45

Make a browser programmable, it becomes the new runtime for programs. So meta OS or it's the replacement OS.

S2

Speaker 2

46:51

But he still saw value in JavaScript.

S5

Speaker 5

46:54

Yes, even though he was saying that and Java was the big name, hence the trademark license, he saw JavaScript as important. And he even thought, what if we got, I told this in other interviews, I can say, he thought, what if we had my friend Kip Hickman, who'd been at Netscape from the beginning and who was a kernel hacker at SGI when I joined, he started writing his own JVM before we consummated the Sun deal and got our hands on their code. And the Java compiler, Java C, which Arthur Van Hoff had written a very nice code, was all written in Java, it was self-hosted, or so-called bootstrap.

S5

Speaker 5

47:26

And so we could use that as soon as KIPS Java VM could run the bytecode from the Sun JVM running the cell posted compiler to emit the bytecode. So once we could bootstrap into Kip's VM, we wouldn't need Sun and Mark was like, well, maybe we can just ditch Sun, we'll have Kip's Java VM, we'll have your JavaScript VM. Now we need graphics. So Mark was thinking far ahead because he knew you could do things with HTML and images, but at some point you really want this.

S2

Speaker 2

47:54

Like dynamographics

S5

Speaker 5

47:56

or three-dimensional. Like even SGI had already started its downfall because the first 4 VLSI team there had gone off to do 3DFX and all these other companies that made the graphics card on your PC, right? Doom was big and Quake, and so we were all playing Quake.

S5

Speaker 5

48:10

I was old, so I was terrible. But why not put that graphics capability on the web? And in fact, it finally happened at Mozilla with Firefox era with Vlad Vukicicic, taking OpenGL ES and reflecting it as WebGL. But OpenGL ES is the mobile version of OpenGL, which is a standard based on SGI GL.

S5

Speaker 5

48:30

So this whole lineage of graphics libraries or really graphics languages for what became the GPU. And Mark was thinking ahead, he's like, we need graphics too. And I thought, okay, I can try to get somebody I knew at SGI but he's a grad student at MIT, he was studying under Barbara Liskov. He laughed when he heard about this later.

S5

Speaker 5

48:46

Andrew Myers, he's at Cornell, long time, I think he's a full professor, and Mark said, great, we'll get him, and I'm not sure he's gonna come. We'll throw money, we'll stock options. We never did it, and they did the Sun deal, so Kip Nobly put aside his own JVM, and we used the Sun JVM. So that was an ambitious period and Mark was very generative because he was pushing hard, he was ambitious, and he wanted to have Netscape possibly be in control of the ball.

S2

Speaker 2

49:13

Maybe you could speak to this dance of Netscape versus Internet Explorer. You've thrown some loving words towards Microsoft throughout this conversation, but that's a theme with, I mean, Steve Jobs had a similar sort of commentary. From a big sort of philosophical principle perspective, can you comment on the approach that Microsoft has taken with Internet Explorer from IE1 to Edge today?

S2

Speaker 2

49:42

Is there something that you see as valuable that they're doing in the occasional copying and that kind of stuff? Or is it, is the world worse off because Internet Explorer exists?

S5

Speaker 5

49:54

So I'm gonna segment this into historical eras because I think Microsoft is today with Satya is quite a different company and what they're doing with Edge is different. But back then, Gates, you know, aggressive character, not really original in my view, not an originator. Steve Jobs famously said once, he doesn't have any taste, and I don't mean this in a small way, he has no taste.

S5

Speaker 5

50:14

You can see this, Apple at the time had beautiful typography and ligatures and kerning and the fonts looked great. And Windows had this sort of ugly system font that was carefully aligned with pixels so it didn't get anti-aliased.

S2

Speaker 2

50:28

What is it, I'm sorry to keep interrupting, but Why wasn't Explorer winning throughout the history of these competitions?

S5

Speaker 5

50:34

Distribution, distribution matters more than anything. And this is why, you know, even now we're seeing in the browser wars, Edge doing better because it's being foisted on people of Windows. We have Windows 10 boxes at home.

S5

Speaker 5

50:45

We have some Windows 7 boxes or laptops we keep running to because we don't connect them to the internet generally. But once you have that operating system to hold, you can force edge. And Apple did it with Safari too. It's not unique to Microsoft.

S2

Speaker 2

51:01

That's sad.

S5

Speaker 5

51:02

But this really matters. And that's why I think IE was going to win. That's why everybody at Netscape felt we're doomed.

S5

Speaker 5

51:09

This was something Michael Toy and Jamie would say, we're doomed. But for a while there, we had a chance and we innovated in Netscape too. We did a big platform push, Java and JavaScript and plugins, more plugins, and more HTML table features, and really started making a prearrayable stack out of what were pretty static web languages. And even in the beta release of Netscape 2, people were using JavaScript to build what you would call single page applications like Gmail and they were using JavaScript locally to compute things and to call the server on a hidden frame in the background.

S5

Speaker 5

51:43

So it was prefiguring a lot of what came later as AJAX or dynamic JavaScript, dynamic HTML.

S2

Speaker 2

51:48

So people saw that, I mean.

S5

Speaker 5

51:49

Even then they saw it, yeah.

S2

Speaker 2

51:50

That's kinda, I don't know, from my perspective, that seems quite brilliant. It seems like really innovative that you would have code run in the browser.

S5

Speaker 5

51:59

It did impress me with something which I learned later about from Eric von Hippel of MIT, which is user innovation networks, lead user effects, that throwing out JavaScript, even though we weren't doing open source, we were doing beta releases early and permissively with Netscape, getting early developer feedback, absolutely critical. I loved it. I did some of that with SGI, with some of the products I worked on, but it really came to the fore in Netscape.

S5

Speaker 5

52:21

And that culminated in Mozilla, where you're dealing with developers all the time and early adopters, lead users. But the lead users helped improve JavaScript, even in those last few betas, where I could hardly change things. I was under pretty rigid change control.

S2

Speaker 2

52:34

So we're talking about just a small collection of individuals that are just like up front.

S5

Speaker 5

52:38

The guy named Bill Dortch, you can find his work in the web archives still from 1996. It's a single page application. It's an artist gallery of mountain art.

S2

Speaker 2

52:46

He uses JavaScript. It doesn't

S5

Speaker 5

52:46

quite work. He uses JavaScript locally. He uses a local database.

S5

Speaker 5

52:50

What you would think of now is JSON, but it's all pure JavaScript code, a bunch of objects being constructed.

S2

Speaker 2

52:55

That's so cool. So how is, if you can do sort of a big sweeping progress of JavaScript, How has JavaScript changed over the years, in your view, from those early 10 days with a quick addition of garbage collection and fixes around security? How has this evolution, that now it's taken over the world?

S5

Speaker 5

53:15

It's been a bumpy ride because the standards body got shut down after Microsoft, I think, took over the web and then felt punished by the US v. Microsoft antitrust case.

S2

Speaker 2

53:25

Can you speak to the standard body? That was a

S5

Speaker 5

53:27

fun ride too because Netscape had taken the lead with the web and HTML innovations like frames and framesets tables. And the W3C was sort of off, even then, sort of in SGML land, heading toward XML la-la land. I'm gonna be a little harsh on it.

S2

Speaker 2

53:44

What's SGML, I'm sorry.

S5

Speaker 5

53:45

SGML was the precursor markup language to HTML. It was sort of the more extensible, standard generalized markup language. It was a pointy brackets, but it had all sorts of elaborate syntax for doing different semantics.

S5

Speaker 5

54:00

And this is why I think TBL and others who wanted to do the semantic web then took XML forward, but they had this, or some of them anyway, had this strange idea they could replace the web with XML or that they would upgrade the web to be XML and it couldn't be done. Worse is better had concrete meaning. The web was very forgiving of HTML, including sort of minor syntax errors that could be error corrected. Like error correction isn't generally done in programming languages because.

S2

Speaker 2

54:29

That's another amazing thing about HTML is like it's more like biology than programming.

S5

Speaker 5

54:34

Yeah, exactly. And so XML was, in its standard form, super strict and could never have admitted the kind of users who were committing these errors. And The funniest part was Microsoft said, hey, we're doing XML, but the way they put it in Internet Explorer under the default media type, put it through the HTML error corrector.

S2

Speaker 2

54:54

So they

S5

Speaker 5

54:54

kind of bastardized it to make it popular, usable, and accessible. And so XML as a pure thing was never gonna take over. And W3C was kind of not fully functional because Netscape wasn't cooperating with them.

S5

Speaker 5

55:09

We thought about where to take JavaScript and we realized our standards guru, Carl Kargol, realized there was a European standards body that had already given Microsoft FITS by standardizing parts of the Windows 3.1 API, which European governments insisted on. They said, Microsoft, we can't use your operating system without some standards. And Microsoft said, you know, here's our docs. And the government said, no, we need a European standard.

S5

Speaker 5

55:32

So this body called the European Computer Manufacturers Association, ECMA, which eventually became global and became a proper noun instead of an acronym.

S2

Speaker 2

55:40

Right, it's just 1 capital E now with a lowercase CMA.

S5

Speaker 5

55:44

Right, And as 1 of the early Microsoft guys I met when we first convened a working group to talk about JavaScript said, it sounds like a skin disease.

S2

Speaker 2

55:53

But it gave, I mean, maybe you'll speak to that, but it gave the name to JavaScript of ECMAScript.

S5

Speaker 5

55:58

That was the standard name because Java was a trademark of Sun's. They were so aggressive, they were sending cease and desist letters to people whose Middle European heritage meant their surname was Javanko, and they called their website javanko.com, and Sun would send them a letter saying, you're using J-A-V-A at the start of your domain name, you must cease and desist.

S2

Speaker 2

56:18

I love marketing more than anything else in this world. So ECMAScript and now it was popularly named as ES plus version. I

S5

Speaker 5

56:27

would say people use JS more than anything. People still say JavaScript. JavaScript is in all the books.

S2

Speaker 2

56:32

So I mean, when you're referring to it, it's usually JavaScript, and when you wanna refer to a version of JavaScript, you'll say ES6, ES5.

S5

Speaker 5

56:39

Yes, or now they've gone to years, which is kinda confusing, because it's an offset of

S1

Speaker 1

56:44

2009.

S5

Speaker 5

56:45

ES6 is ES2016.

S2

Speaker 2

56:50

Yeah, it doesn't match the

S5

Speaker 5

56:51

years perfectly. Yeah, so what were the choices made and how did JavaScript evolve here? So we took this new standards body, which we thought sort of a proven record of standing up to Microsoft.

S5

Speaker 5

57:05

But Microsoft sent a lot of people. They sent some people who were pretty good, and then when they realized that I was there and Netscape was not gonna just bend over and do whatever they wanted, they send somebody really good. And he was a smart guy, he did a lot of the work on the first draft of the spec. Sean Katzenberger, he's left Microsoft.

S5

Speaker 5

57:22

He even did what I sort of did, he told his bosses, stop bugging me to do other things, I'm focused on this. Because it took a lot of focused work to create the first draft of the spec. And I was still holding, I was spinning almost all the plates. I had like part-time help in certain areas and on the front end integrations, I had the front end guys.

S5

Speaker 5

57:39

But I couldn't take as much time as Sean was to write the draft spec, but I had to participate because I was essentially helping write down what the language did. And in areas where we didn't like what it did and Microsoft didn't agree, we sometimes got away with slight changes. And that's the story of standards. You have different implementations and depending on their market power, they interoperate where you have agreement and where they don't, the dominant 1 usually sets the de facto standard.

S5

Speaker 5

58:05

And then you should probably reflect that into the de jure standard. And this happened with JavaScript. Over time as Netscape went down and Microsoft went up, we did the first edition of the standard, codified in 1997 in France. We had a trip to Nice, which was very memorable.

S2

Speaker 2

58:21

For any interesting reason or just because it's Nice?

S5

Speaker 5

58:24

And ECMA's European and IBM and others were there. Mike Cowlishaw, an IBM fellow, was a British. And the guy who ran ECMA at the time, Jan van den Bel was quite a raconteur and a very fun guy, and he had us out for the great, you know, Fouet de Mer, the Bouillabaisse.

S2

Speaker 2

58:43

Was the standardization process beautiful or painful that those early days, you as a designer of the language?

S5

Speaker 5

58:48

It was painful because it was rushed. Now, Guy Steele was contributed by Sun. So even more than Sean, you had this giant brain, Guy Steele helping, bringing some of that scheme magic.

S5

Speaker 5

58:57

He even brought Richard Gabriel for fun. Richard wrote the fourth clause of the ECMA standard, which is kind of an intro to what JavaScript's all about. So we had some really good people, and we didn't fight too much. There was some tension where I was fixing bugs and I was late to a meeting, and Sean Katzenberger of Microsoft was actually mad, like, where is he, we need him.

S5

Speaker 5

59:16

And when I got there, I saw that only he saw this sort of off by 1 bug in somewhere in the spec. And then I saw it too, and I said, there's a fence post bug there. And then we kind of locked eyes and we realized we were on the same page and we kind of, he wasn't mad anymore.

S2

Speaker 2

59:30

What were the features that are being struggled over and debated and thought about? It was

S5

Speaker 5

59:34

mainly writing down what worked and what we thought should work in the edge cases that didn't interoperate or that seemed wrong. But we were already laying the groundwork for the future editions that I was already implementing. I was still trying to lead the standard by using the dominant market power to write the code that actually shipped.

S5

Speaker 5

59:52

So the de facto standard would lead the de jure standard, and I was putting in the missing function forms that I didn't have time for in the 10 days.