Introduction in Stockholm
00:00:15
Speaker
Well, welcome to Deffen, Joachim and Perkan. Great to have you here.
00:00:23
Speaker
Yeah, it's lovely. It's nice to have the podcast in Stockholm for once and have just, you know, one in Vandere over there in Belgium.
Vandere and Sweden’s Socio-political Climate
00:00:34
Speaker
Is in Vandere some kind of like ah racist, xenophobic bullshit that you're are usually coming out Yeah, yeah, yeah, yeah, exactly. I heard Sweden's gone a bit like that recently, you know? Yeah.
00:00:45
Speaker
It just means immigrant, um but it depends on how you pronounce it, right? You know, and which political party you're a member of. Oh, right. Okay. Yeah, but it was like one of the first words that your kid told me when I first came to work. I had another word. Yeah, but don't say it. Some people use it.
00:01:08
Speaker
No one uses it. No.
00:01:12
Speaker
Well, given that this is a polite society, deafened podcast, you know, we better not use those kinds of words. yeah Keep it left of center. Come on. ah Right. Okay. So maybe we we can do you guys in alphabetical order because that's as good as any, you know.
00:01:35
Speaker
Reverse alphabetical order? Actually, we do it we do it because I know that I spoke to you at the heart of closure, Joachim. Is it Joachim or Joachim, by the way? Joachim in Swedish, but Joachim is the Swedish pronunciation. Joachim.
00:01:52
Speaker
you ah ah Use any of those other the two. The last second one. Joachim. Joachim. Joachim. Okay. It's like Joachim Phoenix kind of thing.
00:02:03
Speaker
yeah I think that's Joaquin, but you know, whatever. Yeah, it was my joke, dude. Good, damn it. Okay. We need to stay here. Okay.
Joachim's Transition to Clojure
00:02:16
Speaker
We're off to great fucking start. How did you get out of acting and into closure frameworks? Yeah, actually checked this out because we get the years, correct?
00:02:32
Speaker
So it was, uh, it in 2012. So I attended a conference day focus and one of the talks there was by Neil Ford from ThoughtWorks.
00:02:48
Speaker
Oh yeah. And he presented closure for the audience, the Java, mostly with Java developers. Sure. And, uh, pretty interesting, but I, had a hard time to,
00:03:03
Speaker
I mean, I didn't really like the code. present alien to miss adam I couldn't get it. but it was Actually, I thought, can can this really be right? And it looks like that.
00:03:18
Speaker
So I wasn't used to it. so but And then also a few people at work used Clojure. So I was playing around with it.
00:03:30
Speaker
yeah Where were you working at the time? at the Swedish Postcode Lottery as consultant. Okay. Yeah. Yeah, i worked with um a guy, Christopher, I think, who worked at Postcode Lottery. Was he one of the... Yeah, yeah yeah how how he was one of the guys who played around with, and also James Tronc, and another guy also.
00:03:49
Speaker
A few people were interested in that. Okay. I didn't realize James worked there, because I also worked with him later at a different company. Ah. No, he worked there.
00:04:01
Speaker
And he was also a closer enthusiast. so um So I started to play around with it. and And like a year later, I tried to build a Tetris program that I had implemented in like C++ plus plus and Java and Scala.
00:04:25
Speaker
all right So I thought, okay, this is a good way to learn it, to implement it. it the implemented in Clojure. So I did that and I blogged also about it little bit. So a blog series.
00:04:39
Speaker
So that was me my first hobby project in Clojure. And um so, yeah. And how did you how did you find the comparison between like, let's let's say Scala was the modern JVM yeah language and then you did the Clojure stuff. So,
00:05:00
Speaker
You probably had a fairly recent set of comparisons there. So i i was very enthusiastic about Scala because that was the new, it fixed it fixed all the problems with Java at that time. we all had a Scala phase. It's it's okay.
00:05:17
Speaker
Yeah, I was fantastic enthusiastic for about a year. But then I dig deeper into it and it just felt too complicated for my taste.
00:05:29
Speaker
Yeah. Yeah. and then i And then I did closure at the same time a little bit. And then I switched over to closure. So it just was more beautiful in my mind.
00:05:45
Speaker
Simpler, definitely simpler. So, and yeah, I remember we did that at the post at at that company. with Several of us did this course, Scala course, functional thinking.
00:05:59
Speaker
Yeah, they wanted the one at the... Martin Odorski. Yeah, yeah, I did the same one, yeah. It's a good one. We all did, yeah. Yeah. It was a really good to thing. I think we should have something similar. Yeah, it was it would be interesting if Scala had done any of that kind of shit, of course. Yeah. but ah yes So that was maybe my first mind-boggling thing.
00:06:23
Speaker
Write a set function without using the set function. I mean, implement simple things in in a functional way. It was really quick pretty hard at that time.
00:06:36
Speaker
to So even though I have had programmed in like C and used functions, I hadn't used higher order functions at that time. So it took some time to get used to it. But then when I learned, when I understood how to use it, it suddenly everything became so easy to implement and and write code.
00:06:59
Speaker
Yeah. I think that that that course, if remember rightly, the complicated question was how to make a a change counting machine in Scala. That was like the final exercise, I think. The final the final boss, you know?
00:07:14
Speaker
Yeah. yeah um And it was it was quite, ah yeah, it was a bit of a, a head screw because, again, you're kind of used to having lists of things and things that you can keep in a state and variables that you can overwrite and stuff like that. So obviously it was yeah with a mindfuck to get change that.
Furkan's Journey to Clojure
00:07:35
Speaker
But I was asking you about like what the difference like how you found coding Tetris specifically in Clojure versus Scala because it's kind of like an interesting challenge. I guess you're using Swing or something like that?
00:07:49
Speaker
Sorry, I used... Sorry, sorry. You're using like Swing or something like that? Or JavaFX? At that time, I don't actually... This was 2013.
00:08:02
Speaker
I don't remember. brush I think I was... No, no, now I remember. I used... use something of across ja called java 2d or something was really yeah yeah so it's part of the swing thing then basically yeah it was i think it was an early thing that was shipped with java 1. i mean early really early versions oh right okay so just did my own double buffering stuff because i just needed a bitmap and i wanted to
00:08:33
Speaker
plot pixels on that bitmap and do a double buffering. Yeah, okay. wanted a really smooth experience. So maybe imagine ah can best say something a little bit more about it because I did a lot of that stuff in like assembly and C and low-level programming many years ago.
00:08:53
Speaker
That was kind of my hobby. Before I came to Java and Ska, Clover, I did that on a lot of low-level programming. So I was used to taking control of the hardware kind kind of turn off multitasking on the Amiga.
00:09:15
Speaker
That was the first instruction in Assembler you wrote, turn off multitasking. And then you just was doing everything you wanted. Yeah, yeah you showed you showed me one of your renderings on that Amiga.
00:09:32
Speaker
Yeah. remember that you were rendering in some way. Yeah, yeah it was really I liked that. It was simpler, much simpler, everything. even though you Even though it's really hard to do write code in assembly, still think you didn't have to learn a lot of frameworks and stuff.
00:09:54
Speaker
You'll come to that later. Oh, give me that. Yeah, we'll put a flip in that one. All right. So, Fulkan, what about yourself? ah What's your yeah kind of like journey over to the parentheses? parentheses that that that you break it up about You don't even have a glass of wine in front of you today i' i'm too tall tonight. tonight in full respect, you know.
00:10:22
Speaker
Yeah. so No, by oh my be but a very big glass of vodka.
00:10:31
Speaker
Yeah. All right. my My journey is like, um so like I didn't see those times that Yoki coded assembly on an Amiga, unfortunately. I wish I saw um because they look beautiful when I look at it.
00:10:45
Speaker
Many don't appreciate these days. But my my professional programming career started 2013. So before that, I studied computer science. And there, it was interesting. One of the professors was obsessed with LISP.
00:11:01
Speaker
So he he took like the whole course was taught in Java. So like very indoctrinated, this is the way to code. There is no other way. And there was this one guy, he was showing us everything in Lisp. So I got one introduction to computer um science from him with MIT Scheme.
00:11:22
Speaker
And then later, I took a programming language concepts course, again, a MIT Scheme, and then we wrote the programming language using a MIT Scheme, yeah and an IDE, so that you can type and then visualize things. And it looked it looked like Java, the programming language. That's cursing, isn't That's cursors. Yeah. Yeah. Yeah. Oriented programming language in Scheme. yeah
00:11:52
Speaker
But it's too easy to implement a Lisp in Lisp. you know You need a challenge like implement a crappy programming language like Java. Sorry, I'm just throwing the hate you know yeah starting out.
00:12:03
Speaker
Yeah, but we all share, I guess, that hate, so it won't work. Actually, I think i mean the funny thing is that like i know I think we've talked about this before is like Java nowadays is yeah you know compared to someone like Scala, like it was 10 ago or 15 years ago. fifteen years ago Java is sufficiently you know powerful now that you you can... it's It's kind of weird actually, because I think until Clojure 1.12, it was even... you know It was simpler to do some things in Java than it was in Clojure.
00:12:37
Speaker
So it's you know so i think the java the Java people have done a really great job in the last couple of years in terms of like very, very frequent and regular releases,
00:12:48
Speaker
being innovative, you know, taking things on. Anyway, so I'm, you know. Maybe should answer your question we had before. they went ah To compare my experience with the Java and the Flosher version.
00:13:04
Speaker
yeah You asked me about the Tetris program. Oh, yeah. I thought you were avoiding it. I thought you were dodging it. No, no, no. I asked you three times and you were like, oh I'm not entering that shit. You know, I'm just moving on. Yeah. talking about everything else. Okay. No, it was actually, ah think, if you write a really small program, like a little tiny program like that, 500 lines of code, then have a board class, a piece class, blah, blah, blah, with a handful of functions, then, I mean, nothing I have no problem with that.
00:13:38
Speaker
I mean, and and also that is a... I mutated stuff because to speed up, I had to use mutation, in-place mutation, just like and for optimization reasons.
00:13:51
Speaker
so and So that wasn't, it didn't look ugly in my eyes at least. But then what I have problems with is those enterprise systems. that's They are always a mess. Yeah.
00:14:06
Speaker
But yeah, so sorry, we we tangented as usual. So, Ferkhan, you were saying you implemented Java in MIT Scheme as you do you know? Yeah, why not? Young men in university messing about.
00:14:19
Speaker
Yeah, yeah. And then like at the time, like everyone hated MIT Scheme in the class because they were like, oh, exactly. But they were thinking, like, what like i i never seen this before in other places in the internship we do. Like, no one uses this and all that.
00:14:36
Speaker
And then that was true for a while for me as well. Like after the school, like I did mobile programming for three years, Objective-C. so And then like I was tired of like, I was in Istanbul back then, tired of the city and all that, looking for job. And then this one guy offered me job in this place called Stockholm.
00:14:59
Speaker
And I just came here and started writing Java again. Yeah. Beautiful. And then after, I think it was like after two months, James joined that team, James Trunk.
00:15:13
Speaker
And then he planted the idea that, like oh, there's this programming language called Clojure. That's a Lisp. It's a functional Lisp runs on JVM. you want to give it a try? I was like, wow, this is actually real. Like people use Lisp in the real world. Amazing. I'll try it.
00:15:30
Speaker
And then then we hired Jokki at the time. And then my closure journey started. That's my nickname. Jokki. Yeah. And then like the closure journey started.
00:15:45
Speaker
pretty much until now. So I was i guess like the difference was like I was a bit more like empty brain, not indoctrinated with all these different um like object-oriented ideas and frameworks and all that.
00:16:00
Speaker
So it was easier for them to convince me. I like to keep an empty brain at all times, but it's getting filled up with slop recently, but yeah. Yeah.
00:16:13
Speaker
yeah So yeah, that's how I got to know Closure and then wrote many projects since then in Closure. So you're lucky in many ways, you know you've sort of, yeah um your professional experience has mostly been in Closure.
00:16:26
Speaker
So yeah. Yeah. Well, good luck. Yeah. Great stuff. what but What about you, Joshua? No, I'm kidding. okay this is Everybody's heard my origin story on this podcast a million times. It's just because we've got three Swedes, you know, three people from yeah three people in Sweden. They're not all Swedes. Only one actual Swede, I think.
00:16:49
Speaker
i've i've I've got a passport, mate. I'm Swedish, swedishsh as I say. yeah Yeah, me too. Although Jocky wouldn't agree with us, probably he thinks we're not. so Speaking of right-wing politics, here it comes.
00:17:10
Speaker
Oh, God. Yeah. So... Just for the record, Jocky is joking and laughing about this, so it's okay, you know? Yeah, yeah. He's not sitting there fuming. Yeah.
00:17:25
Speaker
Yeah, so no, but i i also um came to Clojure through mit scheme, though I took a few detours along the way before ah before I finally found Clojure. But so was it at this job where you and James and Yoke were working that Polyleth was born? And like how did that come
Development of Polyleth Architecture
00:17:45
Speaker
about? I mean, what the hell is Polyleth anyway, other than a cool t-shirt that two of you are wearing? Yeah, only two people in the world wears.
00:17:57
Speaker
I bet James has one too, doesn't he? Yeah. Actually, they're kind of like annoying because we should have had deafened t-shirts on, Josh, really. Should we go chain train? Yeah, definitely. You two talk amongst yourselves. By the magic of podcasting, we're now wearing them. That's true,
00:18:15
Speaker
yes. So yeah, polyleth anyway. Yeah, so do you want a short story or the long story? We've got time. We've got time. yeah So don't worry about it. you know has a maybe i i was thinking maybe i should explain a little bit the years before.
00:18:34
Speaker
Could be interesting. I think always like you these kind of things, especially like a framework like polyolith, which is not you know, it's not a small thing. It's a, you know, you're, you're, you're asking people to jump in to something, you know, it's quite, you're asking people to jump in to buy into some beliefs, aren't you? Buy into some kind of concepts.
00:18:54
Speaker
it' actually so So usually those kinds of things are like, they come from some frustration or from some, some pain or some wars that you've been in. So, so yeah, I'm happy that you, I'm happy for you to like, you know,
00:19:10
Speaker
Wax a bit lyrical about all of those kind of problems that you've faced. yeah But he he will start from like, we are all stardust and you know, okay there was a cloud. Mama and loved each other very, very much. yeah But just for the record, like we didn't sit down and then decided to in invent a new architecture.
00:19:34
Speaker
Like okay we were just like losing, or Jokki was losing his sanity on the code that we wrote. And then like, he was hating me a bit. So that's how he came up with this.
00:19:48
Speaker
Yeah. yeah Yeah. So I think I, yeah. So where should I start? Maybe. So um remember I worked at a company.
00:20:03
Speaker
So in 2005, we had ah something called an architecture year. So at that time I programmed in Java, of course.
00:20:14
Speaker
So and then um so and then I started to read those books, The Gang of Four, Domain Read and Design and started to read a lot of blog posts and started, OK, trying to understand things.
00:20:29
Speaker
What is design kind of or. or ah I don't see me myself as an architect, but I'm more like trying to solve problems.
00:20:42
Speaker
yeah so But some kind of designer of software, I think am. But just just to put a pin in that for a second, don't you think like in in other fields, at least, architects are trying to solve problems?
00:20:56
Speaker
Maybe we've got the wrong name for like architects in computing. Yeah. but I know there is always a debate. What is an architecture? What is design? Is domain driven? Let's say like some design patterns or whatever. every Everything you do, try I mean, the main problem is to make things simpler, I think. That's our hardest, not our biggest enemy in software.
00:21:27
Speaker
Sure. That things are complex. complex So and that if there are, of course, there are a lot of other and non-functional
00:21:38
Speaker
issues also. Dysfunctional, we call them, yeah. Dysfunctional, yeah. So at least, at and then at some point, I was trying to, i thought it must be, what's called, oh,
00:21:54
Speaker
and I lost the word. Like in math, you have those basic principles where you build... Axioms. Yes, axioms. There must be rules somewhere.
00:22:08
Speaker
It's because when I read about... about especially in the object orientation work. You shouldn't chain method calls and stuff like that.
00:22:19
Speaker
That's a bad pattern. and Or you should always encapsulate everything. If you can't operate on data, I should always assume encapsulate. And I thought, hmm, can this really be true? it was didn't feel right to me, everything out there. So I was thinking a lot about around those things.
00:22:42
Speaker
so move so And it took maybe, i don't know, 10 years to come up with. And i was during that time, I was trying to
00:22:57
Speaker
come up with some theory. It wasn't a theory, but it was a model or whatever you call it. Just for me, it wasn't... It was just because I wanted to understand those things. I felt that this, I couldn't find anything. out of course, I could find, pick things here and there that was, okay, I agree with that, and I disagree with that, and so on.
00:23:22
Speaker
So I tried to find a model that made sense in my head. So was doing that for maybe 10 years, and then I... I came also up with those, I wrote it that blog post, The Origin of Complexity, where I tried to explain those things.
00:23:39
Speaker
So it was a long journey and almost, and that at some time there, when we when I worked at Furkan and James, um I came up with this Lego idea.
00:23:56
Speaker
it was actually, I had i had thought about this problem that code, you should be able to write code in a way that you can, it doesn't matter where you execute it You execute it on your local machine or in a server, it should just, it shouldn't be that easy. You shouldn't be forced to rewrite the code just because how you execute it.
00:24:21
Speaker
That was thats was some that was ah a question or something I tried to solve for for years. then but musty You must have heard of Docker, though, Joachim.
00:24:32
Speaker
um Yeah, you're right. It's like ship your local machine. Exactly. Works on my machine, so here's my machine. Exactly. You must have heard of Docker. Hilarity ensues. Yeah. I think it was a combination of different ideas, so sorry. Yeah.
00:24:54
Speaker
Yeah, I mean, like that was the reason that Jokki pretty much came up, or maybe fast forwarded his thinking to came up with this idea, because like we were about to write a system with microservices and deploying all these and stuff. And we were like just three people in the team. Yeah. Don't do Yeah. And and then like the problem we were trying to... I mean, the problem was maybe a little bit big, but the the users of it was like very small. You know, like no one needed like 20 services for that because there were like 20 people. We could have had one server per person, but mean, it didn't need. could have literally shipped the Docker image out to each of their PCs, yeah.
00:25:37
Speaker
Yeah, and Jok described this as like, oh, like you, he was telling me like, oh, you are like a new developer or like up and coming developer wants to put ah microservices into a CV, you know. CV building activity. activity.
00:25:56
Speaker
CV driven development. Yeah. Yeah. Yeah, yeah. yeah And then like I built it quite good in the beginning. like We had, like I think, five services or something. And then Jokio was having nightmares in his computer, like, how do I run these at the same time on my machine? Or like, oh, if I change one of them, how do I deploy that jar to somewhere so and then the others can get it? And in his mind, this was unacceptable.
00:26:24
Speaker
Then, yeah, he started to think faster. development experience was not good. down
00:26:33
Speaker
Well, I think that's what everyone says, isn't it? That like microservices are like, they're great if you've got a thousand of them, but they're very, and only because then you can like focus on one or two of them, some cluster that's local.
00:26:46
Speaker
But if you've got like like two or three of them, they're just total pain in the ass. Because soon as you go from zero as soon as you go from a monolith to any any more than a monolith, monolith you kind of like you're just hitting all of the problems of coordination. And I remember that, by the way, just ah jo ki i read your blog post, and the thing that you were...
00:27:08
Speaker
the one the word that you put in that post was coordination. yeah That was the problem. So so maybe maybe you can like tell us a bit about that because that was that was clearly a motivation for you.
00:27:22
Speaker
Yeah, according so I So I don't believe that the dependencies... ah To use the word dependency and say that the ah to have a dependency is something bad.
00:27:33
Speaker
That's not true. And I have a couple of examples in that. For example, I mentioned like the if you depend on Java virtual machine,
00:27:45
Speaker
That's not bad. I mean, and because also it it changed in a way that is that it doesn't break things. yeah so but so So it's like, then then you're safe.
00:28:00
Speaker
yeah So you can't say, oh, I depend on this. That's bad. We need to abstract that away or whatever. I mean, that's not always the solution. So it's the coordination that is the bad guy here.
00:28:15
Speaker
so Or that when when you can't automate things. So but that's that's what you try to do. You try to do things in a way that the computer can do the work for you.
00:28:30
Speaker
so Yeah, but as soon as you go into microservices, you have a coordination problem, don't you? Yeah, exactly. And I worked in, especially one project that had, I don't remember, maybe 50 services.
00:28:43
Speaker
But it was, I mean, yeah a lot of code duplication there everywhere. And they had the same library. So they shared code by using libraries, internal libraries.
00:28:59
Speaker
And they were in different versions, so they could fix a bug here. And then some other team upgraded to a later version, the latest version, one month later.
00:29:11
Speaker
And it didn't even compile sometimes, or it didn't work at least. So yeah, it's not easy. those So yeah, it wasn't.
00:29:24
Speaker
Okay, so moving on now. So what what were the kind of like foundational ideas of polyolith?
Understanding Polyleth as Lego-like Components
00:29:33
Speaker
Yeah, um the I think i was said um it the Lego metaphor that you have each Lego brick you have each leg of brick is lives in its own source and test source.
00:29:57
Speaker
The director, they they have their own source kind of director. and they have... Okay, but what was your the core idea you asked for? maybe Yeah, because I mean, that Lego is like like... People have been talking about components since the 1980s, you know. yeah yeah um And everyone's been using Lego as a kind of concept of, you know, pluggable components and stuff like this. so what was What was different?
00:30:25
Speaker
um Or why did Clojure need polyleth? Because, you know, like Rich Hickey in his um ah simple, ah easy made simple.
00:30:38
Speaker
The other way around. yeah one have simple mini Simple made simple. I knew he went for simple made easy, but I thought, no, that can't be right. um That doesn't make any sense. What's this guy smoking? Yeah. Anyway, he's talking about like knitted knitted models versus Lego models. and So you know it was clearly something that that he thought about.
00:31:03
Speaker
um So what... So just i mean I'm just saying, like also, LEGO is Danish, not Swedish. So surely it was IKEA. Come on. yeah yes yeah they but down yeah Yeah. But if we called it IKEA-like blocks, then it would we would need to like ship documentation with it step by step.
00:31:27
Speaker
Right, right, right. You don't believe in documentation. It could be really bad documentation, though. That's apparently completely acceptable. It's fine. yeah You have to put them... Self-assemble. Yeah. yeah just i for arself so This is the Work it out. right.
00:31:53
Speaker
So, but you were saying, so Furkan was so nice to give you, you know, five Docker images for his microservices, but that wasn't good enough for you. So you, you needed Legos instead.
00:32:05
Speaker
So like, but yeah was PolyLift born from that exact frustration? Yes, it was. And also you could add the my ideas. are that have had been going on in my head for some years.
00:32:21
Speaker
Yeah. But that time, like yeah when when I annoyed Jokki enough, ah at that time, he also switched his shampoo. That's what we believe with James. Because like he he he was coming in the morning with these new ideas, like really good ideas. And then he was saying, like, yeah, like I was in the shower this morning and this idea came out.
00:32:47
Speaker
So there must be some chemicals involved there. ah yeah the yeah it It's like feedback speeding c speeding up the process somehow. ah ah It's that Bolivian pearl shampoo that that did it, I'm sure. Yeah.
00:33:08
Speaker
Okay, so, okay. I but i think it's the, I think it was the development experience. I really wanted to have this monolithic feeling that you have access to all your code and you can refactor your code, it can debug your code.
00:33:29
Speaker
I mean, even though if you have 20 services, neat thing with politics is that you can have one single development experience. You can refactor if two components are put side by side and the A is calling B, you can refactor the the name of the function in B and it will... I mean, it's it's... So it has the feeling of a monolith, but it is a decoupled. It's like more like a Lego... a box of Lego bricks.
00:34:02
Speaker
So that's the feeling of it. You... when you work with it. So you get the best of both words, you can say, yeah. So that's what I, I think that was what I was aiming for. So maybe, maybe, um maybe you could like help us to contrast, for example, um get sub modules versus polyeth.
00:34:26
Speaker
Yeah. Yeah. Okay. um, so
00:34:36
Speaker
I guess maybe it was later break. Yeah. No, I was going to say like one, one thing is like, mean, a lot of ideas that we baked into polylit, I mean, they are maybe not individually our ideas, all of them.
00:34:51
Speaker
We kind of like also picked a lot of good ideas that was existing out there and then put put in one place and we spend like a lot of time on like naming them and like finding these like metaphors or like ways to to communicate that idea.
00:35:07
Speaker
And also like one one thing was like Jokki said, making that development experience really good. like No matter how big a system you are building, ah they or you should have the best development experience. Feedback loop should be fast. You should be able to access REPL without needing to start 20 of them. So those were like the the basic ideas underneath.
00:35:33
Speaker
And then also, like we wanted to still keep from that microservices idea, like decoupling these um like areas of responsibility, right?
00:35:44
Speaker
So this is a domain, it should be separate and we should be able to um like understand it in isolation without isolating it into a service. So those were like kind of basic ah foundations and the and the process that we came up with Polylet. Yes, I think that's that's the one thing they got wrong.
00:36:09
Speaker
i mean, you if if you think you can have many small services in separate repos, I mean, of course, if I have, I read a few years ago and that I read a blog post about this that new bank that had at that time 700 services, then I think it's probably, then yeah you probably would have, maybe you could have 10 poliist workspaces or something. You don't have one single for all the services. I don't believe in that. but
00:36:45
Speaker
I'm just saying that sometimes maybe you have, that could work because you have a huge organization and it's yes everything is just so huge. But in most places, they only have like maybe 100,000 lines of closure code or whatever, or um maybe in a million lines of code. But if you have 50 million armss lines of code or whatever, I don't know, 10 million lines of code, then you maybe have to split it up a little bit.
00:37:18
Speaker
Well, I think the thing that matters is not the size of your code base, but it's the size of your development organization. Because for me, the the reason to have services is because I have different teams. like you know If I'm a small company and I have 10 developers, like I think Monolith is a fantastic idea like it because of what you were talking about, the development experience. So I'm just wondering, because you said best of both worlds, I'm wondering, like um you know you're talking about Polyleth gives you access to you know multiple services as if it's, or or like in a seamless development experience. But um so you can then deploy these things in different services. Is that how it works? Yeah, yeah, yeah. So you take, let's say you have 100 components and let me and
00:38:11
Speaker
and 30 of them goes into this service, 25 goes into another service and so on. But when you develop things, you have development environment so so where you have access to all those components. So they act as a monolith, but they are so they are separate.
00:38:37
Speaker
But you put them in and put that into one place so that they can act like a monolith. So that's how works. And then does polylith also take care of defining how these components get deployed into different services? Or is that kind of outside of the scope of polylith?
00:38:56
Speaker
Yeah, it's outside. I mean, what you do is that you put together, so you get all the code you need. But then you have to build a jar or whatever. All that stuff you don't take care of. But we explain how you can do it in the documentation. Yeah.
00:39:11
Speaker
Yeah. And like polylet takes you until you have the class path basically with what you need. And then you decide what you want to do with that afterwards, like how you want to deploy it, where do you want to put it into it? Do you want to put it into Docker or whatever? We don't care about that. Like, because like, we also try to keep the scope as small as possible.
00:39:33
Speaker
And we didn't want to create a framework, right? So like all of this Pololit idea, you can do it without any tooling from us, without our code. so Because it's just like telling you where to put things and how to name things. um So it's more like um like recipes of how to how to write good code by Joachim Tengstrand.
00:39:59
Speaker
but but But also when when you talk about people that use it today, several of them have told me that we wouldn't go this policy path without the tooling right we have. Because it adds so much to everything. It validates the code and it can...
00:40:20
Speaker
and it and it can ah test the code incrementally. So we have a test command that if you just change one component, it can it calculates what did what is effect the what was affected by this change and it tests only they that.
00:40:40
Speaker
right So that increases the feedback loop both locally and on the CI server.
Ensuring Interface Integrity in Polyleth
00:40:49
Speaker
So is the idea, so I, you know, because architecturally, if we go back kind of architecture again, one of the things that we talked about was like not having dependencies and stuff like that. So how do you ensure, and maybe this all documented, but it's a generic question anyway, is how do you ensure that on the one hand, you have like a component that works on its own, and on other hand, components that work together?
00:41:18
Speaker
So then kind of never, we decided this to do it like this. and so So you make sure that it works in the development project. We call it a project.
00:41:30
Speaker
Those places where you put components, we call them a project. So in the development project,
00:41:39
Speaker
That component has access to all other components in your workspace or your whole code base. We call the whole whole whole a old code base a workspace.
00:41:53
Speaker
So that means when you test that component, when you have a test code, it will have access to those components that you decide to go into. And that's... pretty often than all the components.
00:42:07
Speaker
ours Sometimes you have, yeah okay, let's skip that for now, but but you you have pretty much all components o and every component have access to every other component. so in that So that's look in my head, it looks more like the main the central main repo with libraries.
00:42:30
Speaker
you You can pick, think of any library there. They can have access to at least all the other libraries further down, to say, because you can't point upwards because then gets circular dependencies.
00:42:46
Speaker
So maybe it's a question then, because maybe is it's something that's somehow not clear to me, because obviously when when we have a monolith, if I write a ah component, I have access to everything else because on the same class path.
00:43:00
Speaker
So what's the difference? How do you make sure that people aren't just using things on the class path um in the development environment that then you ship and aren't available in the deployment environment? a big so Yeah, that's... Maybe it's how this how these components actually work is is something, the boundaries need to be a bit, I need to understand that bit better.
00:43:25
Speaker
Yeah, so each component has something we call an interface. It's not it's not the same type of interface that you have in object orientation.
00:43:35
Speaker
This is just a namespace. can or yeah Normally, it's just one single namespace with a name that you often you just call that namespace interface, but it can but you can call it some EFs.
00:43:51
Speaker
IFC, for example, or something. But let's say interface, that's single namespace. And that's the only namespace other components ah are allowed to access.
00:44:04
Speaker
Oh, okay. So by convention. don't expose the whole, yeah, it's a convention, say yeah but it's a about um encapsulation. And that means that you can replace a component with another component as long as they implement the same interface.
00:44:20
Speaker
Okay. So interface is like your kind of API layer. Yeah. Yeah. Yeah. But they live together with the each component in their source directory, you have your namespaces and one namespace has the name interface.
00:44:38
Speaker
Okay. And then by convention, other other things can call to that interface. And if they're on a different machine, then is that interface somehow exposed over some protocol?
00:44:52
Speaker
No, I mean, yeah, I mean, ah we have another type of component. We don't call them components because they are called bases. They are also like Lego bricks, but they don't have an interface instead.
00:45:08
Speaker
They yeah have a public API. For example, if you if you have a REST service, you will need to create a base to expose that REST API.
00:45:26
Speaker
And you put that code, you put into a base. That's another kind of Lego brick. and And then what did that base do?
00:45:38
Speaker
does is that it delegates to those interfaces that or components through their interfaces. So when you when you do when when you' create the service, you just put a base into the project and then a bunch of components.
00:45:59
Speaker
And in depths.eden, that means that you have a depths.eden file that refers to ah one base and a set of components with a local route syntax.
00:46:10
Speaker
So that's everything. and then you have And then you have all the code you need. It doesn't need to do anything more than that. Okay.
00:46:23
Speaker
So... and I'm still, I'm kind of understanding, trying to understand where the interface, what what's the point of the interface in that case? Other than as a kind of way to prevent other, like an architectural boundary. Is that the idea that the interface is an architectural convention?
00:46:44
Speaker
that says, okay, in a polyeth application, if you want to share some functionality, you put it in the interface, and that's assumed to be a stable place. and And if you put it in the interface, then you're kind of committing to some some kind of backward-combatible behavior or whatever.
00:47:04
Speaker
Yeah, I mean, like we we wanted to make it. like though The but problems arise in these big monorepos when the code is very tangled, right? So everything is calling everything.
00:47:16
Speaker
So we wanted to solve that in the first place with microservices, right? Like separate everything. So the idea from- You can't possibly share class path then, yeah.
00:47:28
Speaker
Exactly. So what we wanted to to do, okay, like let's put a layer to those components. So that's only allowed from the other components. So like you know the touch points between these components.
00:47:39
Speaker
So it it becomes not tangled anymore, the code base. So you can follow. your tools then prevent, like yeah i if i have a if I have a bit of code and I call directly your function, your tools will say, ooh, no, no, no, that's not permitted.
00:47:54
Speaker
Yeah, yeah, exactly. It's going to give give you like which component is causing that, which namespace and like you will be able to fix it. And this goes same with like the other question. like When I take maybe 30 components and put them into a project, how do I know like I put all the components? The tool tells you, like you missed these five components.
00:48:16
Speaker
so So the tool helps with that. And the tool also helps with testing because we do static code analysis of the entire workspace. So we know actually like what's going on. So we can even do things like, ah you change one part of the system, let's say like two components, we know like which components change, but also we know like which projects are affected by that change. So it only run tests that actually affect like this code change effects.
00:48:47
Speaker
Right. That makes sense. And do you have a editor integration for that as well? So it sounds like something maybe you would want feedback on, like if I'm you know banging along in Emacs and I call some you know some component that I wouldn't have access to at runtime, is am I going to get yelled at immediately?
00:49:07
Speaker
i mean, you have access to everything because you have all your components. You have access to all the... all it's It's like working in a monolith in that sense. Yeah. So you don't need... the Because you have you can navigate...
00:49:23
Speaker
between components seamlessly. Okay. So maybe that was the wrong question. Maybe the right question is like, ah Tell me about the the tools. like What tools do you have and how do those work? like How do I work with them as a developer?
Starting Projects with Polyleth
00:49:41
Speaker
like Let's say that i i don't have any code yet and i want to I've read the polyleth documentation and I'm like, yeah, this stuff is good. um i want to get started. Just walk me through like how do I get started and you know what what is the kind of lifecycle for a developer using polyleth?
00:50:00
Speaker
Yeah, so normally in other projects, at least, what are what I have them been doing or and mean all people I talk to, so so what they normally do is that they they start with a repository.
00:50:16
Speaker
but they They think, okay, we need ah we need this functionality. and Okay, we should put that in a service and then and then we need a repo. And then you start to, you just add namespaces and code and just coding.
00:50:29
Speaker
But in that repository, you start to create your service. But in, sorry, in Polis, you always start with a component.
00:50:46
Speaker
So you think, okay, we we are going to, we need our some kind of functionality. Login is a classic. you know Yeah. Login.
00:50:58
Speaker
Login or, yeah. Login, yeah. Login, yeah. Login, yeah. No, no, log in. You need to log in authenticate the user. Off. Yeah, there we go. Yeah. So then what you do is that you have your development project.
00:51:12
Speaker
That's your kind of development environment already when you... so or or let Okay, let's start from the beginning. yeah so So first you download the Poly
00:51:24
Speaker
command line tool. and install it and then you run the create command and you for a new create a workspace and you give it a name and you set the top namespace.
00:51:44
Speaker
So every year this will be the workspace for everything and all your components will start with the top namespace. It could be right like if it's in Sweden se.mycompany could be the top namespace.
00:51:59
Speaker
And then all components will we'll have that top namespace. So then you create a component and then use the command again for a component and give it a name and then you have your first component and it will and with you would call it login and then you and then it that the what is the tool what does the tool produce is it like some sort of scaffolding tool Yeah, it produces a directory with the name of the workspace. And underneath there you have directors, director called components, director called bases.
00:52:41
Speaker
And one is called projects. And one is called development. So that's kind of your four directories. so so in that when you so when you so after and and then if you go into the components director you will have a director there called login right and if you go in there you will have two directors you have a source director and a test directory and a depth.edent file because this is based on depth.edent
00:53:16
Speaker
So in that depths.dm file, you will find the configuration that with the source and test director pointed out.
00:53:27
Speaker
and then yeah just And then also the development project will also have a depths.dm file that includes it it includes this Or actually the tool is telling you, you need to add this component as a local route to your development apps.dm5.
00:53:47
Speaker
don So then you need to do that manually. But then when you then, and now you have your first component in your development project. And now you can just run tests. and you can zero So you start with a component. At that this point, you don't even need to think about how to run this in production.
00:54:11
Speaker
m So it could be that you you only will run everything as a single service in the end, because that's how your development environment looks like. this It looks like a monolith, you could So you can deploy it as a single service.
00:54:26
Speaker
It will be a polylyth in this world, but it will look like a monolith. yeah Oh, right. Okay. So you can just deploy everything in one package if you read if you want to do it like that. Yeah, you just add all your components. Mirror your development environment in your thing, in your service.
00:54:46
Speaker
Or you don't even need to think about at this stage, like, do you want to expose this as an HTTP API? Do you want to expose it in a different way? Or do you want to write a CLI tool that has a main function? So you're not thinking that because you're focusing on first, like, okay, I need a login component. Let's write that functionality first.
00:55:04
Speaker
So think about that later. You postpone those decisions. Yeah, because that that was my mistake in that project we had with your okay like I first decided I'm going to go for microservices.
00:55:20
Speaker
so right like I don't know what we are going to build, but it's going to be microservices. like Why? You're stopping the wrong end. yeah yeah Instead of adding services when you need them, that's a better no approach, I think. Sure, yeah. but I think i mean i think you know in fairness to you, Furkan, the sort of industry ah uh conventions are like to use microservices these days so it's it's always kind of like it's always good to challenge that and to you know and see the see the downsides of it like you're like you would like you did jockum yeah yeah but i think uh i think it's true also to say that you can use them i mean you you can have i mean
00:56:13
Speaker
What I think what microservices is, is like they say that each service should be, if should be able to deploy them individually. and know if that's That's the promise.
00:56:28
Speaker
So if you're if you have a lot of service, you you use polyleth as a way to organize your code and to encapsulate your functionality. Then you build services. You have one or two or whatever. How many service services you need.
00:56:45
Speaker
But they are organized as components. But you say also, but they should comply what microservices promise to deliver. delivered let's just they should be deployable. How do you pronounce it? I don't know exactly how to express that, but...
00:57:06
Speaker
Anyway, so that's i think microservices was maybe also aimed to be a way to organize code.
00:57:17
Speaker
I mean, to put boundaries around different kinds of brain functionality. But I think what what's hard with that is that both that you need to make those decisions up front and also that, yeah, you get code duplication and also...
00:57:36
Speaker
You can't make them as small as you want.
00:57:40
Speaker
Because if you have, you can't, you don't want to have 100 services or 1000 services. Or let's say 100, you don't want that, but you can have 100 components. that's That's really manageable. manageable that's been Right.
00:57:57
Speaker
So I mean, that makes perfect sense that you would want to kind of delay that decision as late as possible. I'm wondering, you know so let's just say in our example, we've built the login component. We've built 15 other components. And now I have something that I want to run so you know in production, not just on my own laptop.
00:58:19
Speaker
um what's What's the step there? Like, do you do you have tooling for, okay, now make me a service that I can deploy? yeah we call them projects.
00:58:30
Speaker
So then you create the project and then you you go into that projects.edem file and you list the components you want to include in that service.
00:58:44
Speaker
So if that is your first service, it's probably just, it will just mirror the set of components you have in your development. environment Sure. But that can change when you have like five, your fifth service, then you probably don't have all your components in that so so project. Yeah, yeah.
00:59:03
Speaker
So it becomes a service when you build build things out of it, but it doesn't need to be a service. can be something else, some other kind of artifacts. So in terms of tools, if we come back to, you have the CLI tool to help you like construct the services and have a uniform like directory structure and um ah development setup per component.
00:59:28
Speaker
um And so what are the other sort of tools that that come with PolyLith? Remember, the command line also does them, but... or Is that right? Is everything basically in this command line tool or do you have other bits and pieces that are floating around? Everything is in there.
00:59:44
Speaker
Sorry? Everything is in there. Everything is in there. Everything you need. You have this libs command. It shows you what libraries you use, what libraries each component uses.
00:59:58
Speaker
this says and what libraries each project uses, and so on and so on. That's the Lips command. then they have the Depths command that shows the dependencies across all those interfaces. And you can also, if you say, okay, want- It's not dependencies between the interfaces, like themselves. Yeah, exactly. It's not like a Depths.Eden.
01:00:21
Speaker
not a super class of Depths.Eden. It's to do with the specific polylyph things. it's It's about the source code, what depends. Yeah. Right, yeah. Yeah.
01:00:32
Speaker
And then you can also say, oh, but I want to see the dependencies for this specific service. Because sometimes you you can have two components that implements the same interface, and you can use them.
01:00:45
Speaker
You can have one version in development, for example, and another one in one project, and then maybe you have a third version in another project. <unk> The interface is the same. It's the same.
01:00:58
Speaker
First, you have the top namespace, and then you have that login. That's actually the... It's often both the component name, the name of the component and the name of the interface. So it's called login.
01:01:13
Speaker
But then you could have a login extra or whatever. You have another component, but it it it has the same interface. The interface, you could say, oh, but I want to use the login interface.
01:01:26
Speaker
So then you can swap components. But because the project only knows about the interface, that means the code will not break. Right, okay.
01:01:39
Speaker
And you know in terms of that interface, ah you let's say you have a an interface with two methods, but then you remove a method. Does it warn you about this? Or function, we call them, They here. Sorry, okay, okay, okay. We are in the closure world, come on. Yeah. Holy shit, yeah.
01:02:02
Speaker
it's called the israel i can I get confused. yeah so we You have these two objects in your interface, Jock. What do you do? Exactly, yeah. Come on. okay ah Two methods in your interface. They're automatic. Anyway, this
Rapid Changes with Polyleth
01:02:17
Speaker
is Matt. okay um So you have two functions in your interface. okay God, word police, honestly.
01:02:29
Speaker
Sorry. Snowflakes, I don't know. Yeah, okay, so you have ah the the functions in your in your interface, um and let's say you have two functions, you know, log in, log out, but then you get rid of one of the one of the functions, log out.
01:02:49
Speaker
So does your tool tell you about this, or does it say, oh, hang on, you know, you use this to call this? because component lives in that development project, ah and but and there you have...
01:03:05
Speaker
all your components in there. So then your code will not compile. you i mean, your IDE will tell you. Okay, so someone has to have called that that method, that function. Yeah. okay If if yeah yeah and if it's not, it's not a problem. I mean, that would be fine even in a monolith.
01:03:27
Speaker
If you add the true function, removes one, and the compiler is happy. There is one place that the tool helps. If you have two implementations of the same interface and then if you change the interface in one of them, then tool detects that and then says like you are breaking this contract here.
01:03:47
Speaker
like We have an interface. And it's really picky there also because i the name of the arguments needs to be the exact same name. So if it's i name and ID, let's say, yes to as input to that function, they need to be name and ID in order components.
01:04:09
Speaker
And that's a good thing because then you don't swap them. Let's say they have the same type, then the compiler will not help you. So if they are all both strings or integers or whatever, it will help you.
01:04:22
Speaker
will say, oh, this is they't they don't match anymore now. Well, obviously in Clojure, we don't have the types anyway. so Yeah, I was going to say that. Another mistake here. Go on, keep up. you know We're not inventing this in Java, are we? i't think we have primitives so I don't not trying to do but So maybe a um question for you then. like ah What kind of systems have you built where you felt like, oh, polyleth really gave us an advantage here? like Can you tell us a little bit about like um you know what what is the the kind of killer use case for the polyleth approach?
01:05:04
Speaker
That's a question for Furkan because we have systems. i so I think it's a killer killer architecture for everything you write in Clojure, I would say. Nice. Okay. yeah people People usually ask, like oh, but like I'm going to do like a very tiny ah tool. Should I even use Podlite? Why bother with the added, maybe complexity, you could call it, four directories instead of just the source?
01:05:32
Speaker
But like usually those projects turn into bigger ones and it becomes harder to evolve it later on. like Can you be sure there's going to be just one namespace from the beginning? So I always recommend like start and polylet because it's not hard. Polycreate and then you get the source file anyway.
01:05:50
Speaker
So, um but like what I built with it is like mainly it was like HTTP services, um like with that. And then like in my current company, like we build both frontend and backend with it. like So we also have a ClojureScript polylet repository. um So that was also pretty useful, actually, like ah because like in frontend, you also have like a lot of like components, like UI components, but also polylet components that are like parts of that UI, like different domain domains.
01:06:26
Speaker
And then you tend to reuse them in different places. Like recently we released a new product, which has um to maybe your pleasure, Ray, an window that you can chat.
01:06:45
Speaker
God damn it. Yeah, but like... Okay, stop the interview now. Pull the plug. Yes.
01:06:55
Speaker
Yeah, let's call it. It was a login UI instead of AI UI. Sure. Yeah. Okay. Yeah. How polylet helped there is like, I naturally created that as a polylet component.
01:07:10
Speaker
And then ah we put it into our app. Then like my co-founder said, like, okay, now we're going to put it inside Microsoft Word as a plugin. you know The only thing that changes is the entry point, right? Like the base changes, but the component is the same, like nothing changes there.
01:07:27
Speaker
So like I could reuse that component and then add just like, i don't know, maybe 50 lines of ClojureScript code as the base. And then we shipped it as a Microsoft Word plugin.
01:07:40
Speaker
So that was a pretty powerful aha moment for me. And also we had one of these moments, like incidents in the backend API, where like we released something bad and it was the frontend application was like calling an endpoint infinitely.
01:08:01
Speaker
So, and we had nothing to nothing we can do to prevent the front end application because it's a like it's by its nature works offline. So we don't have a way to force it to update. So users need to update it So we needed to isolate that endpoint.
01:08:19
Speaker
So it was like really easy to create just one base in Polar Lit and say, like this endpoint will be called from this base and then commit that commit. And now we have two services instead of one.
01:08:34
Speaker
So two API services running in two different machines. And again, like it took us like less than half an hour to make that split because all the code is already there.
01:08:44
Speaker
We just needed to add a new base And then the endpoint points to that new base. Fraser Cain- So how does the how does the the play of this tooling work with the closure script tooling?
01:08:58
Speaker
Oh, that's a good question. So I mean, I've been hacking it for, i think now like two years almost. And then like we When was it? like I think it was during Christmas time. I was alone at home and Jokki called me. i like Tell me about that little story. Because you were so busy. you were you had your startup working 80 hours per week, where I don't know. yeah And I was asking you for help. yeah And I, okay, now he answers once per week. mean, he's busy.
01:09:32
Speaker
I knew you were yeah really, really, really busy. So then after a few months, I just posted in the Polaris Slack channel. Is there anyone out there that can help me with this front end stuff?
01:09:47
Speaker
but And then, yeah, Perka reached out. Hey, I'm a guy. Like like I didn't know him. yeah Maybe I can help you. I have some years of experience. but I've heard of Paulie Leff. Yeah, I've heard about it.
01:10:06
Speaker
yeah and then i think he understood that okay he needed to step in here and yeah yeah it was it was a good timing because like my wife was away i was alone at home like nothing to do it was christmas time so we sat down with jockey and like we had before that like we had a thing i think if this is a happy or a miserable christmas story by the way you know my wife my wife was away was on my own you know it sounds ah could it It almost starts as like suicide note, you know? Yeah. yeah but But it came good. Okay. This yeah like this is good to hear. Yeah, exactly. that
01:10:43
Speaker
that That was the second option. It's a polythe Christmas story. Okay, come on. heartwarming the top warming yeah Yeah. You're roasting your nuts around the fire. You can call you.
01:11:00
Speaker
but In this case, the ghost of Christmas past, I suppose. Yeah. Yeah. And then... Anyway, yeah. So tell me, yeah. Let's get back to the actual story. Yeah.
01:11:13
Speaker
So there was a long closure script discussion in Polylet repo, like from couple of years... For like two years or Two years so. Maybe three years. I don't know. Yeah. Yeah. yeah It was like some at some point very heated discussion. You know it happens in open source. People become too attached to it, their ideas. Everyone spot a bike shed from a fucking mile away. you know yeah but like all ah Every time we got this closure script question, like our and then people come with solutions, right? Like, we want implement it this way, or you should implement it this way. Oh, yeah. And then and then we we we look at the solution with Jokke and then we see, like okay, this is like and doubling the complexity of what we have already.
01:12:01
Speaker
And like what are we adding in the end? And it's usually nothing And then we're like, OK, we're not going to do this, like this way at least. So we'll do ClojureScript at some point, but not this way. So we postponed it. We discussed it millions of times with different people. But then this last Christmas, it was like, and also I was trying it in production with like um my own tooling.
01:12:25
Speaker
And then like we had this moment where like we realized by just changing maybe like 100 lines of code, we could support ClojureScript. It was like a revelation. Except that I had been working for months for the tooling, all the tooling changes, but the core, I mean, it was enough for use to be useful for furcance. Yeah. What was the essential kind of like, what made the penny drop? What was the specific thing that you saw that, oh yeah, this is the thing that we just need to change?
01:13:03
Speaker
So there was one thing that was like me starting using shadow CLJS, which has depth even support. So it simplifies a lot of things for us because whole polylet tooling is on depth even. Yeah. So that's one thing. The other thing is like, I realized that in the like JavaScript world, um like,
01:13:27
Speaker
you use like NPM or Yarn or whatever tooling. But I realized like Yarn has this concept of workspaces that pretty much mimics what Deps Eden does for Pololet with the local routes and all that.
01:13:43
Speaker
So at that moment, I realized that, okay, like the tooling is there. like We could achieve exactly the same things without changing anything. And then one other thing we saw was like people were too opinionated about like these frontend applications being separate than their backend.
01:14:03
Speaker
think we were also on that track. We were also on that track for a while. So like we were considering like having two directories in the polylet workspace. One is called frontend, one is called backend. But then how do you share code between them? Do you add a common that sounded like you're increasing the depth of the tree And then are you adding any anything that simplifies? this is more like increasing complexity. So like that that moment came when I needed to ah create node backends with our Clojure Circle for some stupid reason.
01:14:39
Speaker
Josh is going to be very upset with you here. yes I am, I'm fuming. Yeah. yeah So it's it's because of laziness. we didn't want to implement this CRDTs in ClojureScript instead wanted to use nodes.
01:14:58
Speaker
So long story, we could have another episode for that. but Laziness I support, i guess. Auto-emerge for the win, basically.
01:15:09
Speaker
Yeah. So we needed ah like we needed components that have like both like Java implementation of the same thing and node implementation of the same thing.
01:15:23
Speaker
ah And then I thought, like oh, if I add a Clojure-C interface to this, they can live in the same component. And then the when you run the REPL, if you run it on JVM, it's going to pick the JVM um one.
01:15:37
Speaker
And then if you run it on Node REPL, it's going to pick the right one. So they can live actually side by side. There's no problem with that. So that realization made it quite easy for us because Yoki, okay, throughout this year, Yoki refactored our codeways a lot. So it was there was just one filter in the code that only accepted CLJ and CLJC files.
01:16:01
Speaker
When we added, like, oh, also add CLJS files, everything was working already. All right, okay. So one line, I love it. yeah Yeah, here here is ClojureScript support. And then I needed to create an example repository to actually show that this works with all this yarn setup and shadow CLJS and all that. And then we refactored the code a bit.
01:16:27
Speaker
um so So because Yoki is obsessed with the CLI tool, like how it prints things. Is a healthy obsession, Yoki, though? I don't know. I'm not sure. I don't think so. Yeah. many Many times I said this is nice to have, but yeah, he doesn't like that.
01:16:50
Speaker
I think actually Perkan needs... small, simple tools. And he doesn't use, he maybe use 1% of that tool, I don't know, or 5%.
01:17:03
Speaker
yeah But a lot of other users, they really, for them, they are, yeah, they use a lot of functionality. Let's skip that, yeah. I use those, but like more like our CI, CD pipeline uses them. yeah And then when there is a problem, they are very useful, like because then you can like understand what went wrong.
01:17:24
Speaker
ah But otherwise, I don't run them on my local. It's just like tests, poly You just write code. Yeah. So that's how ClojureScript support came along. So now we have a way to, you can just like mix both languages in the same repo in the same component. It doesn't matter. You have different components or the same. It was very useful with like our schemas, Mali schemas, because then I can share them with between both backend and frontend.
01:17:55
Speaker
So like it helps with a lot, a lot of things like that. Very nice. I mean, I don't know if you've been, and this is kind of like, ah maybe it's a kind of stretch question, but don't know if you've looked at some of the other like tools that Borkduda has been looking at, like, for instance, Skittle, which is a smaller a smaller kind of to It looks cool, but I haven't tried it.
01:18:23
Speaker
i mean Yeah, yeah. Okay, the reason I ask is because sometimes, especially for relatively simple applications, um the nice thing about Skittle is that it doesn't really have any tooling.
01:18:36
Speaker
you know is that basically you just write your closure script and then it gets essentially interpreted on the fly when it gets provided to the client. And you know if you're if you're kind of thinking about tooling, then...
01:18:52
Speaker
Having almost no tooling is really nice. yeah yeah Yeah. Yeah. Yeah. Polydisk is similar. You can use it without tooling. It's like... Yeah, we that's what that's how we how it started. We used it for a year or so without tooling.
01:19:08
Speaker
yeah Maybe more, two years. I don't Well, I think you're right. I mean, from what you're telling me, a lot of it's conventions. And then, yeah then but obviously it's nice if you can have a tool that will help you to make sure that you're living by the thing you're promising yourself, if you know i mean. Yeah. Yeah. Yeah.
01:19:29
Speaker
Also, ah also like I see it a bit because like whenever we talk about polylet to someone, like we get a backlash. Either like this is not an architecture, and that's usually like a question about the word architecture rather than...
01:19:45
Speaker
um whether it is an architecture or not. we don't I don't care. Jokki ah yoki has a little bit more strong ideas on that. but No, I think it solves architectural problems. how That's what I think it does.
01:20:01
Speaker
And maybe you don't want to call it an architecture. Yeah. and But don't know. Yeah. But like and and another backlash we get is that oh like, oh, these are all the conventions that already exist. Why should I do you pull it? Then i ask them, do you use those conventions in the right way in your code base? No one does it. Maybe you pick one of them, but not the three of them that is actually makes it something.
01:20:26
Speaker
And another thing is, like I think it gives you, ah like but if you use polylet, it gives you a way of communicating about your code base. Because we thought about those words a lot, like what is a workspace, what is a base, what is a component project? So all that, like we literally, we spent months on that. Me, Jokke and James sat down like, should we call that component? There are other things that they call themselves components.
01:20:54
Speaker
And then we ended up like... For example, environment was, we changed from environment to project. Yeah. That was actually an idea from James. Yeah. He's really good at James Trunk. He's really good at gaming.
01:21:06
Speaker
yeah So, I mean, I think you're right. I mean, if you if you basically understand all the conventions that polyleth is implementing, then and you're doing them, then it doesn't cost you anything, I guess, to use polyleth because all that polyleth will do is just help you to enforce those things.
01:21:26
Speaker
So there's no, if you if you already say, well, I already implement all these conventions, say, well, okay, well, but no problemo, you know, go away. If you don't need any help, go away. mean, I guess it's, ah I guess it's at the moment, at least ah in Sweden, it's still optional to use Ployleth or is it? No, they ask at the border control.
01:21:55
Speaker
and Let me check your laptop
01:22:02
Speaker
yeah Yeah, that would be great. But like, I think Sean... Hold on, be careful what you wish for. Yeah.
01:22:13
Speaker
Sean Corfield was like quite against Polalith in the beginning. Like he was questioning a lot these things. And also like, i mean, he is probably he was probably using many of the conventions himself. sorry. Yeah.
01:22:28
Speaker
Yeah, go ahead. there Okay. if you on Yeah. Just going to interrupt because at that time we had the first lining and based version. Yeah. We used symbolic links.
01:22:38
Speaker
That was actually, we didn't like it so much. It worked. The lining and and symbolic links. And I, so I have, I can understand that maybe he didn't like those things. Yeah.
01:22:54
Speaker
But then we rewrote it. Oh, continue, sorry. Yeah, we we rewrote it. And then like we then Alex Miller came in at some point when we rewrote it in Deps Eden. He was like, you're using the two steps wrong.
01:23:07
Speaker
Don't do it. like It was his feedback, pretty much. What what but you're doing, don't do it. We're going to remove it. so If you go to America, it's not permitted to have polygons on your computer. it's like Exactly. yeah but that that I've not allowed.
01:23:29
Speaker
Yeah, there was it that was a good thing that he pointed out that that's the best thing that what you're doing here is wrong, because that made us rethink again from scratch. And then the tool became actually really, really good. in light I was in the middle of two jobs that worked full time. It was more like 80 hours per week for three months.
01:23:52
Speaker
to rewrite that it was issue 66. thirds of the to the magic number.
01:24:03
Speaker
I mean, to change it from ah symbolic links and lining to depth.E. And also before we did that rewrite, I was thinking about what to change, what to fix, what other things to fix.
01:24:16
Speaker
So we cleaned it up. not just it was not just uh like a migration was more like a total rewrite that we fixed all the problems we we identified in that first so we we learned a lot about our own idea could say yeah yeah yeah yeah yeah yeah that's always interesting isn't it to see how the tool evolves like you say from uh the way you're using it the way the tools around you evolving and then the feedback you're getting from the community yeah yeah and like we had the same argument with sean like what is this adding like why should i use and then like we kept saying people like just start using it you will realize it because it was like hard after you you consume all of your arguments it's like yeah just give it a try
01:25:08
Speaker
and You will realize what it is. And he did. like He tried it out. And then he realized like it was adding a lot of value to to their project where where he works. And then he started blogging about like his journey of converting their monolith into a polylet step by step. I don't think it was a monolith. He had many services. they Sorry, like it was a monorepo, but several services.
01:25:39
Speaker
Yeah. yeah yeah yeah so So that helped us a lot in terms of recognition, let's say. Now we have like about 700 people in in the Slack community. That's very impressive. it was I was going to ask you about the community, actually. like what are What are some cool things that you've heard of people doing with polyleth then?
Polyleth’s Community and Corporate Adoption
01:26:03
Speaker
ah may I mean, one of them are using... What's
01:26:13
Speaker
You're my cat. Yeah. yeahra Making a podcast appearance. Is he on skis for some reason? Yeah, it sounds like it. So, yeah, so...
01:26:33
Speaker
Yeah, so one, maybe I can open it. Are you still there? Yeah, yeah, we're here. Or maybe you can talk. for i can Yeah, we can't share screens, though, on this tool. It's a podcast, you can't share a screen. Yeah, people won't see you, Jokko. Yeah, just describe what's on your screen. That'll go well.
01:26:54
Speaker
yeah Read something from the internet. Yeah, I can read something random. is He's asking ChetGPT now, like, generate me project names that use polylids.
01:27:05
Speaker
Yeah, so yeah i want that okay, now i have it. So, for example, ah this I think this was pretty cool, this GreenLabs.
01:27:16
Speaker
They adopted polylids. they adopted policies in 2022 and I have 93,000 lines of code and they are using, they have like 50, 50 Lambda functions. Right. Okay. Yeah. Makes sense. Something like that.
01:27:36
Speaker
So yeah. So I can see here. Yeah. Not really 50, but number we don't need the exact number. Okay. It could be 49, 52. No, so have 52, 51.
01:27:46
Speaker
yeah around fifty two veteran yeah it's important to know it's so important yeah and and your project or I think when you transform when have switch between i mean when you really when you switch to the yeah first you have a code base and then you reuse maybe 70% of the components and build something totally new product with the same same components yeah I mean like we have like More than 300,000 lines now, like both Clojure and ClojureScript.
01:28:25
Speaker
And it's all like polylet components. So that's biggest. we talked like When we came to Belgium for the conference, we talked to several groups of people. they said like they were using polylet and we were like, why didn't tell you you why didn't tell us about this? like We would be very happy if you told us before. so i'm just use all spare time working on this. When I post something, I get three likes sometimes. Yeah, and there was there was like one group of people, I think they were working on a big e-commerce system or whatever, um like with a lot of big, big, bit the big team, they adopted Pololit. And then we didn't hear about this at all beforehand. And then they were like, yeah, we were not allowed to say much about it.
01:29:20
Speaker
It's like, okay. Yeah. Maybe only top secret projects use Polylet. So there might be thousands of companies, actually. just Only the best ones, top secret ones. Absolutely.
01:29:35
Speaker
They're using all kinds of things these top secret guys. Yeah, Sean uses, they have, like I think, um quite a few of dating sites they run. So all of those use Polylet in the background.
01:29:51
Speaker
that So go ahead. No, was going to we should maybe try to wrap up the polyleth discussion now. um Yeah. Because obviously we want to respect the time we've been going for quite a minute. I've just
Benefits of Polylet in Development
01:30:05
Speaker
looked and it's like, holy these shit. Yeah.
01:30:08
Speaker
Yeah. yeah This has been really good. um So maybe, maybe it's what would be the, if you were like pitching polyleth to,
01:30:20
Speaker
someone who's starting a new project, what would be your like top three, let's say, wins from using PyLith versus just starting out ad-libbing, hoc?
01:30:33
Speaker
Should I say something? Go ahead. You can both have a go. It's all fine. For me, it's the development experience. It's just awesome to have a single rep for all your services. You can work with all your services as it is a monolith.
01:30:49
Speaker
And then that you can easily change. You can split up servers into two services very easily. just You just add and an extra base and then you split them up. kind so super You can do things that will take and a week in an hour.
01:31:06
Speaker
i mean, just, yeah. And I think that's maybe. so they One or two is enough, actually. The three is always tricky. The third one is like the third album. You know, it's always the tricky one.
01:31:19
Speaker
i would i would i work i and yeah I would add like one more thing to what you said. It's like the the the mind shift it gives to you. it It's similar to like when you switch from Java to Clojure. gives you a mind shift. This is a big one. Yeah, yeah i think I think so. It forces you to think about your system it it forces you to think think think about your system And then it gives you the communication tools that you can make that thinking, actually. Like when you have those components, phases, projects, and then it forces you think in those terms and those result in better systems.
01:31:55
Speaker
So um I think that's quite important. That's what I saw like in the teams that I worked with Pololet. Because people don't come to you with like, I have this idea, I'm going to write this code or anything. They're coming to you as like, oh, should we should do this component.
01:32:12
Speaker
Or we should split this component into two. Like they start to talk in those terms. Right, right. So the communication
Maintaining a Flat Project Structure
01:32:19
Speaker
between the team becomes a lot more yeah straightforward. Yeah. Yeah.
01:32:23
Speaker
And i don't don't do i think I remember that you said that this also makes you faster. i asked you, how how much faster are you with polylists with a code base that have like one or two or 300,000 miles of code?
01:32:36
Speaker
And you said you thought you were like twice as fast. Yeah. I mean, yes that's it's all always, you know, subjective. Some number of percentage is more efficient because you can reason about the system more easily. Exactly. Because of that, it becomes easy. Even in the front end, like I've seen a lot of like TypeScript code bases, like even finding where a specific component you see on the screen becomes very hard. Here it becomes much easier because it's much easier to look where
01:33:08
Speaker
where in the code base and then like like isolate that component and then you know the the functionality is there. So then you can start whatever you need to do right after that. So I think that increases the speed.
01:33:25
Speaker
ah think that is the good thing with like what you get with spinning up your code base in many its services. That's the benefit. You have just one thing you work with. But here you have something yeah to have something smaller you go into and you only need to think about that. And these are like much smaller pieces compared to those services.
01:33:46
Speaker
And also it's much simpler. like It's just like one directory of names that you need to scan through. It's not like a tree or anything. It's just like one single depth.
01:34:01
Speaker
Right, so it's quite a flat project. of Yeah, it's flat. emphasissis yeah like we We got like so many requests in the repo about making that not that flat. We always say no to those requests. We don't want to change that. like It's so simple
Preferred Coding Editors and Tools
01:34:16
Speaker
as it is. Why do you want to make it complicated?
01:34:20
Speaker
That's such a Swedish attitude. You know, everything has to be flat. We have no hierarchy. and Exactly. It's a flat pack system. yeah Yeah, exactly. Yeah. Well, like that that's a brilliant explanation of VK actually, Ray. I never put two and two together. Of course it has to be flat pack.
01:34:39
Speaker
yeah um Yeah, but it's ah been really cool talking to both of you and we really need to have another closure meetup in Stockholm. It feels like it's been a million years, but um yeah, it would be really nice to meet both of you in person and we can... ah talk about polyleth more and you can yell at me for not using it.
01:35:05
Speaker
yeah Yeah. So before we let you go, though, there is a a really important question that we haven't gotten to yet. And that is, of course, like, Thurkan, are you using Emacs some other shit?
01:35:21
Speaker
Yeah, some other shit is my answer. Nope. Oh no. Yay! Which other shit do you dare reveal? I'm on Kama.
01:35:32
Speaker
let's good that' Not quite the good one, but okay. Another another Swede. you know and another You're just addicted to the Swedish tech product, I see. yeah ah What about you, Joke?
01:35:45
Speaker
I use some other shit. I use cursive. Yay! ya One for the cursive teams, yeah. And I take that because I have been working with Java so long and I use Cursive.
01:35:59
Speaker
But it's pretty... It's worked well for me. I think all the people I know, the the people that come from a Java background, they've almost all used IntelliJ and then Cursive is our sort of... We're cursed to use it, literally. you know I think that's where you got the name from. Yeah.
01:36:19
Speaker
yeah But yeah. Good. Sorry, Josh, you lost every single time this time. I'm definitely going to try Polylyth next week because ah they've they've got great editor choices as far as I'm concerned. I don't know about that. See, I don't need Polylyth because I have VMAX. Yeah. Yeah.
01:36:42
Speaker
yeah yeah lord Ray, you can do Vibe coding next week with HoloLit. Oh,
Clojure's Composability and REPL Benefits
01:36:50
Speaker
wow. Yeah, definitely. ah probably is the only time I will ever use Vibe coding. So yeah, fair enough.
01:36:59
Speaker
okay ah No, but ah maybe ah we should like finish up with ah what a kind of other, but maybe it's one of the, because we talked a little bit about the the tools, the community and all that kind of stuff, but maybe it's one thing that, and your journey to Clojure, but maybe a sort of wrap up thing is like, what what do you what do you like still really find interesting and exciting about Clojure itself? Hmm.
01:37:36
Speaker
Take your time. Anyone can chime in. you know I think when for me it's because i sometimes i need I have to work with other languages and then i it's the rep always the REPL.
01:37:51
Speaker
we Working with a language without the REPL and and you don't have that fast feedback loop it's just a pain. So I think it's the REPL that is always my the best with closure.
01:38:07
Speaker
Yeah, but like what gives you that excitement? Like what's, what's going to be the next and closure? If that's the question, I would say like, no, no, no, it's like sometimes you just you just kind of like,
01:38:20
Speaker
you get surprised and delighted by by a particular way you've solved a problem or you know that it would be hard to solve a problem in another language, but you kind of like, you, you like the fact that you did this refactoring with CLJS, know, you just like, Oh, it's just a one liner. And then bam, it's sort of fixed. Yeah.
01:38:38
Speaker
Or like when you're refactoring your CLI tool, Joachim, over the sort of like 12 months, maybe you suddenly think, oh yeah, actually, if this was in another language, this would have taken, I would never have done it even. you know Yes, what I think, what Clojure does is that it separates, ah yeah or or or what what it does is that it separates data and it uses mutable data and functions.
01:39:03
Speaker
And this is really important because then you can put things side by side. they can just let your flow. I think so i think that's what polys also do with components, but that's another story. But I think that's what I what i like the most also. I accept the record, but it's the simplicity. It's that everything is separated.
01:39:31
Speaker
from start. And that's also composable. I think software should be composable. now i i had I had to look into this Golang code recently, and then like not being able to see that data is really the big, big thing, I would say. like You can't play with it. You can't mold it like right away. I mean, REPL helps there. But I think why REPL even works is also like we operate on the actual data, not something wraps it that hides it away from us.
01:40:09
Speaker
so yeah i mean just ah know just to sort of ah and but For my thing, it's like JVM21 where we can essentially get rid of most of async code. Like you were saying the beginning, Joachim, relying on the VM might not be a bad thing. It turns out to be a very good thing. you know they've They've improved something. They've made life easier for us. And now, suddenly, we get we get kind of like thread stalling on I.O. for free, which to me is like, oh, yeah, this is super awesome. you know It's not
Encouragement and Conclusion
01:40:46
Speaker
really a closure thing as such, but but the fact that we're in the environment makes it um suddenly everything just becomes more straightforward again. Yeah, it was a good choice. I think you did it on top of the J.J.M.
01:41:05
Speaker
All right, cool. Well, thanks very much. And, well, I mean, hopefully people in the audience will either, you know, shout out that they love Poyalith or give Poyalith a try.
01:41:18
Speaker
And it's been a fantastic conversation. Thank you very much. Thank you. Thanks, guys.
01:41:28
Speaker
Thank you for listening to this episode of Deaf Anne. And the awesome vegetarian music on the track is Melon Hamburger by Pizzeri. And the show's audio is mixed by Wouter Dullert.
01:41:40
Speaker
I'm pretty sure I butchered his name. um Maybe you should insert your own name here, Dullert. Wouter. If you'd like to support us, please do check out our Patreon page. And you can show your appreciation to all the hard work or the lack of hard work that we're doing.
01:41:56
Speaker
And um you can also catch up with either Ray with me for some unexplainable reason. You want interact with us, then do check us out on Slack, Clojurian Slack or Clojurverse or on Zulip or just at us at deafenpodcast on Twitter.
01:42:15
Speaker
Enjoy your day and see you in the next episode.
01:42:53
Speaker
Valter will go and, you know, start the podcast at the appropriate time, which is not always when we ask him to. Sometimes he just picks a different time just for fun. His fun, I think, our misery.