The Elixir Outlaws now have a Patreon. If you’re enjoying the show then please consider throwing a few bucks our way to help us pay for the costs for the show.
Episode Transcript
Amos: Welcome to Elixir Outlaws the hallway track of the Elixir community.
Amos: Hey, there you are.
Martin: Hello.
Amos: Ooooh. How you been?
Martin: Uh, isolated.
Amos: Yeah. Yeah. Are you, are you living alone now or are you still have a roommate?
Martin: I am alone.
Amos: You are alone now.
Martin: I've been alone for, hm, it's almost a month now.
Amos: Oh man.
Martin: It's it's horrible.
Amos: Yeah. I, I, I, you know, some days when I'm chasing my children around and they're driving me crazy, I, I think I would be a whole lot better off if I was alone right now. So Anna is starting a new project today and Keathley has a new project because the weather destroyed Chattanooga. Uh, he has.
Martin: Yeah, quite the rundown he had there.
Amos: Yeah. Yeah. He's still fighting it this morning. So they, they still are without power. And, uh, since nobody else could show up, I thought, hey, let's just throw this link out here. And I thought you and I could catch up for a little bit. And then maybe we just make the link public and whoever shows up, shows up. What do you think?
Martin: Sure.
Amos: So what have you been up to lately, Martin? I guess for everybody listening, they can't see your face. And the fact that we look like twins. So I guess we should say who you are.
Martin: Is this the show?
Amos: This is, well, the show started a while ago. As soon as you showed up, the show was going .
Martin: Before I changed my t-shirt.
Amos: Yeah. Before you changed your t-shirt. Oh, don't worry. Don't worry. It's not video. They didn't see your, your whole body.
Martin: We should screenshot.
Amos: We should. See how I gotta change, I gotta change the, uh, layout here.
Martin: My microphone out of the way, since they can't even see it from my-
Amos: Ah, it doesn't show me on my thing. So I can't tell that we both have-
Martin: Oh, it's a Gig Elixir.
Amos: Tee. Yeah. We're both wearing Gig City Elixir from the first year? The first year.
Martin: No, this is last year.
Amos: This is the last year. This last year was a fantastic conference.
Martin: Unfortunately, I didn't go to the first one. How was it?
Amos: Uh, it was a lot of fun. It was, it was a lot of fun. It was at an aquarium at the Chattanooga Aquarium and, uh, and a lot of, a lot of great people were there and some good talks. I really wish they had been recorded. Um, but they didn't record that year, uh, the, I think they just weren't sure if it was gonna work out or not. So, yeah. And so then they came back in and had a second fantastic conference. I mean,
Martin: I think we both,
Amos: We both spoke there, so must have been amazing.
Martin: Evidently. Uh, yeah, I actually think, uh, honest to, as, as God is my witness, - And I'm not that religious or whatnot- I actually think it was one of the best conferences last year, that I attended-
Amos: Yeah, Yeah.
Martin: of course. I, um, yeah. What I've been up to lately was the question. What have I been up to? I've uh, I've been, I've been keeping my running practice up. That's pretty good.
Amos: So you get out of your flat though?
Martin: Yeah, like a, so, for listeners, I'm in UK. So we got, uh, one government mandated, uh, like allowance of exercise each day. So we're allowed to leave the house for, uh, for exercise and shopping or grocery shopping, just essentials. And um, and then we're also allowed to get medicine.
Amos: So how far do you run when you go out?
Martin: A 5k.
Amos: Every day?
Martin: Uh, no, every other day.
Amos: Every other day. Whew! You're going to be like 60 pounds by the end of this.
Martin: I have lost so much. Yeah, yeah.
Amos: Or kilograms, I guess. Uh, probably not 60 kilograms. That would be, it's pretty tiny.
Martin: Yeah. Like high quality podcast content. I'm on the 75 kilograms right now. And I don't know what that's in a.
Amos: Pounds?
Martin: In stones or inches or whatever you use there. I'm from the continent.
Amos: So what, have you been doing anything exciting Elixir wise?
Martin: Elixir wise, uh, of course I work for Erlang Solutions, so we got some client, uh, but I cannot speak about, so that's interesting. Uh, yeah, so we, we still do our, um, our, uh, consultancy business.
Amos: Good, good deal.
Martin: So of course I'm like transit- Usually I, I used to go to the office and of course the lockdown has, um, has changed that. So that's, uh, the company we transitioned, uh, really really quick to, to working from home. And of course, most of our plants, uh, are not based in London. And so we've got conferences area on- we've got offices everywhere. So, um, so the transition was kind of smooth, I would say.
Amos: Oh, that's nice. Yeah. I guess if you're used to being distributed, it's not necessarily a whole lot different.
Martin: No, it's, it's just, you, you don't see your, your colleagues. I miss them. My colleagues.
Amos: Yeah. So, uh, have you been doing any open source work lately - oh, go ahead with that, but I have, I have another question for you because we've been talking about it on Twitter a little bit too.
Martin: Yeah. Uh, so I have done a little bit of work on Tortoise. I went to Tortoise's, uh MQTT client for Elixir, um, that I have been working on, on and off. But, um, but I haven't been that, um, like on top of that project for a long while, unfortunately. So I, I went to the issues and then I reassured everyone that I will for sure get back to working on it soon. So that's my, I think the extent of my open source work, uh, lately. And I really hope I can, I can get back to it.
Amos: Those are dangerous words to say that you're going to be back on it soon.
Martin: I'm soon. I got even have a conference talk from last year where I said, that I'll be on it soon. That was basically the entire message of the entire speak. Listen, I did this project. I'll be back on it soon.
Amos: I guess, now that, that we, you brought up Tortoise, everybody probably knows that you are Martin Gausby. And if I say your name terribly it's fine. Correct me.
Martin: It was beautiful. It was beautiful.
Amos: Good. Um, so yeah. Yeah. Since, since we hadn't told anybody who you were, we never introduce ourselves. We just assume everybody knows everyone else's voices.
Martin: I didn't even know this was the show.
Amos: Yeah, exactly. So.
Martin: What about you?
Amos: I'm not saying my name. You got to say my name.
Martin: Amos.
Amos: Yes. I got Martin to say my name. So I know on a was it on Twitter the other day, I think it was Twitter. No, it was LinkedIn, you put up a picture that you were doing some COBOL.
Martin: Oh yeah.
Amos: What the heck got you to try out some COBOL? Cause I did that for a living.
Martin: So I, every morning, my morning routine, I go to my computer and check out this TIOBE index. That's how you pronounce it, right? Tee-obe?
Amos: Yeah. Yeah. I know what you're talking about. I don't, I don't know how to pronounce it either.
Martin: And I just saw that, uh, COBOL is a thing right now and I always try to, to stay on top of the latest and greatest. And I, I just, I booted, my Elixir was up and then I just installed new COBOL and then I got it working in Emacs. And then I, I wrote "Hello, World!" Like I wrote pages and pages of source code and then " Hello, World!" was proudly presented on my screen.
Amos: Nice, nice. So this is the first step to all good software. Is COBOL.
Martin: And, and then I kind of lost interest.
Amos: Pretty quickly.
Martin: And then I wrote a "Hello , World !" in Idris.
Amos: Have, did you, do, did you continue on the Idris at all?
Martin: Uh, I started reading the book, so, Idris is something that has been on my radar for a long while, but I'll get on top of it soon.
Amos: What made, what made you want to look at Idris?
Martin: So I think for, when, there are some languages that are interesting because they bring something new to the table, or I think some languages are not interesting to me because they could just bring syntax for instance. Um, I don't think, and this is, this is not, uh, anything against people who are into Python or anything, but personally, I don't see that a language like Python has anything, but the fact that it, uh, like English and that's, that's not, uh, not interesting, where Idris has some, some new, new things that it brings to the table such as the dependent types. And I, I don't know any, any other languages that has dependent types.
Amos: Are you, uh, are you a type person? Do you like types?
Martin: Uh, um, I think they are nice, but mostly I work in Elixir, and, and of course we, we got dynamic typing in Elixir, and-
Amos: Are you, are you a Dialyzer fan?
Martin: Uh, it's been a while since I've run Dialyzer to be honest, I use the, I do a lot of struct and I, uh, I let the compiler complain if I address something that isn't on the struct. So catching a lot of spelling mistakes. And I, I do a lot of, um, like my pattern matching I try to do it very precise, such that, uh, I got some type checking doing runtime, but, um, but not, not doing composite, uh, besides the struct, uh, it's, uh, it's complicated, let's say. Um, I think, I think I would like to work more in type languages. It's just, um, all the problems that I seem to find interesting are soft, real time service, and there's no better runtime than Erlang VM for doing this kind of stuff.
Amos: So have you, uh, so you, you work with, uh, Robert Verding.
Martin: Yep.
Amos: So have you, he's, he does Gleam, right?
Martin: Uh, no, that's not him.
Amos: I thought I was him.
Martin: He does Luerl and LFE.
Amos: Oh, LFE, that's, okay.
Martin: Lisp Flavored Erlang.
Amos: Have you looked at Gleam though? I know it's, it's typed, I, I've glanced at it one once but,
Martin: Yeah. So that's Louis Pilfold and he, uh, he's also from London. To be honest, I haven't tried programming in it, but it kind of looks like a kind of like an SMLs type of language.
Amos: Yeah. I was wondering if that would, would give you the types, like, to be able to play with types, but still in the soft, realtime.
Martin: So the way that he goes about it, as far as I understand, and I could be very, very wrong, we should probably get Jay and Louis on the podcast, he, you have a compile step of course, where you do all the, where you can do all this static type checking. And that is basically it. I don't think he has figured out how to handle message processes yet. And I think that is the, that is the hot problem to solve.
Amos: Yeah.
Martin: How do you, how do you actually do the contacts between the processes and the message processing? So a way you could use Gleam is to, to build up a kernal in your program where, you know, it's, uh, it's pure and it's, um, and it's type safe, and then you can, because, uh, the smart thing he has done, he has, um, made that such that you can, you can build during the compile time, you can build, um, a module that's built with Gleam, and then you can call into it from Elixir or Erlang or LFE.
Amos: Oh, nice. So you get that, that interoperability.
Martin: Yeah. So a lot of the talks in Elixir community has this, uh, you got to have this, uh, functional caller. Um, it could be used for building the functional caller in your program.
Amos: I think it would be interesting to take, um, the program that they do in Bruce Tate's and, uh, James Edward Gray's book and take that functional part that they build that is their core and put it in Gleam just to see what that would look like. I think it'd be really interesting. Maybe, maybe, uh, when Groxio, , when Bruce, um, does the COBOL unit, right after the COBOL unit, he could do one with Gleam and Elixir together.
Martin: Yeah.
Amos: So is there anything else on your mind, or should we open up, uh, the, the Elixir Outlaw's pub to the world?
Martin: Well, what have you been doing open source?
Amos: Um, I have not been, uh, doing much open source work. I've been working on, uh, still, like for awhile, we've been talking about it on the podcast a little bit, but an AI system that uses cameras, I've been working on that, but I also just got a new laptop and it's not set up. So.
Martin: Oh, you're doing CCTV.
Amos: Yeah. So I'm, um, uh, I'm working on that and then getting the new laptop set up. And so we, we do a thing at my company Binary Noggin called Noggin Day every Thursday .
Martin: Yup, yup.
Amos: Where we get to play around and do whatever we want. Last week, I spent that time automating, um, automating, updating the security certificates on one of our websites so that I don't have to do that by hand every three months or whatever it is that let's encrypt certificates go away. Cause it's just obnoxious and I don't want to do it. So I automated that. So that was my day. So it's not always like exciting steps. Sometimes it's just stuff like, hey, this is bothering me. I want to fix it. And, and, you know, scratch your own itch. And a lot of times my own itches are, are minimal little things like that. Like, let's just get this annoying thing out of the way. Um, so that I don't have to worry about it anymore.
Martin: As an Emacs user who has way too much Elisp in his configuration, I, I know that feeling.
Amos: So I want to say it like a year and a half ago, I switched from VIM, I've been using VIM for about 20 years to Emacs. Actually I switched to Spacemacs and then recently on, on, uh, the computer that I don't do day to day work on, I threw away the Spacemacs config, and started my own. And I very, very quickly put evil mode back in because I think I liked that modal editing.
Martin: How do you actually like that? Because I've heard that it should be pretty, pretty good VIM implementation than Emacs.
Amos: Evil mode is, is, is, is really nice. Like the very basics of VIM are there and it's enough VIM that you can do like 90% of what you did before and not even realize it. It's just every once in a while you hit something and you're like, that is not VIM, like that did not do what I expected it to do. But it does, uh, it does a pretty good job. And then the greatest thing about moving to Emacs. So I used Emacs back in the day too, before I used VIM, actually, I used Emacs a little bit, but not enough to get into it a lot. And the, the really nice thing is Elisp, like the VIM configuration language, Vimmel, or whatever, however people want to pronounce it, is terrible. It's really terrible. So, uh, Emacs having Elisp in there I feel like is really powerful. Um, and I've reading a book Mastering Emacs, um-
Martin: by Mickey Peterson.
Amos: Yeah, I think so.
Martin: Highly recommend.
Amos: Um, and, and I've been going through it and that's whenever I said, okay, I'm going to try out vanilla Emacs, but I was so frustrated because when I was trying to go through it, I'm not like through the book yet. And even some of the EMAC shortcuts drive me nuts. Um, so I was not able to get around and do anything really useful without like doing a bunch of stuff and messing it all up and then having to undo a bunch of things and then move forward. And I thought, well, throw in evil mode for now. I think that the one thing that I missed from Spacemacs to vanilla Emacs is the cording of keys, um, are, seem a lot simpler in Spacemacs to me, um, in that configuration than the vanilla.
Martin: Yeah. I, I guess it's, um, like a lot of people use Spacemacs. So a lot of people have hammered on this problem of finding the right keystrokes to do stuff, I guess. But um,
Amos: Yeah, I think so. And I tried to pull, like, my big problem with Spacemacs was every time I w would see something in Emacs and I'd be like, I want this in Spacemacs, all the documentation is here's how you install it into like vanilla Emacs and configure it . And Spacemacs configuration is different. And I didn't, I didn't stick with learning Spacemacs, I think long enough to realize how to translate from one to the other really well. And there was a lot of magic in there and I thought switching to vanilla Emacs would, would allow me to, to learn a little more behind the scenes. And I might go back to Spacemacs at some point, but I don't know.
Martin: Yeah, well, I, I basically let's see, I use the starter pack couple of years ago, but I have been running vanilla Emacs for a very long time. And my keyboard set up, uh, and, uh, key binding strategy is actually pretty close to what they have in org mode, which is this organization mode that uh, {inaudible} can execute code and do shoot rainbows and whatever.
Amos: I saw somebody using org mode to do give a presentation and it was pretty amazing. So I've also the org mode manual is online. Uh, I was originally like, oh, I'm just going to print this off. Cause I like reading things on dead trees where I can take notes on it and stuff pretty easily and flip back and forth. And I went when it popped up the dialogue and it said it was like 290 pages. Nevermind. I'll just read this online.
Martin: Yeah. So I, what I mean by aligning my key bindings with what they have in org mode, um, so when you type a control C control C uh, like, uh, it's, uh, can even it, uh, it does what you mean kinda in org mode, depending on the context. So I tried to get that into every, um, every mode that I, that I have. So in Elixir mode, it will, it will prompt, compile, uh, mode with, um, which allow me to specify, for instance, mix, get mixed steps get for instance, and then compile mode will pop up and then it will print the result of the fetching of the dependencies. And then I say a control C control T, which will run the tests. And in Emacs this, this is a universal key, which when applied, it will alter the function that comes after. So if you say key, like universal key, control C, control T in my setup, then it will ask me for what, like, normally it will just run the mix test, but when I do it with the universal key binding, then, uh, it will ask me what I want to change it to so I can apply stale for instance. And then the next time I say a control C control T, then it will remember my last selection.
Amos: Oh, nice.
Martin: Yeah. So I got very elaborate set up I got there, but, uh, I guess now that I've been speaking about it public, I should probably put it out there and study it.
Amos: Yeah, yeah. Throw it up on, on GitHub, take a look. So do you, do you use the Elixir LSP mode?
Martin: I just, um, lately I've been toying around with NX- OS which is also highly recommended, and I started building a Emacs set up with an, my NX-OS, and I, I got LSP working or, or Elixir, but I haven't been working on any major project. It's just seems incredibly cute that you can, you can, you can coach the definition and you can describe it point and, and all that stuff.
Amos: Yeah. I really like it from the vanilla install of the LSP. The only thing that I do is I shut off the documentation that automatically pops up when you're on top of something.
Martin: Oh yeah, that’s annoying.
Amos: Yeah. It's like that it's available, but I wouldn't to like only open the documentation when I want to see it, because it was just in my way. I couldn't read code at all.
Martin: I think if I, if I, I think if I was that kind of guy, I would probably use Visual Studio or something like that.
Amos: Right.
Martin: Or IntelliJ or It's just, um, it's just distracting. It's most distracting then it's useful. I, I really like functions that, um, it just takes, what's beneath the point of right now and then like pop documentation when I, when I apply a key.
Amos: Yeah. When you asked for it.
Martin: Yeah. Yeah. Because if you like, of course, if you, if you follow that approach at some point, if you keep shoving the documentation in the user's face, then at some point you'll shove it into face of the user when he needs it.
Amos: (laughing) I guess that's true. Um, so do you, do you, do, do you do GUI or command line Emacs?
Martin: I do GUI.
Amos: GUI? When I switched to vanilla, I also switched to using GUI Emacs because I was not using the GUI Emacs.
Martin: Yeah.
Amos: Using Emacs inside of tmux.
Martin: Like I'm not that nostalgic for the, uh, for the command line, actually.
Amos: I got, I got a habit of it because up until a couple of years ago, I lived in the middle of the woods and had really bad internet. And so if I was going to work with somebody else, I couldn't do any of the screen-sharing applications because my internet was too bad, but I could use a reverse proxy and a tmux, and then we could share the terminal. So I got used to doing most things in the terminal, so I dunno, I thought, I tried it that way for a while, but it didn't really, everybody kept telling me I needed to use the GUI. There's apparently some functionality that's in the GUI that's not in the command line, but I haven't learned about it yet. Going back to the vanilla Emacs.
Martin: Well, inline images, in org mode, for instances, I don't know if you can do it in some terminal. I don't know.
Amos: I'm not sure.
Martin: No, I, I just, uh, on my NX OS, I have chosen to go with Bagel and, um, and then Swabian, and then I, I basically pulled a practical user interface Emacs up in that it's like, I'm so not nostalgic for the, for the terminal, but I do like some, some, uh, user interface. Have you tried programs like Quicksilver or Lunchbar, or Butler or Mike OS?
Amos:
Um, I used, uh, Alfred. And I used Quicksilver a long time ago. I like Alfred. I also found with, uh, LSP mode, you can turn on a dash, there's a dash plugin, too, for Emacs. So you can cause to open up dash documentation, which I actually like better than the documentation in the editor window.
Martin: Yeah, but, um, these launcher applications, they kinda, I think they bring in the best from, from the terminal because typing is good. I think typing is good. It's, it's precise. You don't have to touch your mouse for anything. Mouse is, uh, annoying.
Amos: I feel like if I know what I'm looking for, that I know what to type and anytime I have a mouse in my hand, it's because I don't actually know what I'm looking for. It's like, I feel like I'm going through a bunch of file drawers looking for something, when I just want to be able to say, this is the one thing I know I want, give it to me.
Martin: If you combine the, uh, at the typing with fuzzy with then I think you have something really, really strong where I get the Quicksilver. I remember when I, I use that with you, you basically learn how to say, I don't know, uh, a program we own all the time, like Emacs, then you just, uh, you learned that you are activated and then you say EM and then enter. And then it had this thing where you, you invoke something like EM then you get to Emacs and then you had the action you could apply to it where the default action for programs was to open. And, but you could also switch to the action, and then you could say, find a find in finder, and then you would open finder and, uh, and be in on the location where you had Emacs installed. So this, um, this concept of finding a subject and then applying something to it, is really interesting, um GUI, and I guess in the Emacs, you've got stuff like Helm. And also the one I use,, Ivy.
Amos: Yeah, I also switched from Helm to Ivy recently. Um, and there were some things that frustrated me at first until somebody showed me how to turn on fuzzy search in Ivy.
Martin: That’s, um, on, by default.
Amos: No, I had to type like exactly the characters in order instead of being able to like, you know, say M or A for app, and then M instead of being able to skip letters, it made me type all of them. That was the default.
Martin: I think you use space bar to, if you, if you apply a space, then it's creates this fuzzy.
Amos: Oh, if you do a space. So there's also a configuration where you don't do a space and you just type, and it'll be fuzzy. I didn't know the space thing though.
Martin: Yeah. I think that's the reason I, I kinda, I kind of learn to live with it. It, it is amazing how fast your brain can rewire itself to, to these things.
Amos: Yeah. I don't think that I've used like a file browser in a project, unless I was trying to teach somebody about the structure of the project, to, to open a file and many years, even in dev.
Martin: Like, you've got to have that, like, if you don't have, um, have that then you should perhaps consider Emacs.
Amos: Yeah. Uh, so I did.
Martin: Get some, uh VIM users and, yeah.
Amos: I put a, I don't know about that. I did put a link out on Twitter and in, uh, our, our little, um, chat that we have to see if anybody wants to join us.
Martin: In the Slack.
Amos: Yeah. In the Slack? I'm sorry I meant Discord. I don't know that anybody will show up, but whatever. I told them, they got about 20 minutes. Yeah. And then you have to get back to your client work, right?
Martin: Yup.
Amos: I don't, I don't really have a whole lot else. I'm all Emacs'd out. You've exceeded my knowledge. Which is not hard.
Martin: Too much Emacs.
Amos: It's not hard.
Martin: How's the kids?
Amos: Uh, the kids are good. Um, all being all home all the time, I think is starting to grate on them a little bit.
Martin: Did you homeschool before or-?
Amos: Yeah, we did. Um, but we still like went places and did things. Uh, I also have, I have one kid that, uh, goes to public school. Um, so he was gone and now he's home all the time. And then my daughter's home from college. So she's home all the time. And then, um, I have one daughter that had homeschooled full-time and then we have a son that was three days a week out of the house at, at a different school. Um, he did two days at us homeschool high school hybrid. So he goes to high school. It's an all boys school two days a week. Then he has, uh, another gifted ed program with the public school that he did one day a week. And then he was home two days a week, but, you know, everybody went out, even though we homeschool, like we had art classes that were not at home and were with other kids and, um, different things that we did. And now we're here all the time. My daughter has been, she has, she was in Irish dance when all this happened and she's actually been going into our foyer on the tile and she gets on a Zoom call with her dance teacher and dances. So that's, that's pretty funny to watch. Uh, and then I gotta clean up black scuff marks off of my floor, but it's also nice to see that that people are, are trying to make sure that they're not stopping everybody's extracurricular activities in life and figuring out ways to be able to do it at a distance.
Martin: Yeah. It's like a lot of creative stuff going on with the, with the same teachers. And I think it will be interesting to see how, when we get out of all this, how much this sticks.
Amos: I did see, um, something that I thought was, was pretty entertaining, speaking of creativity, it was called cow to meeting. Cow to meeting. And there's a company in California that has a farm. They have like llamas and all kinds of stuff. And they will for a donation, I think they're a nonprofit, and for a donation, they will call into your company's Zoom meeting with a Llama or, or whatever. Uh, and also give you tours of their farm. I thought it was pretty funny.
Martin: Could we, could we get one on the podcast?
Amos: Maybe at some point, but they're booked all the way out through like partway through next month. It's pretty crazy.
Martin: It's so crazy with the booking.
Amos: Yeah.
Martin: I can see delivery trucks on the street outside, and I try to go to like the grocery website and then they're booked out for like three weeks.
Amos: Oh yeah. Um, we've been ordering groceries and you might as well go to the store if you can, but then you don't even know if the stuff you need is going to be there.
Martin: No, I basically, my store use right now is I go once a week and then buy whatever, if there's fresh vegetables, which I really, really miss, uh, then I buy some of that and then I have that for a couple of days. And then I just, um, have some frozen goods. Like spinach is pretty good for freezing. Yeah. It's like, it's horrible. Like when you, I guess we, we weren't really, I guess it would be nice if the grocery stores could just bump up some, um, some of their capacity on the deliveries by, by getting in contact with some people who has some, some trucks that are out there, I'm sure they're out there like, uh, which has coolers and stuff like that. Um, such that they could just ramp up their delivery service.
Amos: Yeah, that would be nice.
Martin: Yeah. I guess it's not a problem everywhere, but like the stories you hear, like, uh, right now London is okay. I think we're on the, on the scale of, um, of the, uh, infection. So I think we're heading to peak right now. Um, but of course, I don't know much. Personally I don't, I really don't want to get this thing because it sounds really, really nasty, even if you're, if you're young and fit. When they say, uh, as I understand it, when they say mild, uh, infection, it is a mild Corona infection. It's not a mild flu, it's it really gives you some, some damage. But I, I'm not a, I'm not a doctor. I just, I'm just a concerned citizen who stays inside and protected.
Amos: Yeah. I don't mind. I don't, I don't mind staying inside. I'm I'm, uh, I miss people, but, um, I can make it. I'm not so uncomfortable that I'm like angry or anything. And I think it's best for society for me to just not be out and around people. It's, actually, that's probably true whether there's Corona virus or not, I should, best for society for Amos to not be out.
Martin: Yeah. I, I had, uh, I realized something there about myself as well.
Amos: Well, I don't know that we're going to have anybody else show up today. I wish they could hear us now, but we're not really live. So-
Martin: It’s not a live show.
Amos: It is not a live show. It's semi live.
Martin: It’s indirect.
Amos: Oh, I, I have been tweeting about this a lot lately too, but Steve Bussey's book, um, Real- TIme Eixir is out and, uh, Real-Time Phoenix and go buy it. People should buy it. Like that is a fantastic book. Steve did a really good job. And in the way he teaches, I think, is it, at least for me, the style was really well done. Project was interesting. And I, and I felt like I was learning along with Steve instead of him just telling me how smart he is.
Martin: Yeah. That's a, I haven't read it myself, but the, uh, the thing about sounding smart is pretty, I think there are some things you can do to, to pull that off and then like, just start talking about monads. And then bang on 90% of the room, more than 90% of the people in the room doesn't know, know anything about monads.
Amos: And, and the 5, out of the 10% that does 5% of them just know what the term is. And barely really know. I spent a long time trying to understand monads and monoids and, and functors and like what all that meant. And I don't know. I think I kept trying to look at them as things, and it's, it's really more like an object where you have like a behavior and state combined. And I think people concentrated way too much on type signatures, for me, at the beginning to be like, that's, I was like, what? I don't understand how this is useful, or where you're going with it.
Martin: Um, yeah. You'll have this handy diagram of A points to A mark. Now, you know what a monad. Good.
Amos: Thanks. Thanks for that. I appreciate that.
Martin: Yeah. So on the grand scale of things, uh, and being totally honest, do you think that learning COBOL was more valuable or learning what a monad is? Like if I was, if I was to start today and I, I had these two options, for my career path?
Amos: Well, which one is going to make you the most money today is probably COBOL. Um, I don't know. If those are your only two options, I guess you need to learn to program, so COBOL, but I think if you could really understand how , like monads and all those types apply to your program, I think you would need to know a little bit of programming before you would get anything out of it at all. And then for the most part, I don't think you ever really have to learn it.
Martin: Yeah.
Amos: Thank you. You can get, you can go a long way in a career with not knowing what a monad is.
Martin: Well, I personally like 12 years ago when I started my career, I didn't know what state was. I, I basically came from a background where I, I was building websites and then I started doing JavaScript and I was concocting some, some machinery where I really think I would have benefited from knowing formally what a state machine is or building modal interfaces, for instance. Uh, but as such, I, I just, I came to, I came to make solutions without knowing what a state machine was, even though I was using them all the time.
Amos: Right. Yeah. I, I, I get that a lot from people too is like, oh, like when I, where I was trying to learn what a monad is, like when I heard this term and people talking about it and I didn't know what they were doing, I kept trying to get them to explain it to me. And they would say you're using it all the time. And I would say, well, k, well show me where, and then they really that's where it fell apart was nobody could show me or tell me.
Martin: Yeah. And I think that's, um, that's one thing about learning and teaching. Like sometimes I think more often than not, it's enough to build up a new solution of how something works where you don't really need to, like, if, if you know, just enough of it, and if you can make solutions with it, then you're good for the most part, but necessarily knowing how, how it works down to the bits. I don't know if that, uh, there's a, what do you call it? There's a point of diminishing returns.
Amos: Yes. Yeah, absolutely. But I don't know that I would pick COBOL as the first language either.
Martin: What, what, what would you pick as the first language for somebody who-?
Amos: First language for somebody who just wants to learn to program? Um, I would actually pick something, uh, I, I know that it's, it's frustrating for any big project, but I think I would pick something like, like Ruby, Lua, Python, one of those. And I, I really don't like Python, but I would still pick that over, over something like Java. Java, there's just so much that you have to learn and do before you can get anywhere. And I think in interpreted languages, like Ruby take away some of that, that you have to learn. Cause you can just write the file, and then you run it. You don't like write the file, compile it, deal with a bunch of compilation errors and warnings until you get it done and then send it out. And then, and then also like Java, you just, there's a lot that you have to do to just print "Hello, world!"
Martin: Yeah. Public versus static main.
Amos: Right. So, uh, and, and see, like I grew up learning, I learned with Q basic, uh, originally and, uh, TI basic on the calculator, on the Texas instruments calculators. Um,
Martin: I remember that from like, high school. It wasn't yet high school in Denmark, but, uh, I do remember like, uh, learning something in math class and then just programming, uh, some, some basic that's basically, uh, solve the problem. And then I distributed it to the entire class and then nobody knew how to do it. They knew how to input X or Y and set. And then.
Amos: Yup. I did that, um, making, making my math class easier, um, and, and made games on the calculator too. And distributed that to people. Yeah. Um,
Martin: What kind of game do I know you?
Amos: Um, I had one where I had, um, characters on the side of the screen that would like look like a road going back and forth and go to thinner and wider. And then I had a character in the middle of the screen, and I think I used a, uh, upside down triangle, um, that you could move just side to side and it would speed up and move in and out. And you got points based on how long you could survive without hitting the wall. Like that kind of stuff. But it was a lot of fun and it got me into programming, uh, and I learned C and Pascal, but I don't think that any, like, I still wouldn't start people with C and Pascal. I, um, I mean, I, I think that it would be really cool if computers still came with like Q basic. Cause cause-
Martin: Like COBOL or basic?
Amos: Yeah. Something like that and all the documentation. Yeah. Cause that's, that's how I learned. I and Q basic wasn't even advertised on the computer. Like it came on the computer, but there was no icon for it. I just happened to run into it and was like, what is this? And it had a help menu of the top and I clicked it and it had all the documentation for the whole thing and I just started reading.
Martin: Yeah. I, of course I'm of the school that I think that the computers should build up into the basics.
Amos: Yeah. Yeah. That would be you you're, you're maybe an old school person.
Martin: Um, so I guess my family, we bought XC 64 second hand. And at that point, the Commodore Amiga was already, uh, a thing, that we were one generation behind. But that was good because then I got to experience the, uh, the true beauty that the Commodore 64 was. And to this day I am like my, if I ever get kids, I would start them off with, um, with an eight bit machine until they're like eight years old or something like that. And then they can get a 16 bit machine until they they're like 14 years old. And then they're ready for the true power of-
Amos: Of a four eighty six?
Martin: Of a Unix machine.
Amos: Oh, okay. Nice. Yeah. I think, yeah there's, something about that, those basic machines, like the Commodore 64, that they don't, they don't do a lot for you, so you have to make them do what you want, but there there's simplicity in that too.
Martin: Yeah. Like, uh, where the instruction is basically, uh, like you can, you can trace the instruction on the motherboard. It goes to this gate. And then like, when you, when you punch in these numbers that will end up in this chip and then it will produce a sound. Like that's, there's a beauty in that. You can understand it. Where there's no way to understand D and that's of course the, I guess the problems that we have with Dumbarton computers that nobody understands how the predictive, um, uh, coat execution works. And then we got all kinds of problems where you can basically triggered to, to dump your private keys and stuff like that from memory, by, just by visiting a website.
Amos: It amazes me when people figure that stuff out because there's, there's just, there's so much to know now, in order to get anywhere, but, and then you look at things like machine learning and that's just a black box. I mean, we understand how you build the box, but what happens once you get input and you get this magic output?
Martin: I don't know, this is something I just ramped up with something like that. But there are machine learning solutions that they cannot use because they cannot prove how it came to this conclusion.
Amos: I could, I could see that. Yeah.
Martin: So, so for medical, medical, uh, like diagnostics, uh, they cannot really, um, at least, um, rely on 100% because I'm not a doctor. This is not-
Amos: I could see that. It seems like there's a little bit of fear there. Like what if it comes up with the wrong answer? There's no way, there's no way to say if it came, like how it got to that wrong answer or right answer. And so it's hard to trace, like it's a system with no observability, right?
Martin: Like you know what would it be smart? If we just had, uh, like clouds and clouds of computers, just buying and selling papers, like really, really quickly, and nobody knows what's going on, but a lot of revenue is generated. Like, should we build a system like that?
Amos: Should we? Or have we?
Martin: I think we have, we shouldn't have. This is depressing isn't it?
Amos: It is. I don't want to end on a depressing note, but, um, I've got, I've got other stuff I gotta get done today and apparently need to go read some more about Emacs.
Martin: It's self-documenting so a control H-I.
Amos: Control H-I. And control H- was it control H-K? Is that the one where you then do a keystroke and it tells you the help? That, that one's awesome too.
Martin: Yeah.
Amos: Cause, cause I have people say, oh, just do this, you know, control H whatever. And I'm like, well, what does that do?
Martin: To bring it back to the Elixir here, so, um, I think that's one of the, one of the great, great, great things about Elixir is that it's kind of self-documenting as well. So you've got your in IEX you got B for, a, what is that? It's callbacks on something. So you can say B and E on a module that implements callbacks, then you can get documentation . And you can say T and for type.
Amos: And "I"
Martin: Yeah. Um, H of course, but, um, I think this is, this is one of the insights that, uh, Jose Valim had, and he did a really, like, type was a really smart move because I think, um, a modern language should be self-documenting and it should come- that came later. But, uh, but yeah, uh, formatter so that we don't end up in discussions about how we should format stuff. Now we can just complain on the mailing list about how the formatter, is, uh, destroying our code.
Amos: There, there things that the formatter does that I don't like, but I also am, will still say let's use it. Just because I don't want to think about it. It's nice that if I go look at somebody's code, it looks exactly like it was formatted in the last thing that I looked at without having to refigure.
Martin: Cases where you want to, for instance, pattern, pattern match on a tic-tac- toe game where you, you want to align them such that, uh, in your pattern match, you have to board, uh, with, uh, free times free. And then you sit there painstakingly aligning your code, and then you run your formatter and then just goes," I see what you're doing here, but I don't like it." Send it on one line. Let's split it into nine lines.
Amos: Uh, could you imagine doing like a bit board implementation? Do you know what a bit board is?
Martin: A bit board? Like I know what it is, but could you please explain it to the listeners.
Amos: So yeah, um, a bit board often is used for like chess engines. And so in, you will store bits, um, for each square on the chess board. So you'd have a 64 bit, I'll call it a register, and, and you would put like a one where every pawn is, and that would be your white pawns, and then one for every black. And that would be black pawns and one for every, um, knight. And you would store all these as separate 64 bit registers, and you can do like ands and ors on them.
Martin: I think I've heard of them as bit fields.
Amos: Bit fields, okay. We called them bit boards when I was using them. Um, maybe maybe bit board is, is more specific to something like chess. Maybe that's what they called it because it was chess, but.
Martin: I can pull a, a module that I built for Elixir called Bit Field Set, which, uh, which has an, it was an interesting problem see because I was, uh, one of the first projects I tried to tackle with Elixir was a bit turn find. And you, you have bit fields and bits are to, to communicate between the peers, which pieces you have of the bit turned. So how do you, how do you represent that in, in a way that is like fast to, to execute because you, when your bits aren't flying, if you're interested in finding peers that has a piece that you're missing and, and this peer has to miss a piece that you have, such that you have something to offer to them and they have something to offer in return, and then you, you basically ask, uh, can we please exchange information? And then the, the other people either accept or not. Hi Connor. And, uh, and the, uh, so I ended up building, uh, I was looking at Louis', um, bit turn client for Erlang. So I was talking a lot with him because he was also living in Copenhagen at the time. Um, yeah. So, so people who don't know Yesper, he's an old time, um, Erlang guy, and if you go to Stack Overflow and you find a preferred Erlang question and the user name is, uh, "I give crap answers," but they're not crap answers, its Yasper. And its always funny.
Amos: I didn't know that was his username. That is awesome. Uh, his blog is really good too.
Martin: Yeah, jlouisreablings. But, uh, he had in his implementation figured out that he could store a bit fields in numbers because then you can do a bit manipulation on, on the number. So it's like, you can say, uh, like I have this integer set, the, uh, uh, of this bitesize. Flip this bit. And then you basically have a, you have a bit field implementation. If the two numbers are the same size, you can, you can do stuff like, um, like Anthem and then you will get a new bit field that represent, um, all the pieces that are in the, uh, between the two, shared between the two. And you can knot them, then you can figure out which one has, which one are represented in this one that is not represented in this one. So this is basically what you want. So that is what my, my project, if you to go to my GitHub, https://github.com/gausby/bit_field_set, implement that as-
Amos: Did you, did you ever, ever complete your BitTorrent client?
Martin: No.
Amos: No. Man.
Martin: I think I made it so far that I lost interest. Actually, I gave a conference presentation talk about it, and then I lost interest.
Amos: Where, where did you give that?
Martin: It was in Stockholm. I think it was 2016, but the video recording was lost.
Amos: Uuuugh!
Martin: Because the, um, the SD card and the camera recording, it was, um, I think there was a fault on the SD card or something like that. So they couldn't recover the information. So this is why you always have redundancy. You should at least two cameras.
Connor: When I first started doing Elixir. I saw your BitTorrent client, and I was like, " Hey, this is unfinished. I could do this" And so I started one and got to about feature parody of what yours is, and then also lost interest. Just like, it got to a point of where like, oh, like the core of this is done and now it's boring.
Martin: Yeah. And also I didn't get to, the distributed ETS table. It's should be really easy because it's, um, as I've been, somebody explained to me, it's, it's like a hash table it's just distributed.
Amos: It's a perfect explanation of a distributed hash table.
Martin: Yeah, we should, we should get that project up and running again. Um, I think it was called Hazel, um, my implementation.
Amos: So it sounds like Connor and Martin have both worked on this. Now you just need to put the two together and have two half implementations.
Martin: But just run diff.
Amos: So what are you up to Connor? Joining the group today.
Connor: Just hanging out. I, um, I'm trying to, I'm working on, um, meshing and the security there, and I've come to the conclusion that I have no idea what I'm doing. And, um, I'm basically waiting for someone else to do it for me at this point. Just kidding. No, I have to keep, I've, I've been digging deeper and deeper into the wifi, the networking libraries that Linux supports and, um, prying along the way.
Amos: Have, have you found any of them that you think are good? Because, most of ntework support stuff's pretty terrible.
Connor: Well, I mean, Yeah. I mean, define good. It works. So it's good. Um, like I, I'm not gonna say that I'm a snob for writing pretty or good code or anything like that, but, uh, I will say that WPA supplicant, um, is a handful to navigate. Um, it's a, it's a beast. I mean, like it does a bajillion things, so of course it's going to be a large project and it originally wasn't even, it doesn't even seem like originally it was meant to be the WPA supplicants was the important part. Uh, it's the same project as host APD, which is the, um, access point version of WPA supplicant. So, uh, your router runs host APD, et cetera. Um, and WPS applicant seems like it was a spin off of that project, and they're both in the same repository and they both share a lot of code. And like, there's a lot of stuff that's just like straight copy and pasted from one project to the other. And, um, like some things work differently in both projects. And it's, it's, it just it's, it's got the feel of something that's been around for a really long time, because it has. And also, you know, only, no one ever adds anything to it until they absolutely need it. And, you know, they needed it yesterday. So they're just going to dump as much stuff as they can into it. And then hosting the, you know, the WPA supplicant team merges it and just calls it a day.
Amos: Maybe that's what Martin we need to deal with Tortoise. You just to keep moving forward, you just merge everything.
Martin: Actually, I think I have some pull requests that I could merge, but the MQTT five branch has diverged so much since that doesn't really make sense. And I, I think when I, when I merge that eventually it will be a totally new beast. So there will be new bugs, new perks.
Connor: Um, are you still, I haven't been following lately. Are you still working on MQTT five on it?
Martin: So, yeah, so as I said in the beginning of the podcasts, I recently replied to an issue where I once again promise that I will soon be back to it. So that's, that's the extent of work I've been doing for a good while.
Connor: I wrote a MQTT broker in Elixir based on a lot of what you had. And I got as far as MQTT 3.1, and then there was no MQTT five client in Elixir available. So I never bothered because I didn't want to write my own MQTT client, test my own MQTT server , or broker, I'm sorry. So then I gave up.
Martin: I don't really have a MQTT server for, uh, for my tests, but I do have, um, I have a TN server that exposes a TCP port, so, and then you give it the script that it will- And I use my encoder and my decoder functions for, um
Connor: Oh, to encode and decode the packets. Interesting.
Martin: That's what I did. I gave that list of, um, of packages that it either expect or dispatches. So, um, I, I rely on if, if the GenServer received something from the client that it doesn't expect in this point of the test, then it will fail and then it will crash the, um, the test process. Then I can see which one and, and for what reason, and, um, when it receives something and the next command in the, in the script is just sent, then it will send something to the client. And that's basically how I test tosses.
Connor: Well, if I ever get around to finishing my, uh, my broker, you can use it in your, uh, in your tests. I, uh, I think I have a dependency on Tortoise actually, uh, for tests, uh, for the test environment, because I'm using it for, for integration tests.
Amos: So Tortoise can use your broker and your broker can use Tortoise to test. And so if there's any problem in either one of them, it'll just be a circular issue, right?
Connor: Yeah. At a certain point, we're going to make our own, uh, protocol instead of using MQTT.
Martin: Yeah. It's a, it's a funny protocol. Does some-
Connor: I enjoy that MQTT protocol, actually. I think it's, uh, well laid out. It has just enough stuff in it. MQTT three is a little lacking. Um, I really didn't enjoy when I was implementing the lack of descriptors for errors, which MQTT five solves this, but like, you just get booted off the broker and it doesn't tell you why or when, or, you know, what reason. And so that was, I think that was my biggest gripe about MQTT 3 or 3.1 is the latest version of 3. I believe 5 solves this.
Martin: It was as simple as doing the 3.1 where the specification was 68 pages, including the acknowledgement and the index and all that, where the new one is 120 pages or something.
Connor: Yeah, I've only skimmed the MQTT five spec. I've not actually dug deep into it
Martin: And they have, um, I think the story was, and this is like, this is how I see it, because there was a guy who wrote, uh, if you printed his blog posts, you would, you would end up printing 10 minutes or something like that. 900 pages, and keep basically just lambasted MTTC for lacking tests and lacking this, lacking this. And you can't, do that, you cannot do this and this and this. And then a year later, MQTT five, is there.
Connor: They just took everything and, uh, addressed every single complaint that that guy had.
Martin: Yeah.
Connor: That's funny.
Martin: So he basically went, "No, uh-ah!"
Connor: No, you.
Martin: Now we got, uh, you can extend every protocol Hackett type with privacy's, user defined privacies, except for the ping, because, uh, if you could set user defined properties on a ping then you could use the ping packages for everything.
Connor: Right. You wouldn't even need any other, you would basically just have like a TCP socket at that point on the ping messages.
Martin: Yes. So they didn't add it to that, but they add user defined properties to every, uh, every page, except, um, like including the, um, the handshake and the, when you call it, the, the messages that goes back and forth when you, when you send a message with a quality of service than the, the response messages. Some of them have to respond like replying messages. You have to stand-
Connor: I also remember what I looked at, um, yeah, the in- flight messages. I also remember when I looked at the MQTT five spec, I remember it kind of like basically having nothing in common with the MQTT three spec, other than like the names of packets. Like my entire, my entire broker, uh, like GenServer or whatever it is, I can't remember would need to be like restructured entirely to support it just because of like, it used to be like one request equaled, one response. And if I remember correctly, MQTT five has like a concept of, I think, like you said, like in flight responses. So you can have, like many, many different responses to one packet type. Or something to that effect.
Martin: You can only have, uh, so quality of service to message will, like it will set the pop publish and then it was set the, um, uh, in- flight message practices, uh, received. And then you'll acknowledge that you have received the, uh, acknowledged that the server perceived. And then.
Connor: Right. Acknowledge all the things.
Martin: And then the server will send back the complete, package complete. But that was also in uh, 3.1. And it is an error if you receive something that is not, um, you don't expect at that point. Yeah, of course. You've got, um, you've got support for multiple, uh, in-flight messages. So as long as you- how much is it? It's a 16 bit, um, integer for the, uh, for the, uh, for the package ID. So in theory, you should be able to have, uh, some 32,000, how much is it?
Connor: Right. Whatever, whatever you can fit into a 16 bit integer.
Martin: Yeah. But if you have that many messages in the, in in -flight then, then you probably have a problem somewhere.
Connor: Yeah. That's a different issue. You're allowed to do it. That doesn't mean you should.
Martin: And if you're running around, what's
Amos: Uh, somebody's uh, alarms going off and I got tired of hearing it and they weren't shutting it off, so I had to run over and turn it off. I also didn't know if it was showing up on here, if you guys could hear it going.
Martin: Actually I could.
Amos: Oh, sorry.
Connor: I heard a little jingle.
Amos: Yeah.
Martin: But I enjoyed it. So I didn't say anything.
Amos: I hate, I think it's my wife's alarm for, uh, lunchtime. So I should probably go eat while food's warm. That's the one thing about being at home. We keep having lunch. It's really nice.
Connor: Yeah. I keep on having to go upstairs and like stare in the fridge for five minutes. Like, uh, oh man, I don't know what I'm going to eat. And then I eventually just give up and have another cup of coffee and come downstairs again.
Amos: If I didn't have kids, that's probably what it would look like here but,
Connor: Yeah. You gotta feed those guys.
Martin: No, no dietary expert here. And this is not dietary advice or anything, but you can add butter to that coffee and some coconut oil.
Connor: Maybe you can add butter to the coffee.
Amos: A little bulletproof coffee.
Martin: You can put some cinnamon in it.
Amos: I put cay, I put cayenne pepper in mine.
Connor: No you do not.
Amos: Yeah. Whenever I do bulletproof coffee that he's talking about, I put cayenne pepper in it and sometimes a little bit of a cocoa just a cocoa flavoring. It's like a sugar-free carb free cocoa flavoring. And so it's like this spicy chocolate coffee buttery goodness.
Martin: Yeah. I tried the bulletproof coffee once and it's not as disgusting as you would think.
Amos: Right.
Martin: Because it's.
Connor: Not as disgusting as you would think is what you need, clearly.
Martin: Like if you,
Connor: You will not die if you consume this,
Martin: It should just have a star on the packaging. Not as disgusting as you would think.
Amos: I was at the sewer processing plant the other day. And it was not as disgusting as you would think.
Martin: 5 out of 10. Not as disgusting as you would think.
Connor: I did not die.
Martin: I guess that could be the name of the episode.
Amos: Sounds good. Not as disgusting as you would think. I think we can stick with that. So I'm going to go ahead and get out of here and I guess I will talk to you all later.
Connor: See ya.
Martin: See ya.