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