In this podcast, we talked about multiple topics such as Symbolic AI, Norvig and Lisp, Emacs Lisp, Paul Graham essays, Paul Graham’s book, Common Lisp, Oopsla and many more. Feel free to listen to this audio file:
[00:00] [background music]
Craig Andera: [00:00] Hello and welcome to episode 62 of “The Cognicast,” a podcast by Cognitect, Inc. about software and the peole that create it. I am your host, Craig Andera. If you listened to the last episode, you know we were talking about RacketCon which is going to be held in St. Louis and it’s going to feature things about the Racket language, obviously.
[00:19] There’s another interesting conference coming up that might be of interest to you. People that are into Clojure and anything that’s been talked about or shown. Talking about the Scheme and Functional Programming Workshop, which is going to feature all sorts of interesting talks about Scheme. Not just Scheme, functional programming in general. You can find out more about it at www.schemeworkshop.org.
[00:40] The important things to know are 19th of November, 2014 and it’s being held in Washington DC. Now, if you are paying attention, you might be thinking, “Hey, that’s really close to the Conj.”
[00:52] As it turns out, the Scheme Workshop is being held in conjunction with the Conj. The 19th is the day before the Conj and it’s at the Grand Hyatt Washington DC, it being the Scheme and Functional Programming Workshop which is right around the corner from where the Conj is.
[01:04] If you’re going to be there for the Conj, which we really hope you will be, you should also strongly consider going to the Scheme and Functional Programming Workshop.
[01:11] Tickets are only $20. If you look at the list of people that are involved, it will be worth your $20. In fact, it’s only $15 if you go to the Conj because there’s a $5 discount for Conj attendees. I strongly urge you to consider showing up a day early and checking that out. I am going to do my best to do that as well.
[01:30] I will see you there. If I don’t see you there, I hope to see you at the Conj which is being held at November 20th to 22nd in Washington D.C. Tickets are on sale. You’ve heard us mention that the early bird tickets sold like hotcakes. Those are all gone, but regular tickets are still available, at least, at the time I’m recording this. You can get those at clojure-conj.org, so sign up for that.
[01:51] Speaking of signing up for things, we also still have some spaces open for David Nolen’s Webinar. He’s going to be giving a webinar on Friday, August 22nd, about things related to asynchronous programming and front end programming. Super cool stuff! He’s absolutely the right guy to be talking about that, you might know.
[02:10] He’s the author of Om which is very interesting front end framework. You can go check that out. Go to go.cognitect.com/core_async and sign up there. It’s online — webinar. You can attend right from your desk.
[02:28] One last thing to mention. I will be at the Clojure D.C. meet up August 26th, again, 2014. We’re going to be talking about transit. I might also talk about a notebook-type approach I’ve taken to performance testing using Org-mode, and Emacs, and Clojure.
[02:45] You can find out more information about that at meetup.com/clojuredc. Always fun, meetups are good. It won’t just be me, blah blah, there’ll be plenty of other fun Clojurists of all level of ability to talk to. If you’re in the DC area, hope to see you there.
[03:03] Great. I think that’s it for announcements. Let’s go on to episode 62 of The Cognicast.
[03:08] [background music]
Craig: [03:30] Ready to go?
Eric Normand: [03:37] Yeah. All set.
Craig: [04:03] Awesome. Welcome, welcome everybody to The Cogicast. Today is Friday, August 1st, in the year 2014. We are super thrilled to have as our guest today, Eric Normand. Welcome to the show, Eric.
Eric: [04:14] Thank you. I’m really happy to be here.
Craig: [04:16] We’re super glad that you could make the time to come on and talk to us. Before we get to any topics technical, which I imagine we’ll spend most of our time on today, I’m going to ask you about the song that our listeners heard playing us in. What would you like them to be hearing?
Eric: [04:32] I was so ready for this. It’s “Joyeux Anniversaire” by Sekouba Bambino.
Craig: [04:39] I can’t say I’ve ever heard of the band. I know enough French, that’s happy birthday, right?
Eric: [04:48] Right.
Craig: [04:49] Is that a band that you have some personal relationship to, or just some music you like?
Eric: [04:54] I’ve heard it about a million times, if not an order of magnitude more. This song was being played in taxis and buses while I was in the Peace Corps in Africa.
Craig: [05:08] Wow. [laughs] That’s something that will make me go update on later. That’s super cool. There are approximately seven billion things we could talk to you about. You are, at least from where I sit, a very prominent member of the community. You’ve done a lot to educate people about Clojure. I definitely want to talk about some of that.
[05:30] As I was sitting around thinking, before the show, about what to ask you, I wanted to ask you a question we ask a lot of people, which is your origin story. Let’s go back in time to before you were doing Clojure at all.
[05:44] What was your path to the place that you are with it now, which is obviously quite involved with the language? I wonder if you could give us the path, if you will.
Eric: [05:56] I’ve always been into computers, so I’ll skip all of that stuff. I was first introduced to Lisp in college in an AI course. The textbook was still the Peter Norvig AI book, not the “Modern Approach,” but the one before that, which was more about symbolic AI.
Craig: [06:13] Is that the “Patterns“?
Eric: [06:15] Patterns, that’s right. I didn’t really take to it so much. I thought it was neat that you could add all these parentheses. The semantic model was so clear. I put it down. I don’t think the teacher was really that into Lisp, either. It was like he wasn’t transferring that to us.
[06:39] I started getting into it more when I was reading some stuff on Emacs Lisp about how you could write a parser and a small interpreter in a weekend. I was like, “I’ll do that.” I started writing my own without really having much knowledge of what was already out there. That was 10 years ago, maybe more.
[07:05] I just slowly started getting a sense of what was out there. I read some Paul Graham essays. They were very convincing. I read Paul Graham’s book. I was using it in my classroom projects and stuff. I went to…
Craig: [07:24] Sorry. At this point, you were still doing Emacs Lisp?
Eric: [07:27] No. I was using Common Lisp for my classroom projects, a much better choice. The teacher thought it was weird. I finished the project. Other kids didn’t, so like, “What are you going to do?”
[07:44] I managed to get a paved way to a conference. What’s it called? OOPSLA. The reason I wanted to go is because there was the Lisp 50 celebration that was being co-hosted. It was like the 50th anniversary of Lisp. Alan Kay was supposed to be interviewing John McCarthy. It was going to be really cool.
[08:08] Unfortunately, neither of them went. It was still pretty cool, because I got to hang out with Lisp people. I didn’t have anybody around me. There were some pretty big names and stuff. There, Rich Hickey gave a talk about Clojure. This was in 2008, just to give the time frame.
[08:25] He gave a talk. I was skeptical. I was like, “Everyone makes their own Lisp. Do we really want a fourth of the community?” It’s how I thought. It was convincing enough to get me to try it. I gave it a shot. I just haven’t looked back since.
Craig: [08:46] Obviously, a lot of people have gone back and scoured the Internet for other presentations that Rich has done. Was this the “Are We There Yet?” talk that he gave at OOPSLA, or am I thinking of a different venue?
Eric: [09:00] Wow! I don’t know. It could be.
Craig: [09:01] OK. We’ll look it up and put it in the show notes. It’s not a big deal. I was just curious.
Eric: [09:05] I don’t know if these talks were recorded, actually. I haven’t seen them around. It was a pretty cool thing.
[09:12] The worst part about it, if I can be a pessimist for a little bit, is that most of the people were old. Not that there’s anything wrong with being old, but when their average age is 50 or 60, it doesn’t have the same energy as when you have a bunch of young people.
[09:32] It doesn’t seem like it’s going to go anywhere. I really got that sense of being in the room with all the people who basically made Lisp what it was. There were very few young people doing interesting stuff with it.
[09:54] Seeing Rich, who was younger than everybody who I’m talking about — the 50- to 60-year-olds — with a real vision for the future, this is like a past life. This Common Lisp stuff of, “When are we going to get something new? When is the next thing gonna happen? It was just a common theme.”
[10:20] There was a lot of pushback on that, like, “No, it’s good enough. We don’t need anything new. You don’t understand it enough yet, so we’re not gonna listen to you.” Just seeing someone come in with a bunch of new ideas, it was refreshing.
Craig: [10:37] I’m curious. I like the ideas in IN/Clojure and they drew me in around the same timeframe, actually. I’m wondering [laughs] if you had the same experience I did which was looking at Clojure and looking at relative to whatever you were using. At that time for me, it was C#. I think it applies to a lot of different environments.
[10:59] Do you remember what the specific things that you like? For me it was oh, concurrency. That’s something that I deal with all the time. It turns out [laughs] as I went down the road, the approach that the Clojure takes me in that…I really know how to spend as much time thinking about that.
[11:17] Not that they’re unrelated but it’s actually the immutable data structures that turn out to be the big thing now, but I would miss more than Clojure’s concurrency structures and a couple of things too. I wonder if you remember what the specific features were that I spoke to you at that time.
Eric: [11:33] That’s a really good question. I would say the thing that turn me on the most was the literal syntax for the data structures. Everyone wants to use hash maps but in Common Lisp there’s no syntax for it and they’re mutable. You’re just doing imperative, like add this to the hash map, add this, add this, add this.
[11:55] Creating new one, add this, add this, add this, add this. Whatever happens is you get tired of that and you write a macro. There’s ways around it. It’s not terrible but it just became much more declared, it’s much more freeing to use the proper data structure for the problem that you had.
[12:18] I really like that approach of having…The data structures are phenomenal and they’re described in a way that makes you understand why you would use them. This is about order. The set is just about membership. It’s not about order at all. In fact, we don’t guarantee any order.
[12:41] The hash map is about key value pairs also not about order. There’s all these things about them that I really liked. Then secondarily to that is Lisp is really a procedural language that just happens to be…
Craig: [13:01] Are you referring to…You’re referring to Common Lisp when you say Lisp?
Eric: [13:04] I’m referring to all Lisps, Common Lisp specifically. It’s a procedural language and it just happens to be really good at helping you do functional programming. What I mean by that is like look at the IN/Clojure, the do-notation. It’s like do this one, then do the first one, then do the second one, then do the third one.
[13:31] We always say presumably for side effects. The procedural is always there but Clojure adds on top the idea with the immutable data structures that you really do want to be doing functional programming.
[13:50] You have the same issues with procedural IN/Common Lisp that sure I wrote a really nice function, but oh, it has to copy its data structures when it gets called because you don’t know what other bits of code are going to do to it.
Craig: [14:09] I actually had the experience of getting brought in for a very brief period on a large Common Lisp code base. It was 40, 50 lines of pretty tight Common Lisp, so that’s a significant system. They were doing high speed processing and they had mutable data everywhere.
[14:29] There was a point where they had to stop the world to avoid those things. You could see where…I’m not going to do justice to it because it was actually was a quite a sophisticated system. This was not written by inexperienced people or people that didn’t understand the language.
[14:46] They were employing the tools to achieve an end in a very sophisticated way. Just looking at it, I was really struck by the way that, as you say, mutation and the imperative nature of it percolate out when you don’t have the faults. A mutability that makes and high quality immutable data structures which is the key that makes the functional approach, the garden path.
Eric: [15:12] Right. Exactly.
Craig: [15:14] Please, continue.
Eric: [15:15] The other thing about the literal data structures is because…Lisp really the only literal data structure you have is the List in Common Lisp. You have to quote it to make it literal. The evaluation semantics of Clojure were really well chosen. You could actually embed the values that are assigned to variables into your List. That made it really easy to do DSLs.
[15:51] I guess what you call DSLs where you’re really just building up a data structure and then you have an interpreter for that data structure. These are stuff that people talk about in Lisp. Everyone’s like, “Oh, macro lets you do metaprogramming.”
[16:07] The beautiful thing about Lisp is the data driven stuff that you see in principles of artificial intelligence programming, the one we referred to before.
[16:18] That’s where stuff gets real. That’s where it’s like, “Wow, I didn’t know I could just like pattern match on this and say what it’s gonna do, and then pattern much on that, and say what it’s going to do.” Very declarative. Like I said, in Common Lisp, to not have to quote, you have to use a macro or something. You just get it’s not as clean.
Craig: [16:42] Sorry. Can I get you to unpack that a little bit? I think at least some listeners and [laughs] I am, sitting here thinking, “Well, you do have to quote List in Clojure.” Are you talking about the fact that there’s a vector literal that you can use for the many of the same purposes?
Eric: [16:56] Yeah, exactly. People don’t use List so much in Clojure. You use a vector when you want just a literal sequence type. Then you have maps that are literal. You don’t have to build that up one element at a time. You have sets. I’ve often wished for more. It’ll be really cool if there was other stuff.
[17:20] I don’t know what it would be. When you’re building the DSL, often you switch on the type of data structure you’re looking at, like, “Oh a set means I’m gonna do alternation and sequence, like a vector means I’m going to do sequence.”
[17:38] Something like that. Then you’re like, “Oh, but I wish there was something like a third option because I need to use this other thing and there’s no data structures left. I’ve used them all.”
Craig: [17:51] To some degree you have. This is timely because Transit gives this to us in JSON world. You have that in even with tag literals, where you have a reasonable, you could argue, syntax for introducing new data types.
Eric: [18:07] That’s right. That was one of the reasons I was really excited about it when it came out.
Craig: [18:13] I’m sorry to interrupt you again. Please, continue.
Eric: [18:16] You asked me to unpack. You build up these structures. You might not even know you’re doing it. Just going in Lisp where you’re looking at the car and the cutter of something and doing equality on it to a real data structure that has evaluation semantics not quoted. That you can just do anywhere.
[18:44] You don’t have to do it in a macro. It was night and day. You don’t use so many macros. Rich talks about this all the time that macros are for humans. What you see a lot of in Common Lisp is people using macros as the logic of their program. There’s no way to do it without a macro.
[19:13] There’s a lot of other stuff in Clojure like getting rid of a lot of the excess parentheses. That’s something that I have to explain to people a lot. If you look at Common Lisp from when you were in college, you had to take a class on it. There’s all these parentheses that even I forget all the time are there, like when you have a let.
[19:34] You say let and then you open parenthesis and then you have to do pairs. You have to do another open parenthesis x is 10, close parenthesis. Open parenthesis y is 20, close parenthesis. Then close that whole grouping, all the bindings…
[19:51] You have all these pairs. Same with a can’t. A can’t it’s a predicate and body pair. You got all these things that in Clojure we don’t have to do. It just seems like a tiding up. You can see why they have them in Common Lisp. It makes them much easier.
[20:14] It makes your interpreter and compiler simpler, you would say, because you’re not completing the pairing with the…if you have to write an interpreter for a can’t in Clojure, you have to build up the pairs yourself.
Craig: [20:33] Right, and they are pairs if you think about it. Those things really are pairs so that if all you have is…correct me if I’m wrong, Common Lisp actually does have a vector literal syntax. Certainly, I don’t think anybody would argue that Clojure has more literal data types.
[20:49] If you started with, I’m going to build my language out of lists or constants, then the actual straight up mapping to what you’re doing is, it’s a list of pairs. That syntax does make sense from the perspective of the semantics at a language.
Eric: [21:07] It’s a closer mapping of the semantics to the syntax which makes them much easier to interpret. You’re saving people’s pinkies.
Craig: [21:17] [laughs] It’s funny. I actually just ordered…let me completely derail. Let’s talk about me here. I guess what I’m trying to say here…I just ordered a…not just. I’ve had it sitting next to my desk for a while now. I’ve got an ErgoDox keyboard, which is one these funky ergonomic keyboards.
[21:35] One of the cool things about it is that you have the ability to add additional layers because there’s more than the usual number of the modifier keys. I might play around with putting open print on the home row with one of the…that would move way down to maybe right thumb and left index finger or something like that.
Eric: [21:54] That’s a great idea. I would make some other character like comma or something. I’ll put that as a SHIFT. You could not even have a SHIFT, a modifier key for it. That would be great.
Craig: [22:06] Some other time when we actually are talking about me and not you, I’ll take to you about my crazy keyboard setup that I’ve done or I’ve actually got a machine at home. I don’t have it here in my laptop. I’ve got a machine at home where the home row keys ASDF on the one hand and JKL; on the other, actually, do function as modifier keys SHIFT, CONTROL, ALT.
Eric: [22:31] That’s sound funky.
Craig: [22:32] It’s kind of funky. It totally works. I’ve been using it every day for years. Anyway, we really are talking about you. I really genuinely I’m fascinated to hear more about your…it’s easy to get me up to go off and talk about my crazy schemes. Please, I’ve said this too many times already. Obviously, I’m doing a terrible job being a host but please, continue.
[22:51] We were talking about, by the time that you wrote the Clojure, you said couple of things you liked were literal data types that the way that they enable functional programming. Of course, there’s a bunch of syntax things that you and, frankly, I prefer. Maybe, take it from there.
[23:06] You’re, “OK, great there’s this neat new language Edward showed me.” Then you went somehow from there to the point you are at now, which I really want to talk about. At some point what was the ark goal from there?
Eric: [23:20] Let me take one little step back. Before I learnt really that I like Clojure, I was really into Common Lisp and was reading everything about it that I could. I saw something online. This was the heyday of video. If you found a video online about something that you were into that wasn’t cats, it was, “Let’s watch this. I’m going to download it. Save it to my hard drive.”
[23:53] You probably had to change the codec and everything. Anyway, I saw somebody do a video that was just a screencast of them programming Reddit in Common Lisp. It’s 10-minute video or maybe 15 minutes. The story is that the first version of Reddit was actually written in Common Lisp.
[24:21] They were having all sort of library problems. Finding libraries to do some modern things like SOAP services. They had to talk to a SOAP service for some reason. It was just one problem after another. They rewrote it in Python. There was a grumbling in the Lisp community.
“[24:43] Oh, but that was going to be a successful Lisp company. I was going to go work for them. They would champion the language and whatever. Now, it’s Python.” Someone made it, “Look, you can write Reddit in Common Lisp. I’ll do in 15 minutes.” I looked at it and I was, “I had my own thing. Hey, I can make that video. I could probably make it a little better.”
[25:09] I made a video that was a basic link sharing site. It didn’t come in Lisp. There was no audio. I just typed out enough information comments. I was, “Now, I’m going to do this.” I just typed it up. Then people were, “Oh, you need audio. You need to do this. You need to do that. I can’t read it. It needs to be higher resolution.”
[25:34] I fixed it up. Back then YouTube didn’t have high enough resolution to read text on a screen. I had to find a hosting service because when I put it on my blog it crashed my blog. This was back when all the Reddit guys were Lisp people.
[25:58] Someone posted it to Reddit and is, “Reddit clone in 20 minutes.” It crashed my site. I put it on one these hosting things that had high res. That was the start of LispCast. Then I was, “Oh well, I need a blog to talk about this.”
[26:18] I put out WordPress or something. I just made over the next year till I made eight or nine of them. It just took the same sight and just kept adding to it. Doing tasks and I even did continuation passing stuff, which was really big in Common Lisp.
Craig: [26:40] I swear I’ve seen this. This was…
Eric: [26:43] They’re still online.
Craig: [26:44] This was a while ago but I think I remember when you…I might remember when you put this up because I went through a Common Lisp phase as well. Right or wrong the same time as you. This stuff just threw me into the way back machine. Sorry. You were saying you’re making these videos and you’re putting them up.
Eric: [27:04] They dwindled. I think the way I see it people, who a little bit interested in Lisp, flooded it when the first one came out. Then they got little deeper and deeper and the people who could understand them at that point were not interested [laughs] in some beginner stuff. The ninth one maybe 20 people watched it.
[27:33] It wasn’t working but they got me into blogging. I started blogging. I was blogging a lot in Common Lisp. Then I got into Clojure. Started blogging about that. I always wanted to do Clojure videos. I just didn’t feel I was ready. I didn’t know the language well enough.
[27:57] I was going to be translating Common Lisp stuff into Clojure. I wanted to feel confident in my own authority to say this is a good way to do it. I just put them on the side. This was back in 2008, 2009. I might have made a video or two that was “How to install Clojure” that two weeks later it didn’t work anymore. That’s back at that time.
[28:25] I was doing Java at work which really helped. I think it really helps. It’s hard to see if you don’t know Java. It really helps learning Clojure to know the semantics of the Java object model, the virtual machine and the standard library and stuff.
Craig: [28:49] I wanted to ask you about that because this came up last night. I was at a user group and somebody asked this question, “So, I’m not a Java person. Is that going to be a barrier for me?” I actually said, “No.” Obviously, it’s helpful to understand the JVM. To some degree the Java language because you wind up and you’re operating a lot. That’s a good thing.
[29:12] What advice would you give to somebody who’s starting with Clojure but maybe they know Python but not Java or…? I knew C#. C# and Java, they’re kissing cousins. They’re really similar. What advice would you give to somebody who doesn’t know Java or even C# but they want to learn Clojure? Can they ignore it? Should they make it part of their education? What advice would give?
Eric: [29:38] That’s a good question. It’s so different now, now that you have real dependency management and stuff. Even Java didn’t have dependency management. People were copying Char files manually. I would say learn how to search for Java docs. It’s stuff like that. It’s like all these ecosystems stuff that you’re going to have to…
[30:06] Let’s say you’re doing some problem in Clojure and you’re, “How do I get the last second of the day?” Joda-Time. It’s something there’s not obvious even from the Joda-Time docs. You search and you get a stack overflow thing and it’s in Java.
[30:24] Now, you have to know Java to be able to translate that into Clojure. It’s little things like that. You just going to have to learn enough Java to do that translation. You have to learn how to read Java docs. That there’s a package structure, and you want to get the frame version. You get all the classes on the left-hand side, so you can search through that.
[30:51] All these little tricks that you learn just by having to do a lot of Java programming, they’re so natural to someone who’s been doing that for a long time that they forget that it’s not obvious that the substring method is just that substring, and there’s three different versions of it. Do you know what I’m saying?
Craig: [31:11] I do. Although I wonder whether we might do the classic Clojure maneuver and pull things apart. What I hear you saying is that it’s important to know how to read Java artifacts, whether that’s docs or source code. I wonder what your advice to a new person might be. You don’t have to really have to learn how to write it.
Eric: [31:32] That’s true. That’s true. You don’t have to know how to write it. I rarely write Java code, almost never. Almost never.
Craig: [31:38] It’s the same here.
Eric: [31:40] The other thing is the stack traces.
Craig: [31:42] [laughs]
Eric: [31:45] It’s just the truth. Stack traces are…I could only speculate on why they’re not cleaned up a little just for display. It’s a lot of Java stuff in there in terms of like, “These are class names, and how do the package names and function names and Clojure correspond to package names in Java, stuff like that.”
Craig: [32:14] There’s no question [inaudible] . I think the good news for a newcomer is that there’s a fairly small number of rules that let you make sense of them. You have this page up and page down scroll through. It’s the rare stack trace you get that doesn’t flow over the top of the screen.
[32:33] At least in my experience, it’s been that you quickly learn what to ignore and can, for a little experience, zoom to the relevant bit.
Eric: [32:42] To be a little optimistic, the Clojure wrappers for Java libraries are amazing. They make it better than Java. I’m speaking in general. I’ve said this before and I in trouble for it, but Clojure to me seems to just clean up everything it touches.
[33:06] Joda-Time is nice but clj-time is way nicer. Or the Apache HTTP client, I don’t think I could use it in Java, but the wrapper for it is great.
Craig: [33:20] That’s really interesting. First of all, again, I am also not speaking to any particular library. For example, clj-time is well-done, but I find that my path through the landscape of Clojure wrappers around Java libraries has often but not always gone something like, “Have a problem. Look for a Clojure library that doesn’t appear Clojure library does it. Don’t find one.”
[33:47] Find a Clojure wrapper around some popular Java library. Use that. Then, like I said, often but not always, just start using the Java classes directly. Again, people are solving different problems in different approaches, but that is a path I find myself taking increasingly.
[34:09] Of course, the good news for people like me that do that is that, the interrupt is clean and strong enough that your code remains pretty nice when you do that. Now, I think that there are definitely times where a Clojure layer adds value.
[34:26] There are times where you can make something immutable that’s not immutable in the library, and that can help with benefits. There are also times in my experience where using the Java library directly lets me be more flexible in how I express my programs that might have a slightly different view of the abstractions encompassed in the Java library than the way the Clojure wrapper sees it. Have you ever had that experience?
Eric: [34:53] I have. Now that you mentioned it, I was thinking of specifically Lucene. I think the Lucene library, not Elasticsearch or Solr but the embedded one, is just so configuration-heavy. It is so highly optimized that I think you have to go to the Java. You’re going to be dealing with Java arrays and stuff like that.
[35:23] I have had that experience of trying to do it with the wrapper and being like, “No. If I’m going to have to read these Javadocs and learn exactly how all these classes work, I might as well just be constructing those classes.”
Craig: [35:37] I think that’s a good heuristic actually is. Obviously, it always depends and we can’t give. Between as we’ve written a fair amount of Clojure…Sometimes, we do. Sometimes, we don’t. Neither one of us is saying always or never.
[35:51] I think that might be a descent heuristic. The nth time you find yourself looking at the Javadocs in order to user the wrapper library, that maybe you should think about what makes more sense.
Eric: [36:05] That’s actually a really interesting point, because I think what happens is as you learn about the problem more, you tend to want to go down to that level of control. If you’re just like, “Oh, I just need like the last — like I said — the last second of the first leap day in the century,” something like that.
[36:28] I don’t want to understand how to calculate what the leap day is and how many seconds it has in the Julian calendar. You just want somebody to do it for you. [laughs] Then if you’re writing something that needs to understand all those calculations, you could write those calculations yourself.
[36:51] You can get a book that tells you what a leap second is and how to calculate it. At that point, you want to be in there writing it yourself.
Craig: [37:02] I do want to make sure that we turn our attention to some of your more recent efforts. I certainly I want you to continue the story of then to now, if you will. You’ve been doing a lot of work most recently in getting the word on.
[37:19] You mentioned the LispCast videos, which you’ve been doing for a long time. You’ve ramped those up internals in a Clojure direction. There’s also the “Clojure Gazette,” which I always enjoy reading that you have been focusing more energy on as well. Bring us to the present and to those efforts, if you will.
Eric: [37:36] Sure. I actually got tired of software engineering, so I skipped town. She was my girlfriend then, but my wife and I went on around-the-world trip. We were just living off savings very, very cheaply and volunteering around the world.
[38:01] I just didn’t do much programming for a while. Then I met some people in Poland who were starting a company, and I started working for them. They did their company in Haskell.
[38:15] I was on the fence because I didn’t have a good experience with Haskell before, but it’s functional programming. It sounded like a cool opportunity, so I jumped in.
[38:26] I was doing that and I was living in Argentina, where my wife is from, waiting on her visa because we got married. We’re going to come back here. I just had all these projects on hold. You know how when you’re like, “I’m not gonna be here that long. I don’t wanna start anything new.”
[38:45] I had all this things on hold. I had the videos. I wanted to do a newsletter. They were just all building up like a sonic boom. I crossed the Equator. I came here.
[39:04] Two days after I got here, I had signed up for MailChimp, made a template, and just started throwing all this stuff in the newsletter, and put a form up, put up a site. I just started it up.
[39:21] The Gazette was always supposed to be something like…I called it the Gazette because I was looking for a name. It could be “Clojure Weekly.” It could be “Clojure Newsletter,” or something like that. I thought about Benjamin Franklin. His newspaper was like the “Philadelphia Gazette” or something like that.
[39:41] I was like, “Oh, that’s what I want. I wanted to like Benjamin Franklin.” Obviously, if you have the same newspaper name as him, you’ll have the same success.
Craig: [39:50] [laughs] It’s a given.
Eric: [39:51] [laughs] Also, I wanted it to be not just news. I started looking at the definition of gazette and it seemed to really resonate with the kind of stuff that I wanted to do even though it has an old-timey feel, too, it’s not like, “Oh, this is the new cool thing.”
[40:11] The whole point of the Gazette as I saw it then was like, “I’ve been reading, and watching videos and talks, and listening to lectures, and just doing all these staff, and trying to get a sense of history of the software engineering stuff that I started as career.”
[40:34] I didn’t know where everything came from. I’m just doing all this research, all this reading. and wanted to share the good stuff that I found. Honestly, with the passage of time, the good stuff stands out very easily.
[40:53] I just wanted to make a newsletter. That’s why I call it inspiring. It’s to inspire the Clojure programmer. It’s not all about Clojure. In fact, sometimes I don’t even mention Clojure. I’ve gotten mail about that before until I get, “It’s called Clojure. It’s supposed to have Clojure in it.”
[41:13] Anyway, I wanted it to be like, “This is just really good stuff. It doesn’t matter even if it’s not about computer science. It’s just good staff that would be interesting to read or to listen to or whatever.
[41:30] That’s how it started. That was in February of 2012. I got about 500 subscribers in the first month, and then it’s been slowly growing since then.
Craig: [41:47] We started this podcast right around the same time. I’m sure I’ve read every episode of the Gazette. You said just now something that reminded me of something I want to ask you about. You said that, “The Gazette is not necessarily about Clojure, but it’s about inspiriting Clojure,” which I think is great.
[42:06] One of things I like about the community is that there’s a real willingness to look outside the language and say, “There are good ideas elsewhere.” I think that’s something that we do reasonably well as a whole.
[42:19] I am so bad with people and names but I’m pretty sure this was you. Like an idiot, I forgot to verify. I wanted to talk to you about this, but you wrote a post about Church and Curry types. That was you, right?
Eric: [42:30] Yeah, uh-huh.
Craig: [42:31] I would love it if you would maybe talk about that a little bit. We don’t necessarily have to go into depth on it if you don’t want to, but it was one of my favorite things that you’ve written. I just found it really…I don’t know.
[42:46] It was inspiring actually. Maybe not to make me want to write codes in a certain way, but like, “OK, that’s cool. That makes me want to go learn more about these things.” For the people that haven’t read it — of course, we’ll put a link in the show notes — maybe you could give the gist or explain what your post is about.
Eric: [43:06] It’ll be a good way to talk about the ideas that didn’t make it into it.
Craig: [43:10] [laughs]
Eric: [43:12] There is this cartoon, and I posted this on my blog, too. It’s a Haskell cartoon. It’s like a Venn diagram and it says, “The people who are into type systems, the people who are against type systems or for type systems, against type systems, and then the people who know anything about type systems.” [laughs]
[43:37] It’s trying to say that, “If you know something about type systems, you’re much more likely to be in the proponent of type systems, and if you don’t know anything about type systems you must more likely to be in the other side.”
[43:54] What I wanted to do is reverse that and say, “Well, if you’re into dynamic typing systems, you’re kind of…” Let me put it in another way. Lambda calculus branched a long time ago. I don’t know when exactly.
[44:16] One branch believed that having types be part of semantics of the language was vital. The other thought that types were interesting. You should do inference and whatever, but it shouldn’t change the semantics of the language.
Craig: [44:38] I might need to stop you there. If you could…I see what you mean.
Craig: [44:41] I know it is. It is. Of course, it’s an audio format which…What do you mean when you say, “It’s part of the semantics of the language. Types are part of the semantics of the language,” what does that mean?
Eric: [44:52] That means that if the program is not well-typed, it’s not even a program. It’s like you try to add a string to an integer that is just not a program.
Craig: [45:03] It’s like forgetting a close paren in a Lisp. It’s invalid.
Eric: [45:06] It’s just like a syntax error. That’s not a Clojure. We need [inaudible] . That’s called a Church from Alonzo Church. He invented lambda calculus, and I believe also to simply type lambda calculus.
[45:25] Then Haskell Curry, who the Haskell language is named after, branched off of that and then said, “I used to think that, but now I actually think that there is some value in not having the types be part of the semantics of the language.”
[45:41] That branch is the branch that Lisp point down. It doesn’t have static types. If you do put a type system on it and on a Lisp, you have to call it an extrinsic type, because it’s not in the language.
[45:57] What I was trying to say is that that cartoon was from the perspective of people who’ve gone down this typed branch and looking over at the people who didn’t go down that branch, who went down the other branch and saying, “You don’t understand what we’re doing over here.”
[46:13] I wanted to have a post that was the opposite. It’s like, “Well, we went down this branch and you don’t understand what we’re doing. I know you like types and you are getting a lot benefit out of it but you don’t understand what we’re doing on this side.”
[46:29] Obviously, I like Lisp. I like the dynamic stuff. Let me add to that, because otherwise I’m not going to represent myself well. I think types — by that, I mean static intrinsic typing — is going to have a huge impact on the future of programming.
[46:55] I think it’s going to be very important that we have static types. The powerful languages of the future are going to have them. I don’t how far ahead you have to look to see that, but it’s going to happen. It’s going to happen, but I haven’t seen, for instance, a SICP.
[47:21] That’s Structure and Interpretation of Computer Programs. It’s like a set of ideas that really is fundamental and changes the way everybody programs. It’s going to happen, someone’s going to write it, and people are going to design type systems around this fundamental set of ideas.
[47:44] Right now, from my perspective, I get a lot more value from the dynamic type side. I do miss static typing sometimes. Like I said, I programmed in Haskell for over two years professionally. There are definite benefits.
[48:02] I just don’t see the level of design that I see in Clojure in the selection of types, in the selection of abstractions available to a programmer. Now, of course, you can make them all, but I just haven’t seen it. In theory, they’re there. They could just emerge, but I haven’t seen it.
Craig: [48:25] It gets in the same way that you could program exactly the way we program in Clojure in Java. You could totally do that. Obviously, Clojure itself was written in Java, but I’m talking about the programs that are with Clojure, not the compiler. Very, very interesting. That’s a really good summary I think of the nucleus of that post.
Eric: [48:46] I think I have an interesting perspective. I’ve talked to people about this and they’re like, “Wow, you’re like one of those rare birds who went down the static type path, got paid to work in Haskell, and then you’re like, ‘No, not for me,’ [laughs] and you went back to dynamic typing.” I wanted to share that perspective because I don’t think it’s very common out there.
Craig: [49:12] I think it’s great and I don’t want to put words in your mouth. You can agree or disagree, but I suspect you would say that it’s something that people should really experience themselves.
[49:20] I know for my part I want to spend some very serious time learning Haskell or something like Haskell so that I can come at it from a position like you are, where it’s like, “Well, I’ve done it and I’ve done it seriously and I understand the tradeoffs and to have that mindset like in the post where you’re like, ‘We could.'”
[49:39] Hopefully, people aren’t but it does happen. Stand there and shout to each other yes, no, yes, no. Often times, these things are about trade-offs, about understanding how particular technologies apply to that particular problem you’re working on.
[49:52] I’d like to be in a position where I can look at it and say, “Yeah. For these problems that I’m solving right here, I understand all the options and I can make an intelligent selection.”
Eric: [50:03] Learning Haskell has definitely made my Clojure programs better. There’s no doubt about that, just the structured thinking that you have to do. Before I would tend to just like, “I’ll just use a map and like add keys as I need them.”
[50:21] Like, “Oh. Sometimes, I want to pass the string, so I’ll just check that here.” The amount of thinking before you start programming that you have to do in Haskell. This is getting deep into Haskell, but this is something that’s very important in type systems that your type is like a theorem and your program is a proof of that theorem.
[50:51] It’s a constructive proof that you’re saying, “I can actually do the thing that this type says I can.” You have to think at that level of logic. If you can’t write the program, it’s like, “I can’t really prove that I can do this, [laughs] that this is going to work.” You’re constantly having to build it in a very clean and logical way.
Craig: [51:20] Yeah, I could absolutely see that. Like I said, I haven’t worked in Haskell. I’ve worked in languages with much less capable type systems. Even in my own Clojure, I’ve noticed lately that although I am not currently using even something like Core type, which is not quite the same thing.
[51:38] I do find that when I think about my programs, I spend more time thinking about what the semantics of a particular piece of data is and wanting to come up with…For example, as a splinter of what you’re talking about, really good names for things in the program, which is, I think, an aspect of what you are talking about.
[52:01] Then really making sure that I document the code in such a way that it’s evident what the properties of a particular piece of a data, or some kind of construct are.
Eric: [52:15] For sure. In Haskell, you can use the built-in types, but they will only get you so far. At some point you’re going to have to really think, “What are the different cases?” Represent each one with a different constructor for your type. That kind of thinking is invaluable. I do it all the time now in Clojure. I’m not forced to.
[52:44] I wish there was some way…and then sometimes when I am writing a system that’s very intricate, I would love to get some help from the compiler. I would love for it to guarantee something, to guarantee that this key is always going to exist, something like that, or that I’m even passing it a map. Those things — I say as I’m tightening it up, I prefer to just jump in and factor things as I go.
[53:20] Programming to me is the exploration of the ideas. In Haskell, I never felt like I had mastered the thought process through coding. It was always a lot of upfront work where I had a piece of paper, and was like, “I need this type and this tag will have these operations.” etc.
[53:43] Whereas in Clojure, I know I have a number and I’m going to do this to it. Then I just keep adding to it and then factoring it out into smaller pieces and things like that. It works better with my process.
Craig: [53:55] Interesting. This is awesome. We’ve already been talking for close to an hour. I’m not trying to cut you off. We haven’t really focused on your efforts. We mentioned briefly LispCast, we mentioned the Gazette.
[54:13] I know it’s in your website, you mentioned FunctionalTV. You’ve been trying to get a little more active with letting people know that these are a lot of work. I know video in particular, having done a little bit of it.
[54:26] I don’t know if people are aware of this, but producing, say, a minute of video is…for every n units of time of video, you’re spending, in general, somewhere between 10 and 200n minutes in production. It’s really, really hard.
[54:43] Anyway, I wanted to make sure that we will reserve a little time at the end here before we wind down, to give you a chance to let people know what you’ve been up to and where they can find it.
Eric: [54:51] Sure. I’m totally focusing on Clojure right now. I’m trying to make video courses in a way I haven’t seen done for programming before. I’ve watched a lot of courses for different languages. I’m trying to actually apply a lot of teaching techniques to the material.
[55:17] I like to do things in the video, since it’s video, it’s not just screencast, animations, and diagrams and stuff, because I’m trying to help build a visual model of how things work. The idea being, for instance, in the Web development videos, there’s a visual language for how the ring adapter and the Middleware and the handlers fit together.
[55:47] As the program that we develop in the video progresses, you can see it visually, and understand it in a way that you couldn’t even really say. It’s hard to talk about those things.
Craig: [56:00] We were talking about that earlier on the show, about how its audio is a limited format.
Eric: [56:04] Exactly. That’s my thing. I’m trying to grow it. I’m working on the core.async videos right now. There’s actually a preview out. Like you said, the video takes a really long time.
[56:20] It’s unforgiving, in the sense that text…if you’re writing a book, let’s say, a sizable book that’s going to take a while, and you make a mistake in the second chapter, it’s not the end of the world. Just go back to that file, backspace and type it again. It’s not a big deal. I’ll be in the editing phase, the post production phase, and I notice I made a mistake in the program.
[56:48] I’ve to go all the way back to the first phase, basically reproduce the environment where I typed that code, so that I can type it back in, run it and re-record it. Maybe have to redo the audio because it didn’t work right. It’s a lot of work is what I’m saying, but it’s worth it, I really enjoy it.
[57:11] I wish I could spend more time on it, to spare time project now. I’m working on that. I just want to see these videos that I’m trying to align with the Clojure trajectory. Just want to see them help people learn how to program and do…I really excel at software engineering.
Craig: [57:34] I can definitely recommend them based solely on what I’ve seen of your work in the past. There’s one in particular, and again, please, correct me if I’m wrong, but I believe you did a cast at one point about point three programming. That was you, right?
Eric: [57:46] No.
Craig: [57:47] OK. Sorry. Anyway, like I said, I love your writing. I think people should definitely check out that post. They should absolutely check out the…as I’m sitting here thinking that, I wonder if Russ can edit me out being an idiot.
Eric: [57:59] [laughs]
Craig: [57:59] I was talking to people about who we should have on the show. Your name came up several times because of the work you’re doing to educate people on Clojure. It was like, he’s a really nice guy, he really says good stuff and I’ve enjoyed the Clojure Gazette.
[58:14] I know I mentioned, but I really dug the church versus curry post. I think you’ve got good stuff to say. People should absolutely check out your videos. If they are not already subscribed to the Gazette, do that too. Where can they find you on the Web?
Eric: [58:30] Lispcast.com is my blog. Clojuregazette.com is the signup form for the newsletter. I am selling the videos on purelyfunctional.tv. There’s an intro to Clojure video, and there’s a web development in Clojure video.
[58:47] There’s a code sync video coming up. If you’re interested in any of the videos or any future videos, just get on the mailing list. There’s a signup form on every page. That’s it.
Craig: [59:00] Super cool. I would second that people should definitely check out your stuff.
Eric: [59:05] One more thing.
Craig: [59:06] Yeah, sure.
Eric: [59:06] If you run a Clojure meet up or a functional programming meet up, and you want a discount for your members, just send me an email. My email address is on my site.
Craig: [59:17] That’s great. Thanks for that. Is there anything else you would like to talk about? I think we are going to have to have you back.
[59:24] I mean, if nothing else, I feel like once I finally go and spend some serious time with Haskell, we can have a super fun conversation about our respective experiences with that. It’s always a good sign where we get to this point in the show and…
Eric: [59:37] There’s always more.
Craig: [59:39] I know we had better wrap it up, but clearly, we can continue the conversation sometime. Before we do finally wrap it up with the, I suspect, what you know is the last question. Is there anything else you would like to say before we go or share?
Eric: [59:52] Just thank you and I’ll be happy to come on any time.
Craig: [59:54] Great.
Eric: [59:54] This is a lot of fun
Craig: [59:55] Likewise. We do come to the last question which is the ultra song. What would you like us to play?
Eric: [60:03] I would like to play Yambo by Salif Keita.
Craig: [60:07] OK. Is that another song that you heard on your travels around the world?
Eric: [60:11] Many times. This is also from West Africa like the first song.
Craig: [60:16] Cool. That’s awesome.
[60:17] [background music]
Craig: [60:17] I’m looking forward to hearing that. It’s always fun to me when some guest mentions a song I don’t know then I go add it into the show, and I get to hear it. It’s a nice moment.
Eric: [60:28] Yeah.
Craig: [60:30] Eric Normand, thank you so much for taking the time to come on the show. You’re obviously very busy. Look at all the things you’ve done. It was great that you were able to take the time and come on and have a very, very interesting conversation with us. We really appreciate it so thanks a ton for coming on.
Eric: [60:44] Thank you Craig.
Craig: [60:45] That’s been great. We will close it there. This has been the Cognicast. Thanks for listening.
[60:55] You’ve been listening to the Cognicast. The Cognicast is a production of Cognitect, Inc, whom you can find on the web at cognitect.com and on twitter @cognitect. Our guest today was Eric Normand, on Twitter, @ericnormand, E-R-I-C, N-O-R-M-A-N-D.
[61:14] The Cognicast is produced with help from Alex Miller, Damian Matt, Jamie Kite, Lynn Grogan, Michael Fogus, Paul deGrandis, Sam [inaudible] , and Stewart Sarah.
[61:22] Episode cover artist by Michael Parenteau. Audio production by Russ Olsen. Our producer is Kim Foster. I’m your host Craig Andera. Thanks for listening.