Luke Edwards: The man with many libraries

Svelte Radio

This time we're joined by Svelte core maintainer Luke Edwards, known for his many NPM packages. We talk Cloudflare Workers, his jest alternative uvu and a bunch of other cool stuff.

This time we're joined by Svelte core maintainer Luke Edwards, known for his many NPM packages. We talk Cloudflare Workers, his jest alternative uvu and a bunch of other cool stuff.

Guest: Luke Edwards. Twitter. Github
Hosts: Kevin, Shawn, Antony

Notes:


Picks:Transcription:

Kevin Åberg Kultalahti 0:00
Hello, everyone. Welcome to another episode of Svelte radio. Today we have another guest on the show. But first introductions. I'm Kevin, and I run a site called Svelte school where I teach people about Svelte. And yeah, that's me.

Shawn 0:15
I'm Shawn. I work as a developer advocate at AWS. And I guess I do stuff on this whole Twitter's

Antony 0:24
Hi, I'm Antony. I'm the CTO of a startup called biank. I'm a supposed Svelte maintainer. And yeah, that's about it really, I'm also going to introduce the guest, because I know everything there is to know about Luke. So our guest is Luke. And Luke is not Australian. That's the first most important thing there. And so Luke Edwards is an Australian Californian, that's very important to know. He's also a co maintainer of Svelte. And he's the creator of polka, which is an express alternative, which is focused around speed. And also modularity, I believe. And he's been recently involved in deploying loads of stuff to CloudFlare work, which is interesting, this whole talk on that you can watch, it's also worth mentioning that Luke owns the most number of open source modules on NPM out of anyone. And that's a fact, really, anything you want to add to that, that's not true.

Luke Edwards 1:20
And that's pretty much it, I do do a lot of stuff in the open source world. And I imagine we'll talk about some of that. But for the most part, just keep my head down and enjoy building things. So that's kind of what that means contract work or salary positions doesn't really matter. I just love to get my get my hands dirty.

Antony 1:37
So you don't code for money. As a rule, you code for passion. And money is a convenient side,

Luke Edwards 1:42
I code for interest, I kind of tell I turn away a lot of not a lot. But I turn away clients with that sometimes, just because if I if I'm not interested in it, then it's not gonna turn out well, and I'm gonna find excuses to try to stop doing it.

Antony 1:56
Nice. It's funny, because I saw Twitter so quite recently about actually, what got you into tech. And the amount of people who replied by just showing a little bullet emoji was quite shocking. Actually, I couldn't imagine being it just for the money just wouldn't work for me.

Shawn 2:11
I mean, I'd say I'd say it's partially for the money for me.

Antony 2:16
Fair enough. I mean, it's not you have a passion in it. Right. You have you you enjoy what you do you enjoy advocating as well, and that sort of thing. But just for the money, just, and they enjoy life, right. Enjoy life first. And then yeah, like,

Kevin Åberg Kultalahti 2:29
I don't I don't think I could see myself doing something I didn't want to do. Don't want to do

Antony 2:35
No, definitely not.

Luke Edwards 2:37
It's also kind of amazing, because like, some people would make like hard career changes, right? Where they're like struggling and stuff, and they'll invest the six months, whatever it is, maybe less, and, like, dramatically turn their lives around. So it does start as just money. But like it's so that they can actually do something else and get by better. That's a good point. Maybe people can grow a passion for it when they start doing it. Maybe that's how they got into it. But that's not how they how they were they were maybe

Kevin Åberg Kultalahti 3:05
i think that's that's definitely true.

Luke Edwards 3:07
I think that's actually kind of at the core how I started to like, I actually was like, enrolled in med school. I hadn't started I was doing all the like, prereqs and stuff.

Antony 3:16
wow

Luke Edwards 3:16
I guess, disclaimer, self taught. But I was maintaining a nutrition blog to kind of like Chronicle my journey through what would be med school and stuff. And as I'm preparing and like working on this, how do I make my WordPress do expert? How do I make this better? I just unfolded more and more. And at some point, like someone just handed me a client said, Hey, do you think you can build this? Sure, I'll give it a crack. And I got paid. I was like, Well, why? Why am I gonna sign my life away for another like six to 10 years before I start getting paid? If I can just do this now? And yeah, then a passion developed? Because just questions be folded more questions, though.

Kevin Åberg Kultalahti 3:56
So you started in WordPress, then? Yeah, your coding career? Yeah. Yeah.

Luke Edwards 4:02
Luckily, I have not touched it. And it's been a decade, but it's still alive. It's still kicking.

Kevin Åberg Kultalahti 4:10
So can you take us through what what your journey has been from WordPress to where you are now.

Luke Edwards 4:18
So I mostly started as a designer, actually. So I was doing my own WordPress stuff. And you always focus on design, and I wanted to cool carousels and stuff. So my first that first client I was talking about was mostly a design work. And then I just implemented it and like basic HTML, CSS, which was all it needed, was mostly design base, and then, you know, a cup that lended itself to other projects that basically I got lucky and it became like word of mouth thing because they knew no one. So all those sort of projects just sort of like honed my design skill set, but then it also honed more front end work. So I basically I started going from backbone route into Marionette and then into I stuck with Riot for a long time. But basically a lot of fun and work in that at some point over, like the next three or four years I started having to work with, or alongside backend engineers, so back into WordPress back into custom PHP stacks, so a lot of Code Igniter, a lot of beginning Laravel stuff. And so I just that gave me some the beginnings of the full stack experience. And then I became more full stack key on future clients, same clients or new ones, and basically lived with a foot in each world for a while. Well, I guess three worlds because there's design in there, too. But yeah, and then so the PHP stuff eventually evolved into elixir. And then I came full circle back into node j. s world, because I was thinking why elixir was kind of starting not to kind of it was definitely still in its in its infancy, a lot more people have heard about it now, which is a good thing, check it out, if you haven't the. So I started doing a lot more Node JS just because serverless was popping up and just throw a lot more companies working with Node JS at the time. And it was just easier to market yourself as a full stack. contractor when you know, you can prove your JavaScript skills on both front end and back end. And so that's kind of where I've been I've dabbled in other stuff along the way. But that's kind of the core synopsis of where things are at.

