localfirst.fm

A podcast about local-first software development

Listen

Conference

#21 – Seph Gentle: Google Wave, eg-walker, creativity, AI


The guest of this episode is Seph Gentle, a prolific software researcher who is behind projects such as the new eg-walker paper and ShareJS, one of the oldest local-first open source projects. Before, Seph also co-created Google Wave over 10 years ago which will be explored in-depth in this episode.

Mentioned in podcast:


Links:

Thank you to ElectricSQL for supporting the podcast.

Transcript

#21 – Seph Gentle: Google Wave, eg-walker, creativity, AI
00:00And you know, like I don't think economically we need local-first
00:02software, you know, like we can trudge along with the feudalism
00:06of Google cloud services for, you know, probably for a very long time.
00:10but I don't want that.
00:11I want beautiful software programs that work in harmony with who I am as a person
00:15and with in harmony with what kind of communities I want to be able to foster.
00:19Welcome to the local-first FM podcast.
00:22I'm your host, Johannes Schickling, and I'm a web developer, a
00:25startup founder, and love the craft of software engineering.
00:28For the past few years, I've been on a journey to build a modern, high quality
00:32music app using web technologies.
00:34And in doing so, I've been falling down the rabbit hole of local-first software.
00:38This podcast is your invitation to join me on that journey.
00:42In this episode, I'm speaking to Seph Gentle, a prolific software researcher
00:46who's behind projects such as the new AgWalker paper and JRJS, one of the
00:51oldest local-first open source projects.
00:54Before, Seph also co created Google Wave over 10 years ago, which we
00:58explore in depth in this episode.
01:01Before getting started, also a big thank you to Electric SQL
01:05for supporting this podcast.
01:07And now my interview with Seph.
01:09Hey, Seph.
01:10So nice to have you on the podcast.
01:12I'm a huge fan of your work.
01:14I've learned so much from the paper you've recently written about Eg-walker.
01:19And the more I dug into your work, the more I realized, oh, wow,
01:23you've also been involved in this.
01:25So for example, you've been working, On Google Wave, like way
01:29back, but also on projects such as ShareDB ShareJS, et cetera.
01:35So welcome to the show.
01:36How are you doing?
01:37Thanks.
01:37I'm great.
01:37It's so wonderful to finally meet you as well.
01:39I feel like you're one of these faces that pokes up everywhere and, yeah,
01:43it's lovely to meet in person and get to actually chat about all of this stuff.
01:46Awesome.
01:47Yeah.
01:48So I've already mentioned a few projects that you worked on, but maybe you want
01:53to give a background for the audience.
01:55No, absolutely.
01:56So, I guess the story starts way back in, I think it was 2010, 2011.
02:00And I was invited onto the super secret at the time project of Google
02:04Wave, which was run out of Google.
02:06And it was, not many people know this, and I'm sure someone will get in
02:08trouble, get mad at me for saying so, but it was a secret even inside Google.
02:12Sorry.
02:13Google was thinking we've got lots of people who've worked in startups,
02:15but we're not a startup anymore.
02:17How do we get some of that innovation?
02:19And so Google Wave started as this skunkworks project.
02:22They didn't even tell Google us about it, which was a wild thing at the time.
02:25and before long, you know, in the original vision to anyone who hasn't tried it out.
02:29Was if we reinvented email today, what would we want it to look like?
02:32What could it do?
02:33And so, Wave is this almost cross between, email and Google Docs and something
02:38else where you can have, A conversation, which they called a Wave, was a series
02:43of messages, but messages could go down.
02:45So we could have a series of conversation items.
02:48You could also embed messages and embed entire threads inside a comment.
02:51So I could write something and you could start a comment thread inside that and
02:55any comment, anything that anyone wrote.
02:57Anyone could come along and just collaboratively edit
02:59it and change it later.
03:00So, we sort of built this thing not really knowing how it was going to
03:04be used, which is a beautiful luxury.
03:06and the answer is that lots of people used it for, you know,
03:08say like, for playing D& D games.
03:11And they would put all of the information about the campaign
03:13itself at the top of a Wave.
03:14And then the actual session would be a series of messages and then they'd
03:17start a new Wave for the next session.
03:18Or, say minutes.
03:20So you'd have the agenda for a meeting and then during the meeting anyone could,
03:23you know, put in little comment threads about what was actually discussed.
03:27And then your minutes for the meeting turn into the agenda.
03:29Sorry, your agenda turns into the minutes afterwards.
03:31Because we've now got this collaborative document.
03:33So, yeah, I fully remember when Google Wave just first came out.
03:38I was still in high school back then.
03:39I was 16 and, I was like using a few Google products.
03:44I think mostly Gmail and maybe a bit of Google Docs to just
03:48keep track of my, own thoughts.
03:50But when Google Wave came out, I was just so curious and there, there
03:56wasn't really like a real use case I had for it back then, but I got
04:00immediately hooked by the novelty of it.
04:03And it was, I think it was really the first time where it really clicked for
04:06me, like, Oh, this is computers are not just for me, like looking in my single
04:11screen here and then sort of asynchronous.
04:14Yes, I can send an email, et cetera, but we can in real time collaborate on the
04:19same stuff and that sort of same magic that happens if we're like sitting at
04:24the same table and do something together.
04:26Now that can sort of be replicated in there.
04:29And not only did you build something in a real time collaborative
04:31way, you build it so well.
04:33I think Google Wave really set the bar for a long, long, long time.
04:38What I really like.
04:39Immersive, high quality web experience could look like and that was,
04:43yeah, you mentioned like in 2010.
04:45And so I think that had had a long lasting impact on my own, longing and
04:52motivation to go all in on the web.
04:55Well, that's, that's very kind of you to say.
04:56I feel like, I'm like, Oh, I can't take all the credit for Wave.
04:59I mean, at peak, there was 60 people working on it and I came
05:02onto the project reasonably late.
05:03So, you know, it wasn't my grand vision, and something though for this audience,
05:08you might be fascinated by, we built the entire thing to be, it wasn't local-first,
05:12that term certainly didn't exist at the time, but it was fully federated.
05:15So it worked like email did with the idea that people could
05:18run their own Wave servers.
05:19And, you know, and so you could collaborate within your organization
05:22on your Waves and then the document wouldn't leave your organization
05:26unless you explicitly added someone from outside of your organization.
05:28otherwise it would stay in the four walls of your company and
05:31your own servers, which was really, really cool and groundbreaking.
05:34I mean, like hearing that in retrospect doesn't sound very, like, that's not
05:38what I associate with Google these days, like Google typically builds like a very.
05:43Google centric service, take it or leave it.
05:46It works really well integrated in the rest of Google services, but
05:50going in a more federated, like open protocol direction is not immediate.
05:55Maybe this was just a different time back then.
05:58Maybe.
05:59I think that Wave was also, it was an unusual, it was a weird
06:02project inside Google itself.
06:03It was run out of Australia in the Sydney office.
06:06so you know, it was, it was like this little, little project at
06:09first about what could we build.
06:10And.
06:12Google's got a funny relationship with openness.
06:14where you've got, I mean, I agree with you about most of Google's product
06:17offerings, but then Google are one of the hugest proponents of the web and
06:21the web of course is still fully open.
06:23And you know, as much as people like to complain whenever.
06:26Google Chrome integrates with Google services.
06:29Google at their heart really still does believe in the open web.
06:32And, you know, so the question is, could we use that knowledge and that
06:35understanding to be able to build more products that work like email does?
06:39And of course, again, Google, you know, with Gmail as a, you know,
06:42it's all built on open protocols.
06:44so yeah.
06:45but no, it was really ambitious and it was a really beautiful.
06:48product, product use, as you say, it introduced lots of people to
06:52actually things being real time and collaborative by default, which I
06:55really think is the right default.
06:56I told my mom at one point I spent, you know, a couple of years of my life trying
07:00to make, we, we had a joke that we wanted to make two windows look exactly the same.
07:04and you know, so if you typed in one window, it would just
07:06appear on the other screen.
07:07And this is a really very difficult problem.
07:09and she kind of gave me this quizzical look and said, Doesn't
07:12it do that already anyway?
07:14And, you know, she just never tried and never noticed.
07:17But it's really, really is, uh, Paul Graham has this question, he
07:21says, what feels like it would be obvious, it would be crazy for us
07:24not to have in a hundred years.
07:25And I think about that a lot, of, what technology would it be crazy for us not
07:30to have, in such that, if we could figure out what that technology is, could we
07:34build that now, and then just have it now?
07:36you know, I don't want to have to wait for someone else to invent all of this stuff.
07:38Like, with Wave, it felt like it was right at the birth of collaborative editing.
07:42Google Docs was actually quite new at the time and, believe it or not,
07:46Google Docs had a bunch of correctness issues where, you know, if you type
07:49certain text and then bolded and then you unplugged your network cable at
07:51the right time and everything else, you'd end up Converging, you would see
07:54something and if you hit refresh, you'd see a different document on your screen.
07:58these problems were still new and we were still figuring them out.
08:00But I feel really sad that there's not more software that takes advantage of this
08:04cool technology we've been working on.
08:06you know, like even things like Figma, and I love Figma for using CRDTs,
08:09but you can't run your own Figma.
08:12When I open Figma, it's, a centralized service.
08:15It just happens to be using CRDTs to do collaborative editing.
08:17but I feel like it's technology that we can use for so much stuff.
08:20and that's, yeah, that was kind of part of my, like, jewel, joy
08:24and sadness in working on Wave.
08:26Right.
08:26Thought, ah.
08:27Yeah, I mean, let's not, let's not go to the sad part yet.
08:30Ultimately, Google Wave shut down.
08:32But I want to hear a bit more about the various aspects you've already mentioned.
08:37And I love the framing of Paul Graham in that regard.
08:40Like, what would be just.
08:41obvious, to build, and maybe we can also follow up which
08:44ideas feel obvious to you now.
08:47And maybe that you want to work on, you don't have the time.
08:50Let's, let's shelve that for the time being.
08:52So not only was Google Wave just like an amazing product experience,
08:57like how fluid it felt, et cetera.
08:59And you have to remember this was like it's 2010, where web standards
09:03were not at all where they were today.
09:06And, I'm not sure how strict Google was back then about,
09:10like, browser compatibility.
09:12but I remember the experience just feeling phenomenal back then.
09:16So what were some of the key challenges making this happen?
09:19I mean,
09:20that's very kind of you to say.
09:22That wasn't the universal experience and it depended very
09:24much on what browser you had.
09:25We, we had an internal Wave that was like scrolled for a long way of open
09:30browser bugs that we'd filed against all of the different web browsers in all
09:33sorts of different little edge cases.
09:35I mean, for context, we made Google Wave work on, I think it worked on IE8.
09:40it certainly worked on IE9, which is the version of Internet Explorer at the time.
09:43but there was so much that was still, I mean, even still is
09:46not standardized, honestly.
09:47We had a rich text editing element, and we needed that to work with international
09:51characters and internationalization, and be able to, synchronize with any
09:55device on any platform with any browser.
09:57So, that was tremendously hard.
09:59There was a team of about six or seven People just working on the input side and
10:05we had this insane test suite that would test and, you know, different keyboards
10:09in the office of, you know, for Korean characters and Chinese characters and,
10:13you know, European, various different forms, you know, different laptops running
10:17different versions of windows to make sure that we could get everything to
10:19synchronize correctly, and we used all of that to try and just make the browser
10:23work correctly and work consistently, but from a technology standpoint, we
10:27forget now, but this is back in the day before we realized that JavaScript
10:30was actually a useful language and kind of nice to write in sometimes so
10:34Google Wave was all written in Java.
10:36And then compiled from Java to JavaScript via Google Web Toolkit.
10:40So, we had, I think that when Wave got shut down eventually,
10:43I checked the source tree.
10:45And internally we had 1.
10:461 million lines of Java code.
10:47And obviously, that wasn't all the client side application.
10:51but then that compiled.
10:52To, it was like a 500 kilobyte JavaScript bundle, which these days doesn't seem
10:56so large, but at the time it brought down, you know, mighty web browsers,
11:01trying to run all of this stuff that we were, you know, trying to do
11:05written in, Java to be able to solve all of this like front end problem.
11:09and then on the back end.
11:10Operational transform was a new idea.
11:12CRDTs were, like, I think that they were a gleam in some researchers eyes
11:15at the time that we were working, but they were incredibly inefficient.
11:18So we tried to build something that was federated and would let multiple
11:21servers, multiple users from different organizations all collaboratively
11:24edit a document, all built on top of a very old version of operational
11:27transform, which some very smart people on the team managed to get to work.
11:31But, it was incredibly new.
11:33I learned a huge amount from working on that, which has kept me busy for
11:37the last decade and change honestly of trying to figure out how you
11:40can even solve a problem like that.
11:42there's another feature that I want to plug because I really hope that people
11:45who are listening to this podcast know about it and realize that you could
11:48build this into your own applications.
11:50We, we also had something called, Google Wave, gadgets.
11:53We had gadgets and extensions and it doesn't matter the distinction, but
11:56you can have a Wave and inside of it.
11:59the internal data structure was an XML tree with annotations.
12:03So you could do rich text, but also have arbitrary XML nodes.
12:06you could make different little applications, and the application
12:09would be embedded inside the page, and the application would be given
12:13some small subsection of the XML tree to be able to collaboratively edit.
12:17So as a result, we could build things and anyone in the community could
12:20build things that you could drop into a Wave and when you dropped it into
12:23a Wave, now you've got a small, you know, drop in application that you
12:26could collaboratively edit inside of.
12:28So, for example, we built a Google Maps extension that let you plan your
12:32holiday with a friend and, you know, with as many friends as you want, and
12:35you could all put down marker pins and draw little lines on the map.
12:38we had a, the yes, no, maybe gadget was the most famous where someone
12:41would post in the office and say, Hey, is anyone up for seeing the new, you
12:45know, the new movie, whatever it is.
12:46on Tuesday at 7pm, and in the Wave would be a little, like, three columns, and
12:52you could click yes, no, or maybe, and whichever column you clicked on, your
12:55face would appear in that, alongside everyone else that clicked on yes, no,
12:58or maybe, or you'd have little polls, and while you had the page open, you could
13:02see everyone's faces appear, all in real time, because that component, which isn't
13:06part of Wave itself, it was an extension, gets to be able to sit on top of the
13:09collaboratively editing, infrastructure and, and work, which was so cool.
13:14That is so amazing.
13:15And I'm like both super excited just hearing about that
13:19again, like amplified by hell.
13:21This was like 2010, like this was like so.
13:26So much earlier, there was no WASM, there was no TypeScript.
13:30There was like, the web was like so, so, so early.
13:34And you didn't just innovate on those technologies, but you
13:37innovated so much on those.
13:38Like you really try to, push to whole new frontiers where the
13:42product experience can be like that, that real time collaboration,
13:46like tied to a phase, et cetera.
13:49and I don't really think that we have that in a, as modular as a way, as you
13:55described it right now, like typically you have those sort of super modular ways, in
14:00a more standalone open, like niche open source thing, but not in a mainstream,
14:05product that, that everyone is using.
14:08And, I think the closest to actually who's going after the same vision that comes
14:13to mind are the folks at Ink and Switch.
14:15Who are building Patchwork and, I get to see the in progress
14:20updates there once in a while.
14:21And it's so, so, so cool.
14:23And like, now I see the strong, strong parallels there.
14:25And I think they have a, similar vision there.
14:28They're just starting from a different foundation.
14:31They're building it on top of Automerge.
14:33we're going to have, Peter von Hardenberg back on the show to talk
14:36about Patchwork as well as at the upcoming local-first conference.
14:41but there's many, many similarities there.
14:43so yeah, this is, this is super inspiring.
14:46Yeah.
14:47I couldn't agree more.
14:48I feel like that's sort of my, my dream software I want to have,
14:51in particular for creative work, I think like if I'm going to be.
14:55I don't know.
14:56I'm using IRC or some, you know, discord or something.
14:58Fine.
14:59I understand that it makes the most sense to have some semi centralized
15:02system, but for creative work, for if I'm writing a, if I'm writing a book, if
15:06I'm collaboratively editing a video with some other people, I want to be able to
15:09have something that both has some data living inside some open platform that any
15:14application and anyone who's interested can grab a copy of the data and.
15:18listen to changes and make changes to the data model, you know, just
15:21as a raw JSON model or something.
15:23And then also like that's sort of the Holy grail of then being able to have
15:26custom extensions and custom bits of software that can be plugged in.
15:30it's not a static platform.
15:31It's something that people can build cool UI on top of and try out different things.
15:36I've got this idea in my mind that I can't.
15:37Escape, which is, it was someone in that broader community once described
15:41Google Wave as glorious data bus in the sky of, you know, this amazing
15:45data bus that just moves all of our data around between computers and you
15:48don't have to think about it and it's complicated and it doesn't matter.
15:51You just know that you've got some data and anytime you want it, it can be on
15:54your device and it can be up to date and it can be, you know, you can make.
15:58Collaborative changes with anyone else and if you had something like a JSON data
16:02model or something like, the data model in Yjs or Automerge, then you could have a
16:07data model than any, you can have lots of different pieces of software interoperably
16:11interact with that same bit of data.
16:13So, you know, if I've got, A whole bunch of server logs in there, and it's just
16:17in the, in the, in the cloud, in the, you know, not the cloud, centralized
16:21cloud, but in this data model, and I can subscribe to that, and I can have an
16:24application that listens to that, those logs, produces a report, and produces
16:28and updates that report in real time, and then puts that back in the set
16:31of data, and that's kind of a boring example, the one I often think about is
16:36compilers, so I've got a bunch of source code files, and I could have all of that
16:40in this data model, so I've got a bunch of files, And I want to just be able to
16:44open any program on my computer to be able to make changes and not just on my
16:47computer, but on any of my devices, grab my iPad, grab my, you know, whatever,
16:51grab a Raspberry Pi and make changes.
16:53And then I want my compiler just to be able to listen to the stream of all of
16:57the changes and be live recompiling.
16:59Based on the differences in the source code and putting back into another data
17:03model, a set of annotations describing where all the errors are and how the
17:07syntax highlighting should work and anything else the compiler wants.
17:10And then we can have different IDEs that don't have to understand the
17:13programming language at all because they can just listen to the compiler,
17:16you know, and then for example, I could have like a testing suite as well.
17:19And then the compiler is.
17:20Keeping up to date and executable, a binary file that's just made of a bunch
17:24of small blocks, which are all like functions that are compiled in, linked in.
17:27And then I could have a testing suite that every 30 seconds, so long as there's
17:30been changes, it reruns the testing suite and keeps up to date a set of like,
17:33which tests are passing and failing.
17:35You know, I, like Unix model is, you know, like lots of small programs that
17:39can interoperate and talk to each other.
17:40but then we, we threw a lot away and I, you know, to this day,
17:44I love using IntelliJ, right?
17:45Like, RustRover, that's it, yeah.
17:47Yeah, but these programs are these huge monolithic programs because the only
17:51way to get all of these small components of an IDE to talk to each other is by
17:54putting them inside one piece of software.
17:56the Unix model itself sort of fell apart because we don't have the
17:59right primitives to be able to plug programs into each other, you know?
18:02I think this is where I also see stark parallels again to what the
18:07folks at Ink & Switch are going after where they're building this,
18:11big data bus with Automerge and then build sort of like systems around it.
18:16And I think Patchwork is both a huge exploration what that could be, but
18:21also drives even more, requirements for the ecosystem to form around.
18:27It's sort of interesting how, the data bus is one aspect, but then the
18:31other, resurfacing idea is basically like a, stateful built system where
18:38you basically, like, you listen to something and you do a computation and
18:42that result, other things can listen to.
18:44So it becomes like this bit, this big tree that's ideally incrementally recomputes.
18:51And this is how most reliable systems that we use on a daily basis work.
18:56But unfortunately.
18:58They're, concealed in a box and, typically don't interoperate
19:03beyond a certain system.
19:05And I think this is another common theme that I'd like to see explored more.
19:10How can, like within Google.
19:12So most things can talk to each other, but now everything is in that big Google
19:16box, but how can we go even beyond that?
19:19And this is where maybe coming back to, the initial ideas behind
19:23Google Wave, where you wanted to build your own protocol.
19:26Can you share more about that protocol and the goals for it?
19:29Yeah, in my mind, the way that I would solve this problem if I were to start
19:33today is to pick some Data model.
19:35So for example, Automerge and then create a protocol where multiple peers, you know,
19:39that takes care of, peer discovery of authentication, all of that kind of stuff.
19:43so that way you can have some little package of software, some binary
19:47that you link to or a JavaScript package, you know, NPM library or
19:50something that will give you access to this, to this data collection.
19:54And then you can make a program that can say, Oh, I would like to
19:56subscribe to this kind of data, please.
19:58And you can see it, for Wave.
19:59Like we started trying to solve this problem and at the time we
20:03used operational transform because there were no other options.
20:05Like this is, it's sort of 2011.
20:07I think the first CRDT paper might've come out around 2005, but performance
20:11wise, it, it performed terribly.
20:13Like if you just typed a regular document of a few pages long, you would use almost
20:17a gigabyte of RAM in memory and a similar amount of disk space just to store the
20:22entire object tree that it created.
20:24It performed very badly.
20:25And that being client side or server side?
20:28both, because they'll, they'll be running all the same code.
20:30So, so that was the problem with CRDTs.
20:32So we used an operational transform based approach, which is based
20:35on the Jupyter, OT algorithm.
20:37And at its heart, um, Jupyter, there's a few different ways to say this for people
20:42who aren't familiar with the technology.
20:43Jupyter uses it's only correct if there are exactly like either
20:47one or two participants, so it can't work at all if there's more
20:50than more than two participants.
20:51So three, there's a whole bunch of correctness problems, but you can
20:55solve that by having the server be one of the participants essentially.
20:58So one way to think about it is that every user is collaboratively editing with us
21:02with their server and the server then.
21:04can collaboratively edit with every user individually.
21:07So you can have a real time collaborative editing system and OT based systems.
21:10Most of them work like this.
21:12So long as you have a centralized server, which gets to make all of the decisions.
21:15and really what that server is needed for is to order things and create a
21:19canonical ordering of all of the events.
21:21So ultimately OT systems like that, and there's a lot of different OT systems,
21:25end up with a, You mentioned event sourcing earlier, you end up with an
21:28event sourcing style list of operations that can all be applied in order.
21:32And if you started an empty document, apply all the operations, you'll end
21:35up with the current document state.
21:36and really you just have one, you know, monotonically increasing version
21:39number, which is the version after, you know, N operations have been applied.
21:44So that works great.
21:45It's pretty fast.
21:46It's what we use for Google Wave.
21:47But Google Wave ran into the problem where, We wanted to
21:50be able to have federations.
21:51So we wanted to be able to have an arbitrary set of servers work and for
21:54that, the network protocol, was horribly complicated and it didn't work reliably.
21:59I saw it work reliably.
22:01It felt like, you know, depended on the phases of the moon and everything else.
22:05where.
22:07The servers needed to, between all of the servers, arrange themselves in a tree so
22:11that there was one server that was the most in charge of all of the servers.
22:15And unfortunately, if that server disappeared, then you'd have a net split.
22:18and all of this was just a, it was a, problem with the technology of the day.
22:21It was a problem with operational transform, ultimately.
22:23That we couldn't build what we wanted to build with OT.
22:25And that sort of got me thinking, like, how do we solve this problem?
22:29so this is condensing about, 12, 13 years of my, my time, after just very briefly
22:35after Google Wave shut down in 2011, I was incredibly sad about it and I thought, oh,
22:40there's no way this technology is so cool.
22:42So JavaScript was, As a language that people like to write was very new.
22:45It was Node.
22:46js 0.
22:464. NPM hadn't been invented yet.
22:49if you can imagine it.
22:50And I thought, Oh, I'm going to use JavaScript and just write a really,
22:52really simple small library that does operational transform in JavaScript.
22:55And I called it share.
22:56js and weirdly lots of people know about the project even though I've
23:00taken the website down and, you know, it's all, it's not used for much now.
23:04I had a call with someone, who works at WordPress the other
23:07day, and apparently Share.
23:09js helped them land some giant deal with a company in Europe, which I'm
23:13not going to name, and was used as the back end for this, this whole news
23:17site for a long time, which I had no idea about because it just implemented
23:20Operational Transform well, which is all you want a lot of the time.
23:23so I made that and then, but I was still thinking about the
23:25question of how to make CRDTs fast.
23:27There was a whole series of new papers that happened again and again and
23:30again, and I felt like if, if we had a good version of Operational Transform,
23:34we could make an open source version of Wave or something like it, but it
23:37still didn't quite scratch the itch, because I still didn't quite know how
23:40we could get all of these servers to collaboratively, you know, collaborate.
23:43Eventually, a few years ago, I ended up getting frustrated, and I thought I've
23:47been avoiding CRDTs for the longest time.
23:49And I read some CRDT literature and I was like, no, no, what's the latest on CRDTs?
23:54How are they supposed to work?
23:55And I read some papers and I thought, This is ridiculous.
23:58You could just make, you could make an implementation of this that works fast.
24:01The only reason why CRDTs were slow at the time is because people hadn't spent enough
24:04time optimizing the algorithms themselves.
24:06And Kevin Yarns, the author of Yjs, he'd done a lot of work.
24:09Martin Kleppmann, the author of Automerge, had done a lot of work.
24:12But at the time, Yjs was, performed okay.
24:16Automerge was incredibly slow and to work around that Automerge at
24:19the time separated all the code out into this front end and back end.
24:22So the back end did all the slow work and then it had message passing to
24:24pass message into the back end so that this whole slow part of it wouldn't
24:28interact, interrupt the user experience.
24:30but I grabbed a whole bunch of ideas from both approaches and there's a
24:33YouTube video of me picking Kevin Yarns brain on YouTube if you want to, if
24:36anyone's ever interested watching for three hours, let's talk about CRDTs.
24:40But it turns out that, you know, with the right application of some complex
24:43data structures, using B trees in the right ways, and, um, using some of
24:46the techniques that Martin Kleppmann, well, he was the first person I saw do
24:49it, where, in the file system, the way that Automerge saves stuff, saves data
24:55to disk, Most applications think about it, they call it an array of structs.
24:59So if I've got a bunch of rows in a table, every row is an object or a struct,
25:04and then I've got an array of them.
25:05You know, I might have a hundred of them and each one represents a row.
25:08Most databases spin that on its head.
25:09So the database will instead store one file per column.
25:13So It's a struct of arrays, if you want to think about it that way.
25:16what Martin Kleppmann did is he said, well, each of these columns
25:19in something like Automerge, if it's describing all of the keystrokes that
25:22happened, we can store that as a string.
25:24And if it's describing the positions inside a document that everything is
25:26stored, well, those numbers turn out to be sequential almost all of the time.
25:30You know, about, people usually type in runs of about 20 characters
25:33before they move their cursor.
25:35So if you just store run length encoded, that data ends up
25:38collapsing and becoming much smaller.
25:40So I was saying before, CRDTs, you type a moderate document, it
25:43might take 800 megabytes of memory or a gigabyte of memory and disk
25:46space to store it in raw JSON.
25:48But if you run length encode everything, in these columns, you can save, store
25:52the same data in a megabyte or less.
25:53So.
25:54Martin Kleppman did that and did that in the file storage engine of, Automerge.
25:59Yjs copied that.
26:00Then I took that idea and did that.
26:02Oh, and Yjs also did some of this.
26:04I don't want to take credit for all of it.
26:05It's all standing on the shoulders of giants here.
26:08but I made a library called Diamond Types where I was like, Oh, how fast could we
26:11make CRDTs go and use that internally?
26:13So all of the internal data is all run length encoded internally.
26:17And that's a. that's a whole tangent that I need to write up at some point
26:20because there's a whole bunch of clever engineering tricks to get, make that work.
26:23but as a result, you can make CRDTs incredibly fast, way faster than
26:26anyone could possibly imagine.
26:28You know, we're talking in the order of millions of keystrokes a second
26:31in a text editor, which is, you know, more than anyone would want to type.
26:35and we can store it all very efficiently to the point that,
26:37I added, a, LZ4 compression.
26:40So.
26:40In Diamond Types, I store all of the text content of what you've typed and
26:44then a bunch of metadata that stores all this extra CRDT stuff, essentially.
26:47turns out that if you LZ4, like, just use a very standard, very, very fast, low
26:51grade compression system on the text, then the amount of data that you save just by
26:55compressing the text lets you put all of that metadata in, and often you end up
26:59with documents that are smaller than the original text, even though you've got
27:02A keystroke by keystroke entire history stored in the same file, is really cool.
27:07so a few more decades or a few, you know, well, I guess one
27:09decade of work after, Google Wave.
27:12And we collectively as an industry have figured out how
27:15to solve the problem of CRDTs.
27:17I mean, I'm, I've had several people come and talk to me over, over the years and
27:21say, Seph, you could remake Google Wave.
27:24And I'm like, I know, and we could remake it better and greater.
27:27Maybe Patchwork is trying to aim towards some of that.
27:30but we're in a much better place, from all of that work.
27:33So let's come back to share.
27:35js in a moment.
27:36I want to learn more about those, various components, but maybe jumping
27:40ahead for a bit, what would it take today to rebuild Google Wave with
27:45the technology stack of your dreams?
27:47honestly, the biggest thing would be some funding.
27:50So, Google Wave used Operational Transform, and now we've
27:53got great CRDTs available.
27:54So, I would use my own implementation of CRDTs, or use Automerge or Yjs.
27:58I think any of those libraries work great.
28:00And there's a bunch more people working on that would probably perform fine.
28:05So, we'd use the CRDT.
28:06Google Wave used, it actually People forget this.
28:09We created a custom jabber, like XMPP extension, and the servers interoperated
28:13through that, which is complicated, and I probably wouldn't make that same choice.
28:17We'd need an identity system, if I were to do it today, and yes,
28:20I have been thinking about this.
28:21I'd consider piggybacking on the BlueSky identity system, and, since that's
28:26actually a federated system even though they haven't built all of the tooling
28:30to make it easy, but, I think it's actually an excellent system and lets
28:33people, one of the freedoms that that system guarantees is that if you've
28:36got an identity on one computer or one domain name, so identities are associated
28:40with a domain name, you can migrate that identity to another domain name.
28:43And anyone that knew your old identity will have their contact address books
28:46automatically update and all of your data moves across, which is great.
28:49So we need an identity system, maybe that, maybe something else.
28:53and then we need a web front end or a front end of some sort.
28:55And unfortunately, one of the, It's so embarrassing on behalf of our industry.
29:01one of the last bastions of unsolved problems is making a good rich
29:05text editor inside a web browser.
29:07in the last Like, however many years it's been, it's 2015, so I guess it's been 14
29:11years since Google Wave shut down in 2011.
29:14in all of that time, there's been multiple aborted attempts to try
29:17and make a web standard for being able to edit a rich text document,
29:20and none of them have succeeded.
29:22All of them have fallen apart, and, rich text editing is a massive mess.
29:25but there are a lot of JavaScript libraries that pave over a lot of
29:29the worst parts of that problem.
29:31maybe lingering, on the last aspect for a bit, I have deliberately tried
29:35to avoid rigid text editing and all facets of it, just for my own sanity
29:41sake, me, working primarily on.
29:44Overtone and LiveStore.
29:46Overtone is a music app where I can gloss over rich text editing for the moment.
29:51This is where it's rather important that your music library is in sync,
29:55playbacks, playback history, playback state is in sync, etc. That's where
29:59I'm leaning on event sourcing.
30:01But, Looking at rich text editing and real time collaboration on text, I'm aware of
30:09projects such as ProseMirror or CodeMirror as sort of the code twin project to it.
30:15I'm aware of the TipTap rich text editing framework.
30:20I'm also aware that Facebook has, I think, a pretty good one, which
30:25I'm blanking on the name right now.
30:27But yeah, where are those projects falling short?
30:30I mean, ideally I'm with you, this would be a web primitive that is
30:35like standardized and implemented by all browsers, but what's so
30:39hard getting there and where do the existing solutions fall short?
30:43honestly, they're probably mostly fine.
30:46They fall short in, for example, mobile editing, so I want to be able to
30:50have a native experience on my phone.
30:52if I open up Apple Notes, I can select text and I can bold it and highlight
30:55it and do lots of different things.
30:57a lot of the existing editors will, it's just really hard to hook into the native.
31:02Rich text editing through a web browser through mobile Safari.
31:05so they, they need that to work.
31:06And then they need it to work from Chrome with Android.
31:08And then they need it to work with lots of different things.
31:10mean I still run into problems sometimes on Reddit.
31:13If you use the new Reddit interface, they've got a rich text editor.
31:16in the reply box and sometimes I've typed and then hit backspace.
31:20Sorry, hit undo and weird things reappear or disappear or the wrong text, you
31:24know, it gets jabbled and confused.
31:27so there's a bunch of correctness problems like that.
31:30That is, it's incredibly boring work.
31:32but it's really important for this kind of thing.
31:35I have a longstanding rule.
31:37I don't know if this has a name, so maybe it can be Seph's rule if no
31:39one else has claimed it, but that essentially technology gets worse the
31:43further away from, mostly Bay Area software engineer problems that you are.
31:48So if you have the kind of problem that someone, a Bay Area technologist,
31:52thinks about a lot, there's going to be good libraries, good software, good
31:54tooling around solving that problem.
31:56But.
31:57You, for example, speak a language that where characters are typed right to left,
32:01instead you're gonna run into problems.
32:03in Australia we have roundabouts, we, you know, which the Americans call
32:06traffic circles and Google Maps took a decade to be able to understand how to
32:09actually give you navigation directions around a roundabout in Australia, because
32:12they don't have them in America, they, I mean they have a few, but they, most
32:15Americans I know are terrified of them.
32:17but I feel like Rich text editing is one of these problems because us software
32:20engineers mostly use plain text.
32:22So.
32:23There are so many great plain text editors that exist both on the web and on desktop.
32:27but yeah, rich text is just harder.
32:28It's further away from the problems that we regularly solve.
32:31I fully agree.
32:32And I love Steph's rule.
32:34maybe that it's going to become a thing.
32:36and so in particular to you touching on mobile, I feel like mobile and
32:41the combination of mobile and web, that is indeed like one of the
32:45hardest modes that are still, largely untamed, and this is both I think
32:51particularly for web technologies, but, overall, it is just a, it had
32:55less time to kind of mature over time.
32:59And particularly for web mobile experiences, when, when it comes
33:03to text editing, et cetera, like dragging around a cursor, this
33:07is where things feel very choppy.
33:09The, creator of React, Jordan Walk, He shares some, some things about that
33:14once in a while, where he's kind of particularly pointing out where mobile
33:19web is falling short, to be competitive with mobile native in terms of animations
33:26and like, just, native interactions.
33:28I mean, it's a very hard set of problems, but I think.
33:32Addressing those feels very worthwhile to make the web even a richer platform.
33:37But then you could also argue that sort of not necessarily in the interest of Apple.
33:42And that's a whole different, kind of worms.
33:45I mean, yeah, it's easiest to think of Apple as a person, but they're
33:49actually, I can't remember what the 200, 000 people or something.
33:52And some of those people are really interested in, in open
33:54standards and some aren't.
33:55And some of them are great people and some of them are assholes.
33:58And that's true of every company that you could name, you know
34:00I agree.
34:01And in apple's credits they have push safari and the capabilities
34:04way forward over the last couple of years It's really has come a long way
34:09Yeah, I think the safari team is very dedicated to making safari an
34:12excellent web browser and it shows but there's still some hard problems
34:16that haven't been tackled yet.
34:17it's quite sad when I was young I started programming when I was about 10 years
34:20old and Every year there would be new things and new technology and, you know,
34:25like I got to see the birth of Windows 95 and, I thought, wow, programming
34:29is going to be so easy in the future.
34:31You know, like I imagine that right at the time there was whole teams of people
34:35working on making something, but in the future, there'd be such good libraries
34:38and such good software tools available that one person could do the work of an
34:42entire team or entire you know, of a whole project because you could just grab in
34:46such good software and there'd be such good primitives available to be able
34:49to solve all the problems that you had.
34:50And I feel like that prediction of young me.
34:54I'm so sad.
34:55I'm disappointed that it didn't come to pass.
34:58And instead we have, you know, it's like, Oh, back then, if you wanted to build a
35:01program, you want to write some software.
35:03Well, I mean, like, I'm so sorry to everybody else, but.
35:05I would have just targeted Windows, you know, written a Windows application
35:09and there it is, and, you know, made some little command line tool in
35:12DOS or, you know, if you want to, if you're working in Linux, you would just
35:15make a command line tool because that was how most good software existed.
35:19But now it's like, oh, well, you know, I guess you're going to want
35:22a Linux and Windows and., Mac Os desktop version of your application.
35:26And then you need to make it work for iOS and Android as well.
35:28So there's five different platforms right outta the gate and, you know, are you even
35:31trying, if it doesn't work on all five of those platforms, and it should work well.
35:35But I guess you could just use the web, but the web's not actually very good
35:38on, on, you know, on mobile platforms.
35:40So you really want to have a, native application.
35:43Oh, but all the programming languages that you use.
35:45For building native applications on iOS are different from Android, different from
35:48the web, different from everything else.
35:51And, you know, and we keep on saying, well, we can kind of solve this with
35:54WebAssembly, for example, and that way we can have one, you know, target from
35:57all of these different bits of software.
35:59And, and that's true.
36:01If we had good UX libraries across every platform, which were consistent and
36:05work well, I mean, this is somewhere.
36:07I'm very, I was very excited about react native when it first came out.
36:10And so many people were kind of like some random thing.
36:13I was like, please, please.
36:15I really want just one good, you know, application programming interface I can
36:20use to build real software for real users.
36:23it feels like a tragedy, a tragedy of the commons problem in my mind that there's
36:26so many companies doing really good work.
36:29But each company, of course, is trying to solve the problem that their
36:32particular company will make money from.
36:34And there are the commons in software, the commons of the standard set of desktop
36:39applications, of user interface libraries.
36:42Say, if I wanted to write a desktop application in Rust.
36:44there's open source libraries which will interact from Rust to GTK and
36:48Rust from, to the Windows libraries and so on, but almost all of them
36:52are maintained by volunteers.
36:53And it's a huge problem, like Google Chrome has probably had a billion dollars
36:57of investment put into it at this point.
36:58to be able to have a web browser that works across every platform and let
37:01you be able to run arbitrary software, like arbitrary web software across
37:05all the platforms Google Chrome runs.
37:07and it might take something around that order of magnitude to have a
37:10really good user interface library.
37:12That works across every platform that exists today so that I can just build,
37:16like, write once, run everywhere, you know, like, write software once, write
37:20Patchwork, write something like that, and then just have Good primitives that mean
37:23that my program can work in every context that I want it to run, but as far as I can
37:27tell, no one's really putting that time and effort and investment in, you know,
37:30like, there's, there's things like Flutter and I'm very excited by them, but I've
37:33burned by Google projects being canceled before, but it just feels like one of
37:37these things that like, I want that.
37:38And then, and then on the flip side of that, we've got, things like,
37:42SQL, which I have massive problems with, even though it's one of the
37:45most, one of the best, like think programs like Postgres are some of the
37:49highest quality software that exists today that we can, we use regularly.
37:52And yet its design is from the seventies.
37:55there's a wonderful talk by Rich Hickey, where he talks about,
37:58value oriented programming and place oriented programming.
38:02And he says that.
38:03Back in the day, we didn't have much memory.
38:05Our computers had literally like, Some of the old Atari's and Nintendo
38:08Entertainment System has less RAM than is available in one tweet.
38:12You know, before they made tweets longer.
38:14It had like, it's like a hundred and twenty bytes of
38:16RAM or something ridiculous.
38:17And they made Super Mario Brothers with these wild limitations.
38:21And so it makes sense, if you're storing data, that every time the value
38:24changes you want to Replace, you have one place where the value goes and you
38:28replace the value that's stored there.
38:30And now SQL is stuck in the past where we've got a table and we just
38:34edit the rows and you've got no idea of what's actually changed.
38:37And that makes it incredibly difficult to build collaborative software because
38:40You need to know that kind of history.
38:41So people maybe layer collaborative things on top of Postgres, but then
38:45now Postgres, you're sort of fighting against the ergonomics of Postgres itself.
38:48And again, no one's solving this problem.
38:50And it really upsets me.
38:52Oh man, I have so many thoughts on this.
38:54I 100 percent agree with like that assessment of like the tragedy of the
38:59commons and I'm both devastated about it and also hopeful because of some of
39:05the initiatives that you've mentioned.
39:08the TLDR of it is that I still think that the web is the best vehicle for us
39:14to, make it through this uncanny valley.
39:17Since I think if you exclude some aspects, for example, mobile web or some,
39:22some other, or browser, strict browser compatibility to a certain limit, Firefox
39:27is lagging behind in a bunch of things.
39:29You can actually already live in the future.
39:32By building fully for the web, things like WebAssembly have come a long way.
39:37things like WebGPU, et cetera.
39:39And there's also new frameworks that are in the making, but not as
39:42mainstream yet that fully embrace those.
39:45So where some lower level primitives could be taking
39:49advantage of WebAssembly or WebGPU.
39:52the thing that's, commonly strikes me is like the most comical unsolved
39:56problems is list rendering, where we have so many React list virtualization
40:03libraries, and most of them still suffer from the same underlying problems.
40:08And whenever you render a list, like some symptoms that appear typically
40:13comes along with frame drops.
40:16But also like, it's rare that, you persist the position of a list and
40:21there's just like, if you start digging into, lists as unsolved problems,
40:27it becomes very comical, but the way how I, try to address that for
40:31myself is by rendering to a canvas.
40:35And that's a whole different approach altogether.
40:40We don't need to go into that, into that rabbit hole.
40:43But yeah, I'm, hopeful that things are coming along.
40:47And you've also been mentioning React Native.
40:49That has, that's a long, long, long project.
40:52And in a way I have so much admiration and respect for the people who
40:58relentlessly keep pushing forward on that.
41:01There's been some really big.
41:03breakthroughs over the last couple of years, some of them you would think
41:07like, wait, that's kind of obvious.
41:09Why wasn't it like that from the beginning?
41:11But there, there are reasons for that, but it's really getting there.
41:14And, particularly for mobile, it is like, it's becoming a really
41:20attractive, platform to, to ship things.
41:23And this is where you can, at least when your goal is at least code reuse.
41:29then you can get a long way if you target React and React Native.
41:33We're not yet at that point where you have the same set of like interactive
41:38components and they work in all platforms, no matter what, maybe at some point,
41:43but there's progress in that direction.
41:46yeah, I mean, while we're at it, I'm just going to throw out some more
41:48things that I hope other people fix.
41:50Well, someone fixes like it, it might end up being me.
41:53I was saying earlier that, if I could live a thousand lives, I would just spend a lot
41:58of them rewriting bit by bit every piece of software that runs on my computer.
42:03So everything actually works well and consistently.
42:06I've been building a little helper tool web app just for the last couple days
42:09to be able to, annotate documents, to be able to, it doesn't really matter,
42:13it's some little helper web app.
42:15And once again, I'm frustrated because I have a server, and my server has
42:18some data, and I've got a frontend, and my frontend needs to edit that
42:21data, and as I change the data, the changes need to be propagated to
42:24the server, and the server keeps a copy of it, which it stores on disk.
42:27And that problem, I feel like every single time I try and approach
42:30it, I have to re implement the wheel and I start from scratch.
42:34And it's not even this data that I'm editing isn't even collaborative.
42:38It's just like, okay, great.
42:40You know, let's start climbing the ladder of editing once again.
42:43So the first step, you know, I've got one object and I send
42:46it to the browser and the browser sends back an entire copy of it.
42:49Next run.
42:49Okay.
42:50The server can do versioning where the browser can subscribe,
42:53it can get a certain version and find out what version it is.
42:55Next run, Now I can subscribe to the browser, can subscribe from some version
42:59every time a new version gets sent, the server sends a new copy of the data.
43:02Okay, then now I can do differential updates.
43:05Now I can do collaboratively editing on top of the differential updates.
43:08Okay, now I can do like, you know, anyway, it's just a series of things over
43:11and over and over again, every single piece of software I end up writing.
43:14And most of the time I'll cap out somewhere pretty low down that ladder,
43:17even though I'm probably one of the, you know, like, I know all of the
43:21tools, I know all of the ways that we can make this problem be good,
43:23but our platform isn't very good.
43:25And I think a lot of the problem with that is because like we still think
43:28in most software about messaging, it's a message oriented system,
43:32how we actually want to think for a lot of this isn't about messages.
43:35it's about updates.
43:36it's, I've got some semantic idea of the state of the world.
43:39And instead of sending messages to the client, which is kind of a low
43:43level primitive, I instead want to be sending updates and describing how
43:46the document has changed over time.
43:47I was working with the, braid group, trying to build.
43:50So we together wrote a proposal for the IETF on a primitive that we could
43:54add that's different from get and put and post and so on, but a different
43:58verb, which would be a subscribe verb, to say if there's some resource
44:02that lives at some URL, I want that resource to be able to change over time.
44:06And I don't want to have to re implant the wheel, reinvent the
44:08wheel every single time, describing how that resource changes.
44:11In fact, it would be great if the web, like HTTP itself, had a
44:14primitive that described a resource that could change over time.
44:17And then, for example, NGINX, if NGINX understood that that was something that
44:20changed over time, instead of NGINX storing some cache invalidation time
44:24and then occasionally revalidating its cache, but in the meantime it's serving
44:28out stale copies of this resource.
44:30Instead, NGINX could just subscribe to the underlying layer and say, Hey, I
44:34want, I'm interested in this document and tell me every time it changes.
44:37And then NGINX can be doing fan out to all the different clients that is interested
44:40in subscribing to that document.
44:42And you'd have a much better, much more performant way of being
44:44able to distribute data around.
44:45That is way easier to program, way faster from a performance perspective.
44:50And then it could be integrated into lots of things.
44:52Like integrated into Postgres, integrated as a standard thing that
44:54we have access to in our web servers.
44:56Something we have access to in our web browsers and so on.
44:59And it's primitives like this in my mind that, you know, like,
45:01I'm like, Oh, please, please.
45:03Give me better things like this.
45:04This is the kind of thing that I feel like all computing, again,
45:07it's that lesson from Google Wave.
45:09All computing can work like this.
45:10You can just have the data update in real time.
45:12And this is a primitive that almost every program I've ever worked on
45:16is needed in some form of, you know, In a web browser, in a mobile phone,
45:19in some monitoring application.
45:21I have some data that lives somewhere and I want my application to be kept
45:24up to date and told whenever changes happen, and then I wanna be able to
45:27edit that data from different clients and have something sensible happen.
45:30And there's a simple version of that, which is a centralized
45:33version where a centralized server like has to authorize all changes.
45:36And you have a version number that goes up by one every time a change
45:39happens, which we should be able to just trivially have built into
45:42Postgres, in my mind, in SQL databases.
45:44And then there's the CRDT, the real time collaborative editing use case
45:47for that where I don't actually want a single version number, I
45:49want something kind of like Git.
45:51but where I can collaboratively edit any kind of data and I can do it in
45:53real time rather than needing to hit commit every time I make a change.
45:56I want to push that out.
45:57and hopefully as well, I want to be able to do optimistic replication,
46:00optimistic concurrency control.
46:02So the Ink & Switch team is working on this, and having branches and so on
46:06for other kinds of applications, right?
46:07Again, it's, it's my rule.
46:09It's the, it's like.
46:11We've built these tools for ourselves for code editing where
46:13we get to collaborate using Git.
46:15We get to have branches, we get to do merging, we get to look at
46:18all the diffs between versions.
46:20Everybody wants these tools.
46:21Everyone.
46:22You know, from people working on CRMs to people doing video editing to
46:26people, you know, I'm sure running, like wanting to talk to astronauts
46:29in space, this comes up all the time.
46:32And for those kind of people, for these projects that want to build using these
46:35kind of primitives, it's so hard to have, like, we just, our primitives
46:38on modern software aren't there and.
46:41No one like application teams aren't working on it because
46:43they've got products to ship
46:44so I've had a couple of folks Who are working on that on the podcast before so
46:49for example notably the folks working at Electric They're tackling specifically
46:53that problem for Postgres were exactly as you're describing that you can subscribe
46:59to or like you're you can basically just Express something they call a shape.
47:03It's sort of like we can oversimplify and it's like sort of a scoped query.
47:07And then your client can subscribe to the result of those queries.
47:12And it basically always gets an up to date query result locally.
47:16Well, eventually consistent, but you already get those sort of one level
47:20up primitive, where you don't need to think about get, propose, delete,
47:25but you can just, subscribe to that.
47:28well, it comes with its own challenges and if you're looking at the fundamental
47:33layer, that you describe as message oriented, I think that's closer
47:37to the metal and where you need to roll up your sleeves more, but it
47:40also allows you to implement things for different trade offs in mind.
47:44So one thing I'm, curious about how you're navigating trade
47:48offs when it comes to, to data.
47:49It's all about trade offs, like what for a given application,
47:53what can you get away with?
47:55How much is fine that different parts of the application stage do they need
48:00to be fully transactional or is it fine that one part of the application
48:04Is maybe lagging slightly behind, and how do you address the cap theorem
48:09for your particular application?
48:11So I'm curious how you're thinking about navigating trade offs and
48:15like trade offs even go to a point, not just to build the initial app.
48:19But also to keep in mind how you need to evolve the app over time, how certain
48:25are you about the data model that you've picked that this is the one you still
48:29have, like in five years, you're going to have it in five years, probably
48:33no matter what, but the question is, are you still happy with it in five
48:36years or, is this the worst decision you've made building the application.
48:42So I'm curious how you're thinking about navigating trade offs when
48:45you design an application, the data layer for an application.
48:48I mean, fundamentally as engineers, you navigate them one by one, you
48:52know, while sweating profusely.
48:55That's how that goes, I think.
48:56yeah, I feel like there's, there's a bunch of interesting problems in
48:58all of the things that you've said.
49:00I had a few, couple small conversations with PVH, talking about, he built this
49:04thing based around lenses of, of how data can evolve over time in a Cambria.
49:09That was it.
49:09Yeah.
49:10Um, in local-first software.
49:11And I have a bunch of my own thoughts about that.
49:13And you know, like I've got designs in mind that I'd love
49:16to experiment and play with.
49:18So there's something there, which is, you know, like it's really interesting.
49:21HTML, has evolved beautifully over time.
49:24Like HTML has barely changed at all since it was first introduced.
49:28like we've introduced new tags, but almost like all of the
49:30tags still follow the same.
49:32Fundamentally XML style structure, and that's wonderful.
49:36It's wonderful.
49:36It's been able to evolve like that.
49:38Email has evolved slightly less gracefully, but emails.
49:41I think email up email programs from the 70s probably still work
49:44today with most modern emails, which is incredible, even though.
49:48Email messages themselves are almost impossible to pass correctly.
49:51And, I've got a lot of thoughts about that as well.
49:53I've got some friends who work at FastMail and they've, pinned me to the
49:55wall with things about email that I had no idea about that are horrific.
49:59but there's this open problem, which is how can data models change.
50:02So there's a, set of problems there, which I'd love to solve.
50:05There's a set of problems around, how is our data stored and sent.
50:09in my mind, what I would really like to have is.
50:11I feel like there's some kinds of programs where I actually really You know, I'm so
50:16sorry to the Ink and Switch folks, I'm quite happy for there to be a centralized
50:18server for Discord, or for IRC.
50:20For something like that, when there's a place that we all go to, I'm quite
50:23happy for there to be one computer that's authoritative and decides, you
50:26know, all of the messages that are and aren't part of the log of messages.
50:30I feel the same way about banks.
50:32I'm more than happy for them to use a centralized transactional database.
50:35I'm not a Bitcoin absolutist by any means.
50:37I think decentralized databases work great.
50:39but I'd really like some set of primitives where, The primitives that
50:41I use in my computer program, like what I embed into my program and use, are
50:45the same set of primitives that I could use either with a centralized server,
50:48which has transactions and various other ergonomics, or with something
50:51like Automerge or Yjs, where, I'm actually collaboratively editing a CRDT.
50:56And I feel like there's a lot of overlap there around what's the shape of the data.
50:59What does the change look like?
51:01You know, subscriptions, which also you almost always want
51:03in a centralized use case.
51:05and then there's a bunch of questions around performance.
51:08so I wrote a CRDT library of my own called Diamond Types I haven't kept up with all
51:11of the demands that I've made of myself.
51:13busy and distracted, but I use that.
51:15That was the test bed in original place where I built Eg-walker,
51:18which is an algorithm that I've written a paper on, which is just
51:20for collaborative text editing.
51:21and I wanted to make it really, really fast.
51:23And people kept saying, well, but don't you know that if you
51:26collaboratively edit a text document in something like Yjs or Automerge,
51:29it stores every single keystroke that's ever made to the document.
51:32And these documents are going to get huge, and we need some way to be able to
51:35prune history, and it's really important.
51:37So I said, well, Look, that might, I agree, I think that's a very
51:40interesting and important problem.
51:42But let's first start, let's just start by trying to make it as fast
51:45as possible and as small as possible.
51:46So, you know, even if we prune it, it's going to be pruned
51:49to be even smaller regardless.
51:50this is always when I do a lot of performance work and people, a lot of
51:54times people reach for multi threading.
51:56Let's, let's spawn it across lots of threads on your computer, which is a fine
51:59approach, but It's almost always better to start with trying to make it run as
52:02fast as you can on one thread before you run it across multiple threads.
52:04I mean, this is why the M1 series of, of Apple was like such a big
52:08deal because it showed like, okay, we can actually do a lot better even
52:12in a single threaded environment.
52:15Exactly.
52:15Yeah, but It turns out that, the collaboratively editable text documents
52:19don't actually grow very fast.
52:21the amount of data, the number of bytes on disk is tiny.
52:23And, and yeah, like I think that it might be useful to
52:25build software to prune anyway.
52:27And I've got a bunch of, you know, like I've thought a lot about that problem
52:29because people keep talking about it.
52:30but from an engineering perspective, a lot of the time we can just keep all
52:33of the data and it's actually fine.
52:34We just need to, for example, store it in some slightly more efficient
52:37way sometimes than raw JSON.
52:38And, you know, and like, that's the thing that we need to think about.
52:41modern computers are so fast.
52:43Like, yeah,
52:44I feel like similar to what you've mentioned before with quoting Paul
52:49Graham of like, what was the quote again?
52:52It's it's what would it be ridiculous to not have in a hundred years?
52:55Yeah, exactly.
52:56So you imagine a hundred years, it's like, we still don't have something.
52:58It's crazy.
52:59Then it's, okay, well, if we didn't have that in 100 years, it would be crazy.
53:02Could we just build it today?
53:04Exactly.
53:05So similar to that, we can also ask ourselves more often, like, Which things
53:10would actually be totally fine that historically we always like shied away
53:14from and that sort of like by now, there's sort of like this, picture of like a baby
53:20elephant kind of, pinned to a pole and it's like, it has learned it cannot escape
53:25and now it's, a full upgrown, elephant and still, pinned to this tiny pole.
53:29I think there's like, a lot of similar stuff, the way, how we go
53:33about programming and we need to unlearn, forget about some things.
53:38And this is, I feel like also why some of the most brilliant, new
53:42technologies are by people, by, by newcomers, like new generations of
53:47programmers who are like blissfully unaware of some of like the old stigma.
53:53And this is how we get new ideas as well.
53:56yeah, I really agree with that.
53:57there's something that it doesn't, I keep thinking about, there
53:59was a, there was the Unix room.
54:01So Unix was invented in a place by some people and they sat in a room together and
54:06they had one computer and they would write programs and show them to each other.
54:08And someone wrote spell, you know, and, and someone wrote like, they
54:12wrote these different little Unix programs and said, Hey, check it out.
54:15And then, some people, made the pipe operator and made piping work.
54:18And they started to be able to connect these programs
54:20together to be able to make.
54:21You know, quite complex programs just as a series of small programs pipe together.
54:25This is a really beautiful primitive, and it's a beautiful
54:28thing that, someone created.
54:29And we have it on all of our modern terminals.
54:32I think there's even a version on Windows, but all Unixes have something like this.
54:35I feel like at some point we gave up trying to invent new kinds of
54:38primitives like that, and I dunno why, but it feels like the sort of
54:41thing that we should be able to do.
54:43Obviously, you know, I sometimes think about, we've been
54:46talking about the web a bit.
54:47And, we have this beautiful idea, which is, so we've got these
54:50two different ideas right now.
54:52We've got a desktop application, and desktop applications have access to
54:55everything that the user has access to by default, which is interesting.
54:57And Apple's trying to change this, but keeps getting in trouble for it.
55:00desktop applications are binaries.
55:02They're always native binaries on every platform.
55:04And they have access to some set of native, APIs and they
55:07can make sys calls directly.
55:08And then we have another set of applications called web applications,
55:11which is sandboxed by a browser and, you know, historically only written
55:14in JavaScript and written in a way that they can operate on every, every
55:17computer, but only inside the web browser.
55:19And like.
55:20Web applications are really successful, I think, not because of the web browser, but
55:24because you don't have to install them.
55:26And people sort of forget this, but they're kind of equivalent, except
55:29this one you have to install for some reason, and this one you don't.
55:32And because you don't have to install a web app, people spend a lot of
55:34time optimizing them for size.
55:36So you load up the New York Times and it'll load a lot of Crap, probably,
55:40but we're looking on the order of maybe half a meg of JavaScript.
55:42Maybe it's a couple megs of JavaScript and some images.
55:45Um, whereas if I install, you know, I haven't actually tried this.
55:47I'm going to get in trouble by somebody who will actually go and
55:49look, but you look at most iPhone apps, for example, and they, there
55:53are hundreds of megabytes in size.
55:54I think the Uber app is like 300 megs or something crazy.
55:57Like the Facebook app is huge and it doesn't even have content.
56:00Like it's not even like the Uber app is loading.
56:02It's like installing databases.
56:04Who even knows what's in there?
56:06But then web applications are written in slow languages and I just feel like
56:09it's like well, we could just make a new platform and we could give it
56:13a new kind of application where you don't have to install it, but also it
56:15gets access to some set of beautiful native primitives that might be even
56:19better than what the web provides today for applications themselves.
56:22Like the web obviously is designed as a document.
56:25Viewing platform and then we've could have hacked on applications because it
56:28was so convenient, and we could make it so that data is just transparently
56:32available and accessible between programs beautifully using all of the tools and
56:36technologies we've been talking about.
56:38but no one works on this stuff because we sort of take for granted, it's
56:41like, there's the ruins of old Rome, you know, and that's, that's like Unix
56:44or it's the, you know, the machine code and x86 assembly and then modern,
56:48you know, people say, oh, well, Then they build the web browser and then we
56:51build on top of the web browser react.
56:53And then you build an application on top of react, but then the application slows.
56:56So you do some other wacky thing on top of that.
56:58And it's like, you know, underneath the city is this giant, you know, all of
57:02these ruins that are all full of code and all being used by modern programs.
57:06But that so many people, particularly young engineers, they have no
57:09idea about all of this crap.
57:10They just know that if they type the right thing into a react application,
57:13that they'll get something on the screen.
57:15But all of that stuff, we can actually like, you know, burn it all if we want
57:19to, and then go and make beautiful things right from the very base of computers.
57:23Yeah.
57:24I mean, I think there's this sort of like innovators dilemma and I think this,
57:29you mentioning email as an example, I think this is one of the words, since
57:33you, you just emails and browsers, like you, you just cannot get away
57:38with like not supporting the old stuff.
57:40And this is where, If you build a brand new thing, you don't have to,
57:45account for all of like the historic mess, and you can just start over.
57:49And, I think this is probably just having the, the courage or naivety to start over.
57:58I think that that's highly underrated.
58:00and also for the record, I've just checked, blank loading New York times.
58:04It's like currently five megabytes of just javaScript and, depending on, well,
58:09and 20 megs, of like other stuff that I've loaded, like with images and so on.
58:14So, I think that this just proves the point, like even for New York times,
58:18like five megs of JavaScript, it's fine.
58:21I don't want to know how much of that is like ads related, et cetera,
58:25but, I just want to encourage people to rethink their, like their
58:30learned, thinking about trade offs.
58:33Like we're, it's at the same time, we're kind of indoctrinated with like,
58:37okay, we need to make the initial page load as quick as possible.
58:42We always have connectivity.
58:44I'd like to alter that slightly and say like, when we're connected.
58:49We probably have pretty good connectivity.
58:51So let's embrace that, but we're, not going to be always connected
58:55for the moments where we don't have perfect connectivity.
58:58Let's, like piggyback on the times when we had good connectivity and we
59:04should just sync the deltas instead of like reloading everything every time.
59:08Also goes back to the build problem, the build system problem that we had before.
59:14Since we don't build things in a principled enough way, so we don't
59:17trust the stuff that was there before, and so that leads to us reloading
59:22everything from scratch all the time.
59:24And, I think that's another big culprit of, systems problems.
59:29I read a great article a while ago, comparing the size of JavaScript bundles
59:33with War and Peace, saying like, you know, could you, how many copies of War and
59:38Peace could fit in your JavaScript bundle?
59:40and it's quite a lot.
59:41and the other thing I sometimes think about is, how many bytes of
59:44data would it take if you took a screenshot of your website, even as a
59:48PNG, and then sent me the screenshot, would that be larger or smaller
59:52than it takes to load your website?
59:54And if the answer is that your screenshot would be smaller than all
59:56of the code that you send me, then maybe you're doing something wrong.
59:59but even then, like, yeah, I really encourage people to also think
1:00:03about from the perspective of, the web browser, it's all code.
1:00:07You know, if you, if you start digging, it's code a really long way down.
1:00:11And all of that code can be changed.
1:00:13Like web browsers are open source.
1:00:14I've got some quite famously, infamously, I've got some source
1:00:17code, in Google Chrome, to be able to interact with Xbox game controllers.
1:00:20I'm not sure if it's still there, but, I wrote, a user land,
1:00:25USB driver for Google Chrome.
1:00:28so that if you're on Mac OS in particular, so if you plug in an Xbox
1:00:30game controller to a Mac computer and you want to play video games, in browsers,
1:00:36then the Xbox controller will work.
1:00:38But there's so much stuff like that, that like, you know, and I think that's almost
1:00:40crazy that that, that is in Google Chrome.
1:00:43it should be the operating system, but there's lots of perimeters
1:00:45that we could put in Google Chrome.
1:00:47That would mean that, you know, if there's some, if there are things
1:00:49that we want to be able to have access to as web developers, We can
1:00:52build them in as primitives, and everyone can get access to them.
1:00:54Like, a lot of the standards committees, you can just go to them, it turns out.
1:00:57You know, like, there's open mailing lists of the people that build
1:01:00all of this stuff, and they're just nerds like us, you know?
1:01:02Like, they've just got all of their own crotchety, angry opinions
1:01:05that they'll tell you about if you give them half a chance.
1:01:07but, I don't know.
1:01:08I feel like there's not enough conversation around all this
1:01:11stuff, how it could be better.
1:01:12Going back slightly to the moment where you reflected on that kind of the creation
1:01:19of primitives, what I found, at least looking back at my own creative work,
1:01:25what I found easier to than just forcing a primitive into existing out of thin air is
1:01:32rather embrace sort of like organic chaos, and then study it really hard and then
1:01:39see basically out of the existing mess.
1:01:43typically if you look hard enough, if you observe hard enough, you
1:01:46can, observe some things that later can emerge as primitives.
1:01:53And, this is where almost paradoxically the more requirements
1:01:57I apply on a certain system.
1:02:01The more it becomes like simpler over time.
1:02:05And so I've basically just taken more kind of like inner peace by like, not
1:02:10knowing the primitives upfront right away.
1:02:13I'm basically just trying to solve the problem.
1:02:15Like I happily say yes to a few problems and I've had enough, past
1:02:22experience where out of that mess.
1:02:24through lucky coincidences, I realized, okay, here's some useful, more general
1:02:30primitives and in hindsight, those primitives look very obvious and
1:02:34someone who then looks at that system and maybe builds a similar one, they
1:02:39can already embrace those primitive ideas and, build on top of them, the
1:02:44beginning, but I think for novel, new primitives, I think the most likely path
1:02:51for them to come into existence is out of emergence and not out of like forcing
1:02:56them into existence out of thin air.
1:02:58I agree with everything and I'm a little bit dubious on that last point.
1:03:03And just to push back a little bit, I think that it's got to
1:03:05be this push and pull, you know, like they're both so important.
1:03:10I really like what you said though.
1:03:11Again, Rich Hickey, who, You should watch all of his talks.
1:03:15Anyone who's listening to this, he's much more insightful than I will ever
1:03:18be, I think, but he gave a talk once and he said, he talked about hammock driven
1:03:22development as in software development driven by writing some code and then
1:03:27going outside and lying in a hammock and thinking really hard about it.
1:03:30And just, just letting it percolate, like letting the design that you've
1:03:34come up with percolate and say, how does this problem actually really want to be
1:03:37solved if I were to do a good job at it?
1:03:39and instead of sort of half arsing a million things and having everyone across
1:03:43the industry half arse the same set of eight things, you know, lists and so
1:03:46on, I don't know, I can't help but think that if, if a few people spend some time.
1:03:51Some serious time thinking a lot about lists, we could have some really nice
1:03:54lists in web browsers and all these different things and then it would
1:03:57just be solved for everybody, you know,
1:03:58maybe this is, this is why I've prefaced it with like, that's being
1:04:02for me, the easier path, like for me, step one is half arsing something.
1:04:07And then looking at it, but I need to have it be laid out wrong first for me
1:04:12to spot, oh, this is, this is how right.
1:04:15Looks like some more brilliant people than me can probably skip step one.
1:04:20But for me, this one has been a more proven approach.
1:04:24I mean, it's the same for me.
1:04:25I used to teach programming and something, you know, my students would.
1:04:29Sort of sometimes come to me asking me how they should design their program
1:04:32before they even start writing any code.
1:04:34And I'm convinced that you know the least about your program,
1:04:38like you know the least about the program before you start writing it.
1:04:40That's the time that you will know the least that you will
1:04:42ever know about this problem.
1:04:44So you're the least qualified you're ever going to be to design it correctly.
1:04:47You know, so you become qualified by throwing something on the screen and
1:04:51then taking the time to reflect on the knowledge that you've gained to figure out
1:04:54how it could be written in a better way.
1:04:56it's, yeah, I absolutely agree.
1:04:59And I think this is also this underscore is like one of the most important things
1:05:04that I hold dearly in the craft of software engineering, which is the ease
1:05:08of iteration and the speed of iteration.
1:05:11And this is where I spend a obscene amount of time on just like making
1:05:15so that I have fun and iterating.
1:05:19That it's very cheap for me to get it wrong 10 times and
1:05:23it's fun to do every iteration.
1:05:26but if it's gruesome to do one iteration, then you just, run
1:05:30out of like joy and energy.
1:05:32Until you get to the right point.
1:05:34So making the iteration cycles, it's like, it sounds very obvious, but I
1:05:38think very few people actually put in the work since it's also partially
1:05:42some pretty annoying work, like getting your, like your monorepo set up, all
1:05:47dialed in, like particular, like which JavaScript package manager should you use?
1:05:51Like all of like those stupid things, but getting all of that stuff dialed in,
1:05:55I think that the reward is, quite big.
1:05:58I mean.
1:05:59I assume that you've read this, but, again, to plug more things that people
1:06:02should read if they haven't, there's that beautiful essay of Worse is
1:06:05Better, that talks about all of this.
1:06:07And I feel like, yeah, I think that life exists like in the intersection
1:06:11of thinking it through and just throwing something at the wall.
1:06:14And I think all good software is going to have elements of both of these things
1:06:17where, you know, there's not too much upfront design and upfront thinking,
1:06:21but there's not too little of it either.
1:06:22You know, like there's got to be some amount of time, but after you've written
1:06:25a whole lot of code, you take a step back and you say, how should this have been?
1:06:28If I knew everything I knew now, how would I build it?
1:06:30And I think everything beautiful and everything incredible has
1:06:33a lot of those feedback loops.
1:06:35Like I listened to an amazing talk at, GDC, the Game Developers Conference,
1:06:38once talking about this, and he said essentially all good games are made
1:06:41by having some ideas, writing them in code, trying them out, and then
1:06:45throwing out 80 percent of them because they weren't very good ideas, but 20
1:06:47percent of them were really good ideas.
1:06:49And he said in that talk that the quality of any program that
1:06:52you make is proportional to the number of iteration cycles you get
1:06:55through, not how long one cycle is.
1:06:57The number of iteration cycles, just the sheer amount of repetition
1:07:01that you go through in writing code, reflecting, changing the code, making
1:07:05it better, writing more code and so on.
1:07:07And I think it's, yeah, I think it's a beautiful idea.
1:07:10I've been doing improv comedy classes lately and over the last few years and
1:07:14in improv we learn it's, you can't plan.
1:07:17There's no planning.
1:07:17You don't have a meeting with your, the people you share the
1:07:20stage with before the show starts.
1:07:22So everything is just asking the question of what comes next?
1:07:25Like, which I feel like is this life philosophy.
1:07:27Just at every moment, what comes next?
1:07:29And maybe what comes next is writing more code.
1:07:31And maybe what comes next is stepping away and thinking about
1:07:33the code and refactoring it.
1:07:34But, like, I feel like that's the right question just to
1:07:37hold, you know, consciously.
1:07:39so you've given me two segues now to ask you about another topic that I
1:07:43think is very top of mind for you.
1:07:44So one is sort of this almost evolution, like, nature evolution of software
1:07:50and good products, et cetera, where it's all about the iteration cycles.
1:07:53That's like how biology works.
1:07:55So this is why we as humans exist, et cetera, and why other good things exist.
1:08:00and then also asking the question, what is next?
1:08:03That is, that's the essence of how an LLM works.
1:08:07So I think you've been thinking a lot about, the topic of AI and
1:08:11what that means for our culture of programmers and software creatives.
1:08:17So I'm, I'm curious, what are some of the leading questions for you
1:08:22are when you're rethinking and like digging into the topic of AI?
1:08:27I've told the story of me working on Google Wave and I started there in
1:08:30about 2010, but I've been thinking about AI a lot since about 2002.
1:08:35I think since I first around when I started uni.
1:08:37I've got somewhere a pile of notebooks full of handwritten notes,
1:08:40thinking through lots of different ideas and ways to build AI systems.
1:08:44and I started a PhD And I ended up leaving and I felt disappointed and I attacked
1:08:49myself because I couldn't get the things that I wanted to get working, working.
1:08:52And instead of just chipping away at it, like I wish I had done in
1:08:55retrospect, I felt a whole lot of shame and guilt and then walked away
1:08:58from the whole industry and haven't really come back or it's been a while.
1:09:02you know, I haven't come back in a big way, for, you know, 20, 23 years
1:09:06or something now, which is crazy.
1:09:08more than half of my life, you know, running away from this dream
1:09:10that I had, but way back when I. Like, it's really interesting.
1:09:15We're in this transition period at the moment where AI is a
1:09:18similar intelligence to humans.
1:09:20but something I think about a lot with this kind of software is, like I mentioned
1:09:24before that when I was young, I thought that one human should be able to, as our
1:09:28tools, let us become more productive.
1:09:29One person should be able to do the work of a whole team from a decade ago.
1:09:33And increasingly with AI think that's actually going to become the case.
1:09:36And I don't really know what that's going to, how it's going to change.
1:09:40A lot of things, but I can imagine as we go forward that if we had better
1:09:43primitives and had primitives that the AIs understood, that a lot of these kind
1:09:47of problems that actually just require a whole lot of code, for example, like
1:09:50building a really good UX, like a UI toolkit that would be cross platform, it's
1:09:53possible that we could start to build AI systems that could actually design good
1:09:57primitive tools, for computer systems and, I don't know what that means for us.
1:10:01Like, I don't have any recommendations or advice or anything else, but it's
1:10:04really interesting to start thinking about it as, you know, if, if your
1:10:07productivity isn't limited by what you can personally code anymore, which is,
1:10:11I think, going to increasingly be the case, then what do you want to build?
1:10:15And how can we start building, you know, like, utilizing AI tools that
1:10:18will increasingly, and obviously they're not quite yet, there yet, build large
1:10:21swathes of working in usable software., I feel like this is just really open
1:10:26question of what does it even mean to be a software developer, but also.
1:10:30What could we do again, right, like that we can't do today because it would take
1:10:33the resources of Google to be able to build something that we might be able
1:10:37to do, you know, like if you wanted to build your own operating system
1:10:39and your own browser from scratch, you could just ask an AI to do it.
1:10:42How do we do that?
1:10:43have you been able to derive sort of like a set of, invariants almost that
1:10:50are still going to be true, in the age where, AI will be a meaningful part
1:10:56of how software is created, et cetera.
1:10:59Like, which aspects do you think are still meaningful for humans
1:11:04to play a, meaningful role there?
1:11:07I mean, it's a great question.
1:11:08I feel like there's this massive economic, you know, loom thing that looms over
1:11:12all of us of, If you can't use your mind to do things that an AI couldn't
1:11:15do, then why would you ever be hired?
1:11:18why would any human be hired for any job?
1:11:20And, there's a threshold that we need to pass.
1:11:23You know, obviously with computers and AI systems, we can become more productive
1:11:26than we ever are today and produce more abundance and more resources and more
1:11:30useful programs and everything else.
1:11:32But if none of the humans are employed to do any of that, then
1:11:34we've got a huge economic problem.
1:11:36but The beautiful world on the other side of that, if we can possibly reach
1:11:39it, I think has to look like humans actually building the software and
1:11:43building like being able to be creative in all of the ways that we're born to be.
1:11:47I think that there's some element that's honestly our birthright in creative
1:11:51beings, being able to make stuff, you know, it feels so, so core to who we are.
1:11:55And the more that I get in touch with myself, the more I just want to.
1:11:58Build and play piano and write stories and do this kind of stuff.
1:12:03So
1:12:03play as sort of like the most natural state of, who we are.
1:12:08Yeah, I did, again, this is a segue, that I'll, I'll try not
1:12:12to drag us too, too far down.
1:12:13I went to France a year and a half ago and, and attended a clowning intensive.
1:12:18So physical comedy and performance for a month.
1:12:21And it was horrific.
1:12:22The, it was quite abusive in its own way.
1:12:25The guy who's was teaching it has been teaching clowning for 40 years.
1:12:28And, anyway, it was an incredible experience.
1:12:30But, he said, you know, he's this like grizzled old Frenchman.
1:12:33And he said that he thinks And he's trained Sacha Baron Cohen and all
1:12:37these different people, but he thinks that the most beautiful thing that
1:12:40exists in the world is watching a child play and, you know, so much
1:12:43of clowning and physical comedy.
1:12:45And I think creativity in general is rediscovering as adults, if we
1:12:49need to, that spark that's inside all of us and that just wants to
1:12:52build things and wants to play and wants to try stuff out and so on.
1:12:56And I don't know, that's my, that's my hope for AI at least is that.
1:13:00If you were to play, if you wanted to make your own sandbox, you know,
1:13:03grow a garden, a software, whatever metaphor you want to think about it
1:13:06as, then what do you want to make?
1:13:08What, what are you called on to make?
1:13:10You know, I live in a apartment building that overlooks a lot of the
1:13:13city and, there's this idea of Dharma that's talked about in, in Smithsonian
1:13:18philosophy, which is like, what is the duty that's your sacred duty?
1:13:22That's yours alone to reach.
1:13:23And that duty, by the way, might just be to like, be a really great parent.
1:13:26It doesn't have to be anything grand or grandiose in any way,
1:13:29but asking that question of what is it yours to do in the world?
1:13:32That's yours uniquely that no one else will do if you don't do it.
1:13:35I think that's really the question that we want to be asking
1:13:37ourselves as creative workers.
1:13:38and from that perspective, I'm excited about AI because hoping I mean,
1:13:42I'm really hoping that it lets us answer the questions like that more.
1:13:45And you know, like I don't think economically we need local-first
1:13:48software, you know, like we can trudge along with the feudalism
1:13:51of Google cloud services for, you know, probably for a very long time.
1:13:55but I don't want that.
1:13:56I want beautiful software programs that work in harmony with who I am as a person
1:14:00and with in harmony with what kind of communities I want to be able to foster.
1:14:04And from that perspective, I think that's like why I care about local-first
1:14:07software and why I hope that more people care about it because I just think that.
1:14:11We deserve, I don't know, we can just have nice things, you know, like the cloud
1:14:15always feels like, feudal city states, you know, so back before we had democracy.
1:14:19And before we had countries, you have these towns and the
1:14:22town, it's not a democracy.
1:14:24There's one ruler, the noble, the local noble.
1:14:26And if you upset the noble, there's no laws necessarily.
1:14:28That's a, recent invention, that the noble would say, no, not you.
1:14:32And you'd be either be exiled if you're lucky or like, you
1:14:34know, hung from the town square.
1:14:36If you did something, the noble didn't like, and no one owns property.
1:14:39Only the noble owns the whole town.
1:14:40That's the rule, right?
1:14:42And so if you have a house, you have a house because the noble has
1:14:46graciously allowed you to live there.
1:14:48And that's the rule, you know, and if the noble wants to.
1:14:50Do whatever they want to do.
1:14:52There's no higher law than the noble, and that feels like the software
1:14:55ecosystem that we exist in today, where, you know, there's the Google city.
1:14:59And as much as I have endless respect for so many individuals that I know
1:15:02who I've worked with at Google.
1:15:03I think they're amazing people.
1:15:05The experience is Google is a feudal city state.
1:15:08Where you walk into the gates and if the noble, with the local Lord
1:15:11doesn't like you, then you can get banished at any moment out of Google.
1:15:14There's no recourse.
1:15:15There's no laws.
1:15:16There's no rules.
1:15:17It's not a democracy.
1:15:18you don't have any privacy.
1:15:19Everything you do is monitored 24 seven by the Google cameras that exist everywhere.
1:15:24You know, and they're nice little plastic, you know, beautiful designed.
1:15:27whatever.
1:15:28And if you don't like it, you can go down the street to the Apple town where
1:15:31everything is run by Apple and Apple has slightly different values from Google.
1:15:35And I happen to like Apple's philosophy on privacy more than Google's,
1:15:38but it's the same kind of world.
1:15:39And I personally believe in democracy and I like that my streets aren't owned
1:15:44by a company, call me crazy, but yeah.
1:15:47And I don't know how it interacts with AI, but I feel like we've got, I don't know.
1:15:50It's like, we've got this opportunity to being more creative, to make
1:15:54more stuff, to not need billions of dollars of funding, and it's up
1:15:57to us what we want to do with that.
1:15:59And maybe it's a stretch and maybe I'm putting words in your mouth here, but, at
1:16:03least you've used the word democracy, and, maybe that is also like something that
1:16:09people see in local-first that is almost a more democratic approach to software.
1:16:15Yeah, I really agree.
1:16:16it's like, I care about local-first software the most for creative work,
1:16:20for like, if I'm composing a song.
1:16:23It's my song.
1:16:24It's mine.
1:16:24You know, it's not Google's or whichever cloud service I want to host that.
1:16:28It's not theirs.
1:16:29I don't want them to be able to look in it or change it or monetize
1:16:33it or sell it on or anything else.
1:16:35It's my work.
1:16:36And if I want to work with you.
1:16:38On making that song.
1:16:39It should exist on both of our computers and be transmitted between our computers.
1:16:44It's ours, you know, like there's some, I don't know, it feels like some principle.
1:16:48It just feels so obvious.
1:16:49And I don't know how I could possibly justify it.
1:16:51It feels axiomatic.
1:16:52I think a lot of people don't realize just how much, you know, Art and I feel like
1:16:55I'm probably preaching to the converted with, you know, with a crowd listening
1:16:58to this podcast, but we forget how much our computering experience is moderated
1:17:02by big corporations, like big companies.
1:17:05And I think that's really sad because our computers are amazing.
1:17:08You know, like the computer sitting at your desk, like, I often think about this,
1:17:12that computers are like, like two to five gigahertz, two to five billion things
1:17:17every second, like, wow, you know, like, that's a lot of, that's a lot of steps.
1:17:21And you can make those steps do anything you want, like you can write any
1:17:23program, totally free in that regard.
1:17:26So we could make programs that.
1:17:28To do whatever service, whatever needs we want that we'll be able
1:17:31to, you know, we've got all the technology, we've got CRDTs, and we've
1:17:34got access to low level networking primitives and all of this stuff.
1:17:38but I really want good software.
1:17:40so that if I want to, like, I don't know, I want to make a diagram for a paper
1:17:44that I've got good tools to do that with.
1:17:45And I want to just whatever it is, I've got a bunch of photos and I want to share,
1:17:49I've been getting into photography lately.
1:17:50I want to share my photos with my friends.
1:17:52I want to be able to just have software that lets me do that easily.
1:17:54you know, like I really want to have.
1:17:56collaborative software.
1:17:56I want to be able to run a DND campaign on a, on a Wave or something that's
1:17:59Wave like where it's not like owned by Google's computers and we have to all
1:18:04agree to Google's terms of service to be able to continue having access to that.
1:18:07It should just be something that we can all access.
1:18:09And if I want to write some new custom software to help me run my
1:18:12DND campaign, I want to be able to do that too and have it interact with the
1:18:15same data model as everything else.
1:18:17So yeah, I fully agree and I think often people who are not as comfortable yet
1:18:24in the local-first bubble as, as we are, I think a lot of people kind of think
1:18:28like, okay, why does local-first matter?
1:18:31Maybe if, there's sort of the, this dystopian future where I can't trust
1:18:36the government, I can't trust the clouds, I'm like a persecuted minority,
1:18:41whatever it is, like, but it has people only assume local-first to be like
1:18:48meaningful, when you're kind of, when a dystopian future has already arrived.
1:18:53And I think you don't, sure, local-first is very meaningful in that part, but
1:18:57that's not what I'm like a I'm optimist.
1:19:01So I don't, anticipate a dystopian future.
1:19:04And so I'm not a prepper, et cetera.
1:19:07I'm not a local 1st prepper.
1:19:08I'm a local 1st player.
1:19:10Like, I want to have more of, like, the local for the playful state of mind.
1:19:15Like, I. I'm so fortunate and privileged that I get to do what I love and,
1:19:22still, like, make a living from it.
1:19:24And, like, my ideal day that I, like, that I live each day is, like, that I had
1:19:28a, like, a day full of play, basically.
1:19:32And for me, play here means, like, discovering things, like, losing sleep
1:19:37over a hard problem, but then getting the joy out of solving that and having sort
1:19:42of my own agency over what I'm doing.
1:19:45And, I think even like when a child plays, like a child is not told, like
1:19:51now you have to build this thing, but it's their own agency to do what they
1:19:56feel like and pursue their own goals.
1:19:59And I think local-first can.
1:20:01And able that in a similar way, how the web has lowered the bar
1:20:06so much and therefore increase the agencies of individuals.
1:20:10Like, and I think the same thing is happening right now with like AI assist
1:20:14tools, where the barrier comes down even more for non programmers to build things.
1:20:20It gives them agency, gives them ways to.
1:20:23Playfully build things and I have the same hope for local-first
1:20:27that it brings down one of the big barriers, which is data management.
1:20:32And I'm very excited about that.
1:20:34Yeah.
1:20:34Me too.
1:20:35Yeah.
1:20:35I feel like there's a bunch of ways that we could be building better software.
1:20:38And, I just want all my programs to interoperate, you know, If I'm editing
1:20:43a text document, I want to be able to be typing something in a text editing
1:20:46environment on my laptop and then, you know, I run out the door and I'm on a
1:20:50train and I just opened up my phone and I can keep on editing it and I want all of
1:20:54my software to work like that and I want there to be And it's like on, on Unix,
1:20:59we have this sort of open file system.
1:21:00There's any program can interact with the file system and edit files, which
1:21:03is great except that the file system makes it really hard for two programs
1:21:06to edit a file at the same time and have anything meaningful come out at all.
1:21:10So most programs don't really interact with each other around the data unless
1:21:14one program sort of saves something and another program opens it up later
1:21:17and then you do something in that program and save something else out
1:21:20and it has something else open it.
1:21:21But with local-first software, I want.
1:21:23Sort of like an ecosystem of all the programs on my computer to be interacting.
1:21:27And then I also want to be able to have programs on my computer
1:21:30and your computer interacting.
1:21:32I feel like that should just be really easy to do.
1:21:34Like it It's something that should be out of the box, and if every programmer
1:21:37needs to re implement it and reinvent it from scratch, it's never going
1:21:40to happen, but it's something that could just be built into the system.
1:21:43I like this way of thinking about it, since my primary goal for local-first
1:21:48right now is, like, step one is make it super, super easy, bring down the
1:21:54barrier to build something meaningful.
1:21:56For myself or a small group of people at all, but then step two, even
1:22:02wider vision is like, okay, let's bring together those experiences
1:22:06and bring them together in a way.
1:22:08That's not just sort of like a, a best effort kind of thing where like,
1:22:12oh, yeah, export JSON over here.
1:22:14import over there.
1:22:16And like, now it's like, you only have people's last names or something,
1:22:20but at least there's some existence.
1:22:22But I think this is almost like a second chapter that will probably take
1:22:27a lot of effort and we need the solid foundations first, but the, yeah, the
1:22:31prize of local-first can, ultimately lead to data interop in the same ways.
1:22:36Like our brain doesn't work in silos, but our brain, like when the conversation
1:22:41I'm having with you, I'm taking some ideas away from that and maybe bring
1:22:46them to another conversation I have.
1:22:48So my brain is already that big data bus.
1:22:52And that is a promise that local-first can fulfill.
1:22:55Yeah, I absolutely agree.
1:22:57And so I feel like there's that piece.
1:22:58And then the other piece is, there's things that we have as software
1:23:01engineers that everyone should have.
1:23:03my girlfriend works, she uses a, there's a content management
1:23:06system that she uses at her work.
1:23:07And I have access to, because I'm a software engineer, I use Git.
1:23:11And with Git, I can have branches, and I can have pull requests, and I can see
1:23:15all the changes and history of changes.
1:23:17we've built those tools for ourselves, and then we haven't built them for
1:23:19anyone else in any other industry.
1:23:21And that, to me, is totally crazy.
1:23:23It's like no one else, you know, like, we've kind of been really
1:23:25selfish as software engineers.
1:23:27It's
1:23:27that's rule in the real world.
1:23:30Yeah, exactly.
1:23:31Exactly.
1:23:31Right.
1:23:31Yeah, but with local-first software, I, you know, like with these, these
1:23:36primitives with these different ways of approaching software, I feel like
1:23:39we can make a set of, primitives that should allow any program to do that.
1:23:43Like it's, I'm really happy with the Ink and Switch guys and the work
1:23:46that they're doing, guys and gals.
1:23:47but there's also, like, I feel like that should just be the standard set of
1:23:50primitives for most things I do, you know?
1:23:52I want to be able to open up Photoshop and be editing a document
1:23:55and have some commit type thing.
1:23:57And if you're using a different image editing program, I should be
1:24:00able to share it with you and you can just open up the document too.
1:24:03And then if, I want to write some script that's going to interactively
1:24:06make changes to the document that I'm editing, like the image I'm editing,
1:24:10I should be able to have a, like a little program that just interacts with
1:24:13the same data model that both of these programs we're using can interact with.
1:24:16And it, it should let us, you know, and then also have the change history
1:24:20and we can look through the history of changes and see who did what.
1:24:22And we can have pull requests on a video editing session.
1:24:25If we're editing a video together, I want to be able to have a
1:24:28pull request on a different way that the edit comes together.
1:24:31Like all of those kinds of things should just be built into the primitives
1:24:34of the software that we write.
1:24:35and the software that we use.
1:24:36And, you know, like I was talking to someone recently who was saying,
1:24:40he was like, Oh, I don't know how to explain it to the programmers that
1:24:42the people want all of these things.
1:24:44And I said, I was like, Oh, well tell them, imagine if you didn't
1:24:47get to use Git and you went back to the world where it was like, you
1:24:50know, blah, final, final to final.
1:24:52No, actually the real final version.
1:24:54This is actually the world that most people who aren't software engineers.
1:24:57live in with most of the programs that they use today.
1:25:00you know, in the best case, they've got, they've got something like Google Docs
1:25:02that, you know, makes a little bait and switch where they have exactly the change
1:25:06control that Google allows you to have.
1:25:08And by the way, last I checked, Google's API for Docs doesn't actually give
1:25:11you the change history of a document.
1:25:12So, you know, once Google's got that change history, it's locked away in their
1:25:16servers and you can't do anything with it or interact with it or even download
1:25:19it for yourself, which is a real pity.
1:25:21but we can just have programs and files living on our hard drives
1:25:25and edit them and edit them with other people and see the change
1:25:28history and do whatever we want to.
1:25:29And I want everyone to have that capacity.
1:25:31So, yeah, like it's obvious, right?
1:25:33yeah, that's another great way to, to kind of think about the future.
1:25:38Like, what have we as programmers figured out and how can we bring it?
1:25:42How can, how can we reduce the distance of Seph's rule here?
1:25:46And, how can we bring a lot of those things that for us are obvious?
1:25:51into other programs, but I think that the reality is, it's not that some
1:25:56product manager hasn't thought of it.
1:25:58product managers have like, it's almost like the peak of the iceberg meme.
1:26:03only the stuff that's floating above the sea level, that is the stuff that
1:26:08was actually important enough and viable enough to build the stuff underneath
1:26:13it's not built yet, it was thought of, but it was just too hard and not
1:26:17meaningfully important enough to ship.
1:26:20And I think local-first can bring down the cost of that.
1:26:23Yeah, I couldn't agree more, and it's not just, too hard, it's even if they
1:26:27do it, they've done it just for their application, you know, and so every
1:26:30application ends up with its own bespoke way to do change editing and change
1:26:34histories and everything else, and then none of them are collaborative, not
1:26:36like none of them are interoperable, like what we really need is we need
1:26:39something like the file system where every program that exists can interact
1:26:43with some standard set of primitives.
1:26:45And then every program can take for granted that the file system exists
1:26:48and it sits underneath the program.
1:26:50And then, if you have something like that, not only is it really easy for,
1:26:53you know, product managers to build these features into their applications, which
1:26:56I promise you, I agree with you, I've talked to a lot of them, they'd love it.
1:26:59They really want collaborative editing.
1:27:00You know, everyone wants this.
1:27:02so not only could they do it easily, but then all of the collaborative
1:27:04editing tools can all work together.
1:27:07You know, they can all interoperate, which would just be so obviously great.
1:27:12It's some people will like Vim and some people like Emacs and
1:27:14some people like something else.
1:27:16And, you know, why not have our documents able to be edited in
1:27:19all of those programs, you know?
1:27:20Yeah.
1:27:21So I'm so grateful that we got to explore all of those ideas
1:27:26that are clearly on your mind.
1:27:28And I'm, Also so grateful for everyone who's making that a reality particular
1:27:33shout out goes there to to Ink and Switch anyone who's really like defying
1:27:37the strategy of the commons for like for software and I just want to see
1:27:43more of that and I think a big step of that is like to like step one is
1:27:47inspire people like open people's eyes of like, oh, we can do better.
1:27:52and yeah, so with that, I just want to thank you so much for your
1:27:57time, like, sharing all that we've already, when quite extensive on this
1:28:01conversation, I feel like there is.
1:28:03A lot of stuff that we should probably explore in a follow up conversation.
1:28:08And we've already foreshadowed quite a bit of like what the folks at Ink and Switch
1:28:12are brewing with Patchwork, et cetera.
1:28:14So I'm really looking forward to learning more about that as well.
1:28:18but, yeah, maybe the audience, if they want to see you, in person, we're
1:28:23also planning the next local-first conference where, if everything works
1:28:28out, you might be a speaker as well.
1:28:30So, happily invite everyone to come to Berlin at the end of May, for
1:28:35the conference and, to get a chance to talk to you in person as well.
1:28:39I think that would be marvelous.
1:28:40And I really want to echo that.
1:28:42Thank you for all of the people that are doing the hard work.
1:28:44I feel like this is something that's complicated enough.
1:28:47We can't do it alone.
1:28:48And.
1:28:48You know, one of the beautiful things about software that is, lets
1:28:51you do collaborative editing is We can collaborate on all of that.
1:28:55Exactly.
1:28:55And it's even like a virtual cycle where people working on that
1:28:59makes it easier to collaborate.
1:29:01So yeah, that's a very optimistic and hopeful vision for the future
1:29:05with many challenges ahead.
1:29:07But yeah, I want to end on a positive note.
1:29:10Seph, thank you so much for like, yeah, sharing all of your
1:29:14wisdom and thoughts with us here.
1:29:17Thank you.
1:29:18Thank you for inviting me.
1:29:19this is lovely and I hope we have a chance to chat more in the future.
1:29:23Thank you for listening to the localfirst.fm podcast.
1:29:26If you've enjoyed this episode and haven't done so already, please
1:29:28Please subscribe and leave a review.
1:29:31Please also share this episode with your friends and colleagues.
1:29:33Spreading the word about the podcast is a great way to support
1:29:36it and to help me keep it going.
1:29:39A special thanks again to Convex and ElectricSQL for supporting this podcast.
1:29:44See you next time.