Four-Letter Technologies

Episode 371 • Released March 26, 2020 • Speakers not detected

Episode 371 artwork
00:00:00 unfortunately the barbecue place i think is closed is that part of the atp tradition yeah usually my my editing reward barbecue places are typically only open from thursday through sunday that's just like a barbecue cultural thing i don't know why what uh so usually my thursday tradition is i i edit the show somewhere around noon hopefully i'm done or at least i'm almost done i take a barbecue break that's my reward to myself for a solid morning of work but no more of that right oh what am i gonna eat
00:00:28 yeah i don't know i don't know oh god i can't i can't make this myself i can't like a lot of the stuff that i eat i can make myself i can't make this myself you got your own coffee roaster it's only a matter of time for your own smoker in the backyard yeah that's true so tonight we have a special episode for you and we are not really going to be covering the coronavirus and all of that terrible news
00:00:50 But we're hoping that with this show and hopefully future shows, we'll be able to give you a little break from worrying because, gosh knows, I'm doing enough for everyone.
00:00:59 So with that in mind, we actually have something extremely special planned.
00:01:04 And I wish I could say that we planned it specifically during a pandemic, but thankfully we didn't.
00:01:08 But nevertheless, here we are.
00:01:10 And instead of some cutesy, funny intro, we're just going to get right to it and say hello again to Chris Lattner.
00:01:17 Hi, guys.
00:01:17 It's great to be back.
00:01:18 Well, thank you.
00:01:19 Thank you for coming.
00:01:20 And we are very excited to have you.
00:01:22 And I figure we could start by just asking, what are you up to, man?
00:01:27 Lots of things, aside from sheltering in place.
00:01:31 Staying very busy.
00:01:32 I started a new job at Sci-5 a couple of months ago, just under two months ago now.
00:01:37 And so I'm learning a lot of new things, and I'm exploring new areas, also staying in touch with a lot of other familiar things.
00:01:45 Just generally keeping really busy.
00:01:47 Actually, this weekend, I finished a package shed, which is a little hut-looking thing that has a tiny roof on it that keeps packages from getting rained on.
00:01:58 Marco just made a house for his garbage.
00:01:59 Very similar.
00:02:02 Does yours also keep raccoons out?
00:02:04 No, it doesn't.
00:02:05 But the kids like playing it.
00:02:08 So last time we talked to you was like three years ago.
00:02:10 And I think we talked to you like right after you left Apple.
00:02:13 Since we last talked, you went to Tesla.
00:02:16 Then you left Tesla and went to Google.
00:02:18 Then you left Google and went to Sci-5.
00:02:20 Can you give us whatever kind of summary you feel comfortable with?
00:02:25 Explain that journey to us.
00:02:27 Okay, so how should I say this?
00:02:29 Let's start with Tesla.
00:02:30 The journey into Tesla was a big adventure, one that I knew was fraught with peril and opportunity.
00:02:36 The Tesla Autopilot team had been through several leaders and they each had short time horizons.
00:02:44 And my mental thought process going into this is that
00:02:48 You know, success over the long term wasn't highly probable, but I bet I would have a lot of really interesting life experiences, learn a lot, and then have some more stories, which I do, that I don't really want to share.
00:03:00 The exit was Elon and I had specific differences of opinion about leadership and
00:03:09 decided that we could not get along together.
00:03:12 And then he and I decided to part ways.
00:03:15 The entire autopilot team is very challenging, but also really awesome and really exciting team.
00:03:21 That's a very specifically weird dynamic.
00:03:24 And Tesla is a very fascinating place.
00:03:27 I always wonder for people who have experiences in, you know, jobs, important companies during exciting times, so on and so forth, very often, like most of them, you know, like you will not want to talk about specifics because like, whatever, move on, you move on, you learn something.
00:03:42 You don't want to dish a bunch of dirt or whatever.
00:03:44 But I do always wonder if there comes a time where we'll, we've referred to this a lot on the show, where they'll be like, oh, everyone's retired and it's, you know, 50 years after all their careers happened and they want to write about
00:03:55 Here's what really happened.
00:03:56 Like, here's what it was like in the early days making the iPhone.
00:03:58 A couple of people have had books like that, like Ken Kushan.
00:04:02 Do you ever think about sometime in your old age when, you know, you're retired and the world has moved on and we're all using our holographic AR glasses, phones or whatever.
00:04:11 Would you like write like a tech memoir?
00:04:14 Like, here's what it was like to be at these important companies during these important times.
00:04:18 And here are my experiences.
00:04:19 Or do you just have no interest in ever, you know, sharing that information?
00:04:23 I have no objection to sharing that.
00:04:24 I think that for me, it's just a question of time.
00:04:28 It's also a question of talent.
00:04:29 I don't know that I'd be any good at writing such a thing.
00:04:32 It would probably turn out really dry and boring.
00:04:34 They have people for that, though.
00:04:36 I suppose.
00:04:37 I guess, I mean, I can tell you things that I liked and disliked about Tesla, if that's what you're asking me.
00:04:41 I know it was more of a meta question of like – because you don't want to talk about it like when you're still in your career because you don't want to burn any bridges and so on and so forth.
00:04:49 But like if the job that you had was of historical significance and I think many of your jobs have been, it's –
00:04:56 It's the type of information that is valuable to history and useful for people in the future to know what was it like.
00:05:03 If you could read Andy Grove's book or whatever about Intel in the early days or you want to read about the creation of the transistor or the creation of Unix or what it was like to make C or the early days of the Google search engine.
00:05:14 I think a lot of your experience already falls into the category of being worthy of being recorded from your personal perspective.
00:05:22 When you're retired sometime, you're going to be saying, oh, I don't have time.
00:05:25 Someday, I don't know if this is true.
00:05:27 Maybe you think this is not true.
00:05:27 I assume someday you will retire.
00:05:29 Now I'm starting to question that of saying maybe you're just going to drop dead in front of the keyboard someday.
00:05:34 I think that's quite possible.
00:05:37 Assuming you ever do retire, I think we would all love to read that book.
00:05:41 yeah i mean i'd be very open to writing that i just need to have the spare time to actually collect the thoughts let me explain retirement to you and spare time is what you get when you stop working well i mean there's an aspect of my personality that i don't seek out the easy cushy jobs i know i know i i seek out the hard hard things that seem worthwhile all right so it's up from there so we can go to google now which is a hard thing that seemed worthwhile i guess
00:06:05 Yeah, well, so I guess a couple of different things.
00:06:07 So when I joined Google, I joined the TensorFlow team.
00:06:11 And actually, at the time, I had talked to Sci-5.
00:06:15 And I had decided that Sci-5 was too early on.
00:06:18 And I didn't really understand where they were going.
00:06:20 And it didn't seem like the right thing.
00:06:23 And when I was talking with Google, the pitch was pretty simple.
00:06:27 I was very interested in machine learning technology.
00:06:29 That's something I was interested in back at Apple, but wasn't able to do anything with it.
00:06:34 In the case of Tesla, one of the things I did was I force pivoted the technology stack off of this other machine learning framework called CAFE onto TensorFlow.
00:06:44 And so we moved to TensorFlow to get multi-GPU training support.
00:06:47 and other things like that.
00:06:49 And in the process of doing that, I learned quickly that TensorFlow is a good thing, but it was a ways away from being a great thing.
00:06:58 And so one of the things that attracted me to Google was that TensorFlow is an incredibly important
00:07:03 technology platform.
00:07:06 It's also very much a developer tool, which I have a lot of experience with.
00:07:10 The machine learning aspect, I think, was very appealing to me.
00:07:13 I had a good friend that said, hey, if you want to learn about machine learning technology, go to one of the best places in the world that's doing it.
00:07:19 And I think that was, I don't regret that at all.
00:07:22 And so the calculus going to Google was, you know, Google's also a legendary, amazing place to work, a lot of smart people.
00:07:30 I know many people that are there.
00:07:31 And so I was very excited about that.
00:07:33 And I'm also very excited that I joined and had a great, great time there and did some amazing things.
00:07:39 Some of the stuff you did at Google was like, yes, working on TensorFlow, but also there was a Swift angle on that as well.
00:07:44 It was kind of, you know, I don't know if you can tell me which was the cart and which was the horse, but like basically modifications were made to Swift that made it easier to work with machine learning stuff.
00:07:54 And they weren't features just for that purpose, but they happened to lend themselves that purpose.
00:07:58 And you happen to be doing that with Swift at Google.
00:08:01 So it's all...
00:08:01 You know, like how does that work out?
00:08:04 How did that connect?
00:08:04 Yeah, I can explain how that all went down.
00:08:06 So what I was hired to do, my starter job, you could say, is Google was developing this machine learning accelerator called a TPU.
00:08:16 There's multiple generations of TPU.
00:08:17 The one I was working on was the first training accelerator.
00:08:20 The idea of TPUs is to use custom silicon, a specifically machine learning design processor to be able to do machine learning training.
00:08:28 both faster than you can do with a GPU, but also, and I think more importantly, at a much bigger scale.
00:08:33 And they were just at the point in time where the hardware was now getting installed.
00:08:38 They had significant software challenges, integration challenges, programming challenges, and they wanted to launch it in cloud.
00:08:44 And so making a public product out of something that's not quite ready yet was a big challenge.
00:08:51 And so my starter project was to get cloud TPUs to market.
00:08:56 You can now get access to them now through Google Cloud.
00:08:59 They're a great product.
00:09:00 They're really, really awesome.
00:09:03 And so I started working on that.
00:09:04 Along the way, there's this discussion about, okay, well, how do we get machine learning technology to go to the next step, right?
00:09:10 So TPUs are an amazing hardware platform, but they don't really touch on the programming model, right?
00:09:15 Now, as part of building the TPU platform, there are many, many things about it that are quite different than the normal places that machine learning frameworks came from.
00:09:24 So one example of that is that they are thousands of chips.
00:09:28 It's like a supercomputer, petaflops of compute in many racks of machine.
00:09:33 And so the way you think about this and the way you want to program it is slightly different.
00:09:37 At the same time,
00:09:38 There are other trends in the industry, including a framework that was new at the time called PyTorch, which came out of the Facebook AI research group.
00:09:47 And PyTorch was pushing towards more dynamic, more natural language processing models, things like this, where the programming model isn't as static as TensorFlow was at the time.
00:10:00 And so there's a bunch of interesting discussions about, well, how do we get...
00:10:03 the programming model to move forward.
00:10:07 And it became apparent to me, you might not be surprised, that Python was not really great for this, right?
00:10:12 Because a lot of where the Python world was coming from is saying, because, so I should say, a lot of where TensorFlow 1 was coming from is saying, Python is a slow language.
00:10:25 And so because it's a slow language, what we'll do is we will use Python so that you can kind of script together some code that constructs a graph.
00:10:33 And then after you've constructed the graph, we'll go use C++ code to run it really fast.
00:10:40 Now, this is one of the reasons that TensorFlow 1 was a very, what I call a static programming model.
00:10:46 It's because you create this graph and anything you can encode in the graph, you're good.
00:10:49 You can just use graph nodes and you can express these computations this way.
00:10:54 But if you can't express in the graph, you're kind of stuck.
00:10:56 You have to go hack TensorFlow and rebuild it yourself.
00:10:58 You have to go become a machine learning framework engineer and learn about compilers, all this stuff.
00:11:03 And that's beyond the abilities of most...
00:11:06 machine learning data scientist type people, right?
00:11:09 And as it should be.
00:11:11 And so what PyTorch did very early on is it said, okay, well, we'll shift to this dynamic programming model where, you know, PyTorch, if you squint and look at it the right way, it's basically the thinnest layer of Python that you can have on top of a really fast C++ runtime.
00:11:26 And so both PyTorch and TensorFlow of the day, we're looking at, given that Python is the way it is, how do we work around the limitations and how do we make something that is acceptable?
00:11:38 And even today, if you want to deploy a machine learning model, you don't deploy Python.
00:11:43 And so if you look at both the TensorFlow and the PyTorch standard ways of using them,
00:11:48 what you do is you write your training logic in Python, and then you use some deployment mechanism.
00:11:54 In the case of TensorFlow, it's a TensorFlow graph.
00:11:56 In the case of PyTorch, it's their TorchScript solution.
00:12:00 And then you end up loading it up into a bunch of C++ code, and then you deploy the C++ code.
00:12:05 And so where Swift for TensorFlow came from is this idea of saying, hey, well, if we take a more modern language, we can have better language integrated features, which I'm happy to talk about if you want to geek out about that.
00:12:16 You can have deployment built in.
00:12:18 So you don't have to have a you write it in one thing, output a different thing, bolt it together with C++ code.
00:12:24 You can just have one solution that scales.
00:12:26 And by doing this, you allow people to move faster.
00:12:28 You get research flowing into production faster and you get a lot of other great benefits from that.
00:12:32 So you're basically like writing in Swift and Swift is actually also the thing that run, but you're still calling into libraries and other languages from Swift.
00:12:42 So let me, let me dive into how Swift for TensorFlow works.
00:12:46 So Swift for TensorFlow is a project with, I think, several major components.
00:12:52 One of the interesting things about machine learning is that you, and there's many different forms, but one of the most popular forms uses what's called backpropagation.
00:13:01 Right.
00:13:01 And so you do, when you're training, you shove a bunch of data into a model.
00:13:07 And as you're shoving data into the model, you're accumulating what are called gradients, which are the updates for the weights in the model.
00:13:13 The weights are basically the parameters that you actually, let me take a step back.
00:13:18 What is a machine learning model?
00:13:19 A machine learning model is a set of computation.
00:13:23 It's a function.
00:13:24 And the distinguishing feature of a machine learning model is that instead of it being a function where you write it all manually in code, you write the structure manually, but then you learn and train the weights.
00:13:37 And so I look at a machine learning model when you deploy it as it's a function that has all this trainable state behind it.
00:13:44 Now, where does that trainable state come from?
00:13:46 Well, the way machine learning training works is that you take a version of the model you want to deploy,
00:13:53 and you start shoving lots of data through it, and then you use what's, and I don't want to go into calculus here, but you accumulate what's called gradients.
00:14:02 Gradients are, you can think of it as like derivatives.
00:14:06 If you think about calculus one, it's, you know, you can take F and you get F prime, which is the derivative of a function.
00:14:12 The gradients in a machine learning case are just higher dimensional versions of that same idea.
00:14:17 And by using those in your machine learning training,
00:14:20 system, what you do is you shove a bunch of data through it.
00:14:22 You see, hey, I can get closer to a better answer.
00:14:24 If I nudge all the weights in this direction, they do it again.
00:14:28 You nudge all the weights, you do it again.
00:14:30 You nudge all the weights, you do it again.
00:14:31 Eventually, your training converges and you have a set of weights.
00:14:35 And now you can ship those weights as a binary blob and deploy the quote-unquote graph for the model, but also the weights that go with it.
00:14:42 Now, the way that it works is that you have to do that calculus thing.
00:14:46 You have to be able to compute the gradient or you have to compute the backwards version or the derivative version of a function.
00:14:55 So there's lots of different ways of doing this.
00:14:56 And so one of the contributions of Swift for TensorFlow is this idea of differentiable programming.
00:15:02 We joke this is one of the differentiating features, which is a terrible pun.
00:15:07 And so in most machine learning frameworks that exist today, the way this works is you build a graph and then you go do these graph transformations.
00:15:16 Well, the graph is just a data structure in memory.
00:15:18 You do these transformations and you get a new graph out.
00:15:21 Another way to do it is you do it dynamically.
00:15:23 And if you do it dynamically, again, it's a very runtime sort of a thing.
00:15:27 The problem with both approaches, because they're runtime things, is that when you make a mistake, so for example, you...
00:15:34 you forget to transpose a matrix or something, and they do a matrix multiply, the sizes don't line up, you get a runtime error.
00:15:40 And when you get the runtime error, it's difficult to reason about where it came from, depending on the exact details of the framework.
00:15:46 And so what Swift for TensorFlow does is it says, hey, well, what we can do is we can take this idea of
00:15:50 taking a function and calculating its derivative, build just that piece into the Swift language.
00:15:57 So this is a first-class language feature.
00:16:00 And by doing that, now you have a very generic language feature that could be used in many domains.
00:16:04 Machine learning is just one of them.
00:16:06 And you can get a much better user experience.
00:16:09 You can get a nice type-directed way of doing this so that it's extensible.
00:16:14 So you can say, hey, it works on
00:16:16 It works on float and it works on tensor, but I want to define a quaternion type.
00:16:20 I can go do that and make my thing also differentiable.
00:16:23 And that's something that doesn't really exist in modern machine learning frameworks.
00:16:28 What you'll see in them is that you'll see that tensor is differentiable, but the normal float type isn't.
00:16:34 Or there's special hacks around certain corner cases, but it's very difficult to extend these things.
00:16:39 Again, there's many different systems, and this is generalization, but by building into language, the goal and I think the reality is that you get a much better user experience.
00:16:50 So that's one of the features.
00:16:52 Now, what we did is we've designed all these features to be orthogonal from each other, and we want to upstream these things.
00:16:59 And so the differentiable programming work has long been a collaboration with the Swift community, and I think the team is planning on pushing it through Swift evolution soon.
00:17:08 And so it's been really exciting.
00:17:10 So for me, I write regular Swift stuff and iOS apps and things of that nature.
00:17:16 And I haven't really ever dabbled with machine learning.
00:17:20 And listening to you talk, my own ignorance is becoming ever more evident.
00:17:23 But nevertheless, the only thing that I was aware of that has kind of bubbled into my Swift universe, my perspective of Swift, is some of the Python interop.
00:17:33 And that doesn't sound like what you're talking about yet.
00:17:36 Is that fair to say?
00:17:37 That'd be the next step.
00:17:39 So the cool thing about the differentiable programming features is that they're very relevant to the numeric world.
00:17:44 And so there's a couple of different subgroups in the numeric world that are fairly narrow.
00:17:50 But in the case of machine learning, they're narrow, but really commercially important.
00:17:54 And so the inspiration for this feature and the inspiration for the design actually came from the old days.
00:18:00 It came from Fortran, where back in the old days, you have a bunch of numeric programming stuff.
00:18:07 And so a lot of the techniques were pioneered and figured out back in the Fortran days.
00:18:12 And then the world...
00:18:13 promptly forgot about them.
00:18:14 And so pulling those forward, making them work in a modern language, making it work with all the different constraints that are just very different was a big challenge and is a big challenge.
00:18:23 And building language features is hard, but it's been a really interesting project on its own.
00:18:28 Were you familiar with Fortran from whatever your past travels had been or did somebody say to you, oh, you should look at this weird old, I mean, I'm sure you were familiar with it, but you should look at this weird old language.
00:18:38 They had some good ideas and you had to like dig into it today, you know, in 2020 or 2018 or whatever.
00:18:44 Well, so these features weren't part of the Fortran language.
00:18:47 They were part of the Fortran community.
00:18:49 One of the interesting things about the Fortran community back in the day is that there were a lot of tools that read in Fortran code, transformed it, and then wrote it back out.
00:18:57 And so these are effectively source code preprocessors.
00:19:00 And so some of the source code preprocessors were doing this kind of stuff.
00:19:03 And they're widely used because, again, the Fortran world is, there's a lot of numeric people working in that world back then, but also today.
00:19:10 I would also like to say I was not the one that designed all the differentiable programming features in Swift.
00:19:15 It was a team effort and I contributed to that and I helped with some of the design points, but I will just be very honest that calculus is not my strong point and I'm very okay with that.
00:19:26 We are sponsored this week by Indeed.com.
00:19:30 Now, I'll be honest with you.
00:19:31 When they booked this spot a few months ago, they were going to run a regular ad.
00:19:34 But as the coronavirus outbreak hit, it just didn't seem right anymore.
00:19:39 So if your job has been affected by coronavirus, they've put together a guide to help and we'll link to it from here.
00:19:44 That's all for now.
00:19:45 So stay safe, everyone.
00:19:46 And thanks to Indeed.com for sponsoring our show.
00:19:53 So we both started to talk about the Python interop.
00:19:56 I'd love to hear a little more about that because I've glanced at it, but I haven't personally had any particular need to use it.
00:20:02 And I've only written, I don't know, a couple hundred lines of Python in my life.
00:20:05 So I'm vaguely familiar with Python in kind of some of its tenets, but this is all kind of outside my typical wheelhouse.
00:20:13 Nevertheless, I find it really fascinating, you know, the idea of extending Swift or changing Swift in order to make it interop better.
00:20:20 How did the Python interrupt stuff come to be?
00:20:23 I mean, it seems fairly obvious, but I'd love to hear your perspective of the journey and what was done to Swift to make that better.
00:20:29 I think you start from the premise.
00:20:31 So the premise was Swift is a good language for hopefully machine learning, right?
00:20:36 Which initially in the project, it was a theory.
00:20:39 It was not a proven fact, but yeah,
00:20:41 it was pretty clear that the entire world revolves around Python, right?
00:20:45 And so just having something better is not enough.
00:20:48 You need to provide a path for people to be able to move over.
00:20:51 You need to be able to make it so you can migrate existing code.
00:20:54 And you kind of have to integrate with all the, not just the machine learning technologies, but the huge ecosystem that has been built around the Python machine learning world.
00:21:04 And so this includes all the plotting libraries and all the analysis and data loading and slicing and dicing.
00:21:09 There's just a huge ecosystem out there.
00:21:11 And so interoperating with Python was a pretty clear goal from the beginning.
00:21:17 But then you ask the question of, like, what is the best way to do that?
00:21:20 Now, if you look at Swift, Swift already has language interoperability support for C, Objective-C, those kinds of languages, right?
00:21:27 And the way that works is a very expensive, very complicated integration with the Clang compiler.
00:21:35 And so Apple has invested a tremendous amount of money into making sure that all of its frameworks map over beautifully into Swift and all these things.
00:21:43 There's like a thousand attributes you can use to customize how it gets imported and all that kind of stuff.
00:21:49 And I think that makes sense for the C world.
00:21:52 But doing that for Python seemed very untenable for a couple of reasons, one of which is the complexity.
00:21:58 let's just say, could not pay for it.
00:22:02 It was not that important.
00:22:04 This all started as a research project.
00:22:06 But second of all, a major difference between Python and the C languages is that Python is fully dynamically typed.
00:22:13 And so in C languages, you have type signatures, you have API declarations, you have all this stuff to tie into, but in Python, you just don't have that.
00:22:22 And so...
00:22:23 Kind of going through this, what I realized quickly is that that dynamic nature of Python was both a huge curse in terms of working the way that the C importer worked, but it was also an amazing blessing because it made everything way simpler.
00:22:38 And so without going to how it works, I'll explain the outcome.
00:22:43 So right now, you can go open a Jupyter workbook, which is an online notebook environment.
00:22:49 It's kind of like a playground on the web.
00:22:51 you can go through the Python interoperability tutorial.
00:22:54 And if you do that, what you'll see is you'll see the syntax looks almost exactly like Python.
00:22:59 So this comes to, this builds on the fact that the Python expression syntax and the C expression syntax, or sorry, the Python expression syntax and the Swift expression syntaxes are very similar.
00:23:11 Like you use plus in both languages to add things.
00:23:14 You have dot notation, you have function column notation, you have parentheses and stuff like that.
00:23:19 It all works roughly the same way.
00:23:21 But in the case of Python, it quote unquote just works.
00:23:26 What you do is you import the Python module and now you have full access to the entire Python ecosystem and everything works.
00:23:32 You don't have to do type annotations.
00:23:33 You don't need header files.
00:23:34 You don't need to go change your Python code.
00:23:37 It just works.
00:23:39 And the way that works,
00:23:40 You might wonder about this because Python is such a dynamic, such a unique language in its own right.
00:23:46 The way it works is that Swift just links in the Python interpreter.
00:23:50 And so when you import the Python module, the Python module in the Swift Python module just links to the Python interpreter.
00:23:56 And so you're literally just linking in the Python interpreter.
00:23:59 So now you get literally everything in Python.
00:24:02 You can now talk to it.
00:24:03 And the way Python works under the covers is that Python is a relatively... I should back out of that.
00:24:10 I was about to say it's a relatively simple language, and that's probably not quite true.
00:24:14 But it's a language that is built on top of C. And it has a C API for everything.
00:24:20 And so there's a C API to call a function in Python.
00:24:22 There's a C API to do a dot access, like x.y.
00:24:26 And there's C APIs for all these things.
00:24:29 That Python module is just using Swift's existing C interop to import all those APIs and directly call into them.
00:24:37 It's a very beautiful thing.
00:24:38 And that Swift, the Python module in Swift is only something like 1,200 lines of Swift code.
00:24:44 It's pretty simple.
00:24:45 That's bananas.
00:24:46 I mean, there's a similar language you could do this for.
00:24:48 Could you make Swift interoperate with PHP just for me?
00:24:53 So let's talk about how this works.
00:24:57 So now the way this works is if you go look at that Python module, and again, it's just Swift code, so you can go take a look at it.
00:25:04 What you'll see is you'll see a bunch of weird boilerplate stuff that is...
00:25:09 there to make things work.
00:25:11 But at the end of the day, just calls in the C APIs.
00:25:14 So now, how do you provide the feel of Python code in Swift?
00:25:19 Well, Swift has already a fairly hackable syntax.
00:25:22 So you have like plus, you can override plus.
00:25:25 You have the ability to define new operators and things like that if you want, but you actually don't really need that because Python operators and Swift operators are roughly the same, or Swift has a superset.
00:25:36 But there's big problems when you start to save function calls.
00:25:39 And so as of Swift two and a half years ago, you didn't have a notion of a callable type.
00:25:48 You couldn't say, I have a value and I want the function call operator on that value to work.
00:25:53 That's not a thing.
00:25:54 Function call at the time meant either call function or call method or initialize a type.
00:26:00 But that was not a user extensible part of the language.
00:26:05 And so when starting to talk through this, you know, had many conversations with people and said, okay, well, how do we do...
00:26:12 Python interoperability.
00:26:13 We talked through, and this included with the Swift core team at the time, like, what are the best ways of doing this?
00:26:19 And people generally all agreed that doing a Python feature was a bad move.
00:26:24 We should not do that.
00:26:26 It turns out there are lots of dynamic languages.
00:26:28 There's Ruby out there.
00:26:29 There's PHP.
00:26:30 There's JavaScript.
00:26:31 There's lots of interesting dynamic languages out there.
00:26:34 And we didn't want to have, you know, a Python feature.
00:26:37 And so pulling this all back around...
00:26:40 If you go look at that, that is what led to a couple of very specific features being added to Swift, including one that just shipped in Swift 5.2, which went out yesterday as of this recording, I think.
00:26:51 And these features were the dynamic callable and the dynamic member lookup features.
00:26:56 And what those two features do is it allows any type, and we use it for Python, but you can use it in your own Swift code now.
00:27:03 Any type can just overload the call operator and the member lookup operator.
00:27:08 The member lookup operator is the x.y kind of syntax and turn it into a method call.
00:27:14 And now when you do x.y on a Pythony thing, it goes and does that C function that does x.y for Python and then returns the result.
00:27:24 And the way this whole system bakes out, which is really beautiful, is you look at Python and people say, Python has no types.
00:27:34 That's a thing that many people say.
00:27:36 And they say Swift has types, right?
00:27:40 And Swift having types and Python not having types mean they're incompatible, right?
00:27:45 Well, the way I look at it and the way that I can explain it is saying Python has one type.
00:27:52 That one type is implicit, and so you never utter it generally in Python.
00:27:57 But there is a type, and Python has a little object model and has a little data representation.
00:28:02 And it's very beautiful and consistent in its own way internally.
00:28:05 And I actually have a lot of respect for the internals of how Python works.
00:28:09 And so when you import that into Swift, it is the Python object type.
00:28:14 And so there's one type in Swift that is all the Python stuff.
00:28:18 And it's all completely dynamic within that type.
00:28:21 And so if you have a Python object and you say mypythonobject.x, what that does is it fires off that C API call and it returns a new Python object.
00:28:31 And then you say parentheses 42 and it does a function call on that Python object.
00:28:36 What this means is you're true to Python through and through because if in Python you get some crazy runtime error, well, hey, you'll get crazy runtime error here too.
00:28:46 It's the same model now in your Swift code.
00:28:50 Now, one of the things that I didn't really anticipate but has worked out really well, and this comes back to this idea of you get beautiful designs if you build simple things that compose correctly.
00:29:01 is that in Python, you can have a Python array, you can have Python integers, you can have Python, all the Python things.
00:29:09 Well, Swift also has integers.
00:29:10 It also has arrays.
00:29:12 And so one of the really interesting things about Python interoperability when you embed it into Swift is you get, I think, perhaps the world's
00:29:19 most beautiful progressive typing system for Python, where you can say, hey, I have a Python dictionary of Python strings to Python arrays.
00:29:30 Or you can say, I have a Swift dictionary of Python strings to Python arrays.
00:29:36 Or you can say, I have a Swift dictionary of Swift strings to Python arrays.
00:29:41 And you can type
00:29:43 statically or dynamically as much as you want at any level because it all interoperates correctly in the same type system.
00:29:49 It's a really, really interesting and very beautiful thing.
00:29:52 And the fact that it just works kind of blows people's minds.
00:29:55 Now, coming back to PHP, well, so that Python module in Swift is 1,200 lines of code.
00:30:01 PHP has its own interpreter.
00:30:03 You could build exactly the same kind of a thing talking to PHP.
00:30:07 That's by design.
00:30:07 That's one of the nice things about the language features being very orthogonal.
00:30:12 And then the question is, how good does it feel?
00:30:15 I'm not a PHP expert, thankfully.
00:30:19 But if the basic grammar structure of PHP is similar to the basic grammar structure of Swift, it will work out really nicely.
00:30:25 If you were talking to Objective-C or something like that, it would be somewhat less beautiful.
00:30:34 But the system setup, so you could talk to small talky languages, you could talk to
00:30:39 many different kinds of things, and I think it's pretty cool.
00:30:43 See, everyone, you heard it here first.
00:30:45 I think most people are going to look at this proposal as like, you have a sewage treatment plan over here, and you have a nice, fresh, clean ocean over here.
00:30:53 Let's build a canal to connect the two.
00:30:56 Well, I mean, if you go back and you look at... So the Python interoperability, all the language features are in Swift now.
00:31:02 This is a done deal.
00:31:04 If you go back and you look at the...
00:31:06 Gosh, when was that?
00:31:07 That must have been December 2017-ish, something like that.
00:31:11 That's when we were talking about, on the Swift forums, adding dynamic member lookup to Swift.
00:31:17 And the threads, there are many mega threads on this, and it was hugely controversial.
00:31:22 And the arguments against it at the time, or one of the major arguments against it at the time, was like, hey, if you allow people to overload operator dot, which is kind of what this is,
00:31:31 they're going to misuse it.
00:31:33 And then nobody's going to be able to reason about anything because everybody will use it for all the things and they'll horribly pollute all the code base everywhere.
00:31:40 And you're not gonna be able to reason about anything.
00:31:42 Right.
00:31:42 I mean, can't you make that argument about almost every Swift feature?
00:31:45 Bingo.
00:31:46 That's exactly right.
00:31:47 And so you can, you can make that argument about any feature in any language.
00:31:51 You can misuse anything.
00:31:53 And, um, if you just use integers for everything, well, you know, that's not going to be great for your numeric code either, but you could do it theoretically.
00:32:01 And so I think that the feature and the argument has stood the test of time where we've had it for, I think, a couple of years now.
00:32:09 People have done really interesting things.
00:32:11 There's definitely JavaScript interoperability things for marching through JSON files that use this.
00:32:17 And it's enabled some really beautiful and expressive APIs.
00:32:20 But I haven't seen people going overboard and using it for everything.
00:32:25 It's kind of the same argument as, oh, my God, because you allow emojis and your identifiers, everything's going to be pile of poop, right?
00:32:31 Oh, so you've been looking at my code.
00:32:33 This is kind of like the destiny of any community built up around a language with a particular set of features, right?
00:32:41 So Swift was born as a language with...
00:32:43 uh that preferred to be to have errors uh caught at compile time rather than run time and it therefore attracted a community of people who value that as a as an attribute in their language so you come in a couple years later and say you know what what about there's some cases where you won't tell until you make the call whether there's an error and they're like wait a second
00:33:04 That's not what I signed up for.
00:33:06 I came here for a language where you couldn't do that.
00:33:09 When I have something dot something and the compiler says it's good, it's good, right?
00:33:13 If I wanted the other thing, I would go to Objective-C and be sending messages to nil.
00:33:16 I'm here in Swift.
00:33:17 I'm a fan of Swift.
00:33:18 I'm on the Swift forums.
00:33:20 And so you kind of coming down from the mountain and saying, but what if dynamic callable, but what if integration with languages that aren't like that?
00:33:28 And it was like, well, interoperability is fine, but don't
00:33:48 Because if you are attracted to Swift and are a super fan of Swift, you're not going to do that willy-nilly.
00:33:53 You're not going to say, hey, here's this cool library for doing this thing in Swift.
00:33:56 And by the way, everything's dynamic.
00:33:58 And dot means nothing.
00:34:00 And you can write any method after the dot and I'll dynamically create it on the fly.
00:34:04 People don't do that.
00:34:05 Or if they did that, their library wouldn't become popular.
00:34:07 Yeah, nobody would use it.
00:34:08 Yeah, so people aren't dying to do it.
00:34:11 And it has never been the culture of Swift.
00:34:13 So even though that feature exists, I don't think it's even an attractive nuisance at this point.
00:34:18 I mean, another really interesting to me objection at the time was people would say things along the lines of interoperability with Python makes sense for the machine learning community.
00:34:29 But if you do this, then people will just leave the code in Python and they won't ever move it to a beautiful Swift API because it will look like Python.
00:34:37 And that's not a Swifty design.
00:34:40 And this is true.
00:34:43 I mean, the Python integrated
00:34:46 If you use NumPy, which is a very popular Python library for numerical programming in Swift, it does not look like a natural Swift API.
00:34:54 The naming conventions and the keyword arguments get used differently and all that kind of stuff.
00:35:00 Sounds familiar.
00:35:01 Yeah, so exactly.
00:35:03 This is also like Objective-C, right?
00:35:05 Where at least if you don't do all the work to annotate your APIs, you get something that doesn't look at all like Swift.
00:35:12 What I said at the time, which I still believe, is two things.
00:35:16 One is, hey, well, interoperability is the first thing that gives you the ability to define wrappers.
00:35:21 And so if you want to use some yucky external code, and it's yucky for whatever reason, being able to wrap it up without having to drop to a different completely foreign universe is really useful because then you can define a Swift API that wraps the underlying thing.
00:35:38 The other thing is that...
00:35:40 Because it doesn't feel natural, people want to do that work to create those wrappers.
00:35:45 But when you start doing that, you start to realize, well, actually, that Python API I'm calling into is just a Python wrapper on top of C anyways, in many cases.
00:35:54 And so instead of wrapping the Python, maybe I should wrap the C. And again, what you allow people to do is over time, the community can
00:36:02 go build amazing new plotting libraries and data analysis libraries and things like this.
00:36:08 Um, but you just allow each individual person to make decisions that make sense to them and you're never blocked.
00:36:15 Like it's very pragmatic.
00:36:16 You can always get stuff done, but then if you have lots of spare time, you want to go design the world's best plotting library, you can do that.
00:36:22 And, um, and so now that feeling a natural thing actually kind of helps with that, I think.
00:36:29 This is an interesting test case, because in the case of Objective-C and Swift, you know, a lot of the similar problems, but the big difference is there was a sort of command and control structure that basically dictated Swift is a thing that we're doing.
00:36:43 And until you hear otherwise, this is the future.
00:36:45 So get on board the train and pretty soon you basically have.
00:36:49 no choice like you know there's there's a dictator involved in that dictator being apple like if you're going to develop for apple platforms it's going to be in swift eventually so get used to it over the course of many years and you know in the world of python and machine learning i imagine there is no dictatorial force like that so even though the same thing could happen it's certainly not going to happen with the same speed but all the same tools apply all the same techniques all the same sort of what you're saying about but it has to happen at the rate of you know cats being herded and not at the rate of
00:37:18 you know the dictator saying this is going to happen over the course of the next few years unless something goes terribly wrong so get on that train so it's it'll be interesting to see how how if that goes faster or slower or like if it never actually happens or if swift is just another player in a big soup of languages but uh how do you feel about not being able to just mandate it as as was possible in the apple days
00:37:40 Well, so we could talk about Swift for TensorFlow more in a second, but let me push back on you, John, because you're right that Apple could have done that, but they didn't.
00:37:50 So until Swift UI, there's never been a thing that you could only do in Swift.
00:37:55 Yeah, I know.
00:37:55 That's a multi-year plan.
00:37:57 Well, but even with SwiftUI, you can still build UIs without using it, and lots of people still use UIKit.
00:38:03 So what I'm saying is, for years, Apple did not do that.
00:38:08 There was no arm-twisting, thou shalt use Swift.
00:38:11 It was always a...
00:38:13 Well, so there's not arm twisting.
00:38:14 There's a little bit of arm grabbing.
00:38:16 Like at a certain point on your second year at WWDC and all the slides are in Swift.
00:38:21 Like that's the type of thing where it's like, you know, they control the platform and they're clearly saying like, oh, everything's available in both languages.
00:38:27 Like the year Swift was introduced, every slide had both Objective-C and Swift.
00:38:31 I'm presumably dictated from on high.
00:38:33 And for the years that followed, Objective-C slowly disappeared from all the slides at WWDC and Swift became the only thing.
00:38:39 And then pretty soon the default was Swift for a new project in Xcode.
00:38:42 And that's what I'm talking about.
00:38:44 Like, that there is a large... Yeah, I agree with you there.
00:38:47 A large, not-so-invisible hand pushing in one clear direction...
00:38:51 It wasn't like, yeah, they didn't come down and just say, we're changing this overnight.
00:38:55 Because you couldn't.
00:38:55 You had to make sure, hey, is this Swift thing going to work out?
00:38:57 Do people like it?
00:38:58 There's lots of unknowns.
00:38:59 But the direction has always been clear.
00:39:00 That's why I said, in the absence of anything else, this is going to happen.
00:39:05 Whether you like it or not, because there are still people like, oh, I like Objective-C better, and whatever.
00:39:09 But whether you like it or not, if the majority of the community does not scream bloody murder, and Swift works out fine, which it seems to, we're going to get to the point very quickly when
00:39:19 a couple years down the line, oh, here's a new API that you can't use from Objective-C.
00:39:23 And by the time that happens, it's almost a non-event.
00:39:26 I mean, some people grumbled about SwiftUI, but Swift had been so clearly the message from Apple for so many years that I think by this point, if you weren't on board with that change, like, I don't know if you've been beaten down by the overwhelming tide of Swift on Apple platforms, or you just got used to it, or...
00:39:44 learn to love it or left to go to a different platform right whereas like i said in machine learning you can have enthusiasm for swift but it's really up to the individual people as you said to say is this what i want to do do i want to make a wrapper for this do i mind that there's python in between do i find the swift thing benefits me in any way or do i just want to do it in python or do i like the swift so much that i'm gonna you know disintermediate the python and go right from swift to c for my new library and that's up to the individual and
00:40:09 I mean, I suppose there's a cultural influence as well.
00:40:11 I'm not involved in the machine learning community, but if they have big conferences and the same type of thing here is, you know, let me show a demo of this cool thing I did in machine learning.
00:40:18 And just so happens that all their demo and slides and code is in Swift.
00:40:22 That sends a message, especially if it's something cool, but it's sort of on a case by case basis up to the individuals.
00:40:28 Well, so I think that, I mean, to agree with you and then disagree with you, I think you're right that the machine learning community is definitely not top-down controlled.
00:40:38 And even if somebody were to do that, you would have a thousand people all doing different things anyways, because there isn't a lot of consistency in that universe.
00:40:47 But the same thing is true about server development and many other segments where Swift is, what I would say, organically growing slowly over time, right?
00:40:55 And so I don't think that's unique to the machine learning community.
00:40:57 Yeah, that's true.
00:40:58 We talked about Switch on the server recently.
00:41:00 It is very similar in that Apple is not super interested in, they don't have a server platform that they're pressing on everybody.
00:41:05 So it's, you know, they're not a force there.
00:41:07 And then it's really more like machine learning where it's up to individuals.
00:41:11 And even if they did, if they came out and said, we think that this is the right thing to do for server, everybody would say like, okay, cool, Apple, whatever.
00:41:16 I'm using my Django thing or whatever.
00:41:19 And there's not that, to your point, there's not that top-down single leader type of thing.
00:41:26 But the thing I want to push back on you again is who fundamentally has the control there?
00:41:31 Who has the power?
00:41:33 So is it Apple or is it the community?
00:41:36 Because Apple has pushed technologies, as you know, in the past that haven't worked out.
00:41:42 And so if Apple started pushing it that first year, and it was kind of a soft push, like that first year in particular was a, hey, we have a thing.
00:41:50 We hope you like it.
00:41:51 We think it's great, but let us know what you think.
00:41:54 And if the community...
00:41:56 barfed all over it and said, this is terrible, we don't want anything to do with it, well, Apple would have course corrected and changed, right?
00:42:02 And so I think the community and the community reaction and feedback and things like that also have a huge impact on Apple's decision-making process as well.
00:42:12 Yeah, I mean, there's definitely a give and take there.
00:42:14 But, you know, that's why I was off in the qualifiers is assuming things worked out, assuming there wasn't like just open revolt in the streets or whatever.
00:42:20 But, you know, it can there was definitely pushback, but there was enough promise that Apple said we're going to power through the pushback.
00:42:27 Because, you know, certainly when Swift was introduced and for years afterwards, there were lots of complaints from people who are very experienced with Objective-C about how Swift was inadequate for their purposes and Objective-C was better and didn't understand why we were making this change.
00:42:39 But there was enough promise and enough people who liked it that Apple was able to make the decision to say, we're going to keep going.
00:42:46 This looks like, I know there's complaints, but we're going to keep going.
00:42:50 And so to just power through that.
00:42:53 I'm sure that none of the people on this call would have those complaints early on.
00:42:57 No, early on.
00:42:59 We had complaints like that three shows ago.
00:43:03 We'll get to that in a minute.
00:43:06 One of the things I love to tell people is that
00:43:08 pick any technology that I know and I can both love it and hate it at the same time.
00:43:12 Well, that's what comes from, comes from using it.
00:43:15 Yeah, exactly.
00:43:16 And if you can't, then you're, you're just being religious or something.
00:43:20 Or you haven't used it long enough yet.
00:43:22 And so, so, so those are the language features in the Swift for TensorFlow project.
00:43:25 The, there's other pieces as well.
00:43:27 And so one of those is the API.
00:43:29 And so Swift for TensorFlow has a big API, and that API then wraps the TensorFlow APIs.
00:43:34 And saying it wraps the TensorFlow APIs doesn't do justice to how cool it is.
00:43:39 It probably doesn't make sense to deep dive on all this stuff, given the audience, but it's really cool stuff.
00:43:47 It uses, again, that really powerful and very efficient...
00:43:51 nature that Swift gives API developers.
00:43:53 The next step up then is the community aspect of it.
00:43:56 And one of the things I'm very happy about with the Swift for TensorFlow community is that it has attracted a lot of really interesting and really smart people that have contributed a huge amount.
00:44:05 And one of the things that we did at Google and continues to this day is there is a roughly weekly public video chat that you can dial into and talk to the team.
00:44:16 And all the episodes are recorded and you can go watch all the
00:44:20 the technical discussions about, uh, differentiable programming or, uh, APIs for reinforcement learning and like all, all these different things.
00:44:30 And they're very public.
00:44:31 And this has been a really great thing for engaging a community and helping build and helping learn.
00:44:36 And particularly in the machine learning community where there's so many different people and perspectives and talents, and there isn't obviously one right way to do it because it's not a mature, mature field.
00:44:47 Um, I think that was very, very helpful.
00:44:49 You had those video calls at Apple too, though, right?
00:44:52 Are you kidding me?
00:44:53 I am kidding.
00:44:54 Just imagine the difference between the two companies.
00:44:57 You're talking about a technology and a product that you're working on developing and that you're having routine interactions with official members of Google and members of the public talking about the technology in an open forum.
00:45:10 It's an alien concept to the Apple way of doing things.
00:45:14 And again, I think that Apple's moving a lot.
00:45:17 In particular, in the Swift world, I think it's being quite progressive.
00:45:23 They got a blog.
00:45:25 It's just like a light and day difference in terms of the significance placed on such things.
00:45:31 And it's just a different philosophy.
00:45:33 And I don't think that either is right or wrong, but it's quite different.
00:45:37 So the project continues today.
00:45:39 It's an exciting project.
00:45:40 Just announced their new release a week ago, two weeks ago, something like that.
00:45:45 And so they're making really great strides, integrating new things.
00:45:48 One of the challenges there is that the runtime implementation that they're building on top of the classic TensorFlow runtime is not perfectly suited for their task.
00:45:57 moving new technology stacks and doing cool stuff.
00:46:01 Anyways, if you're interested in that space, it's a very vibrant and very cool project.
00:46:06 And it's still, I would say, a little bit ahead of its time, but the technology pieces are falling in place now and it's going to be a very exciting 2020.
00:46:14 So it sounds like you were super into this stuff, but then you left to go to Sci-5.
00:46:19 You want to explain that?
00:46:20 Well, that's only the second project I did at Google.
00:46:24 So there's another project called MLIR.
00:46:27 Have you heard anything about that?
00:46:28 I have.
00:46:30 Do you want to talk about that, or is that too geeky even for John Syracuse?
00:46:37 I remember you being super excited about SIL back in the day.
00:46:40 You just love intermediary language.
00:46:42 This is what you love.
00:46:43 So here's the deal with MLR without diving too deep into it.
00:46:48 If you work on compilers for too long, just like if you work on anything for too long, you start pattern recognizing across different systems.
00:46:57 You start realizing they're all the same.
00:46:58 Actually, what you realize is they're 50% the same and 50% different.
00:47:04 But because you're building a new thing, you build a new thing from scratch.
00:47:07 And the 50% that's the same never gets factored across the rest of the universe.
00:47:11 And so that's what compilers are today.
00:47:13 And so if you look at...
00:47:15 LLVM, for example, it has what's called an intermediate representation.
00:47:19 It's the data structure that the entire LLVM universe works on.
00:47:22 It has a ton of infrastructure that's been built up across now.
00:47:26 LLVM turns 20 years old this year, incidentally, which is kind of scary.
00:47:31 And so LLVM has a bunch of this stuff.
00:47:33 Then you go look at Swift.
00:47:34 Swift has SIL.
00:47:35 SIL is its compiler representation for doing high-level language optimizations and doing ARC optimizations and that kind of stuff.
00:47:44 And that representation has to reinvent a huge amount of basic compiler stuff.
00:47:49 And you go look at machine learning compilers, you go look at TensorFlow, you go look at all these different domain-specific worlds, you look at Julia and Rust, and all these different compilers are doing the same thing over and over and over and over and over again.
00:48:02 And so what MLIR does is the ML stands for multi-layer.
00:48:07 It's also designed to be reinterpreted in many ways.
00:48:09 If the acronym ultimately fails itself, we can say it's Moore's Law or...
00:48:15 mid-level or machine learning or whatever the cool thing is of the day.
00:48:20 Bitcoin, wait, that doesn't work.
00:48:22 And so what MLIR does, it says, okay, cool, let's make it so that instead of building an instance of a compiler, we build a compiler construction toolkit.
00:48:30 The way MLIR works is you define in a declarative specification what your IR is, what that intermediate representation is, what the type system is, what the instructions are that go into it, things like that.
00:48:41 And then you get a tremendous amount of infrastructure for free for doing things like testing, location tracking, so you get debugging optimized code, something LVM has never really been great at.
00:48:51 You get a ton of the things, multi-threaded compilation, like all these things that are actually hard
00:48:58 And you have to design in from the beginning to make them really great.
00:49:01 And most people don't think about that.
00:49:03 And so when you're building a new compiler, typically, just like you're building a system, you're racing the market to get your thing to work.
00:49:09 You're not investing in that core infrastructure.
00:49:11 And so MLIR allows you to do that.
00:49:14 And we built and started this at Google.
00:49:18 It's now an open source project.
00:49:20 It's contributed back to LLVM, so it's now an official LLVM subproject.
00:49:24 And one of the cool things about MLR is it's only 18 months old-ish at this point and 18 months-ish from the first white paper.
00:49:32 And it's already being pervasively adopted across the industry by all the big companies for lots of different things.
00:49:39 And it's been just an incredible growth.
00:49:42 And it's just really cool to see that happen.
00:49:45 Interesting you described it as a compiler construction toolkit.
00:49:48 Wasn't that basically the pitch for LLVM back in the day in a very different world, but similar idea, a bunch of libraries you can use to build a compiler?
00:49:56 Yeah, so the difference with LLVM is, I think, fairly big.
00:50:00 So I love LLVM.
00:50:02 Please don't misread any bad things I say about LLVM as me disliking LLVM.
00:50:08 LLVM is really the LLVM IR, what people think about when they talk about the core LLVM.
00:50:15 LLVM is a really good way to talk to CPUs.
00:50:17 The basic model of LLVM is C with vectors, roughly.
00:50:23 And so if you have a problem that looks like C with vectors, LLVM is a really good solution because you can use a large number of code generators for...
00:50:31 all the different popular processors and things like this.
00:50:34 And you could build really cool high leverage settings on top of that.
00:50:38 LLVM has not been very successful when you talk to accelerators.
00:50:41 LLVM has also been completely useless for high level language things.
00:50:46 It was never designed to do that.
00:50:48 And so the difference between MLIR and LLVM is that MLIR is designed to solve all the world's problems.
00:50:54 And in fact, LLVM is an instance within MLIR.
00:50:58 MLIR also models LLVM as well as many other things.
00:51:02 Are you holding out one more letter?
00:51:03 So you've got LLVM, what was that, low-level virtual machine or whatever, ML, which is like mid-level.
00:51:10 And I guess the HL is like languages like Swift.
00:51:14 Do we have room for one more letter in there?
00:51:17 I don't know.
00:51:17 I'm pretty good at four-letter technologies.
00:51:22 We are sponsored this week by Jamf Now.
00:51:25 Jamf Now makes it easy to set up, manage, and secure your Apple devices.
00:51:29 Jamf Now is mobile device management security that helps you sleep better at night.
00:51:34 From enforcing passcodes and encryption to remotely locking or wiping a device, Jamf Now ensures you have the MDM security settings you need so your Apple devices and the information on them is untouchable just the way you want it.
00:51:46 With Jamf Now, you can set passcode requirements, place a device in lost mode, even remote lock or wipe a device as needed from anywhere.
00:51:55 Jamf Now helps secure devices so you can focus on your business instead.
00:51:59 And it's super easy to use.
00:52:01 There is no IT experience needed.
00:52:03 So our listeners, you can start securing your business today by setting up your first three devices for free.
00:52:10 Add more starting at just $2 a month per device.
00:52:14 So create your free account today at jamf.com slash ATP.
00:52:19 That's jamf.com slash ATP.
00:52:23 Thank you so much to Jamf Now for sponsoring our show.
00:52:29 So yeah, so Google's a great place.
00:52:31 I had a lot of fun there.
00:52:33 There's a lot of really talented people.
00:52:34 I love that they're ambitious and willing to swing hard to do amazing things.
00:52:40 And so it's really great.
00:52:42 But due to an unfortunate incident with the free food, you were forced to leave and go to a new company.
00:52:47 Well, just because something is good doesn't mean it can't be better, right?
00:52:51 All right.
00:52:51 Well, so what's your sci-fi pitch?
00:52:53 I mean, the downsides of Google are things like it's a gigantic company with many tentacles.
00:52:59 Tentacles?
00:53:01 Well, it's got its tentacles into everything.
00:53:03 It's trying to be and do everything in the industry.
00:53:06 I think the other bigger issue is it's just kind of becoming bureaucratic like many big companies do.
00:53:12 And so certain aspects of that, like the performance review system, is just a nightmare.
00:53:18 Um, and so there, there's certain aspects of that.
00:53:20 They're just, you know, standard big company life.
00:53:23 And, and with, with sci-fi, the appeal is it's a much smaller company.
00:53:27 You know, it's, uh, it's hundreds of people and it's not an early stage startup, but it's, um, way smaller than one of the big, the big companies, but it's really got an ambitious charter of reinventing how semiconductors are made.
00:53:42 And so, um,
00:53:43 What my team does at Sci-Fi is really rethinking how people design, build processors, but also just ASICs, accelerators in general from the beginning.
00:53:56 And there's a tremendous number of compiler language, lots of other familiar problems, as well as a lot of very developer tool-y kinds of problems where you're trying to enable a new kind of user to be productive and be able to do things they couldn't do before.
00:54:10 So it's a lot of fun.
00:54:12 It's really exciting.
00:54:13 And it's also a space where the existing tools, whether they be proprietary or open source, all have different kinds of problems.
00:54:19 And there's a huge opportunity, or so it seems, to make the world better.
00:54:23 It sounds like there's a lot of synergy with the MLR stuff you were talking about.
00:54:27 Any kind of industry like that, especially something about building hardware, probably has a whole bunch of software tools.
00:54:33 But the love and attention those software tools get for this very...
00:54:36 narrow market is probably not very big and so people just deal with the tools that they have from a limited number of vendors that are not nearly as friendly and as polished as the tools for something a larger platform let's say yeah that's exactly right and there's also an aspect of mlr is fundamentally transformative compiler technology in my opinion and i say that having worked on a lot of compilers
00:54:59 There's nothing else like it, and it really opens the door to a lot of really interesting new kinds of ways to solve old problems.
00:55:06 And not all the tools in this chip design space are built on state-of-the-art technology.
00:55:14 And so there's unique opportunities when you say, hey, let's take a thing that didn't exist until 18 months ago and apply it in a new way to a field that is...
00:55:21 Really, really important and has a lot of smart people working in it.
00:55:27 And just like the TensorFlow and the Swiffer TensorFlow projects and things like that are about building tools for data scientists, here it's about building tools for chip designers.
00:55:35 Does MLR have an animal mascot logo thing?
00:55:39 It has an abstracted cuboid M. It's a geometric design.
00:55:45 It's not nearly as cute as the LVM Dragon.
00:55:48 Yeah, a giant silver dragon.
00:55:50 We've got to workshop the MLR thing.
00:55:53 You're very enthusiastic about it, but it's no dragon.
00:55:56 Seriously.
00:55:56 And, John, did you even catch that somewhere along the way the LVM Dragon got its head installed right side up?
00:56:02 I have brought this up with you many times.
00:56:04 I'm glad to know that that was corrected.
00:56:06 So, you know, there's progress being made in all fronts.
00:56:10 So to come back to sci-fi, to the best you're willing and capable of saying, who is the kind of customer that you guys are courting?
00:56:18 And I don't necessarily mean like name Tesla or something like that.
00:56:20 I'm just saying, like, what kinds of more specific problems are you looking to solve?
00:56:25 I understand what you were saying about, you know, making chip design better and faster and whatnot.
00:56:29 But how does that apply to an actual thing I can hold in my hand?
00:56:34 So I think that there's a difference between what Sci-5 is about and what my role in Sci-5 is.
00:56:40 Sci-5 as a company has a couple of different things going on.
00:56:45 Are you familiar with the RISC-V instruction set and that movement?
00:56:49 I know that it is a thing, but I don't know much more than that.
00:56:52 Okay, so let me give a quick dive into that.
00:56:56 So RISC-V, it's an instruction set like ARM or like x86 from Intel and AMD or MIPS or PowerPC.
00:57:04 It's like one of those kinds of things.
00:57:06 So if you talk about...
00:57:07 The others, so you talk about MIPS, XA6 ARM, PowerPC, like all these things, they're all proprietary.
00:57:13 And so they're all owned by a very large company and that very large company controls its destiny.
00:57:20 And so this control comes from multiple, in multiple ways.
00:57:25 So they have a roadmap and they publish new specifications and
00:57:29 If you ask nicely, they will listen to you and they will consider your input, but they decide what to do about it.
00:57:35 But the other thing about it is that they're the guardians of all the chips.
00:57:40 And so you either have to buy a chip from them or you have to buy a license to make a chip using their instruction set.
00:57:49 And so this has been a very successful model for these companies for a really long time.
00:57:54 Look at what Intel has done with x86, right?
00:57:57 And the Wintel monopoly back in the day, or look at what Arm is doing now for cell phones, for example.
00:58:04 But this is not really great if you want to do something really custom or if you don't want to be locked into one particular vendor.
00:58:11 And there are actual instances where vendors go out of business and then your instruction set and all the software built around it are stranded.
00:58:18 Things like, you know, HP even had an instruction set called PA...
00:58:23 And they eventually abandoned it with Itanium and the whole debacle around that, which really left their server users in kind of a weird spot.
00:58:34 And so you could argue that building your whole world on top of a single proprietary vendor leaves you tied to their destiny, right?
00:58:43 I think it's true for all proprietary things.
00:58:46 So what RISC-V is, is RISC-V came out of Berkeley.
00:58:49 And it was originally a group of academics that were working on RISC instruction sets.
00:58:54 And they were the pioneers of RISC back in the day.
00:58:58 And so RISC-V is the fifth incarnation of the Berkeley Research Group's design for RISC processors.
00:59:06 And what they did with RISC-V, which was really...
00:59:09 cool and interesting is they open source and opened the entire design process for the instruction set.
00:59:16 And so not only is it a patent free non licensed open kind of instruction set, but there are open design processes kind of like Swift evolution for the instruction set themselves.
00:59:31 And so, and
00:59:32 you too can design your own RISC-V processor and decide to add new instructions without talking to anybody if you want.
00:59:39 But the community also realizes that if everybody does that, well, you get huge fragmentation.
00:59:44 And so it's better for people to work together in a collaborative cross-industry way to define new extensions to that.
00:59:51 And so RISC-5 is, I think, it's still a bit early in certain ways, but it's really eating the industry in a very interesting way.
01:00:00 And it's this wave that's really kind of taking over things.
01:00:03 Now, Sci-5 was founded by the creators of RISC-5.
01:00:07 And so the founders of Sci-5 were from that research group.
01:00:10 They had designed the RISC-5 instruction set.
01:00:13 And so they founded the company initially around that.
01:00:17 And their idea was to productize and commercialize the RISC-V design, build actual processors for it.
01:00:23 And they've been doing that for quite some time.
01:00:26 RISC-V has since evolved.
01:00:29 And so, yes, it is...
01:00:31 The RISC-V company, the leading RISC-V company.
01:00:36 Yes, it has some amazing RISC-V CPU designs, which you can license and put them in your own chips.
01:00:42 But it's also what is called now an idea-to-silicon company.
01:00:46 And so...
01:00:46 They have all the functions for chip design in-house.
01:00:48 And so you can walk up and say, hey, I'm going to build a toaster or a microwave and I need this and this.
01:00:54 And it needs to be Bluetooth enabled because of course it does.
01:00:56 But I don't want it to be big.
01:00:59 So take out this and that and the other feature and the entire stack and the entire system can be completely customized to your needs.
01:01:05 If you want to own the design because you're into owning, you know, you're an ML accelerator, machine learning accelerator company and you're building your secret sauce and that's your accelerator.
01:01:15 But yeah, you still need RAM interfaces and like all the other standard things that go with this PCI interface and stuff like that.
01:01:21 Well, you can own or customize however much you want, but Sci-5 can then bring it to market for you.
01:01:26 Now, Sci-Fi is not unique in that respect, but what they're doing and one of the things I'm very excited about and what my team is driving is working on all the tooling, the methodology, the cloud platforms, all this stuff to make it just better, faster, cheaper, improving turnaround time, making it so the tools work together.
01:01:43 There's more commonality and just making that just way better than what you get out of a bunch of existing tools that are kind of cobbled together.
01:01:55 So it's a really exciting time.
01:01:57 They're really hard problems.
01:01:58 It's an industry that is very mature, and there's a lot of very established, very good players, and there's a lot of great tools.
01:02:05 But there's also, I think, a good opportunity to look at the big space and try to understand how it all fits together and come up with new ideas.
01:02:13 So we'll see how it goes.
01:02:14 It's a long-term journey.
01:02:17 You mentioned the open source instruction set and the fact that companies like this can exist because RISC-V is not proprietary.
01:02:27 So they can build products based on it and use that as a tool set if a customer comes to them so they want a thing that does whatever.
01:02:35 They don't have to license an instruction set from somebody.
01:02:36 They can use RISC-V.
01:02:37 It makes me think about...
01:02:40 apple's usual mo well they have two different mls one the more traditional one was that uh you know they come up with something themselves and it would be their thing and they would control it and they're happy with that and everyone's great but in the modern world uh apple can't invent everything themselves um so they're
01:02:57 you know they had two options the old one was okay well we'll use something from a third party uh and then the newer option is we'll you know a proprietary thing from a third party and the newer option is we'll use an open thing that nobody owns in particular so example of the third party one is like we're going to put cpus in our computers we'll buy them from motorola we'll buy them from ibm whatever uh and that has been a relationship that's been a little bit fraught the open source one is we're going to build a new operating system we'll build on top of bsd we'll build on top of mock right
01:03:26 uh we'll build our new compiler toolchain on top of llvm which is open you know all you know and even going to the extent of building some things themselves in-house either based on open source projects like webkit from khtml or saying we're going to make a new language and also that language is going to be open source even though that was from the outside touch and go until the official word that was going to be open that's a choice that they've made but still within apple there are situations where they're still in the old pattern which is
01:03:52 We're using a thing.
01:03:53 It's super important.
01:03:54 We don't own it.
01:03:55 And it's proprietary in some form.
01:03:57 And one example, that would be the ARM instruction set that Apple has this license for with whoever owns the ARM stuff.
01:04:03 Right.
01:04:03 And that's, you know, they make their own ARM CPUs, a whatever, blah, blah, blah.
01:04:09 But they don't.
01:04:10 Apple does not own the ARM instruction set, nor is it open source that anybody can use for free, like RISC-V.
01:04:16 Uh, so depending on how the risk five thing goes, and we've been talking for a while in this program about speculating transitions of the Mac to the arm platform.
01:04:24 And in, in our various discussions, we have brought up the idea of like, why is everyone thinking it has to be arm or why does everyone think it has to be way from x86 or whatever?
01:04:32 Couldn't Apple just come up with its own instruction said, what about the inertia of arm and all this other stuff?
01:04:36 Uh, I can imagine a future where, uh,
01:04:39 risk five either has the clout or apple decides to give it the you know to hitch its wagon to that star kind of like it did with khtml which did not have a lot of cloud in the web browser community before apple sort of adopted it uh but kept it open then apple could have an instruction set that is no longer at the mercy of some company that is not apple but that is nevertheless a private company and i don't think arm is going to go out of business and honestly apple could probably buy them if they really got into a pinch but i do wonder about
01:05:09 You know, if if the timelines are lined up differently, we could all be using iPhones with with chips inside them that run some kind of risk five instruction set.
01:05:17 And it wouldn't be that that different of a world.
01:05:20 And I bet Apple it would fit better with the current model of Apple, which is if we don't own it totally in house, it should be open.
01:05:26 Well, so I don't know anything about Apple's plans in the space, so I can't comment to that, obviously.
01:05:32 But I think there's a couple of different factors that I would weigh into this.
01:05:36 So Apple's big enough they could theoretically do anything, right?
01:05:41 And so one of the things that impresses me about Apple is that in the face of immense resources, they're still incredibly strategic, right?
01:05:50 Right.
01:05:51 And it's very this is something that I don't think Google is quite as good at is that Google tries to do everything because they can.
01:05:59 Right.
01:05:59 And that's not always great.
01:06:02 I think I think Google shut down that that kite based Wi-Fi thing, didn't they?
01:06:06 So they're they're raining it in a little bit.
01:06:09 Yeah, so anyways, I don't want to speak negatively about Google.
01:06:12 But the thing with instruction sets is that there's a huge software ecosystem that goes with that instruction set.
01:06:20 And so one of the things that's interesting about RISC-V is that you could look at this and say, well, the RISC-V instruction set's not that interesting, right?
01:06:29 And I think the people behind RISC-V would say that's the whole idea.
01:06:32 It should not be interesting.
01:06:33 It should be very straightforward to compile for and things like this.
01:06:36 But the point is not that the instruction set is magic in some way.
01:06:42 The point is that at the state of evolution that processors are at, the instruction set isn't the most interesting piece.
01:06:48 It's about the software that lives on top of it.
01:06:51 And at any point in time, somebody could go invent their own instruction set.
01:06:54 That does happen, particularly in grad school.
01:06:57 If you're an electrical engineer and you're designing a chip, you can invent your own instruction set.
01:07:02 But if you do that, you have no software.
01:07:04 Where's the web browser?
01:07:05 Where's all the other things that go with this?
01:07:08 Where's the compiler for the C compiler?
01:07:10 All these things.
01:07:11 And so the cool thing about RIS-5 here is that you can say, I'm going to design my own CPU, but I get the software.
01:07:19 And that, I think, is very, very interesting and cool.
01:07:22 Now, coming back to Apple, Apple doesn't need that.
01:07:24 They could invent their own thing.
01:07:25 They have multiple times before.
01:07:27 So I don't know how they weigh all these things.
01:07:30 But yeah, I think for the general industry, it's a pretty big factor.
01:07:38 We are sponsored this week by Linode, my favorite web host.
01:07:41 Whether you're working on a personal project or managing your enterprise's infrastructure, Linode Cloud Hosting has the pricing, support, and scale you need to take your project to the next level.
01:07:51 They have 11 data centers worldwide so far, and they're always adding more.
01:07:55 All these are filled with enterprise-grade hardware and their next-generation network to back it all up.
01:07:59 So Linode Cloud Hosting delivers the server performance you expect at prices that, frankly, you don't.
01:08:05 I've been a Linode customer myself since long before they were sponsoring, about eight or nine years now.
01:08:10 That's where I host my personal server for my blog and the live stream for the show.
01:08:14 It's also where I host all of Overcast, and that makes up about 25 servers there.
01:08:19 And I've been with them this entire time, and I am so happy with Linode.
01:08:23 They are amazing value for the money.
01:08:25 You get such good specs.
01:08:27 You look around the industry, and for the entire time I've been with them, they have been top of the line in both performance and in value.
01:08:35 They really are great.
01:08:36 I've never found anybody who can beat them consistently on value.
01:08:39 And so that's why I'm there, because I spend a lot of money on servers, and I get a lot for it there.
01:08:43 And I wouldn't get that much for my money, or I'd have to spend a lot more pretty much than ever else I've ever seen.
01:08:47 And they have great support if I need it.
01:08:49 They have great performance.
01:08:50 They have all these different options.
01:08:52 So anything you need from basic things like their wonderful $5 a month nano plan, which gives you a gig of RAM these days.
01:08:58 And over time, when they're able to offer more for the money, they just upgrade their plans at the same prices.
01:09:04 And you can just upgrade your servers with one click to the new plans.
01:09:07 It's incredible.
01:09:08 So see for yourself.
01:09:09 Go to linode.com slash ATP.
01:09:12 And when you create a new account, use promo code ATP2020 to get a $20 credit for your next project.
01:09:19 Linode is so great.
01:09:20 I highly recommend it.
01:09:21 If you need servers, check out Linode cloud hosting.
01:09:24 Once again, linode.com slash ATP, promo code ATP2020 when creating a new account to get a $20 credit.
01:09:32 Thank you so much to Linode for hosting all my stuff and sponsoring our show.
01:09:39 So Chris, you haven't been at Apple for several years now, but you are very much a veteran of WWDC.
01:09:45 And you have presented at several, to the best of my recollection, if not all the ones, when you were at Apple.
01:09:51 So as someone who has been on the big stage, the biggest stage, in fact, at WWDC, knowing now that it's gone online only, how do you feel?
01:10:02 feel about that do you think it's workable what would Apple do about labs like do you have any thoughts opinions anything you'd like to discuss with regard to WWDC
01:10:13 Yeah, again, disclaimer, I haven't been there for years and I don't know how they think about it.
01:10:17 But the way I think about it is I think it's actually a huge opportunity in certain ways.
01:10:22 So WRC as a thing has needed to evolve anyways, in my opinion, because you've got too much demand and too little supply.
01:10:31 The labs, if you're one of the lucky people to get the lottery tickets and you get into the labs, it's incredibly valuable.
01:10:37 But what about everybody else?
01:10:39 And the talks are great, but also variable depending on the day each speaker has.
01:10:46 And so this gives you a chance to improve the quality of the talks and maybe relieve some of the pressure on that.
01:10:53 Now, the question for me is, what do they do with the keynote and other things like that, which were kind of positioned as being technical content, but they're really marketing talks.
01:11:03 And so how does that all work?
01:11:05 And I'm not sure about that.
01:11:06 But I think that overall the event will be great.
01:11:09 And maybe this will force an evolution that allows labs or the replacement for labs to be more scalable to more people.
01:11:16 And maybe that will be a good thing.
01:11:18 Now, I think that the other side of this is that this whole shelter in place, people can't talk to each other, you can't go to conferences, really impacts a lot of things, including WWDC, where the community aspects of pulling people physically together and you go have a beer with each other and you see each other once a week.
01:11:36 So that I don't think is really replaceable.
01:11:41 And I would argue that in the case of WWDC, that's already being diluted anyways, just because the community is too big for the venue.
01:11:51 But I think that's something that as an industry, it's going to be really interesting to see what this summer or what happens with all the events.
01:12:00 It's really hard for people on the event planning side of things too, dealing with the uncertainty.
01:12:04 One of the things we've been talking about, speaking of limited resources and supply and demand, is exactly how much of Apple employees and engineers' time WWDC takes.
01:12:16 We're always sort of speculating, like, does
01:12:19 you know does not having to do a presentation on stage live in the moment with all the rehearsals and everything does that free up any engineering resources or is it more or less about the same amount of time because now they're just going to have to be standing in front of a camera pre-recording things or whatever like how would you characterize like the amount of time you you felt like it took you and your teams to prepare for wwc did you feel like you could better spend that time doing something else or did you feel like look this is stuff we have to do anyway and you know it's good that we're doing it
01:12:47 I think it depends on what... So again, this seems like a huge opportunity to me because the dynamic that happens with WWDC is that there are multiple things that Apple gets out of WWDC.
01:13:01 One of which is having that Monday morning keynote forces all the builds to converge.
01:13:09 Beta 1 has to happen.
01:13:11 And that is an incredibly valuable forcing function for engineering management.
01:13:17 to have a clearly defined, easy to articulate goal that everybody understands and can rally behind.
01:13:23 And you just don't have the ambiguity there.
01:13:25 Now, the bad thing about WWDC historically is that crunch time, and it is a little bit of crunch time, as you can imagine, happens exactly the same time you're preparing the technical talks.
01:13:35 So you're trying to, on the one hand, have...
01:13:38 amazing technical content that you're preparing.
01:13:40 On the other hand, you're trying to fix and manage the fixing of all the bugs.
01:13:43 And this is very difficult to juggle.
01:13:45 Now, if they decided to have the keynote on day X and then have the technical talks rolled out two weeks later, you could really change that dynamic.
01:13:54 And maybe that would be better for the sanity of everybody.
01:13:58 I don't think it necessarily dramatically reduces the amount of time that it would take to produce that.
01:14:04 The thing that you get back, I think, is the 1,000 Apple engineers or however many it is that actually attend a week of the conference.
01:14:12 And so you get that back.
01:14:14 But I think that is probably minor when you look across all of Apple's engineering efforts at this point.
01:14:21 So I don't know.
01:14:22 I think it'll be really interesting to see what they do.
01:14:24 And Apple's a very strategic and very smart company and has a lot of very smart people.
01:14:28 I'm sure they're looking at how to turn this into a new opportunity and what new things they can do with the format and how they can delight people in new ways.
01:14:38 If you had to put money for or against there ever being another in-person thing like WWC again, would you say for or against?
01:14:47 You got to put money on it.
01:14:48 One dollar, one dollar bet.
01:14:50 Well, so this comes back to your observation about Swift, which is you do a thing and then see how it works out, right?
01:14:58 And so I think that if they do WWC virtually this year and it sucks, then it's probably going to go physical again.
01:15:05 That's not how betting works.
01:15:07 I don't know.
01:15:07 I would wager that it doesn't return to its original format.
01:15:13 So if it does, if there is an in-person event, I think it would be significantly different than what the historical events have been.
01:15:20 We'll see.
01:15:22 So we'll see.
01:15:22 I don't know.
01:15:23 It's been funny for me because as I found out about this news, which we all kind of expected, on the one hand, I was kind of happy because I've been lucky enough to go to many of the last WWDCs and have a ticket.
01:15:36 But nevertheless, it is certainly way, way, way...
01:15:40 too little for the amount of demand that there is, as you said, Chris.
01:15:43 And so on the one side, for the actual event itself, I was like, oh, you know what, that's probably for the best.
01:15:47 But then on the other side, and this is another thing you said a minute ago, not being able to rub shoulders with not only my two co-hosts, but a lot of the people, some of whom are within Apple that I know, and some of our mutual friends that all kind of descend on San Jose that one week in June.
01:16:03 I'm really going to miss that quite a bit if that doesn't ever return.
01:16:08 It is definitely a yin and yang sort of thing that I'm very curious to see what will happen in 2021, assuming we all survive until then.
01:16:16 But moving along.
01:16:17 Well, so let's flip that question around.
01:16:21 What opportunity does this produce for things like AltConf?
01:16:24 Right.
01:16:25 Because there are people that are interested in pulling people together and there are a lot of interesting community events.
01:16:31 And maybe this is an opportunity for them to benefit and for the community to self-organize in ways that Apple perhaps wasn't super great at in the first place.
01:16:40 Yeah, I couldn't agree more.
01:16:41 And I think some of the trouble is, you know, any sort of physical self-organizing isn't happening, quite obviously.
01:16:46 Well, not this summer.
01:16:48 But I think the question is, as you project forward, I'm really curious to see what the pandemic does to human culture.
01:16:56 I mean, I think it's a really interesting – you think about –
01:16:59 I don't know, pick your time frame, two years from now, three years from now, when all the dust has settled, things have gone more or less back to normal, we have reassembled the U.S.
01:17:07 economy and the world economy.
01:17:10 What's different, right?
01:17:11 And 9-11, just within America, had a fairly profound impact on a lot of little things across our world.
01:17:20 And...
01:17:21 This is a global event, right?
01:17:23 This is a global event that's a much bigger impact.
01:17:26 And I think it's going to be very interesting to see how this changes the way we look at things.
01:17:30 It could have widespread effects on how people think about in-person meetings.
01:17:35 You're working from home, maybe far more socially acceptable outside of software and other industries where it's been more common.
01:17:43 I think it could have really interesting effects on society and culture in general.
01:17:48 Well, no, things have really changed if Apple starts letting people work from home.
01:17:54 It does happen.
01:17:55 It does happen.
01:17:55 So I feel like, Chris, in the first part of our conversation, you know, talking about your past of the last three or so years.
01:18:03 I keep coming back to something you said to us the last time we spoke, and this is not the only time you've said it.
01:18:08 You said in so many words, like you want Swift to take over the world.
01:18:11 And I feel like in many ways, your roles at certainly Google in particular, it is you trying to get Swift to take over the world.
01:18:22 So three years on from when the four of us last spoke, how do you feel that goal is coming along?
01:18:28 Do you feel like you've made tremendous progress, not enough progress?
01:18:31 Where do you feel like it lies?
01:18:33 Well, so I think there's different ways of interpreting this because my... Let's come back to why I believe that, right?
01:18:40 So my goal is never to take Swift and shove it down the throats of people who don't want it, right?
01:18:47 My goal is for Swift to be such an amazing thing that people want to use it, okay?
01:18:54 And when you look at this and you look at the machine learning community...
01:18:58 And when I was starting there and when I was talking with people, when we were talking about this whole Python problem and things like this, and the general sentiment was everybody uses Python.
01:19:07 Yeah, it's not great, but everybody uses it.
01:19:09 The world will never change.
01:19:11 And I come at that and say, hey, well, the world doesn't change unless somebody steps up to change it.
01:19:16 This is merely hard.
01:19:17 Let's work backwards from this.
01:19:19 Let's look at all the different problems, including the migration problem and social acceptance and da, da, da, da.
01:19:24 interoperability, like all of these things and solve the problems.
01:19:29 And if you solve the problems, then you can test the social question, right?
01:19:33 And in the meantime, it makes Swift a better language and there's other things that you can do there.
01:19:39 The thing that's weird and completely human is that people generally don't like switching technologies.
01:19:49 And so when you look at the Swift on the server community, to just pick one that you're more familiar with maybe, there what I'm saying is that you see people that use Swift in a different part of the world and they want to bring it with them because they like Swift.
01:20:03 You don't see, you know, I'm a random Node.js developer and I don't know anything about Swift.
01:20:09 I'm just going to start using Swift on server because I want to learn a new thing.
01:20:12 You generally see people pull it with them.
01:20:16 And when you come to language design, one of the things that was really part of the idea of Swift in the first place is building one language that can scale up and down.
01:20:25 One system that can, you know, write...
01:20:28 bootloaders in, but also feel like a scripting language.
01:20:31 The initial Swift programming language iBook even included this in the intro, talking about this notion of scaling from systems up to scripting and being easy to teach, but very powerful at the same time.
01:20:43 And if you achieve this, then what you do is you build on the natural tendency that we as humans do, which is we take a thing, we get used to it, and then we want to bring it to adjacent problems.
01:20:55 Because very few people work on exactly one thing ever,
01:20:58 Usually you're working on a thing and then you're like, okay, well, now I've set up a front end.
01:21:02 Well, hey, this technology is nice.
01:21:05 If it works for me, like if all the prerequisites are there and it is actually good for that, well, I'd rather have one set of editor bindings, one set of string APIs, one set of all the things.
01:21:17 And so naturally what happens with languages is you get diffusion across different fields.
01:21:22 And so Swift, I think, is doing that.
01:21:26 Of course, diffusion takes a lot longer than that initial iOS, the iOS growth within that community.
01:21:36 But I'm seeing a lot of that diffusion now.
01:21:37 It's really exciting.
01:21:38 It's really great to see.
01:21:39 I still think there are huge missing features and missing tons of work that is left to happen.
01:21:45 But as that starts happening, I think it's going to be even more exciting.
01:21:49 you mentioned the scripting thing and uh way down uh lower in the notes i don't think we'll have to get into much detail there's the brisk project that i uh brought to your attention a little while ago um which is like a sort of a bunch of things built uh libraries i guess on top of uh swift to make it a better high level scripting language and when i see things like that i feel like it's like a
01:22:13 It's like a gift because, you know, so you have this language you want it to be able to scale from, you know, systems programming at the low end all the way up to high level scripting.
01:22:21 And you can write a Swift script and you can, you know, put a little line at the top of the file and just run it from the command line.
01:22:26 But there's more to a scripting language than just being able to just write in a text file and run it, quote unquote, without compiling, even though, you know, it's being compiled behind the scenes.
01:22:33 something like brisk is saying here are the pain points like if I want to dash off a couple line script here's why I don't use script I don't use swift because I feel this pain point doing this is awkward and doing that's awkward and so it's basically it's obviously someone who loves swift who's writing brisk like because they're trying to like Paul Hudson yeah I think so yeah like he's bringing on his you know his suitcase his tool that he likes hey I like swift sometimes I find myself having to write scripting things
01:23:03 I want to use the tool that I like, but the tool that I like is just not quite well suited for it in these sorts of ways.
01:23:11 And so you write this kind of wrapper library as a proof of concept to say, well, if Swift is more like this and more like that file would be easier and it wouldn't have to deal with this kind of errors or types or, you know, all sorts of stuff like that.
01:23:22 Um, and you know, if I, I'm, I haven't kept up with this, but I'm hoping that the, you know, the Swift evolution community looks at this and says, if we're interested, if some subgroup is interested in making Swift, a better scripting or high level language, um,
01:23:38 look at all of those the things that are in brisk and say is this a pain point can we address this pain point in a language proper because i can't imagine the solution is actually to have a series of wrappers on top of wrappers and top of wrappers if there's some problem that makes swift ill-suited to be a scripting language as compared to other quote-unquote real scripting languages it's probably best addressed at the language level but at least that's that's what my thinking is what do you think when you see a project like that
01:24:03 So I'm not super up to date on what is happening with Brisk.
01:24:08 I think when I looked at it, it's a really cool project.
01:24:11 One of the things I would observe here is that what Swift has done in this case is it has turned a language design problem into an API design problem.
01:24:19 So Paul, for example, he's not a compiler engineer.
01:24:22 He's an author and he's a smart, experienced Swift programmer.
01:24:27 He's not a compiler engineer and he's not into making language changes, nor should he have to be.
01:24:32 But he's able to go and tackle this problem and solve it through API design.
01:24:36 That's actually pretty cool.
01:24:38 That's one of the things that allows Swift to scale is you get people that have an area that they're interested in and they can be effective because you've now lowered the bar for solving these problems to, quote unquote, merely designing an API.
01:24:54 Now that API design is really hard, as I'm sure you all know, but that really shifts the balance versus saying you have to go in and hack the language or the interpreter or things like this.
01:25:03 Now, as far as Swift Evolution goes, there's a tremendous amount of work.
01:25:08 There's a recent proposal from Nate about incorporating command line argument processing and having a really beautiful API for doing that and using property wrappers and all the latest cool things to be able to make that natural expressive fluid and such.
01:25:23 And so there's a lot of work, I think, tackling different pieces of these things, but they're not all...
01:25:28 There isn't one right answer.
01:25:30 It's all the different pieces have to come together.
01:25:31 And I just love, again, this is an example of diffusion where you have...
01:25:38 Paul is able to say, hey, well, there's a thing I like.
01:25:42 Hey, I don't like it in this way for this reason, this other thing.
01:25:45 So I'm going to go do it.
01:25:45 I'm going to go solve it.
01:25:46 And that's where you get languages and technologies that spread and cover an ecosystem is because people are able to do that.
01:25:54 And you've made it so anybody or Paul can go off and solve that problem for himself versus waiting for a compiler engineer to schedule time in their day to go care about the thing that he cares about.
01:26:07 Swift has always had that kind of like with the standard library being written in Swift, like that, you know, that int and string and all that stuff are not like, you know, like there are types that are also written in Swift.
01:26:18 Now, if you were to look at the standard library, it's some fairly terrifying Swift code in many cases.
01:26:24 And often that's because, you know, features that you wouldn't expect a regular Swift code.
01:26:30 programmer to use are essential to make stuff in the standard library work.
01:26:34 I'm not sure if that's been itself evolving over time so that the standard library starts looking more like normal Swift code and less like the craziest Swift code you've ever seen to make all the machinery work.
01:26:44 That definitely has been making progress.
01:26:47 It's still not there yet, but...
01:26:48 yeah i mean i guess i guess that you know so i still feel like there is that this slight discontinuity of like the standard library yeah it's in swift and hey you can send a patch to it in swift you don't have to be a compiler engineer like a you can more or less understand it and b you can actually fix it uh and you know without having to know c++ or any of those stuff um but then for things like brisk or other sort of api wrappers the command line parsing thing that is just more straightforward like library code and
01:27:16 no one's going to look at the command line parsing library in Swift and be terrified that it's doing weird, strange stuff because it's, you know, there's enough language features there that you can write, especially with property wrappers.
01:27:25 That's, you know, language feature that lets you make a quote unquote Swifty, whatever that means at any given point in time, a Swift, a Swift like API using language features to make it simpler, more elegant, fewer moving parts, a novel way to do a thing.
01:27:40 I mean,
01:27:40 property wrappers is really a lot of people go wild with some stuff like that but that's i think it's a natural sort of explosion of experimentation um but those are two separate worlds of like the standard library which is still a little bit intimidating but very super important and then i don't know what you call it is there a name for the things that aren't part of the standard library but you know so so let me let me pull this back together because you have a really important point right which is
01:28:05 So one of the original design points of Swift that has worked really well is it has this idea of progressive disclosure of complexity.
01:28:13 So you can make Hello World be one line of code.
01:28:16 It looks just like Python, right?
01:28:18 And then you can introduce functions.
01:28:20 You can introduce classes.
01:28:21 You can introduce variables and control flow.
01:28:23 You can introduce each of these things as you go.
01:28:25 And what Swift does is it is really designed.
01:28:29 It has a lot of design effort put into it.
01:28:30 This is one of the focuses and one of the huge contributions that Swift evolution brings.
01:28:35 in terms of really obsessing about the details of how things work and how they look and how they feel.
01:28:41 Now, that doesn't mean that Swift is a simple language.
01:28:44 And so Swift, on the one hand, is factored really well, I would say.
01:28:48 And so this progressive disclosure of complexity is a big piece.
01:28:51 So it's not like C++, where every mistake of the past is thrust in your face when you do simple things.
01:28:59 But on the other hand, it does have tremendous depth.
01:29:01 And so property wrappers are one of these super powerful features where, you know, you don't have to be an app developer and know what a property wrapper is, but as a library designer, you can now achieve a very fluid and expressive API because you're using this feature.
01:29:14 Coming back to the Python interop, same deal, right?
01:29:18 The people using the Python interoperability don't know how the library is implemented.
01:29:22 It's implemented in pure Swift.
01:29:23 It uses some
01:29:24 some cool features that are fairly esoteric, like the dynamic member lookup feature, right, which normal application developers have never used.
01:29:32 But the fact that you have one contiguous system where you can scale up and scale down is, I think, really powerful.
01:29:39 this goes all the way down to the standard library.
01:29:41 Now the standard library, it's, it's hardcore using every crazy feature because people care about performance and there's a lot of low level things going on in certain parts of it.
01:29:53 But if you go look at like the array APIs and things like this, or you look at the collection APIs and,
01:29:57 They're all fairly reasonable, very simple Swift code.
01:30:01 And that you can see in your own applications by just adding an extension to string or an extension to an array, and now you can just write normal code.
01:30:09 And that's basically what the code you'd see in the standard library is.
01:30:13 And so I think that is one of the things that is fairly unique about Swift is that because it's trying to span this big gap, both in terms of
01:30:22 domains of application, but also in terms of user, like, I don't know if sophistication is the right word, but the level of craziness of the individual programmer.
01:30:34 And because you can support that all in one system, you end up with this really interesting world where you don't hit a ceiling, right?
01:30:41 In Swift, if you get to the thing where arc is a problem for you, you can drop down to unsafe pointers.
01:30:47 And you can bang out what is effectively C code to go manipulate bits and push around pointers in a completely C-like way.
01:30:56 And it's complicated, but you can do it.
01:31:00 And the fact that you can do that in one system versus having to swap out, I think, is quite powerful and very different.
01:31:05 I think we asked the same question the last time we talked, and we'll see if we've made any progress in three years.
01:31:10 But it's the idea of Swift self-hosting, having Swift compiler written in Swift, and the natural extension of exactly what you're talking about, that Swift all the way down.
01:31:18 Are we any closer to that, or does that still remain not an area of active development?
01:31:23 We are making some progress on that.
01:31:25 So I think the very tip of the iceberg, there's a project by Doug Greger who is working on rewriting the driver, the command line interface to Swift.
01:31:34 He's writing that in Swift.
01:31:36 And I don't know the exact status of that, but I think that's underway.
01:31:39 Hilariously, like MLIR actually helps with this.
01:31:42 The whole sill layer could be switched over to MLIR and then you don't have to worry about that.
01:31:46 It's actually doing that would make Swift itself a better compiler.
01:31:50 I don't know that anybody's signing up to do that work.
01:31:53 There's a lot of different ways to do that.
01:31:55 It has not started in RIS, though, and that's a sad thing.
01:32:01 Now, there are features in Swift that are still missing, and I think that getting some of those would lead to a better compiler root in Swift.
01:32:08 One of the ones I'd make a shout-out for is there's a longstanding proposal that is making slow steps at every release towards building what's called an ownership model into Swift.
01:32:20 And ownership in this case, there are languages like Rust that allow you to use types to control how your memory gets owned and managed.
01:32:32 And so Rust doesn't have something like Arc, where you have dynamic memory management with reference counting.
01:32:38 It's all static, and it's all driven by putting tons and tons of annotations in your code.
01:32:43 um rust is a great language incidentally also builds on top of lvm uh and so it's it's like i'm a fan of rust but the the feeling of rust is you have to think about memory management all the time like that's part of the way you program it uh swift on the other hand is coming in from a different angle of like you don't want to have to think about memory management until you do right and so with arc
01:33:04 Arc allows you to more or less ignore memory management until you get to cycles, roughly, right?
01:33:11 Or until you get to performance.
01:33:14 And the Swift compiler and the stack and all the design decisions have worked really hard to make it so that you get really good performance out of the box.
01:33:20 But when you run up into a cliff, a performance cliff with Arc in Swift, for example, your option today is you drop down to unsafe pointers and you start writing effectively C code to deal with it.
01:33:34 What ownership in Swift does is it allows you to write safe code, but it gives you the ability to add new annotations into your source code to say this is owned, this is borrowed, and pass around these ownership modifiers in your code, giving you a new point in the space where instead of having to choose between safe but less performant and unsafe but as fast as you want to go, you now can say it's safe and there's extra annotations in your code.
01:34:01 And so, again, progressive disclosure of complexity.
01:34:04 This is not everybody's cup of tea, for sure.
01:34:06 But for people who value safety and are willing to do the extra type annotations, that really completes the triangle of this design space.
01:34:15 And I'm very much looking forward to that.
01:34:17 This is like the flip side of the brisk thing, only at the other end of the spectrum, low-level stuff.
01:34:21 Why isn't the kernel written in Swift?
01:34:23 Why aren't the low-level stuff written in Swift?
01:34:25 Speaking of, I assume, somewhat related topic, I recently watched, I don't know why this came across my transom, it's from the 2019 LLVM Developers Conference, the talk on ownership SSA, which is more at a compiler level to...
01:34:37 efficiently and correctly essentially implement ARC, as far as I can tell, with the ownership model.
01:34:42 But what you're talking about is a proposal where in your actual Swift code, you'd annotate ownership information, right?
01:34:49 That's exactly right.
01:34:50 So it's a language feature.
01:34:51 It's not a compiler internal implementation detail.
01:34:53 And I mean, the way I look at Rust is Rust is coming from this world of its base assumption is that everybody should think about memory management more or less all the time.
01:35:06 And so with that worldview, it being, I mean, you encounter ownership in Rust on the first page of most tutorials because you need to think about ownership to deal with strings.
01:35:16 And so if you want to print Hello World, you have to tell the compiler how to manage that string.
01:35:20 And so what the Swift approach is doing is saying, like, this is really powerful for the people that care about performance, but you should be able to just care about performance in the standard library and have everybody that uses the standard library or your other high-performance library.
01:35:36 You can care about it in that domain, but then all the clients get the benefit of it.
01:35:39 And you get more modularity out of that.
01:35:41 And you, again, get...
01:35:42 the ability to think about this as a performance optimization instead of the programming model that everybody must use to understand and work with your system and language and code.
01:35:52 So I'm really excited about that.
01:35:54 Somewhere between these two extremes, I'll get regular expressions someday, right?
01:35:58 Oh, man, you're killing me.
01:35:59 I'm so sad.
01:36:01 Someday it will be so beautiful.
01:36:02 But again, this is a... So all of these things come into the reality that's easy to forget, which is that Swift is only...
01:36:10 five years old five and a half years old now at this point from the announcement and so it's still it's still quite early days and by the time swift is 10 and it's all figured out and starts getting stodgy and old and doesn't people start complaining about no and doesn't move and isn't exciting anymore well that's when you know it's successful do you think it will be all figured out by the time it's 10 uh 10 years old yeah um
01:36:38 Well, so it depends on what you mean by all figured out.
01:36:41 I mean, I think that my hope is that by the time it's 10 years old, it's more of a library design problem than a language design problem.
01:36:48 I don't think that continuing to shove new language features in on an ongoing basis is a good thing.
01:36:54 I mean, I don't know if you're aware, but C++ 20 is coming and it has lots and lots of exciting new additions to C++.
01:37:01 That's a black hole for language features, C++.
01:37:05 And I mean, there's some good things there, but there's also a lot of complexity and it's unclear exactly where that goes.
01:37:13 The committee is working on C++ 23 features, which are also there.
01:37:18 Let's just say the rate of addition is outpacing the rate of removal by
01:37:22 Nearly infinity.
01:37:24 It's like C++ is a denial of service attack on other languages.
01:37:27 You can't compete because you have to maintain C++ compatibility in your compiler infrastructure.
01:37:31 And just keeping up with the C++ features is so much effort that you don't have time to make your own languages.
01:37:36 You found time, but still.
01:37:38 I think there's a reasonable question, which is...
01:37:42 Clang C++ was barely possible back in 2010, right?
01:37:48 Is something like Clang C++, is a from scratch re-implementation of C++ possible today?
01:37:54 Well, I don't know because the language is a lot more complicated now than it was back then.
01:37:59 And, you know, anything's possible.
01:38:03 Humans are amazing and humanity is amazing and can achieve...
01:38:06 uh unpredictable things but but it's it's just way harder and there are so i'm i'm not i don't follow the c++ community and the standards and things like this but there are reasonable people who are super smart and whose identities are very much tied to the c++ community they're really um unhappy with the progression of c++ and feel like the
01:38:29 you know, it's kind of jumped the shark and they're taking more things than they really should take and they're not baking it long enough.
01:38:35 And that's also, if that's true, because again, I don't follow that closely, but if that's true, that's also very concerning because language design is hard and the decisions you make, you're stuck with almost forever.
01:38:47 And so I hope that they don't do that.
01:38:51 Until then, everybody can just argue about what the tasteful subset is.
01:38:54 Yeah, that's what we've been talking about in this show on and off through various Swift malcontents who will not be named.
01:39:03 Whether the same thing you just described for C2L Plus is actually true of Swift in some ways.
01:39:07 Oh, is it taking on things, more language features than it should?
01:39:10 Is it taking on things that aren't fully baked?
01:39:12 Is it changing too much?
01:39:13 I mean, I don't know if Casey, you want to chime in and try to give a summary of our ongoing debate and pithy characterization of some of our complaints about Swift.
01:39:24 Oh, sure.
01:39:25 Leave it to me.
01:39:25 I see how it is.
01:39:26 For the record, I love Swift.
01:39:28 No, no preface.
01:39:30 Go ahead.
01:39:31 Okay, here it is.
01:39:33 Make it brutal.
01:39:34 Make it honest.
01:39:35 Let's talk about the real thing.
01:39:37 Marco should talk about it.
01:39:40 Come on, Marco.
01:39:41 Well, honestly, I'm not that qualified to talk about it because I hardly use it still.
01:39:45 I'm still very much in my almost entirely Objective-C code base most of the time.
01:39:51 I do have some Swift code in Overcast, but it's not much.
01:39:55 And most of the time, I'm still writing either Objective-C or Straight-C, actually.
01:40:01 Just recently, stuff I've been doing has been a lot of Straight-C.
01:40:04 But I have this characterization that Swift is a dick.
01:40:08 And this is, you know, an argument as old as Swift of, you know, basically being a dick versus being usable.
01:40:16 And, you know, if you look at, like, you know, scripting languages, usually, as you mentioned, you know, Python earlier, you know, usually, you know, untyped or dynamically typed languages are usually much more pleasant and straightforward to use, not only for beginners, but also in contexts like scripting, where even experts just don't want to deal with certain things and just kind of want the language to just, you know,
01:40:36 figure it out.
01:40:37 You have the string representation that is the string of the character one.
01:40:41 You try to use it as a number, it just behaves like number one.
01:40:44 That kind of thing.
01:40:46 Swift obviously goes way the other direction and goes towards strong typing, strict typing, correctness by compiler versus runtime stuff.
01:40:57 Obviously this is an old argument, but it does result in overall as people learn the language and
01:41:05 in many ways, even as people who already know it, use the language.
01:41:09 Man, Swift is such a dick sometimes.
01:41:12 It really does feel like it.
01:41:13 And I wonder, like, I mean, obviously to some degree, if what you're going for is a safe and strongly typed and compiler-checked language, to some degree of that is inevitable, how do you strike that balance and
01:41:27 And in the case of Swift, a lot of that falls on, I think, the tooling, not being able to do things like produce good error messages.
01:41:36 We see this a lot with, here we are in year one of SwiftUI, and if you mess up something in SwiftUI, the error messages that you get are ridiculous and very difficult to debug.
01:41:50 Obviously, this is all balances, right?
01:41:52 Let me call it time, because you're touching on six or seven different things.
01:41:57 Yeah, yeah.
01:41:58 Fair enough.
01:41:58 Let's pause and then keep going.
01:42:01 So there's a whole bunch of different things here.
01:42:02 So you're right, fundamentally, that Swift is picking a point in the design space that is not designed for, quote unquote, do what I mean, is the way I would put it.
01:42:12 And what I would say is that dynamically typed scripting languages are really amazing when you have, I mean, in many cases, but like, for example, you have 50 lines of code or 100 lines of code.
01:42:23 The whole thing fits in your head.
01:42:25 Maybe it's a one time you're going to use it for an afternoon and then throw it away anyways.
01:42:28 And so, you know, for that kind of a thing, a dynamically typed language is, I would probably say better unless you're getting something out of the library ecosystem.
01:42:40 The problem with dynamically typed scripting languages is that there are certain places where it becomes a trap because programmers at large don't always differentiate between it feels good now versus it's a good idea as I look ahead.
01:42:59 And so one of the things I've seen is that people start writing, it's a 50-line script.
01:43:03 It's not that big of a deal.
01:43:04 And then somebody else comes and adds a few more features and then somebody adds a few more features and it gets embedded into a
01:43:10 a bigger framework.
01:43:11 And then suddenly you have a hundred thousand lines of, of Python code.
01:43:15 Right.
01:43:15 And at some point you've passed a threshold where it stops fitting in your head.
01:43:19 And now the scale aspect of that has kind of put you in a place where it's harder to maintain.
01:43:24 It's hard to evolve and reason about it.
01:43:26 And I'm not picking on Python here.
01:43:29 Pick Python.
01:43:29 Let's pick on JavaScript.
01:43:31 I don't know.
01:43:31 This is a general thing.
01:43:33 But the ecosystems have developed good testability and unit testing solutions and things like this.
01:43:40 But what Swift is trying to do is it's trying to allow you to have that progressive path from something small to something big without there being a point of no return or a point where you're like, gosh, I really just want to go rewrite this all because now this technology doesn't scale for me.
01:43:55 To your point, that means that when you scale all the way down, it's not really optimized for that.
01:44:00 And I think that is true.
01:44:02 But coming back to the Paul Hudson framework, Brisk, the fact that you can solve these problems in a library means that
01:44:12 Hey, you know, if it means that you can use the same technology stack and your libraries and interact with all your model code and you just import a I'm doing some lightweight scripting kind of API stuff, you actually get a fairly contiguous world there.
01:44:24 And I don't know if that's a full solution, but I think it's a really interesting piece of it.
01:44:29 it's hardly what you're going for is to have one language that covers everything or it covers a, you know, most needs from big to small, you know, from low level to high level from, you know, more forgiving, you know, to, to very, you know, you know, rust like, uh, uh,
01:44:45 Is it possible to have that in one language?
01:44:48 Because some of what you're talking about is, as you said, it's kind of the difference between the library and the language.
01:44:54 In my opinion, the API and the language are inextricably tied.
01:45:00 And that when people...
01:45:02 talk about a language, use a language, describe what's good about a language, much of the time, what they're talking about are features of its standard library or features of its ecosystem that are API-based.
01:45:12 I completely agree.
01:45:14 And so those are inextricably tied together, in my opinion.
01:45:16 So before you add more questions and more things, it is clearly the case that you can have one language that spans all the things.
01:45:26 This is proven by C.
01:45:27 C, you can now write a web page in WebAssembly in C, and you can obviously write low-level stuff.
01:45:34 People have written web servers in it.
01:45:36 You can use C to do all these things.
01:45:38 Now, you made an interesting point in the clarification, which is that doesn't mean it's good for everything.
01:45:44 And so there's a big difference between what you can do and what it's actually good at.
01:45:49 And so this gets into ecosystem, design points of the library, how the language works, friendliness, all that kind of stuff.
01:45:56 I think the thing about Swift that is interesting and different here, and I don't know if this will work out, honestly, right?
01:46:03 This is all an experiment.
01:46:06 Nobody knows the outcome of what things will look like in 20 years.
01:46:10 But Swift was designed from the beginning to try to do that.
01:46:13 And so a lot of other languages, a lot of other systems, like let's pick on JavaScript, a language that everybody uses and many people love.
01:46:22 JavaScript was designed... I think there are people who love JavaScript.
01:46:27 Maybe not everybody, maybe not you guys.
01:46:30 Here I am from the PHP waste dump looking over and making fun of JavaScript.
01:46:36 It makes PHP look totally consistent and designed and normal.
01:46:39 Well, so what I was going to say about JavaScript is, like, to me, JavaScript is one of these examples where JavaScript was designed to be an on-click handler in a web page, right?
01:46:49 The original idea back in the day is it was rushed together in a couple of weeks to build the prototype, and they shipped the prototype, and it was designed to be this lightweight scripting language you embed in a web page, right?
01:47:01 You fast forward to today, and you get diffusion and communities and the way humans work, and now people are writing web servers in it, right?
01:47:08 And they're writing hundreds of thousands of lines of code of JavaScript.
01:47:11 And JavaScript was never designed to scale that way, but people will use it for that anyways because that's how humans work, right?
01:47:19 And so your question is, is it possible?
01:47:22 Well, it's definitely possible to span all the different things.
01:47:25 The question is, is it good?
01:47:26 And I think what Swift is trying to do is it's trying to be good at all those things.
01:47:30 Now, it can't be optimal at every point in the design space, and I think that's okay.
01:47:35 The question is merely, is it useful?
01:47:37 If you squeeze and you are good enough at a certain space, can you build a big enough community of people that care to invest, to build the APIs that really evolve and build the frameworks and get that ecosystem virtuous circle going?
01:47:52 And I think that's the interesting and untested question.
01:47:55 And after that virtuous circle goes for a few cranks, do you end up with something that's truly beautiful or is it just like, yeah, whatever, okay, you can write web pages and see, and it's good for compatibility, but nobody would actually want to do that.
01:48:07 So I don't know.
01:48:09 We'll see.
01:48:11 So we talked a little bit on and off about SwiftUI.
01:48:15 And one of the things that I found striking about SwiftUI is, as someone who had been writing Swift for, I don't know, two or three years at that point, when I saw SwiftUI and I realized, oh my God, this DSL is actually Swift, kind of, it struck me as though it is, the DSL is just stretching Swift all the way to its breaking point.
01:48:35 And as per the error messages up until perhaps this last release this week,
01:48:39 Perhaps past its breaking point.
01:48:41 So I don't know how much you are willing or able to comment on Swift UI, but is that too much or is that just right?
01:48:48 And is that what makes Swift so beautiful that it can be tweaked and bent to be a DSL in line where in a place where I would not expect it to be?
01:48:57 I see both sides of Swift UI.
01:49:00 Um, so on the positive side, Swift UI is a very beautiful, very expressive, very nice way of building things.
01:49:10 Um, I think that it has gone a little bit too far in the quest to like remove commas.
01:49:14 So the slide looks beautiful on a slide and things like this.
01:49:17 I don't think that that trade-off is worth it.
01:49:20 And, um,
01:49:21 I'm not sure if you are aware, but the function builders feature that is the thing that enables all the metaprogramming in SwiftUI hasn't even been standardized.
01:49:29 It hasn't even gone through Swift evolution.
01:49:31 So technically SwiftUI is not expressable in Swift.
01:49:35 Think about that.
01:49:35 Okay, yeah, I take your point.
01:49:36 I take your point.
01:49:37 Right, so now there's continuing forces that are trying to do syntactic optimization and trying to get rid of, like, little punctuation and stuff like that.
01:49:48 I am very concerned about that, honestly, because the way I look at it, and again, I'm just a community member at this point, but the way I look at it is that Swift...
01:49:58 The analogy I would make is that Swift is like a house.
01:50:01 And the house has a lot of bricks that are still missing.
01:50:04 So things like ownership, things like concurrency, things like regular expressions, John.
01:50:08 These are big bricks that have fairly big impact on the language.
01:50:13 We know we want to build them.
01:50:14 There's actually very progressed white papers that explain how they should fit together.
01:50:20 But you need to build those.
01:50:21 You need to fit them together.
01:50:22 And if you start dumping in syntactic sugar too early...
01:50:25 You end up with a house that you put in all this mortar.
01:50:30 You add mortar in between that you normally fill in between the bricks, but now you can't fit the bricks in because you've taken syntactic space and you added language complexity.
01:50:39 Or when the brick falls in, you decide, oh, wow, there's a better way of achieving that syntactic thing in the first place.
01:50:44 And so I hope that the Swift community in general really stays focused on the key technologies that we need to build and land and make sure those are really good.
01:50:56 And I think that it would be good to resist the urge to add lots of syntactic sugar for things.
01:51:03 Now, SwiftUI, again, coming back to positive, it's a profoundly transformational system.
01:51:08 I think it's really Swift's coming of age within the Apple community, which people are taking it very seriously.
01:51:14 And suddenly it's like, clicking is like, wow, this is actually a really good thing.
01:51:18 And it's very beautiful how it works.
01:51:23 I mean, one of the profound things about Swift UI, which is a technical,
01:51:27 is SwiftUI really leverages the type system in Swift to make the diffing part of the functional reactive programming model it provides very efficient.
01:51:36 And so if you look at Dart and some of these other systems, they have very bespoke, very...
01:51:45 interesting systems for making it efficient, which are much more invasive than what Swift UI has done.
01:51:51 And Swift UI has just built random Swift type system.
01:51:53 And I think that is truly beautiful.
01:51:55 And I think that the team has done an amazing job at that.
01:51:58 But I'm a little bit concerned that Swift UI and the pressure and the visibility of that API means that there's a lot of pressure on the Swift language to take things that it might be better to wait for.
01:52:10 Is it unprecedented to add, I mean, I'm trying to think back in the history, like you mentioned, like the stuff that they're building on is not yet standardized in part of the language.
01:52:21 Did that happen at any other point during Swift evolution where there was some Apple feature that they shipped and the things that it, like imagine Apple shipped some kind of API that had property wrappers, but property wrappers hadn't landed in language proper yet.
01:52:32 Has that happened before?
01:52:34 So that has happened at WWDC, but never at the GM final release of Swift.
01:52:39 And so Apple has surprised and delighted people with features at WWDC, but then the team works very hard to actually push it through the standards process and then iterate and change the feature in response to feedback.
01:52:50 Because a lot of like Swift Evolution isn't just about allowing the community to know it's coming.
01:52:56 It's about making the features better based on the input from the community, because there's a lot of smart people that don't work at Apple.
01:53:02 And so, um, so if you guys, the first where it has actually shipped and it's an underbarred attribute, and I'm not exactly sure how that will work stuff out, but there's a lot of really good people working on this and they all want the right thing to happen.
01:53:15 And they're pushing really hard to, to pull things together and, um,
01:53:18 I would also say that SwiftUI very noticeably had bad error messages when it first launched and even in the first official release of it.
01:53:30 And so that motivated folks at Apple to put more engineering effort into improving error messages.
01:53:35 And that helps everybody.
01:53:36 That's a great thing that is a feature brought by SwiftUI that really has nothing to do with the framework itself.
01:53:46 So it's complicated.
01:53:48 I would say like these things, there's no like binary way to look at it.
01:53:51 It's just a complicated set of issues together.
01:53:54 Absolutely.
01:53:55 And I think coming back to what Marco was saying about Swift being challenging is that, you know, what I was doing, you know, Swift early on, you know, after year one of Swift being around in public was,
01:54:05 Even then, error messaging was rough.
01:54:08 And it got a lot better for vanilla Swift after that.
01:54:11 And then I think things settled down.
01:54:13 And renaming everything every other minute stopped happening after, what was it, Swift 2 or 3 or something?
01:54:18 Swift 3, I think.
01:54:20 And everything seemed to settle out and start to get a lot more consistent.
01:54:23 And that's when I think for me, even though I'd been writing Swift for a little while at that point, it stopped being constantly prickly and started being genuinely amazingly fun to work on.
01:54:34 And another thing that I find fun to make a terrible segue, you had mentioned functional reactive programming earlier.
01:54:40 And I'd asked you last time we spoke about RxSwift, you had said perfectly reasonably they hadn't really touched it or looked at it that much, but it looked neat.
01:54:48 One of the things that, at least from an outsider's perspective, SwiftUI is broad is combine, which is kind of Apple's take on RxSwift, if you'll permit me to say so.
01:54:57 Have you looked much at combine?
01:54:59 Are you familiar with it at all?
01:55:00 Does that rev your engine in any way, shape or form?
01:55:02 Or are you kind of whatever?
01:55:04 I don't care.
01:55:05 Well, so in the spirit of being evasive, SwiftUI was underway back when I was at Apple.
01:55:11 So I was actually quite aware of that.
01:55:13 I just didn't want to talk about it.
01:55:14 Sure, fair enough.
01:55:16 So I'm a little bit familiar with Combine.
01:55:18 I've never used it.
01:55:20 So I'm definitely not an expert on it.
01:55:22 So I'm happy to talk about aspects of it, and I can tell you some detailed piece if I happen to know it.
01:55:28 I mean, I just talked about Swift.
01:55:30 Yeah, so I mean, if you ask a specific question, I can try for a specific answer.
01:55:35 My specific question would be like, so that way, the combined way RxSwift, it's a different mindset.
01:55:41 It's kind of in a similar way to SwiftUI.
01:55:43 Compare SwiftUI to UIKit or AppKit.
01:55:47 It's a different way of conceptualizing and building
01:55:50 You know, solving a problem, the problem being I'm going to throw an interface on the screen, I'm going to get events and I'm going to do stuff in response to them.
01:55:56 And so Combine and RxSwift are yet another twist on, you know, how do you want to conceptualize the solution to this problem?
01:56:04 The problem is always the same.
01:56:05 I'm going to throw up a UI, people are going to click buttons and type stuff and I want to react to it.
01:56:09 I'm not sure how much GUI app development you've done, period, but, like, what do you think of the approach as – I mean, Casey could probably articulate it better, but this – I hate the name reactive, but this sort of reactive style, like, you know –
01:56:24 Does that fit your model?
01:56:26 If you had to write a GUI application, would you be thinking of it, conceptualizing it as a series of sources and syncs or publishers or whatever the hell they're called and combine an Rx?
01:56:37 Or would you think of it imperatively or does your mind work more like Swift UI?
01:56:41 How do you personally think about solutions in this problem space?
01:56:45 So I look at it as a programming model.
01:56:49 So if you look at programming models, other examples of that include imperative programming with for loops.
01:56:55 It includes generic programming.
01:56:57 It includes object-oriented programming.
01:56:59 I would say that machine learning is a programming paradigm.
01:57:01 If you're going to build a cat detector, machine learning is way better than writing for loops.
01:57:06 And so I would say combined is a programming paradigm that's really good at this reactive, whatever that means, programming model.
01:57:14 And I'd say it's actually very good for the things it's very good at.
01:57:19 And it's not just UIs.
01:57:20 Like, you think about...
01:57:22 you have a Unix app, like a script or a web server, like a classic old, like Apache or something like that.
01:57:30 Well, Apache has a bunch of logic for like registering signal handlers, right?
01:57:34 Unix signals that you can send out of bound, like asynchronous signals,
01:57:38 messages to your Unix process, like reload your configuration, things like that.
01:57:43 And so there's not really been a great way to model that.
01:57:46 The imperative ways of setting up a callback and figuring out how to go poke some things and then, oh, well, what if I'm interrupting the current thread?
01:57:54 I need to set up queues so I can push data around and I have to handle synchronization.
01:57:58 All that stuff was really grody before.
01:58:01 And I think reactive techniques are a really good way of modeling that because it's really embracing
01:58:07 This notion of you have events and at that event based programming, I think really is great for certainly for UIs.
01:58:16 It's great for like edge casey things like signal handlers and it's good for network servers sometimes, depending on what you're doing.
01:58:25 And so I think it's really great that you can do that.
01:58:27 And I also think it's great that you can have that sit next to UIKit.
01:58:33 You can have it sit next to generic programming.
01:58:35 You can have it sitting next to machine learning.
01:58:37 You can have it sitting next to all these different things.
01:58:39 And then you can provide one system that allows you to pick the right solution off the shelf to solve your problem.
01:58:45 It's not saying there is only one way to do it and you have to do it this way.
01:58:49 You can have a diversity of thought and APIs and you can have different communities that all interoperate and work together in a common framework.
01:58:57 Hopefully not too much diversity.
01:58:59 I hope this settles down, at least in the Apple space.
01:59:00 I hope this settles down to something.
01:59:02 Because I think we're, you know, this Swift transition, we just talked about it earlier, like, you know, Objective-C and Swift live together and will continue to live together for a long time.
01:59:11 But there's a gradient and we're going through a transition.
01:59:14 There's no expectation that in 50 years there will be the community will be 50% Objective-C and 50% Swift.
01:59:19 Like, you know, we'll...
01:59:20 I don't know what the Apple API story will look like this year at WWDC.
01:59:24 I think it's really interesting to think about that because until last summer, they didn't have, or technically the spring before that, but until last summer, they didn't have ABI stability.
01:59:34 So they could not have large scale APIs written in Swift.
01:59:38 And then finally, this lands, you have SwiftUI, combine a bunch of other, the ARKit framework, you have a bunch of really cool frameworks that are now written in a Swift first, really natural to that environment, you know, design point, right?
01:59:54 I mean, a Swift API is very different than an Object C API, even if you put all the annotations on it.
01:59:59 Now, this will be the second year they do that.
02:00:01 And I don't know about you, but I've noticed that sometimes Apple puts its toe in gently into the water in the first time.
02:00:08 And the second time, they dump a lot more energy into it.
02:00:11 And the third time, if it's working, they put all their weight behind it.
02:00:14 And so I think it'll be interesting to see what the APIs look like in general, WWDC this year.
02:00:19 I really have no way to predict that, but I would not expect Apple to stand still here.
02:00:25 Swift UI always felt kind of like Swift 1.0 to me, in that it was very super new.
02:00:30 You haven't seen anything like this before.
02:00:32 It's not your mother's UI kit, right?
02:00:35 It's solving similar problems, but in a totally different way.
02:00:39 But it's kind of weird and creaky, and it's a 1.0, and we're not really super sure about it, and we're excited about it, but there's also Catalyst and a bunch of other stuff, and yeah, whatever.
02:00:49 And the second year is when you see...
02:00:51 how did SwiftUI work?
02:00:53 How did it work out?
02:00:54 Have we formalized those guts?
02:00:57 Are we going to improve it in a big way?
02:01:00 Or is it going to take two or three years?
02:01:03 Swift had a couple years of tentative toe-dipping in terms of technological churn, but the direction was clear.
02:01:10 But I feel like right now, you've got the established UI kit and the older app kit, and then the new kit on the block SwiftUI, and that...
02:01:20 And Catalyst somewhere fits in between.
02:01:22 Nobody's not really sure where.
02:01:24 Right.
02:01:24 And so it seems like maybe there's a few too many cooks in this kitchen.
02:01:28 I would say Catalyst is kind of the weird one out here.
02:01:31 But, I mean, I think that Apple has a fairly well-established pattern of often the first version is not good enough.
02:01:38 And people forget that because you're used to using the products when they're mature, but you go back to the first version of the iPhone, right?
02:01:44 And there are some of us that immediately saw the promise and jumped on the bandwagon and said, this is the future.
02:01:51 But there are a lot of other people who said, what are you talking about?
02:01:53 It doesn't even do 3G.
02:01:54 There's no copy and paste.
02:01:55 There's no apps.
02:01:56 There's no like, you know, it's actually an incredible tech demo, but it wasn't really there yet.
02:02:02 And then the second iPhone came out and that's 3G.
02:02:05 And then
02:02:06 And then you get copy and paste and then you get retina screens and then you get, you just fast forward and now it's just like a life changing thing that you can never, you can never imagine living without a cell phone.
02:02:17 Right.
02:02:17 Um, the same thing about OS 10.
02:02:19 I don't know.
02:02:20 John was Puma, a really great release.
02:02:23 Um, if you go back in the day, I'll only, you can tell me the diversion number.
02:02:28 I'll give you the answer to that question.
02:02:29 I thought Puma was 10.1, wasn't it?
02:02:32 You got it.
02:02:34 Do I win a prize?
02:02:34 I don't remember what 10.0 was, though.
02:02:37 It was Cheetah, believe it or not, the most hilarious codename.
02:02:40 There you go.
02:02:40 The slowest release was named Cheetah.
02:02:43 Well, it was aspirational.
02:02:45 But again, like OS X grew to be an amazing, amazing product and an amazing platform.
02:02:52 And a lot of what Apple is great at is recognizing that the first version has to have enough to get the community to understand it and enough to build that momentum.
02:03:03 And then recognizing when it's working and dumping, dumping gasoline on the fire versus recognizing that, okay, well, we have a dumpster.
02:03:12 We just put gasoline in it.
02:03:13 This is not a good thing.
02:03:14 It's on fire.
02:03:15 right and apple doesn't have many mistakes but it does have products that are not successful and people generally forget about those instead of uh instead of dwelling on them that's going to be the bucket catalyst ends in by the way well yeah i don't know i mean like like i feel like catalyst is just uh you know a sidekick to ui kit and the real battle is ui kit versus swift ui right now swift ui is weird and new and
02:03:41 half broken and strange but it's definitely the you know the shiny new kid on the block so you know i don't know if it's like it's a swift one but now if you were if you were to put money ask some stranger what do you think of this swift thing you had to put money on is swift gonna hit big or is it gonna be a disaster it's hard to tell because apple done a lot of weird things with languages before and you know it's gone a bunch of different ways and it was swift ui
02:04:03 it's it's definitely different i see a lot of promise there um i see a path from where it is now to being a completely appraisal for ui kit but it's a long path because ui kit got to build not build on app kit but got to build on the wisdom learned from making app kit and app kit itself has a tremendous amount of you know experience and wisdom built into that api uh so there's quite a pedigree in in ui kit and catalyst is just like
02:04:29 UI kid in a fancy outfit in a different platform.
02:04:34 I think they're functionally very different kinds of technologies.
02:04:37 Like one is trying to change the model and one is trying to broaden the model, I guess.
02:04:43 Yeah, let people use the skills they already have on a different platform.
02:04:46 right and those are really different goals and I don't know how that will work out either but one of the things that people don't realize though is that when Swift was like you talk about you know Apple put a lot of energy into Swift and clearly there's a there's a committed plan to making Swift take over the Apple ecosystem one of the things that's not well known is that even the week before the WWC launched there were very very senior very smart people that were very dubious about Swift right and
02:05:15 And for rational reasons, I mean, the thought process went, and you have to understand, so the thought process went, the iPhone is successful because of Objective-C, right?
02:05:25 And literally everybody in the iOS ecosystem, also the Mac, writes their apps in Objective-C, right?
02:05:32 So now we're looking at adding a new technology, new language to this world.
02:05:38 And these are people, the execs in question, grew up writing Objective-C code, right?
02:05:45 So they're not coming in from the world of...
02:05:49 we have a good sense of what the average programmers on the wild do.
02:05:54 They're, they're people that have spent many, many years thinking about and, and thinking in objective C. And they look, they looked at this upstart Swift thing and saying, well, there's a huge risk that this will cal like cleave the community in half.
02:06:06 And we may end up having two different sub communities within our ecosystem.
02:06:11 And that, that actually would be a very big problem.
02:06:13 And, you know, I think that there's an aspect of that that was true, but, um,
02:06:18 You know, the Objective-C strongholds are diminishing over time, and apparently Apple's feeling confident enough with Swift that they'll introduce Swift-only APIs.
02:06:27 And so I guess it's worked out well.
02:06:29 But early on, it was not clear, right?
02:06:31 I mean, very reasonable, very smart, very strategic people had very real concerns, and it's very hard to predict that.
02:06:40 Yeah, and doing a public announcement.
02:06:41 If I was one of those people, the thing you could bring up is like, look, we were in a similar situation with Insert Technology X, whether it's Objective-C Garbage Collection or even ZFS for that matter.
02:06:53 Once we publicly announce it or ship it and have to support it, look how long it took us to get rid of Objective-C Garbage Collection because if you ship it and people use it, then you have to support it and it's terrible and you eventually learn that it's not the thing.
02:07:04 And so I can imagine the argument was, look, if Swift's going to be the thing, maybe bake it a little bit longer and
02:07:09 make us more confident internally that we think it's going to work out because if we do actually release it and let people ship with it, even if we decide, oh, well, we made a terrible mistake, we're still stuck with it for however many years and it's really a drain.
02:07:22 Well, and that was one of the things that I...
02:07:24 I have a lot of respect for Apple and Apple's ability to make bold decisions, but that was really non-obvious and they were able to make a leap, even though Swift 1 was really not that great.
02:07:37 Swift 1 was very early.
02:07:39 You could call it a tech demo for sure, and they're still willing to make a bold decision.
02:07:47 leap, partially because they believed in the engineering team and they believed in the promise of moving the world forward.
02:07:54 And they really wanted to be the head driving technology in that way.
02:07:58 And I think that's really great.
02:07:59 And it has worked out over time.
02:08:00 But that's both that the ideas were good, I think, but also that it was allowed to iterate.
02:08:08 And one of the things that relieved a lot of pressure from those discussions is we said, hey, you know, we're going to do a controversial thing.
02:08:15 We're going to say we have a new language and you can build and submit apps to the store when it has its final release in the fall.
02:08:22 But we're going to change it and we're going to tell developers that we will change it.
02:08:26 And the reason for this is that we cannot, even though we think we're smart, we cannot make something that is perfect without having feedback.
02:08:34 Right.
02:08:34 And by the time Swift was announced, only something like 250 or 300 people in the world knew about it.
02:08:42 And you can't make something that's really great if it's in that kind of a silo.
02:08:45 And so that ability that we had to really iterate and change the language, even though it was super painful, I think led to the language being way better.
02:08:53 It also led to it being way more comfortable for Apple to take that risk because it didn't have to be perfect on day one.
02:09:02 You should have shipped that one with tuple arguments to functions.
02:09:04 That would have been cool.
02:09:06 I mean, if you go back in the history of Swift, there's so many terrible ideas.
02:09:10 I'm very happy that the most terrible ideas have been ripped out and we're left with only some of the unfortunate ones.
02:09:21 So you had brought up earlier ABI stability and how that has recently landed.
02:09:26 And out of curiosity, what do you see as the biggest things that are possible now that weren't before that line in the sand?
02:09:34 I mean, there's obvious answers, and maybe that's to you the biggest and most important answer.
02:09:37 But is there anything that's perhaps more esoteric or interesting or unique that you think is now on the table that wasn't before ABI stability?
02:09:45 So I look at ABI stability.
02:09:47 ABI stability itself is one of these funny things where it's very important to Apple, but almost nobody else should care.
02:09:52 Right.
02:09:53 Or you care as an app developer because you don't have to link the library into your code and so your app is smaller, right?
02:09:59 But you otherwise don't care.
02:10:00 It's also an insanely complicated feature, right?
02:10:04 It's also something that many of the languages don't ever even get.
02:10:07 So if you take other languages like Rust, for example, it's a great language.
02:10:11 They've never fought with this.
02:10:12 And it's really hard.
02:10:14 And doing this well is really hard and has a lot of really innovative aspects to it.
02:10:20 But I look ahead and so I look at that as kind of this table stakes thing that you have to get done that's just really hard.
02:10:27 And so until that was done, Apple's engineering team and design effort couldn't work on some of the more exciting, bigger, impactful things.
02:10:35 But when I look at it, I look at there's different kinds of features that are missing.
02:10:40 So to give you an example, one of these is what's called variadic generics.
02:10:46 So you take a generic function and you can have n arguments to your function or n generic types that go into it.
02:10:55 Variant generics are one of these... We were talking about this before.
02:10:59 It's a super esoteric, hardcore, power user, library developer type feature.
02:11:07 But what it enables is it enables things like tuples going into dictionary keys.
02:11:13 It enables... Right now with SwiftUI, they have this hilarious problem where if you have more than 10 controls in your top level, it doesn't work or something.
02:11:21 And so you have...
02:11:22 A lot of these rough edges that get shaved off by having this really esoteric feature that only hardcore library developers will use because those hardcore library developers are the ones building these APIs.
02:11:34 And so that's something that's also, I think it's kind of conceptually well-known, but it's a lot of engineering work.
02:11:40 And so I would love to see something like that just for all the rough edges that will go away when that happens.
02:11:47 There are other features like concurrency.
02:11:48 So async await is frequently requested, will be way better for UI development, for server development, for just like anybody that's doing asynchronous programming.
02:11:58 Again, it's all pretty well understood.
02:12:00 There's a few implementation details that need to be sorted out, but that would be amazing.
02:12:06 They've published a Swift 6 roadmap, and I think that's one of the things on the short list, which I think would be great.
02:12:13 The ownership thing we talked about is something that would really help with systems programming and places where you really want both safety and performance.
02:12:23 And those are, I think, the big ones.
02:12:27 And I mean, the big language features that I can think of.
02:12:30 The libraries then are the big missing piece.
02:12:33 And so the fact that here we are in 2020 and there's no command line option processing library yet is kind of hilarious, right?
02:12:42 The same is true of many different things.
02:12:46 I'm also really curious to see what the community does when you talk about foundation and things like this, where foundation is both a great blessing and a curse, where it was really great for bootstrapping the Swift on server and many other communities, but it also just doesn't feel very naturally like a Swift API even today.
02:13:02 So I don't know.
02:13:03 I mean, there's a lot of really exciting things that I'm sure will happen and come as well as many, many smaller kinds of features as well.
02:13:10 And I think what I'm more concerned about is that we do things the right way and really consider and debate and think about how they fit together and make sure that the consequence of what we get in 10 years or something is really beautiful and still feels really good.
02:13:25 It's not an amalgamation of different things that are thrown together.
02:13:29 I think that Swift evolution is a really good
02:13:31 I wouldn't say controlling function, but it's a really good feedback loop that encourages good iteration.
02:13:37 I'm just picturing some function in the guts of SwiftUI that has like 10 arguments named A1, A2, A3, A4, A5, and that's powering the whole thing because it can't be veridetic.
02:13:47 That's exactly what it is.
02:13:49 And it's overloaded functions, one that takes one, one that takes two, one that takes three.
02:13:55 The limit shouldn't be like 10, right?
02:13:58 I don't know what the limit is or how many arguments you can have in a Swift function, but I would think it would be bigger than 10.
02:14:03 They know about copy and paste, right?
02:14:06 I don't know the secret sauce internally, but they pick some limit and they went up to that size.
02:14:13 Similarly, in Swift, just the base language, you can use equals equals on tuples, and it works up to six elements.
02:14:23 because copy and paste does that have a good compiler error message when you exceed it I'm sure it does not right but you know it covers the most important part of the problem and it's good enough but it's just still a bit unsatisfying and it should be a simple thing that is orthogonal to everything else and you just
02:14:39 you're done and they move on.
02:14:41 This, this again is what I mean by there's like a brick that's missing.
02:14:44 And if you start like papering, papering around the corners and you start adding special case things that like work around the lack of that brick, it's just way better to go build the brick and drop it in and then get rid of all the, the workarounds and all the other technical debt that metastasizes around the edges to, to deal with the lack of that big missing thing.
02:15:05 I mean, even PHP has that.
02:15:09 So Chris, you've been extremely generous with your time.
02:15:11 Just a couple of quickie, hopefully easy ones for you, if you don't mind.
02:15:16 You had talked when we had spoken three years ago that you almost never get to write actual Swift.
02:15:21 And obviously your world has changed quite a bit since then.
02:15:24 Are you ever writing Swift these days?
02:15:26 Yeah, so I actually do.
02:15:27 I still have not written a large Swift application that's 100,000 lines of code, but I do actually use it for certain things I don't really want to talk about right now.
02:15:37 Yeah, totally.
02:15:37 I was just curious if are you using it at all or not?
02:15:40 Because it was so funny to me and sad that you didn't get to really receive the fruits of your labor.
02:15:46 Yeah, I still live in that sadness.
02:15:48 And I still write way more C++ code than I should.
02:15:51 But maybe there's a day that will change.
02:15:55 Do you, when you are writing Swift, ever run into a situation where you're like, damn it, I wish it didn't do this, or it's being such a dick?
02:16:03 All the time.
02:16:04 And so to me, it's all those sharp edges that...
02:16:07 um, that everybody runs into for me, it's like, Oh, I really want to go fix that, but I can't because I haven't, you know, it's right.
02:16:14 It's very different.
02:16:15 And similarly, it's the same thing when I work with LLVM LLVM, I know all the bad things about LLVM better than anybody else does.
02:16:22 Right.
02:16:23 And so people, a lot of people are like, Oh yeah, LLVM is really great.
02:16:26 I'm like, yeah, it's, it's, it's okay.
02:16:28 It's better than the alternatives, but it should be way better than it is.
02:16:32 And let's not set our sights on good.
02:16:35 Let's aim for great, you know,
02:16:36 And same thing for Clang.
02:16:38 Why can't you do high-level optimizations in Clang?
02:16:42 It's very sad that you can't do ARC optimizations for the smart pointer class in C++.
02:16:51 And that's an implementation detail issue that should totally be fixed.
02:16:55 I've argued that this should be fixed, but I don't have time to go do it myself.
02:16:59 So it's really tilting at windmills, hoping that somebody else will care about fixing the problem that's really apparent to me, but isn't really apparent to everybody else.
02:17:06 And this is the problem with working on large scale things.
02:17:11 You had mentioned earlier that this is, I think, the last one that certainly I had had for you.
02:17:15 You had mentioned earlier you had made a package shed.
02:17:18 I know nothing, literally nothing about woodworking, but I know that that's something that's important to you in a hobby of yours.
02:17:25 What other things or would you like to share more about the package shed?
02:17:27 What have you been doing woodworking wise these days?
02:17:30 I haven't had a lot of time to do woodworking lately just because I've been super busy and jumping between different things.
02:17:38 But there's different aspects of woodworking that I like.
02:17:42 The thing that I would say is I'm really good at building one of something because I like the process of design and exploration, understanding something, figuring out the, okay, I'm going to build a table.
02:17:51 Well, how high?
02:17:53 What is the bracing structure underneath it so you don't bump your knees?
02:18:00 centuries or many, maybe millennia, but I don't know any of these things.
02:18:05 Right.
02:18:06 And there's actual principles that underlie all this and there's better and worse and kind of working through all that's a lot of fun because it's a, it's an amazing problem solving thing.
02:18:14 Uh, I would be terrible at building a dining room full of chairs.
02:18:19 Like I would get the first one figured out and that turns into, uh, you know, a manual process of just like doing
02:18:25 fabricating things and i would not be into that at all um but i really love the problem solving the exploration side of that and so lately i've been pretty busy built a little treasure box for my son uh that you can see on twitter if you're interested um it was mainly odds and ends here and there so if you do the chairs you should do the first chair is like chair one like swift one and the second chair looks totally different it's chair two
02:18:49 There you go.
02:18:50 No, no.
02:18:50 First you have to build a chair design factory toolkit.
02:18:55 I think he's already got that.
02:18:56 So here you run into logistical problems like I'm not the only decision maker in the household.
02:19:02 That's where you have the chair evolution process.
02:19:07 Yes, exactly.
02:19:07 I may not even be the most influential decision maker in the house.
02:19:11 Thanks to our sponsors this week, Linode, Jamf Now, and Indeed.
02:19:16 And we will talk to you next week.
02:19:20 Now the show is over.
02:19:22 They didn't even mean to begin.
02:19:25 Because it was accidental.
02:19:28 Accidental.
02:19:28 Oh, it was accidental.
02:19:30 Accidental.
02:19:30 John didn't do any research.
02:19:33 Marco and Casey wouldn't let him because it was accidental.
02:19:39 It was accidental.
02:19:41 And you can find the show notes at ATP.FM.
02:19:46 And if you're into Twitter, you can follow them at C-A-S-E-Y-L-I-S-S.
02:19:55 So that's Casey Liss, M-A-R-C-O-A-R-M-N-T, Marco Arment, S-I-R-A-C-U-S-A, Syracuse.
02:20:07 It's accidental, they didn't mean.
02:20:12 Accidental Tech Podcast So long
02:20:21 So are you guys doing anything from working at home or schooling at home besides playing Minecraft all day?
02:20:28 Because that's mostly what we're doing here.
02:20:30 I think this is the wrong group to be talking about working from home because it consists of two people who always work from home.
02:20:38 And yes, it's different because your family's there or whatever, but maybe not that much different.
02:20:41 And the third person, me, also works from home a lot despite having a regular office job.
02:20:47 I think life has changed a lot less for us than it has for most people.
02:20:53 But it's definitely felt different, even if we're supposedly doing the same thing, sitting in front of the same computers, doing the same type of work, or in Marco's case, not doing the same type of work.
02:21:04 Everybody's...
02:21:06 everybody's here right i mean kid the kids don't leave during the day for any reason and so they're all just here yeah that is critical though like i i literally i i'm getting almost no work done and it's it's you know in in some ways it's my own choice but the main differentiating factor is our kids are all at home you know because the schools are closed for the virus and
02:21:30 I mean, they're going to be they've already been closed for over a week.
02:21:33 There's probably going to be another couple of weeks at least.
02:21:35 That totally changes our day here to the point where, you know, and especially like, you know, we have one kid.
02:21:41 There's no one else for him to play with.
02:21:43 He's not going to school.
02:21:45 All of his out of school activities have been canceled.
02:21:47 He can't go to his friends houses.
02:21:49 what's he gonna do he hasn't he has nothing to do he's in second grade the school work you know he we do have like you know worksheets and stuff that the school puts up in google classroom which is like i mean this is a whole discussion here about like man i feel bad for teachers so often um i know a lot of teachers and it's it's not it's never like a super easy or well-respected job by by our society but
02:22:14 In this particular case, it really shows you quite how important teachers are because, first of all, teachers have all been forced to all of a sudden throw their entire curriculum somehow online, which doesn't work for a lot of stuff and is totally different.
02:22:28 And we're all trying to be teachers ourselves at home.
02:22:32 who've never done this before and it's really hard and we're doing a terrible job largely as like as a people because it's a hard job and we're not trained for it and we have no experience with it and like it really you know one of the hardest jobs in or one of the hardest things about being a teacher is that everyone thinks they know your job better than you do and in this case it that could never be more clear as it is right now but like for us like
02:22:55 you know, because our kid is home all day and has no one else to play with and can't really do anything, I can either, like, you know, sit him in front of the TV for seven hours a day or we can play with him.
02:23:08 And so, we're playing with him.
02:23:10 And, like...
02:23:11 I don't feel bad about that for the most part.
02:23:15 I do feel bad that I am in many ways neglecting my business like that.
02:23:19 That is no question.
02:23:20 I am like I see like, you know, Casey's like pumping out a new build of peak of you almost every day somehow.
02:23:27 And that makes me feel bad because I'm getting no overcast work done.
02:23:33 I'm answering emails as best as I can.
02:23:35 I'm keeping up with urgent business matters as best as I can, but I'm getting no programming done.
02:23:42 Because during the entire part of the day, during most of the day that I'm awake,
02:23:47 So is my kid.
02:23:49 And I'm having to, you know, be a full time parent and teacher.
02:23:54 And, you know, I like, you know, we're running the house.
02:23:56 So, you know, I got to like, you know, make food and everything like, you know, occasionally shop for food, you know, just keep the house clean and running like it's hard.
02:24:06 And it takes up all this time.
02:24:08 And I'm making a decision that while my kid has no one else to play with, then I don't want him to just be watching TV.
02:24:17 I want to be the one to do things with him.
02:24:19 And at the same time, my entire family, all three of us, have developed a significant Minecraft addiction.
02:24:24 So this works out well.
02:24:27 That's all he wants to do is play Minecraft.
02:24:31 When we're not playing Minecraft, all he wants to do is talk about Minecraft or read about Minecraft or watch videos about Minecraft.
02:24:37 So it's 100% a Minecraft-obsessed time for our family, which I gather is not that rare for a nearly eight-year-old.
02:24:45 So it kind of works out well in that we're just kind of playing this game all day.
02:24:48 But I am totally neglecting my job.
02:24:51 But I don't really see a better choice I could make given the circumstances.
02:24:56 Now, really quickly, has New York not canned the entire school year yet?
02:25:00 No, they haven't made that call yet, but it wouldn't surprise me if they did.
02:25:04 But they just haven't made the call yet.
02:25:07 That's very surprising to me because Virginia is doing much better right now than New York is with regard to the virus.
02:25:13 But just earlier this week, I think it was yesterday or the day before as we record this, our governor announced that this school year is over, which is –
02:25:22 Really, really wild for our family because this was Declan's last year of preschool and we'll hypothetically be registering him for kindergarten next month, maybe, possibly.
02:25:34 But he walked out of his preschool class, you know, a week, a week and a half ago, whatever it was, and we thought he would be back in a couple of weeks, which in retrospect, even then I was kind of like, well, it'll probably be a month or two, but he'll be back at some point, right?
02:25:46 He is no longer effectively a preschool student.
02:25:49 It's really, really wild.
02:25:50 I feel terrible for like seniors in high school because, John, Alex still has one more year left.
02:25:55 Is that right?
02:25:56 Oh, God.
02:25:57 What the hell year is he in?
02:25:59 He's got two more years left.
02:26:00 Oh, he's got two.
02:26:01 I'm sorry.
02:26:02 But no, it's been weird for us having Declan home all the time.
02:26:08 Obviously, Michaela pretty much always was.
02:26:10 And not bad weird.
02:26:11 It's been weird, weird.
02:26:12 And I think Aaron in particular, since the bulk of the effort has been landing on her shoulders, she's been doing a really good job of doing – not just sitting in front of the TV.
02:26:23 Now, I wouldn't necessarily say that she's doing instruction or anything like that.
02:26:27 But he's not – to your point, Marco, he's not just sitting in front of the TV, mouth agape, just staring.
02:26:32 By the way, no judgment if that's what you have to do.
02:26:35 I'm not saying we're not doing that ever.
02:26:38 I'm just saying I'm trying not to do that for like seven hours a day.
02:26:42 Speaking of Alex, that's what he's doing.
02:26:44 I mean, it's not the television, of course, because he doesn't use that primitive device.
02:26:47 It's Nintendo Switch and iPad.
02:26:50 Fair enough.
02:26:51 And how could you not, especially if you have two working parents?
02:26:54 How can you not do that?
02:26:56 Right.
02:26:56 And the thing is, the school is giving us these assignments online every day just to try to have some semblance of education, instruction, and structure and consistency for the students.
02:27:08 And frankly, I don't think it's much because it can't be.
02:27:13 It's basically homework every day.
02:27:14 It's like, here's a couple of worksheets and activities.
02:27:16 That's basically what we're calling a full school day these days.
02:27:20 And I can't blame – it's not the school's fault.
02:27:23 They're doing the only thing they can do really because they weren't prepared for it.
02:27:29 We don't have like an entire online curriculum for elementary school kids and I'm not even sure such a thing will be possible.
02:27:37 But anyway, so no one's prepared for this, except people who are already homeschooled, but that's not most of us.
02:27:44 And so we have this little bit of homework every day that we do, and we do basic exercise, and we take a dog walk in the afternoon.
02:27:52 And so we have some structure of the day, but for the most part, I'm not filling Adam's Day with school.
02:28:01 Because first of all, we don't have enough school to do that with.
02:28:04 But second of all,
02:28:06 This is a worldwide, historic, pretty heavy event.
02:28:11 I don't want to be the parents who, like, throughout this pretty stressful time, especially, like, you know, kids know what's going on.
02:28:21 They might seem like everything's fine, but they can tell we're all worried.
02:28:25 They can tell everything's messed up.
02:28:27 This is going to weigh on kids, even if it doesn't seem visible right now.
02:28:31 Like, they're perceiving what's going on.
02:28:34 I don't want to be the parent who during this time forced my kid to be doing schoolwork all day.
02:28:39 It's a weird time for everyone.
02:28:41 Pretending like everything is fine I think is both a little inhumane in certain ways if it's like forcing them to do work they don't want to do.
02:28:49 And also, I think it's it's ineffective that like we're not hiding anything.
02:28:54 They can tell they know stuff is wrong.
02:28:57 They know like something's up no matter how young or old they are.
02:29:01 Like they know like this is a big deal and it's not good.
02:29:04 And, you know, wherever this goes from here, we don't know where it's going to go from here.
02:29:08 We don't know how bad it's going to be or the economic fallout and whatever else yet.
02:29:11 Like we don't know all that yet, but we know it's not good.
02:29:14 And I think letting our kid play Minecraft all day for a few weeks is that's not a bad thing in the face of all that.
02:29:23 Yeah, I couldn't agree more.
02:29:24 And one thing, you mentioned this a moment ago, and I know you come from a family of teachers, and Aaron taught up until we had Declan.
02:29:33 One thing that I hope comes of this, you know, if we all make it across the other, make it to the other end, okay.
02:29:40 One thing I hope that comes of this absolute tragedy is that people appreciate teachers at least a little bit more.
02:29:45 Because here in America, anyway, you
02:29:47 Teachers are generally considered to be glorified babysitters by a lot of people, which is atrocious and wrong and terrible and disgusting.
02:29:55 But in so many communities across so many different racial and economic boundaries, it seems like teachers are just kind of babysitters.
02:30:05 There are teachers that are basically just glorified babysitters, but the overwhelming majority of them are trying exceptionally hard and doing so for almost no reward of any sort and typically are getting beat on for the choices they make.
02:30:19 It's just a thankless, thankless, awful job to take on that these people do to some degree out of the goodness of their hearts.
02:30:26 And it killed me watching the way Erin got treated when she taught.
02:30:31 And I hope that now your average parent does a better job of understanding that teaching is hard.
02:30:40 Teaching is a very hard job and it's important.
02:30:44 And at least in America, we don't value the teachers nearly as much as we should.
02:30:49 But to hopefully not end on a bad note and end on a happier note.
02:30:52 you know, we've definitely been watching more movies as a family than we usually do.
02:30:56 You guys are playing more Minecraft as a family than you usually do or did.
02:31:00 All three of us are playing.
02:31:01 Hops would play if he had hands.
02:31:03 And so, you know, I think that that togetherness, well, sometimes maybe a little too much, or at least in our family, we can get a little on edge from time to time.
02:31:12 Uh, generally speaking, the, the one silver lining from all of this is that we are getting to have some time with each other that maybe we wouldn't have had otherwise.
02:31:20 And I am, I am thankful for that, even though I wish it was for a different reason.
02:31:24 And my, in my, I mean, in my darker moments, I keep only seeing the bad side of this for me.
02:31:29 you know my rational mind says you i'm incredibly lucky that i have not immediately lost my job right and you know that i already did do a lot of working from home and then i'm able to do my job from home and like these are all reasons i am incredibly incredibly lucky uh but then i read about people who are just sitting at home uh you know watching movie catching up on movies and reading books and trying to relax and de-stress from the anxiety that we're all feeling and it's like
02:31:57 I'm doing all the same things that I always did, plus being anxious all the time.
02:32:01 Yeah, I couldn't agree more.
02:32:03 I could not agree more.
02:32:04 No, I don't get any kind of break, and it's the worst kind of thing.
02:32:07 I should just be counting my blessings.
02:32:09 Yeah, oh, boo-hoo, you still have your job.
02:32:12 Trust me, I would vastly prefer still having my job, but a tiny, tiny part of me that doesn't really make any sense says, why don't I get to sit around and read a book?
02:32:21 You know, that part of me is wrong and should shut up.
02:32:24 Well, look, the problem is this affects everyone in so many different ways.
02:32:30 Think about – we said we're lucky that we have jobs that we can do from home.
02:32:36 We're lucky that we didn't just suddenly lose all of our income and that we have stable homes and stable family lives that we're not going to all –
02:32:49 have significant problems by being at home for a few weeks.
02:32:52 Those are all some really big conditions that like most people don't have all of those.
02:32:59 And even for us, it's hard, right?
02:33:01 So yeah, it's hard for everyone.
02:33:04 We have the best setups that we could possibly have really like, you know, in reality, like compared to the world, like we are incredibly lucky with the setups that three of us have and the situations we're in.
02:33:15 But it's even hard for us.
02:33:17 So imagine how hard it is for everyone else.
02:33:19 That's why I'm saying if you want to make your kid play Minecraft or watch movies all day, that's fine.
02:33:26 Because if that's what they want to do, again, I do think there's some value in doing these things with them, which is why I do it.
02:33:34 Also, I'm going to do Minecraft right now, but that's a different story.
02:33:37 But I think it's totally fine.
02:33:40 Don't beat yourself up, parents especially.
02:33:42 Don't beat yourself up for all the things you're not doing.
02:33:45 Don't beat yourself up for all of the academic value that your kids are missing out on.
02:33:51 And I have to kind of tell myself to stop beating myself up for not programming almost at all during this time.
02:33:59 But like...
02:34:00 it's just it's a weird time and it's okay to not try to pretend like everything's normal and it's okay to do things differently and to let certain things be untended to for a while because things are different and you have a different workload and god i really appreciate teachers so much i did put out a few releases of switch glass too so me and casey are uh way ahead of you on the software update front
02:34:28 High five, John.
02:34:29 Well, I build an awesome house in the Minecraft server by Dubai Friday.
02:34:33 Oh, you are ahead of us in the Minecraft building, that's for sure.

Four-Letter Technologies

00:00:00 / --:--:--