Kevin Åberg Kultalahti 6:28
So have you tried any of the other front end frameworks like React?

Luke Edwards 6:32
Yeah, I have them all. Just because as a contractor, you don't really have a choice, you just have to be able to jump into whatever you're doing. It's not the common case that you're starting something from scratch. So it's just whatever they've got, you got to work with that try to improve it, building features, whatever it is, so I've done everything except for anything after Angular two. Right. But like all the other, I have refused to touch Angular after to know, like shots fired, I just, I there's no, like new utility format for me with it anymore. And it's not all that common anymore, either. At least on the contracts.

Shawn 7:12
So you've been you've been a contractor for this all this long. Like what I've been up to been tempted to be an employee.

Luke Edwards 7:19
I was for the most the majority of the last decade. But I did, sometimes I would sign on for like, a long term contract, like with a couple companies. But for the last my longest was with the company for two years, they were transitioning into an advertising company. And so that's where I basically stopped at the beginning of this year, just before COVID lockdown stuff. So good timing on that. But see, I was the I was there for two years and doing all their backend stuff, all the architecture, a lot of fun. And but luckily, people came in to do a front end work to

Antony 7:55
Something is kind of weird, because I don't think contracting is as common in the US as it is in the UK.

Luke Edwards 8:00
I don't think it is. I like if I tell new friends or extended relatives I haven't met before, like I'm contracting, I get a little like, I think it's just a way to say unemployed.

Antony 8:14
Yeah, it's definitely a definitely different market. And it's changed over here quite recently, I think because of the whole tax crackdown, stuff like that, but contracting used to be where people would aim for. And it's kind of weird when Shawn says like, what you tend to be an employee. It almost never crossed my mind when I was contracting. And then one day I did it. And I spent all the time regretting it and thinking when can I go back contracting again, it's really different.

Luke Edwards 8:35
I was definitely feeling that towards like the halfway mark of my last of my salary position I was talking about just the reason I don't know if this is how like I naturally am or if contracting just like promoted it. But I tend to have a project ADD, right, like, hence all the modules. But so if, if I'm working on a contracted thing, there's a there's a fixed start and end date, for the most part. So like most that end date is gone, has come and gone, I can move on to something else, either a new plant entirely or just some other new project and like that works. But if I'm staring at the same stuff for too long, I tend to my eyes tend to glaze over.

Antony 9:16
Yeah, that's fair enough.

Shawn 9:17
My impression of how it works in the UK, is that like, that's actually how you get the better paying jobs is you contract because there's some sort of rule where you have to, if you go above a certain amount, then then that's there's some tax issue is that I assume I assume that's what Anthony's referring to.

Antony 9:34
Yeah, there's loads of weird rules. They've changed it recently. Like when I stopped contracting, which is like four or five years ago now they changed all the tax rules around it. But it used to be that you're a company so you only paid corporation tax. There were there were a bunch of tax breaks but also usually get paid maybe three times as much as a permanent role and the equivalent so anyone with any seniority would go into contracting because it it made sense you know the time but I think a lot of people abused the taxing and try to pay basically rotax, they got a lot of trouble, the government cracked down on it. And because it's kind of an easy, easy win for them. So it's in terms of payment wise, it's become a lot less attractive. And they've removed a lot of the protections you had as a contractor. Because when I was contracting, for example, I was basically an employee anyway, I was treated like an employee by the company, they, I didn't have to get all the shit work, I had the good work and stuff like that it wasn't anything like a kind of you come in because you can tackle these problems, or we don't care about you or anything like that. So it's very, it's very different market in the UK, or it was than it is in other countries.

Shawn 10:34
It's in the US. It's like freelancing, or consulting as well. These are different terms that people use.

Antony 10:39
Yeah, yeah. contracting usually means you have a limited company, and you treat yourself as a company. You go in, and they don't tell you when to come in. They just say, this is what you want. We want you to do, do it kind of thing. And you act as if you're a company kind of thing.

Kevin Åberg Kultalahti 10:53
Sounds about right. All right. Yeah. Should we get into some? Some on topic stuff? Svelte stuff? Yeah. So you You did a talk at Svelte summit, about Cloudflare Workers, right. server side rendering? Yeah. What was that about? So,

Luke Edwards 11:10
I mean, what, where do you want me to start, I guess I should give like a primer on

Kevin Åberg Kultalahti 11:14
workers or just just a summary of the talk. Right?

