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