The Changelog: Software Development, Open Source - Clojure, ClojureScript, and Living Clojure (Interview)

Episode Date: August 29, 2015

Carin Meier joined the show to talk about Clojure, ClojureScript, her book Living Clojure, all the fun things she loves about math, physics, and creating a programming language....

Transcript
Discussion (0)
Starting point is 00:00:00 Welcome back everyone, this is The Change Log and I'm your host Adams Dekovac. This is episode 171 and on today's show we're joined by Karen Meyer, the author of Living Closure. She's also known as GigaSquid on Twitter, GitHub, and pretty much everywhere else on the interwebs. She's speaking soon, if you're going to be at Strange Loop, talking about chemical computing, a very interesting
Starting point is 00:00:33 conversation we had on this show today. She's also the author of Babar, a little language for machines with speech acts. We have three awesome sponsors for the show today. CodeShip, Imagix, and DigitalOcean. Our first sponsor for the show today is CodeShip launching a brand new feature called Organizations. You've heard me mention it before. Now you can create teams, set permissions for your teams,
Starting point is 00:00:57 and improve collaboration in your delivery workflows. Maintain centralized control over your organization's projects, as well as your teams with this brand new feature. And we want you to save 20% that's huge off any premium plan for three months by using this code, the changelog podcast. Again, that code is the changelog podcast. Head to codeship.com slash the changelog to get started. And now onto the show. All right, everybody, we're back today.
Starting point is 00:01:32 We got Karen Meyer. Jared, we set up this call through Twitter. How crazy, right? It's a crazy world out there. Crazy world. So what was going on to invite Karen onto the show? Probably just my interest in Clojure. And I came across Karen,
Starting point is 00:01:50 I guess I came across her on the ThoughtBot podcast over the summer at some point. Nice shout out to them. And then somebody retweeted her or something like that. And I said, oh, that face is familiar. And then I checked her bio. I was like, oh, she should come on and talk to us about Clojure. And that was kind of the genesis
Starting point is 00:02:05 of it. Well, I'm happy to be here. Very gracious of you to respond so quickly and be so willing to come on. We appreciate it. Yeah, absolutely. So Karen, I guess maybe an easy way to start would be, I think your bio says a bit about you being starting in ballet and then physics and then ultimately in software development. But when someone asks you kind of who you are, what's your response? Yeah, well, I usually just say I'm a Clojure developer because that's what I do every day and I quite enjoy it. And yeah, I guess that pretty much just sums it up. I got to it from a very windy path, like many people. So I started, I was a professional ballet dancer for a couple years right out of high school.
Starting point is 00:02:51 And that was really cool, and I really enjoyed it, except for the starving artist bit. Right. Which got a little bit old, like sleeping on floors with mattresses and cockroaches and things like that. So I decided maybe going to college would be a good idea. Very pragmatic choice. Exactly. So when I was in high school, I really, I liked physics and math. And in particular, I had a really nice role model for my physics instructor. She was an awesome woman. And so I was super impressed with her. And there was this one moment that I always remember in physics that kind of I always went back to.
Starting point is 00:03:33 I don't know if you did this sort of experiment in school where you kind of line up ramps that marbles can run on. And then you kind of measure everything all out and you predict where the marble will land in a cup. And like I did all the math and everything and release the marble and it landed perfectly in the cup. I was like, wow, this math physics stuff is awesome. I had a similar experience recently at the science center where they had this ramp where you can roll balls down it. And if you put it at certain intervals with, you know,
Starting point is 00:04:10 with, you know, basic multiplication, you can determine what, um, what key it would hit, which would make a certain tone and each key down the line got bigger. And it was like two,
Starting point is 00:04:20 four, six, eight. And, you know, you did the square root of things and that would determine where you would put it at on the ramp. And that, I that i mean similar that kind of blew my mind yeah yeah i never had such a great experience maybe that's why i didn't like physics because i didn't have
Starting point is 00:04:34 this awesome moment in life why was it amazing that you can do the math and be like we'll put this here and you're gonna hit that key there and you know's amazing. There's a great video of a college professor, I think it's a physics professor, who I think he sets up like a bowling ball on the end of a chain or something. I may have the objects incorrect. But he does all the math like you just described, Karen, and he actually swings it from a location at his own face.
Starting point is 00:05:01 And like he's going to die or be like seriously injured if the math is wrong. And it's a great learning moment learning moment you know for the class and that's a i saw that on the internet but yeah i never had such a a great moment in physics so that that that that told you that you love math basically yeah yeah so that kind of was a catalyst of where i wanted to say to went back to um college i i studied physics and really, really liked it. And then I kind of fell into computer science after that. But I have to ask you if you ever – I don't know if I'm completely weird, but like whenever I am taking off on planes, you know, like right at that moment where you just – the plane is going really fast and you just start taking off, I always say to myself, yay math.
Starting point is 00:05:44 Yay math. I do. Because it's so incredible. I to myself, yay math. Yay math. I do. Because it's so incredible. I'm like, yay math. Well, yeah, because they got to get to a certain speed by a certain distance to actually lift off. And somebody did the math right. I know.
Starting point is 00:05:57 Hopefully. Yay math. Sometimes it doesn't work. That's cool. So do you really like, do you kind of whisper it a little bit or is it just kind of like an inner voice? I'd say it like an inner voice because otherwise people start thinking that you're crazy. Don't say it to the person sitting next to you. What?
Starting point is 00:06:13 Well, that's a good conversation starter. Yay math. And then you kind of go into who you are, what you do. Yeah, I guess it could be. Oh, have you read this book, The Martian? I'm like halfway through it right now have you heard about this no so they're making it into a movie um with matt damon yeah yeah yeah and like september october and it's fabulous i mean if you like uh like space stuff math
Starting point is 00:06:40 engineering it's just fabulous so it's it's a retelling basically of Robinson Crusoe on Mars. Like this engineer, he gets strained, or astronaut, he gets stranded there in strange circumstances of events, you know, as crew thinks he's dead. But he's really not. So he has to use all his engineering skills and everything else to like survive on Mars. And it's a total math and geek fest and it's fabulous. So is it really, he's really on Mars then? Yeah. Yeah. He's really on Mars. Wow.
Starting point is 00:07:11 Yeah. So I totally recommend it. I'm sorry. So it's not a true story. Is that what you're saying, Jared? I had to point that out. Right. I just needed to bring us back to reality there for a second. Well, that's why Clarified is he really on Mars. Right.
Starting point is 00:07:30 But I like it. I'm a Matt Damon fan. I'll check that out. I think it's a Ridley Scott movie, too. Oh. See, we just talked about Ridley Scott two shows ago with Prometheus. Yeah, see, he's fallen from grace a little bit with me, although Adam liked Prometheus a lot. I liked the name Prometheus.
Starting point is 00:07:43 What about you, Karen? Do you like Prometheus uh i did not see that so let's have to put that on my list yeah put on your list it's definitely just one of the two home theater if you have home theater do it on home theater don't just watch it on anything just home theater it if you can. Okay. Anyways. Well, cool. So we got to learn a bit about ballet into physics and some of the appreciation you have for math and whatnot. So at what point did you start getting into software development and what was that like for you? Yeah. So I kind of got into software development doing physics. I started programming in Mathematica, doing computer simulations of some simulated annealing. And that was super interesting.
Starting point is 00:08:32 So after I graduated, there was a lot of opportunities for software developers. And they were looking for people in just general science fields. So I just kind of fell into it that way, and I discovered I really liked especially the feedback of programming. I mean, if you think of a lot of the science experiments, you don't have the fast feedback a lot of times. But in software development, you definitely do, and it's a bit artistic too, which I really like.
Starting point is 00:09:03 So I did Java programming, Ruby programming, and then I met Clojure. And I just kind of fell in love with Clojure. And I've been lucky enough to work in it every day for the past almost two years. So I'm extremely happy. I still like it. Well, we definitely want to ask you about Clojure. That's kind of the thrust of this call. But before that, I also want to ask you about your internet handle
Starting point is 00:09:30 because it's quite unique. Gigasquid. Yes. It's like one of these things that you see it and you can never forget it. But can you tell us the genesis of that? Okay. So this is like way back in the day. I don't know if you remember this when there was a thing called AOL.
Starting point is 00:09:47 Yes. AOL chat. Oh, yes. So I was working at a company, and during lunch, we would all like play Half-Life together. And so my Half-Life avatar was, player name was Squid. So we signed up for AOL Instant Messenger and I put in Squid as my name and it was taken.
Starting point is 00:10:10 I was like, darn. So then I put in MegaSquid and MegaSquid was also taken. So then finally GigaSquid was not taken and that's who I was. GigaSquid was not taken. And that's who I was.
Starting point is 00:10:26 GigaSquid was born. Mm-hmm. Well, that's much better alternatives. Usually people just throw like the year they were born at the end. Yeah. And it's like that's always kind of dorky. So I think you did a good job with the prefixes. Thank you.
Starting point is 00:10:39 And you've held that handle for a while then too because, I mean, AOL messages. AOL days. That's forever ago. Yeah, yeah yeah 20 years maybe I haven't actually yeah I haven't actually been on there for a really long time but it was born there so gotcha awesome well let's get back on the closure here a little bit you fell in love um you've been working with it for two years, it sounds like. What was it about the language in your experience that turned you on so much? Yeah, I guess I've been asked that before, and I never got a chance to study Lisp in college.
Starting point is 00:11:17 So I don't know whether it was kind of Lisp that I fell in love with or Clojure. But I mean, Clojure gives you access to JVM and Java Interop and concurrency and all that. So I mean, it's pretty sweet. But the simplicity of the language really, really appeals to me. So I guess maybe I put the cart before the horse a little bit, maybe back up a split second and give the summary of Clojure. We've already known it's a programming language, and like you said, it's kind of a lisp. Can you just kind of give that overall summary?
Starting point is 00:11:55 Sure, sure. So yeah, Clojure is a lisp. So that means it has all these parens. And the parens sometimes scare people away. But it really, you've just got to like not panic about the parens. They kind of go away after you work on it for a while, especially with an editor that does matching and automatically inserts it for you. They just, you know, it's fine.
Starting point is 00:12:31 So it's a Lisp on the JVM. That's the main language. It's a dynamic language. It's got Java interop. And it has immutable data structures that is really nice for concurrency. And also with an area that's really hot in Clojure land right now is ClojureScript, which ClojureScript is a dialect of Clojure, but it compiles onto JavaScript. And JavaScript, as you know, just goes about anywhere nowadays. So there's some really exciting advances in that. I mean, it's hard to keep up with. They just, more stuff's happening every day. Yeah. So, I mean, just to generalize a little bit and feel free to correct these generalizations,
Starting point is 00:13:12 but, you know, you kind of have this divide in programming languages between object-oriented and functional. The Lisp language, you know, the Lisp kind of tree of languages have always been, maybe not, not always is a bad word, but have kind of had the reputation of being more academic, niche. There's always people that love Lisps and will always hop into online conversations and tell you how much easier it would be to do in Lisp. But overall, object-oriented has been kind of the dominant paradigm
Starting point is 00:13:46 over the last 20 years in programming and yet Clojure seems to be super popular so speak to that maybe yeah so I think that's a combination of things and I think that's because Clojure has a really practical side as well it's really concerned about getting the job done and being able to interop is an important part of that. And being able to run the JVM is like huge, right?
Starting point is 00:14:16 And also there's just really a lot of energy, a lot of innovation in the community, and it's a really kind community, just a lot of great people. So I think that really has helped its success. And also, you know, Rich Hickey is pretty brilliant. So having him guide our language is really great. I was on a project that upgraded from one version of Clojure to the other, and all I had to do was change the version number. It was totally stable.
Starting point is 00:14:55 Everything was compatible. And that's really unusual in other languages, right? Yeah. So they're really focused on stability and making sure that there's backwards compatibility and the language is moving in the right direction. Speaking of Rich Hickey, I think, Adam, we have to do a little bit of a shout out
Starting point is 00:15:16 to Devin Walters. Yes, have to. Yeah, so Devin Walters is a Clojure guy who contributed to the changelog back in 2013. And he wrote one post for us. And it wasn't even a guest post. It was like he was going to come on and be kind of a more regular writer and life happens and whatnot.
Starting point is 00:15:35 But he wrote a post called Rich Hickey's Greatest Hits back in September 16, 2013, which is really just a list of five or six awesome Rich Hickey talks. And that one post was probably the most popular post of the year for us or at least one of the talks. I would almost say all time. I would almost say like, I'm guessing here, but I see so many shares. It's always on Twitter. Like it gets recirculated and people find us because of this. Yeah. Years later,
Starting point is 00:16:06 even I wouldn't, I would probably say it's probably the top all time post of the change log. Devin's a great guy. I actually, I worked with him, um, about, yeah,
Starting point is 00:16:15 a little bit ago too. So he's, he's a great guy. Yeah. We're after that post, we're like, Devin, you're going to write some more stuff.
Starting point is 00:16:23 Yeah, you should. He's a smart guy. Yeah, we'll link that one up in the show notes. It's kind of become a classic. And yeah, Rich Hickey gives great talks, great presenter, obviously a very smart man. And seemed like he kind of invented Clojure almost in a vacuum. Do you know any of the history of the creation of the language? I don't know his personal, like how he came to it all.
Starting point is 00:16:48 I know that he did work on it just solo for quite a bit before it was presented to, I think, a mailing list. And then everybody was like, wow, this is really cool. You know, can I help, you know, make it better. So then he had, you know, a few people just really help put a shine on it and bring it to the first version, real version. So. Very cool. Well, let's get back to the language a little bit. And one thing that you mentioned was that you said it runs on a JVM, and that's huge, I think is what you said. Why is that such a big deal? and what it does now after years and years that it's just great to be able to run on that sort of platform. And you can see that with the explosion of languages that are running within
Starting point is 00:17:55 that ecosystem right now, like Scala and, you know, JRuby and Groovy and all the other ones. Right. Yeah, and I think that because there are so many Java developers, so many people that are familiar with the JVM, not only is it like production ready and hardened and has all these years of, you know, mind or thought put into it, it's just also kind of a comfortable, you know, kind of a, not a relaxing, but just a non-confrontational. What's the word I'm looking for here, Adam?
Starting point is 00:18:29 It's just an environment people are used to. Where if they're going to be switching the way they think about programming from an object-oriented mindset to a functional mindset, which Clojure asks you to do if you're coming from the other side. It's nice to have at least something that's familiar. I think you're thinking expectations. The expectations of working on the JVM are as such, and because of that, you can operate in more of a comfortable, calm manner than maybe chaotic that you see in the craziness that is open source these days, which is the next newest, hottest thing, disrupting the newest, hottest thing from yesterday.
Starting point is 00:19:05 Yeah. source these days, which is the next newest, hottest thing, disrupting the newest, hottest thing from yesterday. Yeah. Plus, don't you have access to all of the libraries? You do. Yeah. Yeah. There's full Java interop that's, for the most part, wrapper free. So it's very comfortable to work with other Java classes and libraries. So, yeah, I mean, if you're looking for kind of a low-risk,
Starting point is 00:19:34 kind of try it out, you can either carve off a little section and just add a jar and try it there, or even in your tests. You can just write some tests in Clojure and see how it goes. So there's lots of ways to introduce it to your team and get used to it when you could just write some tests in Clojure and see how it goes. So there's lots of ways to introduce it to your team and get used to it when you can just say, oh, well, let's just add this jar. Yeah, I mean, it sounds like a nice way to ramp up adoption as well as allowing people to dip their toes in the water as opposed to, you know, completely jumping off or into the pool, so to speak. Right, right. Awesome. Well, I think we do want to ask about popular use cases,
Starting point is 00:20:11 like when Clojure makes sense, when it doesn't make sense, like what is being used for the types of software that you can build with Clojure. We do need to take a sponsor break. So let's take a minute here from one of our awesome sponsors, and when we get back, we'll talk about what are the best times to actually use Clojure. We'll be right back. ImageX is a real-time image processing proxy in CDN, and let me tell you, this is way more than ImageMagick running on EC2. This is way better. It's everything your friend and developers have
Starting point is 00:20:41 dreamt of. Output to PNG, JPEG, GIF, JPEG 2000, and several other formats. And if you're like me, and you've ever argued with your boss or a teammate about serving retina images to non-retina devices, you'll appreciate their open source dependency-free JavaScript library that allows you to easily use the ImageX API to make your images responsive to any device. Now all of this takes a platform and the ImageX platform is built on three core values. Flexibility and quality, performance and affordability. When it comes to flexibility and quality, ImageX has over 90 URL parameters that you
Starting point is 00:21:22 can mix and match to provide an unlimited amount of transformations that you need for your images and they take quality very seriously and because of their commitment to quality several top 1000 websites in the world trust them to serve their images now when it comes to performance imagix operates out of data centers filled with top of the line Mac Pros and Mac Minis and they're set up for a completely streaming solution. This means your images never hit the disk. Images are served by the best SSD based CDN for delivery around the world anywhere extremely fast. And while we're talking about speed, almost all the image
Starting point is 00:22:03 processing happens on GPUs. This means transformations are super fast when compared to competing virtualized environments. And lastly, it's all about affordability. Everyone wants to save a buck. That's how the world works. Because ImageX processes close to a billion with a B images per day, they're able to make certain optimizations at scale and pass those savings onto you to learn more about imagix and what they're all about head to imgix.com once again
Starting point is 00:22:34 imgix.com and tell them adam from the changelog sent you all right we're back talking about closure with karen meyer and we're interested in Clojure for a few reasons. First of all, I'm an object-oriented person. At least I have been. I'm very interested in functional. I tend to write more and more these days functional style inside of my object orientation, probably a lot thanks to Gary Bernhardt and some of his influence on me. But also because it seems like it's very useful in production applications.
Starting point is 00:23:08 And so I'm curious, like, what are some awesome use cases for Clojure? How is it being used out there in the wild? And maybe even on the flip side of that, like, when is it not a great idea to reach for the language? Sure. Well, I mean, Clojure is a general-purpose language, so it's good for lots of things. Where it really shines is when you have to deal with concurrency because you have a very composable, simple language. It's functional and you have immutable data structures and that really just lets you handle concurrency very nicely.
Starting point is 00:23:48 So as a result, you can see a lot of big companies like banks and financial and retailers. It's had a lot of adoption lately. If you go to Walmart and you get a receipt from Walmart, your receipts are all going through a closure program. Isn't that cool? That's so crazy. Yeah. So it's out there and people are using it in lots of places. Big companies, startups, just everywhere. It's in the places you may not expect it then.
Starting point is 00:24:30 Well, yeah, like I said, it's general purpose. So you could just really use it anywhere. I just love the idea of this invisible infrastructure that so many people don't have to care about. And even though we have so many problems with software and security and there's tons of leaky abstractions out there. There's a lot of stuff that's powering, you know, businesses and communities around the world. And most people don't even have to have any clue that there were seats from Walmart are coming through Clojure.
Starting point is 00:24:57 But yeah, exactly. That's pretty cool. Yeah, the kind of nice thing too, is now with closure script you can have closure on the front end and on the back end too so you just really have a single language that you're working with which um it's kind of nice for me you know when i'm developing i don't have to go and switch to javascript or you know copy script or or anything for the front end i can stay within the the same ecosystem so closure skip does that work pretty much just like any other transpiler would work? Yeah. It uses the Google's, and this is the unfortunate name,
Starting point is 00:25:33 uses Google's Clojure compiler, but it's like C-L, then S-U, but it's Clojure and Clojure, which is unfortunate naming. Namespace collisions. Yeah, not cool. Yeah. But yeah, I think it's good for just about anything where you wouldn't want to use it. I could only think maybe embedded, you know, where you have really a small footprint because the JVM is pretty large.
Starting point is 00:26:01 Although that's changing now, you know now with ClojureScript and JavaScript. So if you can get small enough to put JavaScript on there, you can probably get small enough to put ClojureScript on there as well. What about the receipt application that you can think of as an outsider? Why do you think they chose Clojure over, say, another way to do reseeding for Walmart? Is it because Walmart is a Clojure company, or is it because that was, you know, one of the main languages their programmers use, or is there a reason why that was the best fit for it? I can't talk to their reasons. Or maybe not their reasons, but like something in that scenario, like that kind of scenario. Why does Clojure really fit that kind of scenario? Yeah, well, I mean, it's a JVM, right? So you're running a lot on the JVM. And then again, current currency that you're doing
Starting point is 00:26:50 things effectively, and then it's less code, right? I mean, with Clojure, it's really concise. So you have less code to maintain. And you can compose things and break them up very nicely. So it's a nice place to be, I think. How about readability? Aside from the parentheses, let's just assume we can get over the parentheses, which I think I probably can get over that. But at the same time, maybe just because it's foreign, but, you know, the order of the arguments is flipped, I believe. Yeah. Isn't it pretty strange to read, at least at first? Well, maybe at first.
Starting point is 00:27:36 But I think once you get used to it, then it's like really a really simple syntax, right? I mean, what comes first? It's always, you know, the function or the operator, and then all the other stuff is afterwards. So it's, it's very beautiful. And it's like, this is the thing that comes first all the time. I don't really need to think about it. So yeah, I think that actually improves its readability. It reminds me of Adam, when we were at Space City JS last spring I don't know if you remember this but there was a talk about how they built Tetris in ClosureScript
Starting point is 00:28:08 Do you remember that talk? I do, yeah Pretty interesting and we were sitting way in the back so we couldn't see the slides very well but it was cool because he showed how after they had built this foundation of these functions in ClosureScript a lot of the features that they needed
Starting point is 00:28:24 fell out of the fact that the language is designed in such a way that adding additional features later on was very easy and they almost got certain things for free. And he was showing different code blocks and he showed the changes from one slide to the next to add the next feature. And the feature would be like when the row gets complete,
Starting point is 00:28:44 like wipe out the blocks of that row. And I was so far back that I could only really see the shape of it. I couldn't read any of the code. But it had this very, I don't know, it was like an attractive shape. You know, sometimes you can just look at a program from far away, kind of do the squint test. Yeah. And you can tell if it's like poorly factored or not.
Starting point is 00:29:02 Exactly. And this, even though I couldn't understand it from Latin or from Hebrew, it looked really nice. And I wonder if that's appealing to you or if it was just because I was so far away. No, I'm sure that's a part of it. I mean, it's just, you know, you get the joy factor of working in language too that you find pleasing. Right. And, oh, we haven't talked about the repl yet like the repl is like a huge part of it uh so the the repl stands for redevelop print loop but it really it
Starting point is 00:29:33 allows you to just interactively i like to think about it as like sculpting your code like you can just get in there and get your data structures and just manipulate it and get like super fast feedback. And you can even poke at running code and explore it that way too. So the REPL is an incredibly powerful feature that just kind of really aids your development. I think it speeds it up. So yeah, that's a really important part of it too. Very cool. Uh, one thing I was going to ask is when you, you mentioned kind of sculpting your data in the REPL, one thing about functional programming and some of this could be my lack of understanding. So feel free to like educate as well here.
Starting point is 00:30:18 Um, I will not be embarrassed if you educate me here. Um, it's like you're just kind of passing around this bag of data through these functions. And I'm down with transformation and like chaining and all that. But it seems like it seems like you could benefit from structure around that data, you know, some from some object orientation. Do you miss that ever inside of Clojure? Or is it just kind of like once you get used to it, you're just used to passing bags of data? And is that even correct that you do that, kind of just pass what I consider a hash or like a key value? Yeah, yeah.
Starting point is 00:30:52 I mean, it's all based on those data structures and like a map data structure and like a vector data structure. Those are core. You do organize your functions, and you organize them usually by namespaces. Okay. So you can almost think about the way that you'd maybe organize objects. You'd use kind of namespaces for two. You keep groups of related functions in a separate file or a namespace and then include them in whatever you're working on. So, yeah, you can definitely organize your code so it's not just plain functions everywhere.
Starting point is 00:31:33 You mentioned the community. You said it kind of has a great community. Can you dive into that at all and give us some more detail? Yeah, it has a very vibrant community. In fact, there's a Slack channel now that just started up. It used to just be IRC, but somebody opened up a Slack channel. I think it's called Clojurians.slack.com. But I think it's got almost pretty much 2,000 people from like around the world. That's fabulous. You know, there's all sorts of different channels for different people's interests. You know, if they're in, um, you know, England or Russia or wherever, sometimes by a geography, sometimes by interest, if they're into a closure script or to atomic.
Starting point is 00:32:17 Um, but you know, it just brings everybody together and, um, talking and sharing hints. There's all sorts of interesting libraries that are being created every day. Let me see, there was one that just came out the other day that was really cool. Somebody put out a couple screencasts called Perens of the Dead. Wow. So it was creating
Starting point is 00:32:46 a closure script game. He'd only done a couple screencasts yet, but I watched them and they're fabulous. So he kind of codes it all as you're watching through Emacs and the REPL and closure script and everything. So I think it was
Starting point is 00:33:01 the first video was probably about 15 minutes. And the second one was 12 and he pretty much had like this working closure script game. It was awesome. We got to find that one, Adam and link that thing up. Yeah.
Starting point is 00:33:13 Friends of the dead. What do you know about the meetup communities and, and conferences out there for closure? Oh, well there's a lot of good ones. Um, so closure conch is coming up in November. So that was actually the first Closure Conference. And after that, there have been all sorts of other ones that have sprung up. There's Closure West for the West Coast. And now there's Euro other ones. I'm forgetting their names, but some more and more are coming up with popularity. And so that's great.
Starting point is 00:33:50 There's local community groups everywhere. I help run one in our local city, Cincinnati, Ohio. I help run the Cincinnati Functional Programmers Group. And that's a great group of people too. Oh, and there's one coming up too. Strange Loop. That's not just Clojure, but it's a lot of different languages. But Clojure has a strong contingent there as well. But it's a fabulous conference. I guess while we're on the note of Strange Loop,
Starting point is 00:34:19 might as well mention your awesome talk, Chemical Computing. Yeah, yeah. So that's the one I am going to be talking about when coming to Strangelove. So yeah, chemical computing, kind of a strange thing. So I'm actually really excited that the talk had accepted because it's the idea that came from papers that I found in a book that was entitled Unconventional Programming Paradigms. So right off, that really appealed to me. That would just scare me. So you can tell we're different people.
Starting point is 00:34:58 I'd be like, oh, scary. Put it away. Yeah. Yeah, so I really like to be able to step back and kind of approach problems that we take every day and just think about it in a completely different way. I find that really interesting. So what chemical programming is, is it's not actually programming with real chemicals, which, I mean, that would be super cool, too. But that's not what it's about. It's about, it's about abstract. Um, so you're using the kind of the metaphor of a chemical reaction to do your programming with. So, uh, it would be, you kind of think, so if you can take the example
Starting point is 00:35:41 of, um, like calculating a max, like, uh, max, like a max of some numbers, right? Right. You can think of, we'll say, two numbers, like five and three. You can think of as molecules. And when these molecules react, they react according to a certain rule. And to find the max, the rule is if you have a five and a three, two molecules, you're going to return two new molecules that are the same number as the biggest molecule that you had in. So a 5 and a 3 would react and return a 5 and a 5. And basically you just do this with a big, you can just imagine like a big list of molecule numbers from 1
Starting point is 00:36:37 to 100. And then you mix them all up and you divide them into pairs. And then each of those pairs reacts with one another. So it becomes two more numbers. And then you mix them up again. Until you just have one number. And then you do the same thing. Right. And then as they react with one another um you will eventually and this
Starting point is 00:37:09 is the tricky part because you don't really know when yeah you will eventually get them all to be the same number which is the maximum so you can take a quote measurement which would can take a, quote, measurement, which would be take a look at all these number molecules and say do a distinct on it. And you should have, you know, the number 99 or, you know, 100, wherever you ended up calculating the max from. And you'll have your result. But, yeah, so that's the tricky bit, trying to figure out where to end. But the kind of awesome thing that I found kind of experimenting with it and doing things that way is that this model really allows you to just turn concurrency up to the max. Because there's no sequences in there. There's no sequentiality. I can't talk. There's no prerequisites's no, no sequal, sequentiality.
Starting point is 00:38:05 Can't talk. There's no prerequisites for these two to do anything. Yeah. And if you think about it, like we, as programmers, like we iterate over loops and do so much stuff in sequences, like all the time. If you would just think about how you normally calculate a max that you just realize, wow, there's other ways to do it. I don't really even need to do stuff in order like that. So it's kind of an interesting way to think about it.
Starting point is 00:38:33 And that's kind of what nature does, right? Nature doesn't line everything up and put it in a loop and process it all. Well, maybe if you think about time, you have a 24-hour loop and just kind of keep going every day. It's a random day. No, I like that. It seems like a whole different way of thinking about things. And is the purpose of these types of exercises is to just basically kind of get us out of our rut of thinking about solving problems in the same way?
Starting point is 00:39:02 Is that what you're trying to do with this talk? Yeah. And also just spreading the knowledge around of another way of thinking. I think when you have cross-fertilization of two different fields, like computer science and biology or nature-inspired solutions. That's an area where you have a lot of new ideas and research and innovation. All the papers that I got all this information from right now, all the ideas are just in research right now. So there's nothing in the wild that has been used, but there could be, right? So this is kind of putting the knowledge out there and the seeds in people's minds and what might inspire them to think about this in a different way. Maybe that'll help them solve some sort of concurrency problem that they're having. Who knows what it might spark.
Starting point is 00:40:08 So that's the exciting part to me. Sounds like there's a little bit of a pattern here because not only do you have this upcoming chemical computing talk, which by the way you have a nice rundown on your website. We'll link that one up in the show notes to those who can't make it to Strangeloop this year. But you also have a programming rundown on your website. We'll link that one up in the show notes to those who can't make it to Stranger Loop this year. But you also have a programming language of your own. You also say that you're into AI and you're into robots.
Starting point is 00:40:33 You have this thing called Babar. I don't know if that's how you say it, but that's how I've always said it in my head. I don't know how to say it either. Babar. I don't know. It's the elephant from the cartoons, right? I don't know. Well, see, there was a cartoon called Babar.
Starting point is 00:40:50 Yeah. Was that what it was called? So I was going to say Babar. Is it Babar? Okay, yeah. I could be wrong. I remember the elephant cartoon, but I don't remember how they pronounce it. That's what it's named after.
Starting point is 00:41:00 I'm unsure about the pronunciation. Well, it's your language, so you can pick how you pronounce it. All right. We'll go with Babar. I'm almost certain it is Babar. I'm almost certain. Okay. I was a fan of the show.
Starting point is 00:41:11 I like that show, too. Tell us about your language. Yeah. So I kind of have this habit that I like to try to dig into papers and kind of understand them. And one of the papers that I was looking at was by John McCarthy and it was entitled Elephant 2000. And this had a lot of his, they weren't entirely flushed out, but his ideas of what a programming language of the future should be.
Starting point is 00:41:48 And I think it was entitled for the year 2000. Wow. Okay. So he had some very interesting ideas in here. me was the idea, and we talk about cross-federalization, that from philosophy of humans all speak in language, right? And if you look at the things that we do with our language, you can abstract that to kind of a higher level. Like what do we try to communicate with each other with our speech?
Starting point is 00:42:29 For example, if you say pass the salt in English and then you say pass the salt in Japanese, you're meaning the same thing, even though you're speaking different languages. You're meaning you want to request someone to do an action for you. So that kind of boils it down to a different level. He thought that, and philosophers, he got this from philosophers, that this would be the same sort of principles would hold true if you wanted to communicate with somebody from Mars, right? You would still need to have requests. You would still need to have assertions, asserting something like a fact.
Starting point is 00:43:26 You would still have to have something like queries, you know, asking a question. And those are, and not only that is the way that we would communicate with machines, right? Machines would have to, and computers would have to communicate with us on this level. And we can see the ones that I mentioned are pretty easy, right? We tell computers facts. You know, basically X is seven. And we do queries, you know, what is the value of X? We do requests quite a bit a lot of times. But some things that he mentioned in the speech acts were aspects that our computers don't regularly have. And these are, you could have beliefs. And you could have, you could try to convince someone of something that might change your belief. So it might affect your future actions. So that was kind of an interesting one that request by kind of accepting it. philosophical, higher level, how do we interact with each other? And how would that drive
Starting point is 00:45:08 interacting with computer? So that was kind of a roundabout exploration. So I created this language to kind of explore some of this. So I made the language through Clojure. I used Instaparse, which is a great parsing language. I made my own language to be able to have beliefs and speech acts in my REPL or in my computer program. And then I used this to control my AR drone. Wow, yes. Now it got interesting. Yeah. Yeah. So, you know, the whole, you could maybe give it goals and beliefs and communicate it with speech. So this was kind of interesting. So that was kind of fun. I had one point where, um, you, you know, it would, it would, um,
Starting point is 00:46:00 fly up until it believed that it was high enough. And that was, you know, at three meters or however it was. And it was kind of fun debugging that. So instead of saying stop when you're three meters high, say you believe that three meters is high enough. Yeah, yeah, I have the belief. So when it flew off and I got stuck on the ceiling, I'm like, oh, you have a faulty belief, right? I believe there's a ceiling there.
Starting point is 00:46:26 Yeah. So it's kind of a different way of thinking about and debugging programs, a different way of interacting with them. Very cool. The syntax is pretty interesting, too, when you read through some of your examples on the readme, just the way that you restructure. Jared, almost counter to what you said earlier about Clojure, like is it kind of hard to read? that you restructure uh jared almost counter to what you said earlier about closure like it's is
Starting point is 00:46:45 it kind of hard to read but in this case the way that you're asking the program it's it's sort of like similar to english you know it's very english-like yeah there was a there's kind of on purpose so i used to close your program to create a new language that had no prints. Right. Or optional prints. It also is kind of funny because when you start to use things like convincing and requesting, you're kind of humanizing the machine at this point, right? Because you are trying to convince it to power off, you know? Exactly. So I start to have Skynet thoughts.
Starting point is 00:47:21 So how long have you been doing this? How old is this project? Don't kill us. Oh, this one's a few years old. I think I did it in like 2013. Is it stable? Is it where it's at? Are you playing with it anymore?
Starting point is 00:47:34 It was mainly just kind of an exploratory thing for me. So I haven't been adding to it. But, you know, it's out there. And I've had all sorts of interesting people comment on it. And in fact, I found that there was another real programming language, not just my toy programming language, that actually had speech acts in it. This is called the Star Programming Language. So this is a language, I think it's used privately right now, although I think that he just open sourced it, Starlang.
Starting point is 00:48:08 But a full-featured language that has a notion of speech acts in it. Not the beliefs in the – but some other acts. Very awesome. This is all things that I've never even heard of, so very cool things to to be exposed to uh even the term speech acts when i first hit your home page of the bar or babar i was like what the heck's a speech act you know that is exactly right this is why i love like looking at these papers yeah because i read elf in 2000 i had the same thing it came to speech acts and i was like what the heck what is that So it's kind of like just a thread that you can pull on.
Starting point is 00:48:48 And then you can say, oh, Speech Axe is from this philosophically John Searles and just follow the thread. And through trying to just understand just like a couple paragraphs in this paper, it takes you off in different wonderful directions that you never knew existed. Yeah. When you talk, when you start talking about reading these papers, it reminded me, I think it's the, the independent, there's an independent Mac developer. I think it's super mega ultra groovy, which is Smug is his company name, which I thought was hilarious. But he does like audio synthesizing type of software and i i saw a talk of his years ago where uh he says that he he reads research papers as a competitive edge in like the indie dev scene to like give himself a level above everybody else and so he'll like go read an academic paper about signal processing or about some sort of audio intricacies. And he'll work
Starting point is 00:49:45 that into his software and his product, because nobody else is doing that, you know, and he's bringing these ideas from academia, which, you know, oftentimes, they just kind of stop there, and they just sit on a shelf, so to speak, and bringing them into, you know, kind of a capitalist economy, I thought was very interesting. But yeah, your take on it's just as interesting, where it's like, we can actually, you know know reach into these other areas and bring thoughts out that otherwise we never would have been exposed to and they can actually make us better developers they can affect the community in like kind of foundational ways so it's pretty cool sure yeah and this is actually I think one of the strong suits of that I see in the Clojure community, too, that there is a real friendly give and take with the academic community and the industry that you'll see at the Clojure conferences.
Starting point is 00:50:37 There'll be speakers from the academic world. And so we learn from them, and then they they turn around and then they learn from us too. And that cross-fertilization is just valuable everywhere. Well, let's, let's break there. We do have some closing thoughts, so let's break. We'll hear from a sponsor and we'll be right back. I have yet to meet a single person who doesn't love DigitalOcean. If you've tried DigitalOcean, you know how awesome it is. And here at the Changelog, everything we have runs on blazing fast SSD cloud servers from DigitalOcean. And I want you to use the code CHANGELOG when you sign up today to get a free month. Run a server with one gig of RAM and 30 gigs of SSD drive space totally for free on DigitalOcean.
Starting point is 00:51:25 Use the code CHANGELOG. Again, that code is CHANGELOG. Use that when you sign up for a new account. Head to DigitalOcean.com to sign up and tell them that Changelog sent you. All right, we're back. We got Karen here. We're talking now about her book. I didn't say that before the break. My bad.
Starting point is 00:51:55 But we've been waiting to talk about this book because this whole call has sort of been an introductory guide, maybe even a preface to your book potentially. But your book is a guide for in terms of an introduction for closure. So what is this book? Why did you write it? Where did it come from? Right. So I think one of the unique things about this book is that it's a combo. It is two parts. And's part, uh, an introduction in the first half. And then in the second half, it's a training plan. And I structured
Starting point is 00:52:35 it that way, um, from trying to run. So I had been one of these people, like everyone, you know, would run and I was like oh I wish I could run oh you mean actually running with your feet yeah like jogging with your feet like jogging and I was like and I would try it and I'd be like I just can't I can't do it you know I would try running for 15 minutes and I would just feel like I was gonna die so I was just like this is just too hard for me I, I can't do it. And then I ran into one of these kind of like teach yourself to run programs that was ease into 5K that had this thing like you just run for maybe a minute. And then you walk for five minutes and then you run for another minute. And then you gradually build up over the course of, you know, seven, eight weeks till you can finally actually run. And this was like,
Starting point is 00:53:32 I mean, I guess I should have figured this out earlier, but it just was mind opening for me that I just didn't have to do it all at once. And the reason why I was having such trouble was I was trying to do too much at once. And I thought, you know, this can apply to so many other areas. And in fact, I had, I was at a user group and I was talking to a fellow that wanted to learn closure. He said, yeah, I picked up a closure book and I read it over the weekend and I tried it all. And I just, I just don't get it. It's just too hard. And I was like, that's the same thing, like when I was running. That if you're changing, I mean, the way that you think object-oriented is kind of just a drastic difference from functional. It's a different way of approaching problems. And that it's just kind
Starting point is 00:54:24 of like learning to think and do something in a new way that you just really can't do it all at once. I mean, maybe some people can, but I certainly couldn't. And it took me a long while to kind of mold my brain giving people the path that says, yeah, it's okay. Let's ease into it. Let's start simple. This is not going to happen. You're not going to pick up this book and all of a sudden be totally knowing how to code closure in like two days. Right?
Starting point is 00:55:02 It's going to take seven weeks. And I, at least for me, and I hope other people out there that just that knowledge of, okay, it's just not going to happen right away. And that's okay. It's just a very valuable thing. So it provides a structured training plan, um, between week one and week seven, it starts off using some open source website called Foreclosure, where you can solve problems with the community in a kind of almost a test-driven way, which is nice. And then it moves into doing some katas. I've made a GitHub repo, and it's totally open sourcing there. It's called Wonderland Kadas. So you're doing Kadas for Clojure and developing your skills in little bigger chunks.
Starting point is 00:55:52 And then the final week is actually developing your own web app. And by the time you're done with that, you've had your brain a chance to kind of think a different way, and it becomes a lot easier. And you can run a 5k and you can run a 5k. I think this is a great example to, to pause on the tech side of things from this conversation and just say that
Starting point is 00:56:17 this is, to me, it seems like a really great example of living your real life, not just in front of a computer and having profound new thoughts that totally impact what you do in your day job in programming. I think it's amazing how learning to run and influence you to write this book and then ultimately, hopefully, potentially influence so many people out there to take their time learning Clojure through your book. Yes. That's really cool.
Starting point is 00:56:49 I mean, it's amazing to see that. Yeah. I think it's a great conceit for an intro book. I loved when I just saw that it was an intro slash training plan for Clojure. And I almost feel like I need a training plan more than an introduction because, you know, I've talked to people about it and I've seen the syntax and I've got a little bit of an intro already. But a training plan, that's something that I feel like I can really execute on.
Starting point is 00:57:14 Sometimes you have a book that just intros you to a language. It's like, well, now what do I do? Do I just write a blog? Make a web app? But one that actually takes baby steps with you through it is a great idea. Yeah, I mean, it totally depends on your learning style, but hopefully this will key into the people that appreciate that as their learning style.
Starting point is 00:57:37 I have a question about the Wonderland closure of Kedahs. And the question, I guess, is why you chose KEDAs over Coens, since Coens are so popular and they're very similar to KEDAs. Right. So, yeah. So I guess a lot of people are, what's the difference? So I'll give you my definition of it. Maybe it's not your definition of the difference of them. I would think of katas being a little bit bigger, chunk problems, than koans. So that's just my interpretation of it. But is that yours or do you have a different interpretation of it? My interpretation was just more or less learning something through iterative practicing, not so much the variant that you went to isn't cohen's the purpose
Starting point is 00:58:26 is like it's test driven that's like the whole thing with cohen's but with katas it's you do the same thing over and over and over again is that right or am i off do i not understand that that that could be it's like i've heard i've heard various definitions but i'll tell you i'll tell you what it is and then you can tell me what camp it falls into. Okay. So the Wonderland code examples, they're independent little closure projects, and they do have tests. So they come with tests, failing tests, and you need to provide the code to make those tests pass. And then once you have a solution, you're welcome to share that as a link in the read me too.
Starting point is 00:59:09 So people can learn from each other as well. So I don't know exactly what camp that falls into, but that's what it is. Well, you can probably ask five people and get six opinions. That's true. I was supposed to say that because I was just curious because they you know by definition they seem pretty similar and and i was just thinking like with so many coens out there you know sometimes you might ride the coat till the popularity of other coens to popularize yours for example oh okay yeah no i i got inspired just because the book
Starting point is 00:59:40 um follows a lot of examples of alice in wonderland so the the repo um the exercises the wonderland exercises um take their inspiration from lewis carroll and he actually was a really big puzzlist so he he he really enjoyed doing puzzles there's um There's an alphabet cipher that he had published. There was, I don't think he originated this, but he would, it's documented that he used it with children a lot. It's the, it's a river crossing puzzle. I don't know if you've ever heard that, where you've got like a fox and a goose and a bag of corn and then you've got to get them across the river and you can only carry you know whatever across at one time and they're gonna not eat each other so um that sort of thing i i do love your appreciation i'm not sure if it's uh
Starting point is 01:00:42 that way or not but but for just the, some of the, the art that comes with this. So when you're reading, you've got Alice kind of peeking. I'm not sure what she's peeking into. I think she's finding a door that's super small and she's going to go into it.
Starting point is 01:00:54 But you know, with each of these, I'm not sure. Do you call them, are they called katas then? Each individual one is a kata? Yeah. That's what I call them.
Starting point is 01:01:02 But like you said, the terminology is up for grabs, I guess. So in that case, you got, but you have this art and this playfulness and I love. So since I asked you about Cohen's, I do appreciate your appreciation for Alice in Wonderland and how you've played each of these katas off of probably some of your appreciation for that book. Yeah. Yeah. Thanks. off of uh probably some of your appreciation for that book yeah yeah that's um thanks i i yeah it's just i also wonderland's a fabulous a book um that speaks to people on so many levels so it's one of those books that uh are stories that you can read you know several times and still never get all the
Starting point is 01:01:40 nuances that are in involved you know from everything from the plot to the characters to the, you know, the ways they speak, things like that. You just there's always this constant onion effect that you can keep going layer by layer deeper, deeper. No pun intended back to Alice, of course. Yeah, it's timeless. Well, speaking of inspiration, I guess we should go into our closing questions now. And our closing question that we ask pretty much every guest is one about inspiration. So if you had to pick somebody out there who would be your hero when it comes to programming, somebody who inspires you, a mentor or a role model, who would you name as your programming
Starting point is 01:02:20 hero? I would name Jim Wyrick. He actually passed away last year, but I had the privilege of working with him and getting to know him personally. And not only was he a brilliant man, but he was one of the kindest and most inspiring men that I ever got a chance to know. So I'm sure you've heard of him. Like he's, he was the creator of the rake library. Yeah. So, uh, just a beautiful man. Um, he was kind to everybody. Uh, you know, it didn't matter whether you were a programmer or not, uh, a lot of time during lunch breaks,
Starting point is 01:02:57 um, and we'd find our drones together, you know, the, the Jane or be coming down the hall and you'd say, Oh, come over here. I'm going to show you something and like show them how to play the drone and show them the code behind it all and everything. And he was just a, a naturally just beautiful person and a wonderful teacher. Uh, so yeah, very inspiring. Yeah. Amen to that one. I think, uh, we hear Jim as a hero often and well-deserved. I think we had Justin Searles on. Man, it's been a while now, but I definitely remember him having similar kind of affectionate words for Jim. And Adam and I both have Ruby in our roots,
Starting point is 01:03:37 so we were affected and still use Rake to this day by Jim. Not only his software lives on, but just the kind of man he was. Still affects and is still close in the hearts of many people to this day. Absolutely. Adam, you want to take the next one? The next one is always a fun one because it allows you to be a little
Starting point is 01:03:57 introspective and more shoutouts to popular open source that may or may not be popular yet. But in terms of your radar, what is out there either just in programming or open source that may or may not be popular yet. But in terms of your radar, what is out there, either just in programming or open source, what's out there that's interesting to you that if you had a free weekend, I'm not sure how often that happens for you, but if you had a free weekend, what would it be that you hack on?
Starting point is 01:04:18 Well, there's like new stuff all the time, right? At least for me, there's like shiny stuff. I'm like, oh, I want to look at that. I want to look at that. But, um, right now I'm just, um, I'm really just entranced with the chemical programming and the chemical computing and just kind of looking into that a little bit more. And there's some more papers about that and maybe practical applications, um, or practical potential applications because there's not a while in distributed computing, self-organizing systems and self-healing systems. So I would probably like to explore a bit in the past months is Pixie Lang. And that's a new language by Timothy Baldrige.
Starting point is 01:05:19 And he's a really smart guy. But it's a lisp, again, but it's made in our Python using the PyPy tool chain. So it compiles down natively. It's super fast and can access native libraries. So it's kind of exciting and different. It's Clojure-inspired, but it doesn't necessarily stick to be compatible with Clojure. It says it has magical powers. Do you know what those magical powers are? I think that it's supposed to be fast and light.
Starting point is 01:05:58 But it's a great language, especially if you want to use fairy gifts. I think the package manager is named Dust, which is pretty cool, right? So you can have pixie dust. Yes. Love it. Yeah. Always a play on words. Love that. But it's a fun project, and they're very open and uh contributions and friendly there's a
Starting point is 01:06:27 nice chat room so if you're looking to get involved in kind of a cool language with nice people that's a nice side project very cool we'll link that up in the show notes so for those listening uh if you if you've listened to the show before you know that we take pretty thorough show notes. So we do a pretty good job on that. This is episode 171. So you can find everything that we've talked about today, show notes included, at changelog.com171. Any closing thoughts, Karen, before we take it home? No, I think I've said it all. But it's been fun.
Starting point is 01:07:04 Well, I do want to mention that your book, Living Closure, is available for order now. So it's not like it's a preorder. She's written it. It's out there now. So if you wanted to go check it out, there'll be a show note for that. I'll link in the show notes for that. But check out the book. Have fun learning Closure if you pick up the book.
Starting point is 01:07:22 As you know, we release the show every Friday. So come back here next Friday. If you're not subscribing yet, go into iTunes and subscribe while you're up the book as you know we release the show every Friday so come back here next Friday if you're not subscribing yet go into iTunes and subscribe and while you're in there Mazel go ahead and rate the show if you've listened to it before we also ship a weekly email on Saturdays called Change Law Weekly you can find that at changelaw.com
Starting point is 01:07:38 slash weekly and because we love those kinds of words we also have a nightly which is essentially GitHub trending on crack. It's got lots more stuff in there. Maybe crack's a bad word to use for that. On steroids. On steroids.
Starting point is 01:07:51 Yeah, on steroids. Crack would be worse. Okay. On steroids. Thank you for the correction, Jared. Well, read it, and then you decide if it's on crack or if it's on steroids. And we have an open repo for that if you want to give us some feedback. It's ping on GitHub, so find us on there.
Starting point is 01:08:08 But changelognightly is pretty cool. changelog.com slash nightly. Subscribe to that. We had some pretty awesome sponsors for this show that help us make it possible. CodeChip, love those guys. ImageX, a brand new sponsor and a very cool platform for serving images. Very unique. And then also DigitalO digital ocean who doesn't
Starting point is 01:08:26 love digital ocean so those are our sponsors thank you so much for listening and karen thank you so much for coming on the show and just schooling us in the world of closure and everything that you're about so cool having this conversation with you so thank you for joining us and uh let's all say goodbye. Thanks. Bye. Goodbye. Thank you.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.