Luke Edwards 11:19
Okay. So basically, I spent, probably, like, 20 minutes out of my 30 minutes, kind of explaining what workers are on in the front, from a front end developers point of view, right. Like, there's service workers, which like, some people are happy about, some are mad about web workers, worthless, which didn't matter. But basically, I give this little like timeline of what workers are and how we may already be familiar with them. And then how powerful workers are kind of the same thing, but in a server, the same thing as a service worker, but in a in a one of their servers. And then the big reveal sort of thing, which says that CloudFlare servers are everywhere. And so that means that your code will run everywhere. And because it's the way CloudFlare workers themselves are architected, they're basically always on all the time, but you're not paying for that, which is what you would get with a traditional global architecture, like one that I set up at my last company, which you pay for it 24 seven, so hugely, way cheaper. And then I went through a couple of demos to show you like how you can just get started with Svelte server side rendered within a worker. And I deployed two demos of that one word, it was like mostly, mostly manual. So it kind of showed you like what that repos still alive. So shows you all the manual configurations and how you would go through it step by step. And then like the last 30 seconds of the talk, I revealed this new tool called freshie, which is kind of all those configurations and build steps done for you so that with pressure you can target, you can build your app as a as if you would with a sapper or next js and then build it in a way that's ready for workers or for node js, whatever you want, which obviously has overlap with the Svelte kit project, but same sort of thing. So it was just the summary is turning into as long as the talk but the whole thing versus this is what workers are, this is how you can exploit them to your benefit as a salt developer.

Kevin Åberg Kultalahti 13:19
Cool. So speaking of Svelte kit, and Cloudflare, I'm a huge Cloudflare worker fan myself, so I just got to ask it. Are you working on a on an adapter for

Luke Edwards 13:31
there is one being worked on, I personally haven't worked on it yet, just because Svelte kit itself is still kind of its like, interface design is a little bit in flux still. So some of the way the current adapters are, which are all node focus, there's a lot of assumptions within spell kit itself that like we have a node back end, but that's not true with the worker. So half half Nelson, I think is the one who's done the initial adapter, or and he's sort of relaying his findings with what needs to change within the current Svelte kit to accommodate this freshly solved just by basically duplicating the same routing logic, whatever, in different ways for each adapter, which is duplication, but like each of those things only exist once for package. So it's not too bad.

Antony 14:23
I think and what Yeah, what we found is that, so I've written these these two adapters for Svelte kit and Rich's written one, and we've rewritten them all at least three times. But what we found every time we've written them as it becomes more and more concise, but they've all boiled down to essentially the same bit of code because everything runs on AWS lambda underneath. Whereas the CloudFlare workers like the access is a completely different approach. It doesn't have noticed it doesn't have a library need. It's very much I've got an attacking myself actually because I have a few so lost. I think it's made us think about what the scope of an adapter is and what it should do as well. Because originally we had to see this and adapt to my deploy the code as well. But what that comes out as is we'd have 100 different adapters for every single possible deployment platform, when fundamentally they do the same thing. So, yeah, it's very influx. And yeah, like Luke says it is being worked on. It's just 100 game changing ones.

Shawn 15:19
I think this choice of being node based is interesting. I do see that more design decisions on projects are like, should we assume node because of environments like Deno, cloudflare workers, like these are all just, I guess, isolated space? I don't I don't I like the technical knowledge to go any further. But it seems like there's there's a slow movement in JS to diversify away against from node. I don't know if you guys see this as well.

Kevin Åberg Kultalahti 15:49
Hmm. So basically, like, node, I guess, Cloudflare? Yeah. Yeah. Maybe

Shawn 15:54
like not assuming no API's?

Kevin Åberg Kultalahti 15:56
Yeah. Yeah, like a good thing, though.

Antony 16:00
It's weird, because people always describe JavaScript as a bad language. I think ES6 has kind of laid a lot. There's concerns. So maybe it's now that people feel the language is so good, that we just need to be able to run that same language across multiple platforms, a bit like the JVM does for for Java and groovy and closure, and all every other Scala, I've forgotten even how many languages around the JVM, but all of them, maybe that's maybe that's how we're going with JavaScript. I don't know what it's where we're going with the ES6 perhaps I don't know.

Luke Edwards 16:31
I think the only like, real limitation is when you get into things like like file system API's. Right? And I don't even know if Deno has a I know it has that file system API. But I don't know if it has one that will magically work in the browser. Right. Like, maybe that's where they draw the hard line, too. But I think until you solve that, or things like that, there will always be some sort of division. But yeah, I mean, I agree that like JavaScript should be able to just run everywhere, because that's sort of the whole like tagline, right? Like JavaScript, it just runs unless you need compilers, and whatever else. But yeah,

Antony 17:08
I think it's always been a missing puzzle piece for me is it's a puzzle piece that people like, we like you, like rich actually have that you build something that's concise, but so generic that it can work from a multitude of scenarios. And this is the same now because we're saying that Svelte kit can run on multiple different backends or hosting platforms, we have to find the right abstraction level that we can take a Svelte cap and pump it into this and come up with something that run that platform. And it's something I've never, I've never really had the opportunity to do before, but also never really figured that I had a plan for doing that. How do you build a framework? Because I don't know how the world's going to use it kind of thing. And it's something I think some people have, and some people just don't. And I'm definitely one of those ones who doesn't.

Kevin Åberg Kultalahti 17:51
Right. So yesterday, I saw you posted a new library. Another one, or I don't know what you would call it, maybe not a library, but a preprocessor. I guess.

Luke Edwards 18:02
Yeah, that one's more of like a, it's like a proof of concept sort of thing. The so for everyone listening, it's svelte-preprocess-esbuild, and there's esbuild is this magical golang driven bundler, which also happens to transpile JavaScript and TypeScript that like blazingly fast speeds. So I've seen some esbuild Svelte, like combinations already in the community. But a lot of them just don't bother dealing with TypeScript within the script tags. And like so you'll have various build there. But then you these things are just passing the TypeScript through, like regular TypeScript, which is slow or slower, then yes, build. So I was like, well, you just have habeas, we'll do both, like what's not have to do both. And what's the problem? So I found found out that there are problems, and I'm working to fix them. But the whole project itself is sort of meant to be a proof of concept or like a guinea pig, because it shouldn't live within Svelte preprocessor itself. So this is kind of a way to just like test tests in the real world and like, get some some mileage on it before bringing that risk, into Svelte, we processed correctly. And the reason that's possible is because I think as of the most recent major version, Svelte preprocessed doesn't do type checking anymore. So yes, bill doesn't do type checking. So now their goals sort of align.

Shawn 19:30
Gotcha. Yeah. So I mean, that kind of brings me to a question, I guess I always wondered. But a small piece of pre process used to be a third party sort of extension to Svelte and I think it's been brought in to spell like the Svelte org as part of the TypeScript support movement. Is that is that something that's basically formally managed by the the core team now? Is that how it works, right?

Luke Edwards 19:54
The people who are already working on stop the process before the migration are still the ones working on it. They're just all So maintainers, so they're just working on the official orc project now, but it's the same project is relocated.

Shawn 20:07
And you're thinking that the future is for pre process might be, yes build

Luke Edwards 20:10
for the TypeScript integration. So the way that works is basically, it's set up with a bunch of Transformers ready to go, so long as you have the correct flags within your component markup directly. So for TypeScript, that might mean Lang equals Ts Lang was TypeScript, you know, source equals, you know, there's a bunch of triggers, but it will then only successfully do something if you have the TypeScript peer dependency installed. So it doesn't bring everything with you because it does a dozen or more things, post CSS, sass, eyeless pug a bunch of stuff. So it's just, it's pre configured to do what you want, but you have to bring the engine to do those things.

Antony 20:50
This is um, this is news to me. I'm, I'm learning a lot on this podcast.

Luke Edwards 20:56
Admittedly, I haven't used most of it. Like there's I know there's a dozen or almost a dozen, but it's a lot of spirits. Every fun and tech you can think of is already pre configured through Svelte pre process and a lot of things that I think wouldn't make sense. Again, like pug not not to pick on it. But

Antony 21:15
I agree.

Luke Edwards 21:16
Yeah, it's just ready to go. And you just have to instal one thing. And you're done. It's a nice user

Kevin Åberg Kultalahti 21:21
experience, developer experience. So it's kind of an interesting thing that you you're building it in, in public sort of, is I think, you guys always push for, for like someone to do it in public first, and then it can be brought in to Svelte. I think I've heard that several times. It's a good thing. It's like the it's like the actions package. You started, Shawn?

Shawn 21:50
Yeah, I haven't touched it recently. But yeah, someday we'll, we'll get that merged.

Antony 21:55
I mean, people people ask, people ask how to contribute a lot. And I think that's a good way. If you make a product that is that is good enough, then there's no reason that couldn't become part of like the core organisation. It's a good way to sort of sort of get your contribution in really,

Luke Edwards 22:12
yeah, yeah. Another example this and I hope it's fine to mention, but now I'm from now I'm forgetting the name. Anyway, in the maintainer chat, there was a Antony Maybe you remember, remember details, but there was a, like an error boundary component that was shared from a spell library. And I never would have thought to use to set up an opponent that way. And I saw it was news to me. It was awesome. And regicide, too. And I was also surprised, and a bunch of us were surprised and impressed by it. So now, this is not an ongoing conversation. But briefly, in the moment, we talked about, like should something like this be part of core Svelte? Because it Yeah, was such like, its utility was obvious, as soon as you saw it, and there was enough documentation examples there. That it was just, it's one of those things where like an RFC would have been good by like seeing it actually, like alive and working and proven. Is is just like, okay, you can't really argue with that.

Antony 23:11
Yeah. So this is this is this is crown frameworks and error boundary components. So I think Jason made it but actually half Nelson was the one who originally conceived the idea. What it does is it kind of Monkey patches, the one a Svelte component, so that you can define a perimeter around in your component hierarchy, where errors will be caught and dealt with in line. And I think other frameworks kind of have this already. And we don't so they made this component and published it because they are building like a Shopify kind of equivalent in Svelte and it's something I've wanted for quite a long time. And there was like an issue about it, there's no formalised see, like the access, but there's a, an issue about it. And it does work really well, the monkey patching is concerning, because obviously, if we decide to change the way components are built, it will break. So there's that kind of watch out. And I thought, well, this is probably pretty valuable. It works. It works well. And it's got a it's got a kind of a nice felt fluent UI, not UI, but kind of interface. So yeah, and it actually was quite surprised, because you know, maybe I spent a lot of time in the community, but people hadn't seen this and exposed to it. So those those people were quite impressed with it. So I'm happy about that. And it hopefully will be discussed the next maintainers meet if I can get it highly high up in the list. The original authors of it are very interested in making parts of course, well, I think a PR, but obviously, they all have real jobs. So they're not going to promise anything before before the end of the year or even even maybe January. So we'll see how that goes. But But yeah, it's definitely it's definitely something that we'd like to have because it's super valuable to have to catch errors within a certain hierarchy and and deal with them there rather than your whole application exploding.

Kevin Åberg Kultalahti 24:51
Yeah, so Didn't you add this add this to Beyonk? I think you were talking about I have yeah,

Antony 24:57
check out now uses it. So it Anything, anything that's in the most pragmatic critical part of the application will now be caught. And what we did actually, we, we instal Sentry. Sentry for those who don't know, it catches errors and logs them and gives you a stack trace in it. And they're kind of isolated system. So you can see when users are having front end, there is no side that you can't otherwise see in your logs. I talked to the guys at Sentry about what's going on here. You know, why isn't there a Svelte integration kind of trolling them, really, because you don't have to do everything else? And then they replied, saying, well, because Svelte doesn't support it, basically. I was like, What? So? So yeah, I then sort of start investigating push the issue a bit. And hopefully, there'll be some more news soon, with a bit of luck.

Kevin Åberg Kultalahti 25:45
Exciting. So speaking of the of the maintainers meeting, you guys, but every every other week or so? Or is that every other month?

Luke Edwards 25:53
Once a month? Once a month? Yeah, typically towards the end of the month, but with thanksgiving in the US and Christmas, both at the end of the month, it's the end of the year, this year is getting a little dodgy. I'm not sure if that's gonna happen this month.

Antony 26:08
We'll see. Some of the year will definitely end it. Should you? Yeah,

Kevin Åberg Kultalahti 26:15
Can you guys talk about anything that's, that might be coming up. That might be interesting.

Luke Edwards 26:19
Well, I mean, Svelte kit, I mean, it will undoubtedly be talked about, and it will probably be the majority of the meeting, right. But yeah, like Anthony alluded to, there's usually a list of things that like come up during the month that we want to talk about, and then it's just a matter of accumulating to see like the order that they get talked in, sometimes we will, in meetings past, we would end up talking about, we'd have a list of like seven or eight. And like sapra would be second or third on the list. And then we just end up talking about sapper for almost the entire meeting. So that whatever we didn't get to just becomes part of the next next month's list.

Antony 26:56
And the thing that's cool sort of reason for Svelte kit being so important, because the reason saffa dominated was cuz it is a bit janky in terms of code bases, it's kind of evolved, and it's not really a good place to maintain and stuff. So certainly, it'll be nice to have that kind of off the list. Maybe Svelte will take his place he knows, but it's initially at the start of this maintainers chat. It was difficult to get past issues, because they were big issues. But I will say that we've definitely got through these big issues now. And things are a lot more free flowing, I guess, which is which is definitely a good sign. And slots was another one that just had a lot of things around it people wanted the original design was more limited. The people needed it to be and that got attacked pretty quickly. In fact, I mean, it's it's Tammy how just attacked most of it. But yeah, that's what he does his machine.

Luke Edwards 27:42
Yeah, big props.

Unknown Speaker 27:44
Yeah,

Luke Edwards 27:45
I think that's one thing to highlight, though is the big, like, the bullet to me, at least the major value in Svelte kit is, is its flexibility. So like sapra was great, especially the beginning because it did if you had a use case that fit sapper like it worked really well, right. But as time went on, your needs may change, you may need to add things you may need to do more complex things because your apps evolve. And it's that fitting tends to not evolve with it because it was so opinionated is a strong word. But it was so good at just what it did that it wasn't really possible to have it move beyond and so there have been really good community efforts for other solutions routed by alder, j. s. Forgetting some but there are multiple out there. And so Svelte K is sort of the sapper 2.0 where it's going to be really good at a bunch of different things. So that you know, you can your applications can evolve with the same tool over time and not hit some sort of ceiling and be like, okay, shoot now

Antony 28:43
what do I use? And modular? probably worth mentioning more modular? Cuz I think that's a big, big theme is modularity, being able to sort of pull out things you don't want and put things in that you do want? Right?

Kevin Åberg Kultalahti 28:59
Yeah, right. So CloudFlare workers, I want to I want to talk more about CloudFlare workers. Okay, well, what's so great about them?

Luke Edwards 29:07
Well, they're, they're just incredibly quick, and they're practically free. So I mean, most people, it's something like $5, and you get 10 million requests a month, right? And then it's 50 cents for every million beyond that. I mean, like, you just, you can't beat that, right. And they also just execute quicker. So if you have something like a Google function or an AWS lambda, like Bay, they have to start up and most of what that those platforms are doing over the years is trying to make those startups smaller. But like, workers launched with effectively zero startup, I think it's less than shoot, don't quote me, it's either less than 10 milliseconds, or like 15 microseconds startup. There's, those are the numbers that come to mind, but it's, it's one of those.

Antony 29:54
Why Why is that the case?

Luke Edwards 29:56
So again, don't quote me. It has to do with how they How they store your upload. So they support multiple languages, and all of them have some relation to WASM. So they, I think what they do is they compile it on upload to wasm or some Islip whatever, so that it's basically already in this ready to go state. So that instead of like starting a node process or starting a whatever, it's it isn't there and an ongoing, again, this is how I imagine it an ongoing V8 engine, or something is just filling in these different files. They Okay, you go, you go, your turn your turn. And so it's there's no parsing time, there's no Ready set and go it's just go

Antony 30:41
is essentially, essentially assembly language running on a potentially a processor. So something like it's not it's not a interpreted which, which node, JavaScript obviously are a status, right. Interesting is kind of backwards from where we came from.

Luke Edwards 30:53
Yeah. And it happens on Upload. And I thought, when I first ran into that, I thought it was a bug. But basically, it's understanding your code when you deploy it. So the reason I ran into this as I was working on a validation library, which I still haven't finished, but it the core of it relied on like a new function, right? Like you would you're programmatically creating a new function. And then the whole library was just creating this function body string so that it can be evaluated. But that's unsafe, right. And so CloudFlare workers has this unsafe protection. So it disallows the function, disallows eval, and it was detecting that within 30 milliseconds of me uploading it. So the entire request on my side was 30 milliseconds, and it came back saying, hey, online is deeply nested line on like, line 200, whatever. It's saying, you're using new function, you can't do that. So it's doing some amount of parsing, and then I remembered, oh, it's doing isolates in the background. So it has to know what's going on.

Kevin Åberg Kultalahti 31:54
Okay. I think like, all of these, like, serverless, I don't know what to call them, like services, or I can't even imagine how complicated they they must be to, like, make from scratch. So it's pretty, pretty cool.

Luke Edwards 32:14
I imagine it's I know, satisfying, though.

Antony 32:16
Yeah, I mean, once you once you've got that running with no with no cold start time, and then it's been the biggest complaint and every service provider in the world, cold start time, then that's pretty impressive. I was talking to a friend of mine, actually, he was talking about fastly doing a similar sort of thing. And it he said that there is a lot of complexity with components and wasum. Because, yeah, you can't rely on all those libraries being available that you that you normally have, you just can't bring everything in and to dos. Like it's like writing isomorphic code on the client, you don't have things like process, you don't have file system, all that kind of stuff. So yeah, I mentioned it's deeply complicated, in fact, so that people who nail that are going to be the new the new AWS. Sorry, Shawn, but it's true. I think. Yeah, yeah. Well,

Shawn 33:00
I always thought that. So the missing part is state, right. Like, and that was this was pretty excited to see that the launch this thing, new durable object thing, just actually strongly consistent. That that seemed, at that point, I was just like, Okay, well, fair, you you own this, like, this is this is amazing. I want to buy your stock.

Kevin Åberg Kultalahti 33:19
You know, I I actually did buy Cloudflare stock the other

Shawn 33:23
week, that'd be totally dominating this, this new cloud. So it's,

Kevin Åberg Kultalahti 33:27
I mean, the drawback is that you can't really work, right? You can't really pull in any node library, right? Well, for worker, can you

Antony 33:37
because of the wasm thing,

Luke Edwards 33:40
Well you can't pull everything, but you can certainly pull a lot of things, right. Like, it depends on how specific like the module was, right? Like, most know, libraries are so big, that it's kind of impossible to know everything that's going on through all the dependency chain. But something like class x, right, like my class names, alternative thing like that doesn't care what you're running on. It's just a function that returns a string.

Kevin Åberg Kultalahti 34:05
Yeah. Yeah. So speaking of, of your libraries and stuff. So what motivates you usually to like, build these? They're quite quite small, right? They they're very specific to certain problems.

Luke Edwards 34:20
Yeah. It's usually like curiosity, sometimes anger, but it's usually a curiosity. So it's just to see like what's going on under the hood. And so I say anger jokingly but like, if I'm using something and I'm realising that everything else I have in my application is small, or is running pretty smoothly, but using this one thing or waiting for this one thing to run doesn't feel quite right, then that's going to pique my interest to say, okay, what's going on? They're like, why? This is just an HTTP request. Why is this thing like consuming hundreds of megabytes of memory or why is it failing half the time? Why do I have to do this or if this and that is So that kind of, you can call it like some form of OCD, I guess it's just being particular. And I feel like things aren't exactly right. And so that kind of just goes somewhere into the back of my mind to say, Okay, this probably should, should or could be done better. And then I get to at some point, and then I basically treat each one like a puzzle. So I add this extra constraint of making it either as small or as fast as possible, hopefully, both. But that's usually not the case. And just see what I can do with it. But it does. Well, unless unless it's like a necessary thing. Like, unless it's an application I'm actually working on and that bottleneck is currently present. It's some of these things can take months to refine and to, to figure out just because it is a puzzle, and it is for fun, but not most, pretty much. It is most but 90 something percent of the time, something doesn't get released until it's I know, it actually works. And it has been used in production stuff, either my own or client stuff to say like, okay, like it didn't make it did satisfy the requirements I had for it. And then so I try to have this unspoken promise that like, if I release, it should work unless it's like, a not dot zero dot whatever release or has like a work in progress mentioned somewhere on it.

Shawn 36:21
But yeah, I mean, I'll mention one of the many libraries and that's something I admire, but also and a bit terrified by but so so I think it's worth mentioning that I think polka and serve in sad, sade, sade and sade a one

Luke Edwards 36:39
Sade the musician.

Shawn 36:41
It's a I don't know who that is COI framework

Luke Edwards 36:43
that's as smooth as Saudis voice or something. That's the tagline should listen.

Shawn 36:50
All right, well, yeah, we'll mention it. Yeah. Like these are all used in this whole ecosystem, like I think serve is the default way sapper was serving files. And that's, that's pretty awesome. And it's pretty notable how fast it is. That was actually one of the first things that drew me into Svelte. I was like, okay, it's not just about the compiler. It's also about the kind of people that are drawn to Svelte will also not tolerate the slowness that is in the rest of the JS ecosystem. So I think you you are one of my prime examples of like, yeah, like, if it's not good enough, you're, you're rewriting it, and you're not afraid to do so. Whereas I would?

Luke Edwards 37:26
Yeah, it is. It is definitely daunting. So one, one, thank you. But to like an example, this was just this week, Josh Duff is listening. He and I have been talking about me, well, it was my fault. But I mentioned possibly having like another fetch another like, node fetch and node, but not node fetch, just because node fetch, I know, it's being reworked. But it's pretty big. And most of the time, you don't care about like the rest of what node fetch is doing. So I said, like, Oh, just make another one. But it's kind of a bitch. And I'm sure that the node patch teams node knows this and props to them. But if my my do is to set out like a very simple fetch compliant wrapper, so that you can use Fetch as like it, like you would in the browser, button node. But I was like thinking, well, so many things are built on fetch. And so many things are built on like those properties of fish that I don't use, but like the streams API, which everyone uses in the browser. And so so many fetch based wrappers would break in my current version of fetch just because it implements streams. Well, this is where the bitchiness comes in. Because implementing, like readable streams in a browser way which node has always had streams, but not the browser's versions. Is this becoming this huge? undertaking? And so yeah, it can take a while. And I, I guess, one thing to mention, because people ask me a lot is why the reason I have so many of these, like mode variants of my modules, like deepl has equal equal light. phono has three modes, a lot of things have modes. And the reason is because like, I go through so many iterations of modules that like, I'm trying to figure out what I want. But I'm also thinking, well, not in this fetch case, like not everyone's going to care about like the streams API, so they can just pull in the version that they want. So that if you want numbers now, if you want, like the full node fetch, it will be like a kilobyte and a half or something, right, which is mostly the streams stuff. But if you just want to fire off an HTTP requests, that uses a fetch looking API, like s 400 bytes, right. And so it's just, again, most people don't care, especially in a Node JS context. But if you're doing something like workers, right or using building a Svelte kit that can do a can have movable back ends, you know, what your HTTP requests are going to look like. So you can just pull in a package that will satisfy all of those different backends a browser version, a Node JS version and a work er version if it's different, and just pull that in, and it's ready to go. So that's, that's kind of what motivates me with all these different modes. But it does mean that things take longer to finalise, because I'm thinking of all these different use cases for how they might fit.

Kevin Åberg Kultalahti 40:16
So speaking of, of Klona, I have to ask, is the name meant to be the Swedish word for clone?

Luke Edwards 40:26
Yeah. So I think it says on the top, it says like, why clone and it says, it means clone and Swedish. And then it also says, Why? Why the sheep logo? And because it's Dolly? So Dolly the sheep was for Sally, right? Oh, and so it's a sheep becoming a sheep? Yep. I had probably, like, more fun than I should have had making that logo.

Shawn 40:48
But, but I do notice that you you spend time you spend time with the polish like the the logos, the banners, like these are? Yeah, it's nice touches.

Luke Edwards 40:58
Yeah, sometimes not all the time. But if if something comes to mind, that seems like it could work I go for sometimes it affects the name choice, too. If I can help it.

Shawn 41:07
Are you squatting on any good names? Okay, I'll tell you, I'll tell you my squat. So I have happier. So it's, it's, and I also have prettier so that those can do that.

Luke Edwards 41:24
No, I don't I don't think I have any. I have a name that I thought. So I only try to use names or reserved names if I like have a use for them. Because I have some may I don't want to end up like in a situation where I get banned or whatever from NPM for squatting on names. I don't know just risk aversion, I guess. But one name I do have that I planned on using but didn't was y2k. And it's not really a good name. But I feel like I could do something with it.

Kevin Åberg Kultalahti 41:53
Yeah, I feel like in general for for libraries and repositories on GitHub. Like it's it's always nice to see good README or like, good, like the first impression is more important than what most people would think.

Luke Edwards 42:08
I think it should be something you want to read. Read Me, it's one of those ironic names. Like I get this client all the time you leave them this, like really complex or complex, thorough README for them to read to say, like, this is what I did for you. Here's how to use it. And they don't read it. It's like that's, that's what that's what the file is called. Read Me.

Kevin Åberg Kultalahti 42:28
Yeah. All right. Any, any last few questions?

Shawn 42:32
Well, I wanted to especially highlight uvu, which is a test runner that i think i think it's been one of my more successful launches this year. Yeah, I agree. Not Not Not like I pay super close attention. But it seems like it's worth talking about because most people think justice, one of the most universally loved tools, according to the surveys, and you made a competitor.

Luke Edwards 42:54
Yeah, maybe not in terms of like utility, but I definitely had a competitor that competes on the speed side, right, like so I I'll have, the reason I made is because I was working with a client that had a massive jest suite, and it ran. And it's not specific to them. But it took minutes to finish. And it was only something like 100 suites, or something which may have been 1000, or two assertions, but like 100 isn't that much at all. And then so I spent a weekend converting it into uvu. And it was, I mean, so if I'm talking minutes for Jess, it was like 8.9 something seconds with was just like, jest was doing so much, like setup and prep work and stuff. And a lot of it, admittedly, was how they were doing hooks, but like, because just was set up. The jest files are set up in a way that made it not obvious that their hooks were sort of running more than they should have been, it kind of just didn't feel right. And even at its best case scenario, you're looking at, like, probably would have been 45 seconds versus the same eight seconds. So it's still slower than the day. But you, as of today, you can do, for example, browser testing out of the box, which is a JSON back end anyway. But that's not something you can do with UI out of the box unless you set up a register hook or something. And I have examples of that in the repository. So you can definitely do it. But it's not going back to the modes conversation a second ago, like I don't, I try not to put anything things in by default, unless I think it's going to be used by default. So I don't think most cases are going to want j s Dom by default, so I don't include it, but it's easily easily added if you do want it.

Shawn 44:35
Awesome. Cool. Well, all right. Thanks for all your open source.

Kevin Åberg Kultalahti 44:40
Yeah, so do you guys have picks?

Antony 44:47
We've again, informed the guests have

Kevin Åberg Kultalahti 44:51
heard their show before I know

Luke Edwards 44:52
I know what it is.

Shawn 44:56
Yeah, and it's mostly just like whatever we enjoy as well. Right? Yeah. Yeah, you could just be

Kevin Åberg Kultalahti 45:00
like the weather series. Yeah. Yeah, I don't actually have one. This this is this the first episode without pics? Well, it'd be fun.

Luke Edwards 45:12
Yeah, it doesn't have to be tech related, right?

Shawn 45:14
Doesn't have to be. Okay.

Luke Edwards 45:16
I haven't pick. Okay. Okay, so it's a game called Rama cube, which is kind of an old game if some people may have never heard of it. But basically, it's like rummy with cards if you've ever played with it, but it's with tiles. And I like it as a developer. Because when you have down these games with three or four, whatever, and it's either in strips of the Shawn habit.

Shawn 45:37
Oh, so that looks like a family. Yeah, it's a knockoff Rami Rami coupe thing. Yeah, the same thing and just use the numbers.

Luke Edwards 45:45
Yeah, you just need numbers. And you can play with cards. If you don't happen to have the game. It's basically two decks, but with two Joker's, which are the wild cards. And I love it as a developer, because it's basically refactoring the whole time. So like, ladies, play these games down. Sean's laughing because he knows but anything that's done on the board is open to be regrouped and rearranged. So you have to keep track of all these these pieces and arrange new games or new valid games using those pieces and not having any invalid games before your time runs out. So it's,

Antony 46:19
it's pretty parents have it? I think they must. I think the musty they've got

Luke Edwards 46:23
I recommend stealing it. It's pretty fun. Yeah. So

Shawn 46:28
my family's story is like we played it at like a family gathering. One of our one of my cousin's brought it. And then we loved it so much that we got it for ourselves. We just within my family. And then my dad got so obsessed by it, he downloaded a mobile app to practice on his own, to be insanely good. So there is some skill to this. Yeah,

Luke Edwards 46:45
I play every day. I mean, I played three rounds before the podcast this morning. By yourself, like on the app, so there's an official rummy cube app, or whatever, and you're supposedly playing. You're supposedly playing other people around the world, but I'm pretty sure they're all bots. And, you know, but it's fun.

Kevin Åberg Kultalahti 47:05
Yeah. All right. Any other pics I actually have right now, for me.

Antony 47:10
So I haven't picked out because Luke inspired me to think of the whole cover behind me the board games and boarding club games. So my pick is definitely a monopoly deal. So if you'd like monopoly, if you can imagine it being playable about 15 minutes, so yeah, monopoly deal. It is 15 minutes long monopoly, I have no can see on the camera anyway. So I'm not sure I'm holding it up. But I am. And it's super, super vicious. So if you think you get angry monopoly, you can get three times as angry in this in a quarter of the time was crazy. It's just really, really nice, like fast paced, the same kind of concept. But everything sort of compressed down a bit so that you things happen more rapidly, and they happen more directly. And it's just great fun. So I recommend this game to anyone.

Luke Edwards 47:56
And does that just mean you get like more money more faster?

Antony 48:00
It means you get more money faster, it means you often if you may get cards thrown at your face by your wife. It genuinely is so so you get her? Oh, yes, I did. I definitely do. I mean, she would contest that. But of course, you know, that's part of the fun, right? There's a lot of stealing. So I have at one point, been playing with two of the people. And at one point in the game had enough built of my hand that I could take all of this stuff off the table. So just be having everything and no one have anything else is that kind of direct. It takes if you play one round, you will learn all the rules. And that's all you need to know. It's it's not a long a long learning game. So 15 minutes, and you're done basically.

Shawn 48:44
Yeah. My family plays that too. So the two of you pick the top two games in my family fully endorsed.

Kevin Åberg Kultalahti 48:51
I have a game as well. Yeah, exactly. Yeah. So I tried to Google stadia. And I was actually blown away by how well that service works, right? If you don't have a gaming computer, so it's basically a cloud gaming service. Right, but

Luke Edwards 49:11
which one did you play? Oh, I

Kevin Åberg Kultalahti 49:13
played like one of the free ones that comes with service. So I think it was Orcs Must Die three.

Luke Edwards 49:20
A lot of fibre into that name. Yeah.

Kevin Åberg Kultalahti 49:25
It's it's pretty cool, though. Like the service like there's no latency latency or Well, yeah, that's pretty cool. Okay.

Shawn 49:33
Okay, well, I had to pivot to a game pick. All of you picked games. So Jeremy Wagner actually pointed me to this one, but apparently this has been around for a while Cookie Clicker has it's a browser based game or Taylor dash net or cookie clicker. Just Just Google quick cookie clicker. You get it? It's a clicker game. So you just click click like and then and then you set up factories and machines to to help you get more cookies. And, and it's it's a really mindless game. But it's it's pretty, it's pretty addictive. I had to I just had to close it down in Salt Lake because it was really that addictive. But I did give me an idea that our next Svelte society or a Svelte summit activity, because I think we want to have to have a tradition of like when we have a conference, we'll also have give people something to caught up in and show off and demonstrate. And last time we pick something too hard. But I think the clicker game could be just just good, where you can get creative and bring in some art assets and do some animations. So I think I think that will be my pick.

Kevin Åberg Kultalahti 50:33
Cool. All right. I think that's it. So where can people get hold of you? Twitter, website,

Luke Edwards 50:40
Twitter, GitHub, discord, looky everywhere, but leuke 05 on Twitter, I said,

Kevin Åberg Kultalahti 50:46
All right. Cool. Thanks for joining us. Thank you guys. And thank you all the listeners for sticking with us for an hour and

Shawn 50:55
a half you Happy New Year. Goodbye, everyone.

Kevin Åberg Kultalahti 50:56
Happy New Year. Yeah. Merry Christmas is probably the last one

Shawn 50:59
before 2021. Yeah.

Kevin Åberg Kultalahti 51:02
Yeah, definitely.

Luke Edwards 51:03
See you guys next year. Bye.

Antony 51:05
Bye. See you soon. Bye bye.

Audio Player

-
--:--
--:--