Adi_Iyengar:
Hey everyone and welcome to another episode of Elixir Mix. Today on the panel we have Alan Wymer.
Allen_Wyma:
Hello.
Adi_Iyengar:
And myself, Adi Iyengar, we don't have Sasha joining us yet, but we do have a special guest today. Amos King? Did I pronounce that right?
Amos_King:
Yeah, it's Amos. That's cool,
Adi_Iyengar:
We
Amos_King:
though.
Adi_Iyengar:
was, oh, I'm sorry about
Amos_King:
Yeah,
Adi_Iyengar:
that.
Amos_King:
I've been called Worst Things. It's all right. Yeah, thanks for having me.
Adi_Iyengar:
Yeah, so Amos, why don't you give our listeners a rundown of what you do and why you're so popular and why everyone loves you in the Alexa community.
Amos_King:
I didn't know that everybody loved me. I've been around the Elixir community for a while. I can't even think of what year that I started Elixir. Then three years ago, I think we started the Elixir Outlaws podcast, which is a pretty free form, just BSing like you would have in a hallway at a conference. That's kind of the whole idea behind it. Then I run a company called Binary Noggin. where we work with different customers, helping them build custom software, either being their team or being part of the team. Pretty big component of pair programming, things like that. So that's where the name comes from. And then I just, you know, I think that you guys talked about having me come on a little bit because of a blog post I wrote about embedded systems in Elixir, but it's really like... Beam everything. Just put the beam everywhere. That's really what it's about.
Adi_Iyengar:
Awesome. Awesome. I guess let's talk about that blog post a little bit, right? I think it was like building embedded systems in Elixir. So yeah, I guess
Amos_King:
Mm-hmm.
Adi_Iyengar:
give us some background. How did you get started with NURBS or just embedded systems? And what made you write that post? What experiences led to you writing that? All that stuff.
Amos_King:
Alright, yeah, just tell me to shut up if I go to you one. Um, okay, so in... Man, I gotta go back in my head. Um,
Allen_Wyma:
back and you're not gonna
Amos_King:
well,
Allen_Wyma:
know
Amos_King:
I...
Allen_Wyma:
right?
Amos_King:
Do what?
Allen_Wyma:
Go back to your noggin, back in your noggin.
Amos_King:
That's right.
Allen_Wyma:
Try to put it back to your company. Give you a plug.
Amos_King:
Hey, thank you. Appreciate it. We need it. So yeah, I went to Elixir Days the last year that it was in Florida and spoke there and I met Frank Hunliff there, who was creator of NERVs. And I had, maybe I should go back a little bit further. So I had been in the Air Force for 13 years and I did satellite and radio communications and I fixed satellites. communication devices, not satellites themselves. Those are in space. And so, you know, getting out multimeters and things like that was really interesting to me. Programming was still my passion, but I really like hardware. So for a long time I did hobbyist hardware things. Helped out on a device called TESL, which ran Node.js, which I thought was... kind of a really cool thing for hardware and the event loop. And then eventually hated it. I'm not the biggest fan of JavaScript and Node. I think TypeScript makes things better. But I look at Node. Node is a Gen server. It's a single loop that runs over and over. It's a Gen server with maybe some basic task stuff that you can do. And so doing things in parallel, the startup times, everything like that was just not, not what I wanted it to be. Um, and then I had written some secure chat software that the server was in Java. So this is like a big roundabout way to get to nerves here. And whenever, uh, we started to try to federate those servers, the more servers that we had, we found things were, were harder and harder to do, harder and harder to deal with. especially in the Java land. So we kept the client written in Java, but the team, I was no longer on that team, but I had a security clearance and some background knowledge that I needed to be able to help out on some things. And so they started writing and rewriting the server in Erling and the fault tolerance and the distributed nature of it made it actually like really nice and simple to... Chat is like right in the wheelhouse, right? And multiple nodes connected to each other right in the wheelhouse of what the beam does. And at the same time, shortly after that, I was involved in Rails and Jose was starting to come out with Elixir. So long story, jump into Florida. So I happened to be at the airport at the same time as Frank Hunlith on our way out after the conference and I just stopped to start talking to him. And he said, Hey, there's this thing called GrovePy. Uh, it's got a bunch of I2C connectors and can plug them in. And I really want to write a library for it. At the time, uh, I was between some contracts and had a little time. And so I was like, Oh yeah, I'd like to get into this and see what this is all about. I love hardware, uh, and I've worked on it in the past. And so I started, started digging in to it and writing a GrovePy library. It needs to be dusted off if anybody wants to use it now, but it's still sitting around there. It allowed some quick prototyping and things like that. The next year at Elixir Day, I did my talk on nerves, actually, but it was more about testing and how to build a system even if you don't have the hardware in place. We used a lightning sensor that Frank Headlund had sent to me. I wrote all the code with tests. and never ran it until I was on stage. And then I brought a Van de Graaff generator to generate some lighting. And it worked. It worked on stage. It aired once and then worked the second time. And it actually told me that it was manmade lightning, which was really kind of cool because the sensor had said that it would be able to tell if something was manmade interference or natural lighting. So I guess that's my nerves trip into nerves.
Allen_Wyma:
But actually, I want to talk about the like the localized testing part. Because when you test right, I mean, you can still test but you can't really test for everything because I mean, you're missing that hardware input. So you can kind of stub things out right? Isn't it how you would test this stuff?
Amos_King:
Yeah, that's really what I did is so all of the components that you would interact with have data sheets and those data sheets are remarkably accurate. Sometimes they're hard to read at first until you get used to reading them, but they go through a lot before any hardware comes out with a data sheet. There's a whole lot of... checks and balances there to make sure that the data sheets are correct. Because you have a lot of companies depending on these components. The only time that I've found them not, and while the data sheet was fine, I've had faulty hardware before, which is also kind of rare. So I just wrote, you know, like the nice thing about functional programming in Elixir is you can have all these data in, data out functions. And so you can take that. that data sheet and you know what the device should be sending and what you want to come out of it. And then quickly changing it from the binary that comes out of the device into atoms or data structures within your app. So you have these little conversion functions that convert all of that. And that's like your whole hardware layer. And you just have to write that conversion. And then binary pattern matching in Elixir is, makes that super simple. Like if you're writing that and see you're doing bit shifts and all kinds of things, and sometimes it's hard to read without having the data sheet next to you of exactly what this is doing. But with the binary pattern matching that's built into Elixir, you like take the data sheet and you just type in exactly what the data sheet shows. And then that's your function head. And you can have it convert to whatever data structure you want. And so writing those tests is pretty at normal testing that most of us are doing all the time. And so you just, you get to that level. And what that buys you is that now I don't need the hardware, right? Especially in our current world where supply chains are a lot slower than they used to be. Maybe you can't get hardware for a while. And so what can I do to be able to move forward without that hardware in place? And I gave that talk before we had supply chain issues, so that was really weird. that it really applies today. But then even outside of supply chain issues, deploying to hardware restarting and hardware is a lot slower than what you can do on your development machine. So if you can develop on your development machine, that also saves time and money. Sorry, I'm coughing too.
Allen_Wyma:
Yeah, you guys coughed about the same time I was about to say cough brothers for a second.
Adi_Iyengar:
I'm out.
Amos_King:
Yeah.
Allen_Wyma:
Maybe for once I'm the only one who's healthy. That's that's good.
Adi_Iyengar:
You
Allen_Wyma:
Usually I'm the one who's coughing on something.
Adi_Iyengar:
So I guess, I mean, full disclosure, I have yet to use NERS for a complete project. I have done the initial setup a couple of times. I think this was like a while ago. And I remember it used to be very hard to set it up and like not run and stuff. I was the guy who's done it two or three times and quit. Like, okay, this is not gonna work. But it looks like you obviously have enough experience with this on your website. I can see that you listed as one of the services. at least I imagine the IoT, it kind of is a subset of, you know, the nervous development is a subset of that. So I would love to hear about the projects that have been involved in as part of Binary Noggin, doing nerves, you know, maybe if you can discuss what companies you've worked with and what type of stuff are people using nerves for today.
Amos_King:
Yeah, I think the two biggest that I can talk about is I worked with Frank Hunlith at SmartRent. So doing their base station came in to help out with a protocol and they had a chip that they were using and using a protocol for it. Unfortunately, there were some things that came to light from the company that made that chip. that they were like, oh, you don't have to do all of this protocol work because our chip has a restful or HTTP interface built onto it that you can actually use and you're more likely to pass our security audit. So we ended up getting rid of a lot of that. But in the meantime, we we spent a lot of time there talking about testing hardware and everything and setting up testing strategies. And I think that really, really worked well for them. And they are They're all over the community now. If you look, they're supporting everything. I mean, they got Frank, so of course they're going to support everything. They're a fantastic group of people that work there. And then the other really, really big one, and this is something that I find really interesting because companies don't talk about it, is Schneider Electric. So in the United States, a lot of people might know them as APC. but they make uninterrupted power supplies and power management and battery systems and all kinds of things. And they have some battery systems that are used to keep power clean and buildings running even during power outages. And we replaced the network management controller in there with Elixir. We worked with their team. Their team was C developers and there was one internal person who was kind of a champion there to try out Elixir instead of using the RTOS real-time operating system that they were using. So he knew it and then they had me come in and we worked together with these C developers and they're still writing Elixir today and that's been a few years. best ways to know that they're still writing Elixir, because again, the company doesn't talk about it. I'm trying to get companies to talk about it more. Is that they are... If you go to, I think, sse-apc is their GitHub account, and you can see that they have Elixir and Nerve's libraries there, and they're updating them themselves and giving back to the community. And so it's... It's like obvious that they're still using it because they still have development going on on the open source side of what they're doing too. And I don't know, that was a really, really cool and fun project. And I got to go to Ireland. So I can't
Adi_Iyengar:
Nice.
Amos_King:
complain a whole lot.
Adi_Iyengar:
I
Amos_King:
That
Adi_Iyengar:
mean,
Amos_King:
team,
Adi_Iyengar:
yeah, you're
Amos_King:
that
Adi_Iyengar:
right.
Amos_King:
team is out of Galway, Ireland. So,
Adi_Iyengar:
Gotcha,
Amos_King:
um,
Adi_Iyengar:
gotcha.
Amos_King:
shout out to them if they're listening.
Adi_Iyengar:
Yeah, it is quite interesting. I had, I mean, you mentioned that it's big. I had never heard of them, but now that I'm seeing the GitHub, it looks like they have some active Alexa development going on. That's really cool.
Amos_King:
Yeah. And they're really one of the largest companies in the world too. So it's, I don't know. I just know nobody in hardware is talking about what they're doing. And, and, um,
Adi_Iyengar:
Thank
Amos_King:
so
Adi_Iyengar:
you.
Amos_King:
we really, really recently, I can't talk right now. We recently did a panel discussion at code beam, um, with Frank Conley and, um, Andy King, no relation to me. Uh, and Boyd Malter from Crichton and Scenic. And so we talked a lot about how even when like in the website, everybody seems to share everything. In the embedded side, everybody seems to not share anything. And it's starting to get a little better. A lot of embedded systems companies used to play their cards close to their chest, I think. patents and things like that. But I think that they're starting to learn that software side of that probably is going to benefit more from sharing. The hardware side, maybe, maybe you need to keep your patents, right? Like somebody can just go copy your chip a little bit cheaper. That's not going to go over well. But so that, so they're starting to talk about it more, but then also we get the, we get developers in there and they jump in and they're, they're using nerves and, and but they would never describe themselves as an embedded systems developer. And what I can tell you is like, Adi, you said that you, Adi, right? That's how you say it. You asked how to say mine. Now I'm asking how to say yours. There you go. Um,
Adi_Iyengar:
Ha, nice.
Amos_King:
so the, like you tried to set up nerves and everything. Once you get things going, you know, you are an embedded developer, whether you realize it or not. And you're going to start. everything that you're going to do, you're like, oh yeah, this is exactly how I would do it in any other Elixir project. And you know, there's a whole lot of libraries and things that people have done to make it so that put it pulling in a new sensor is not a big deal. You read a data sheet. Once you can read a data sheet, and you know Elixir, you're an embedded developer. Congratulations. So all of those skills transfer on both sides of that.
Adi_Iyengar:
That's really cool. That's really cool. And I think you're totally right about like the embedded companies not talking about it. I mean, even smart print, I think only last two years, they started being more open, at least from what I can see.
Amos_King:
Thank you.
Adi_Iyengar:
But I know there were some of the consultancies as a company called Very Possible
Amos_King:
Mm-hmm.
Adi_Iyengar:
or something like that. They do some of this. But recently I learned this, like I think four or five energy, purely energy-based companies, you know. that are using embedded systems to kind of like minimize a business's energy's footprint and most, they're using Elixir. I was
Amos_King:
Mm-hmm.
Adi_Iyengar:
surprised. I know there's like Spark Meter. Yeah, there's so many companies, Gridpoint. I don't even know that these companies exist and let alone that they're using Elixir and they have like over 50 Elixir embedded engineers. That's crazy.
Amos_King:
Yeah, it is pretty wild. And then those people, because they know Elixir, they can work on both sides. They can work on
Adi_Iyengar:
Great.
Amos_King:
the server and website as well as the embedded side. So it reduces what a company even needs to get going
Adi_Iyengar:
Totally.
Amos_King:
and the amount of communication you need from teams
Adi_Iyengar:
Yeah.
Amos_King:
because they all are speaking the same language.
Allen_Wyma:
Do we mind to kind of define what the word embedded means? Because you're actually using a version of Linux, right? So it's like, well, if I'm using Linux or any other desktop or any other kind of desktop OS, does that mean I'm also an embedded developer? You know, like how would you describe what an embedded developer is? Because I feel like the line is a little bit murky to a certain extent.
Amos_King:
Yeah, yeah, because there is a level of embedded where you're not using Linux, right? You get pretty low
Allen_Wyma:
Yeah, like
Amos_King:
and
Allen_Wyma:
Arduino,
Amos_King:
then,
Allen_Wyma:
right? Like that one there's
Amos_King:
right.
Allen_Wyma:
no OS is what I understand. And that one I
Amos_King:
Right.
Allen_Wyma:
wish I could understand.
Amos_King:
Yeah, you kind of have a boot sector that says I'm going to run this one program and then you write that program. Yeah, so when I think of embedded, I think of single purpose machines, right? you get to install all kinds of things on it. You could be a designer, you could be a writer, you could be a programmer, and you're gonna put different things on that laptop, but it's still the same device. It doesn't change, right? So an embedded device to me is, one, it's small. You're probably not gonna have an embedded device that has the same processing powers as your laptop. But it is a device that has a focused job, and that's all it does. does this job and it does it well. Probably doesn't have much of a screen or if it does, it's not gonna be like what you're used to with a laptop, right? It's gonna be more like a kiosk, like an ATM machine or a point of sale machine, right? It's not something, you're not gonna add an application or open up an application. And that's, to me, that's like the big difference. I'm sure that there are... other people who would get more minute detail. But what I'm trying to get at is the development side is the same. It's not any different. I don't want people to be scared of it.
Allen_Wyma:
Yeah, because for me, it's getting murkier and murkier these days. So I just picked up a Steam Deck or a Disk Evolved. It just came to Hong Kong literally on Monday, picked up. Because it's been out in the US for a while. That one, it looks like a handheld. It seems like a game gear. But you can flip it to a desktop mode. And it's basically a PC. You can use it just like a PC. Now, what is that? That's like a hybrid kind of thing. Because if you go back to your definition, It is kind of single use just to play games, but then I could flip it to desktop mode. Literally I could, there's a web browser, Firefox already installed. I can install whatever things I want. Now is that just a PC on SOC or this is where I get a little bit confused. If you look at kind of like your one thing, right. And originally it is kind of one purpose play games. Now it's
Amos_King:
Mm-hmm.
Allen_Wyma:
I can do more with it technically, but even though if I don't use more with it, I don't know, you know, now I'm starting to get lost in my own thoughts. I don't know what to think about it. It's getting murkier, murkier these days, you know.
Amos_King:
Yeah, I think a lot of it too. It was especially with gaming consoles, because a gaming console really is an embedded device. If you typically deploy updates like you would to an embedded device, if you're going to, it's, I mean, nowadays you actually can get updates. At one point in time, your, your consoles didn't get updates. Like they, they came in there, that's how they were. But yeah, like if you have, if you have an Xbox, right. Then. It is focused on what it's doing. Its peripherals are all geared towards a single purpose device. Now, the thing that I think gets murky there is that you can install other things on it, right? Most of these now, it's not just a cartridge that you're putting in, but like you said, you can have a web browser. You can do all these other things. So it does get a little... little murky in there. But I think also that's because our systems that we're using to build those are getting closer and closer to looking like our, our laptops, right? We have this we put Linux in either one, you have the same operating system sometimes. And once you do that, you kind of open up the door to be able to do a lot more.
Adi_Iyengar:
Yep.
Amos_King:
I also kind of think of embedded systems as things that interact with the real world. But that's not always true, right? And like a gaming device, it's not the same as like turning on a valve or turning off a valve or listening for a temperature update and reacting to that. So it does get murky. There's a line there. I don't know where it is. I think it moves all the time.
Adi_Iyengar:
Totally.
Allen_Wyma:
here.
Adi_Iyengar:
I think it totally moves. I think that I do agree with you where the embedded system generally has like a single purpose, but I guess like, you know, like consequence of Moore's law, I guess, right? Like the ability for small things to process more information keeps increasing. And like this, you know, maybe no need for them to be single purpose anymore. Right? Like you have like, because we used to think like microprocessors doing this reading data from X, that's an embedded device. But now you can. pretty much at the same cost have a more powerful computer that could do that.
Amos_King:
Mm-hmm.
Adi_Iyengar:
And why limit it to only one thing? But yeah, it's tricky. The definition is getting more and more gray.
Amos_King:
Yeah, I think it might be really important there. I don't know. This is just me thinking out loud, but it may be really important to say that it's a purpose-built device where your laptop is general purpose, but something that's a gaming machine is not general purpose, even if it has the ability to become that a little bit. Especially when you get into like, let's listen. We talk about manufacturing and robotics, right? I might have Linux running inside of that robot, but I'm not planning on you going up to that robot and using it to program or browse the web. That's not its purpose. Even if you can get in there and add a web browser to it that shows up on a little screen on it that doesn't, that's not really the purpose behind that system when you built it.
Allen_Wyma:
It kind of reminded me of Silicon Valley where that guy hacked his fridge to bug one of his friends or something. Have you seen that episode?
Amos_King:
I have not.
Allen_Wyma:
I forgot what it did. I think it said some like very nasty things to one of the guys or something. I forgot what it, what it was, but I just remember he hacked his fridge to do something it wasn't supposed to do. So, but
Amos_King:
for me.
Allen_Wyma:
then when you said that made a comment, it just reminded me of that. Like, yeah, that now it gets awesome. Mercury too, because yeah, you can't take the single purpose things. You can, you can repurpose them to do more than what they should be doing.
Amos_King:
Mm-hmm.
Allen_Wyma:
which I think actually most of our careers like that, like we get kind of like a lot of really weird like requests like, can it do this? Can it do that? And you're like, um, it, I don't know, I think so. But should we?
Amos_King:
Yeah, innovation comes from using something outside its intended purpose.
Allen_Wyma:
Or sometimes, you know, as a consultant, right, you and I both do consulting. So like we've gotten, we've gone to places where it's like, wait a minute, you're, you're using Excel to run your entire company and it's on a shared drive and the file system is unable to lock it. So how do you manage like when people are writing at the same time? Well, that's why you're here for this problem. Or, or like, oh, we just like email copies around and we just kind of sort it out after a while. Oh, okay. Got it.
Amos_King:
Yeah, hey guys, I'm working on this. Don't touch it, please.
Allen_Wyma:
That's right. That's sorry. That's yeah, that I think it's called a we call that a program. What is that a lock? Yeah, mutex, right?
Adi_Iyengar:
checks.
Allen_Wyma:
So they have an email
Amos_King:
Yeah.
Allen_Wyma:
based
Amos_King:
Yeah.
Allen_Wyma:
mutex.
Amos_King:
Yeah, I don't know how often I run into that. That's like the sales tactic for consulting. Hey, show me your spreadsheets.
Allen_Wyma:
Now you know you're on me of Dilbert when they go to this bar and there's like emerging acquisition. Hey, you want to merge with me? It gets a little bit weird. I'm going to go to the bathroom. I'm going to go to the bathroom.
Adi_Iyengar:
Dude, the number of startups who basically just got a serious save by replacing spreadsheets. It's crazy.
Amos_King:
Oh yeah. Oh yeah.
Adi_Iyengar:
It's the biggest hidden, I guess, still there's a lot of business potential.
Amos_King:
Yeah, it's everywhere. There's all kinds of little things that are very manual in spreadsheets that can get automated. So yeah, if anybody out there has a bunch of business ideas, I'm sure that Alan and I would be really happy to talk to you about how we can expand your businesses by eliminating your spreadsheets.
Allen_Wyma:
Yeah, I learned a lot about Excel when I worked in the bank. It's amazing. Like, everything in a bank is run on Excel to a certain extent.
Amos_King:
Mm-hmm.
Allen_Wyma:
It's just like scary. The stuff that's running in the back end. You're like, this is regulated business. Are you sure? Yeah, of course. We're doing everything right. Literally, everybody's doing mutex based Excel file access. It's insane.
Amos_King:
We can talk about many things. Like why? Why on embedded systems? To use Elixir?
Allen_Wyma:
Yeah,
Amos_King:
All right.
Allen_Wyma:
actually, actually, that's that's one thing, right. But the other thing too, is it do you still have Connor Rigby working for you?
Amos_King:
I do not. I still talk to Connor and Rick B on a regular basis, but that's, that's here. There you go. There's you a general purpose device story, not general purpose devices. The first time I met Connor, we were in the back of a NERVs training, helping out, just answering questions and running around the room while Frank fed his knowledge to everybody. And I look over and Connor's got a Nintendo DS out. And I was like, man, what is this young guy doing over here just playing games in the back of the room? There's there's so much going on here that it could be done. And I walk over there and I was like, Hey, what are you doing? And he turns his device over and it's running IEX. Wait a minute. What are you doing? Uh, I think I've told that story everywhere, but Connor has never ceased to amaze me since that point.
Allen_Wyma:
Yeah, I think I remember hearing that he replaces Nintendo switch and he replaced like he's just basically buying devices and just seeing can I run elixir on that I think it's what
Amos_King:
Mm-hmm.
Allen_Wyma:
he spends a lot of time doing.
Amos_King:
He, you remember like the original Pokemon Gameboy games? I don't know how old you guys are. So Connor had told me, I haven't seen it, but he said he made a device that you can plug into your Gameboy, how you used to be able to trade Pokemon with somebody sitting next to you. But he made a thing where you could plug it in and connect it to the internet, and you have a device on your side that you plug in and connects to the internet, and so you can trade Pokemon from around.
Adi_Iyengar:
Wow.
Amos_King:
Just for fun. And then you could store those Pokemon too in the intermediary so that you could just copy them to everybody's Game Boy. I don't know, it was pretty wild to watch it happen.
Allen_Wyma:
But but because you had Connor Rigby on the team, is that where you guys started getting more and more into using nerves? Because I think before you're mostly doing just general consulting software on traditional, you know, EC twos, etc.
Amos_King:
No, actually, the Schneider and the SmartWren stuff was before Connor showed up. But bringing Connor on board was definitely because we wanted to get more into embedded systems and Connor is just a really awesome person to work with. So being able to pull Connor in and work with him and learn from him, he has the ability to put nerves on just about anything. And that was really awesome. to work with. And then I know somebody gave a conference talk about it at ElixirConf. I can't remember who it was. Or maybe it was at CodeBeam. I don't know. I've been to so many conferences this fall. But oh, I think it was Jason Axelson at CodeBeam gave a talk about deploying, using Nervs to deploy to a cloud. And he was the second person I ever heard talk about trying to do that. And Connor was the first. because that AB deployment strategy. So that's another thing that says like embedded systems are kind of the same as web systems, is that you can take this deployment strategy that NURBS uses and you can apply it to any computer. If you can build a Linux system for it, you can use NURBS on it.
Allen_Wyma:
Yeah, the how that actually works is kind of interesting, right? Because you take if I understand correctly, right, you take basically using build route still or no, has it changed? Still using build route,
Amos_King:
Mm-hmm,
Allen_Wyma:
right?
Amos_King:
billboard.
Allen_Wyma:
Yeah,
Amos_King:
Yep.
Allen_Wyma:
and you'd basically rip out whatever you don't need or you or maybe it's you add what you need. I forgot if it's an ad or take out. I think it's more of a take out kind of system. Whatever it is, you kind of you say, okay, here's my base image. And I only want this stuff that I need. So it's super right. And it's also kind of read only to a certain extent, no.
Amos_King:
It is. Your system level part is read-only. There's a write partition that ends up on the system so that you can log some things. But yeah, the actual operating system portion is all read-only. And then it does an A-B partition too, so that if your stuff that comes up fails to come up, it'll automatically roll back to the old version. which also builds some safety in that people always worried about like bricking their hardware that they bought. Well, this, this takes care of that for you and you don't have to worry about.
Allen_Wyma:
Now, have you ever had that problem where B didn't roll back on and went back to A?
Amos_King:
No. Oh yeah, that I thought you were saying, breaking. Yeah, I've had that, um, where, you know, something was misconfigured and it, the system didn't start up, um, right away or some liveness check failed and it rolled back to the other one and it's pretty fast and pretty seamless.
Allen_Wyma:
Now, how do you know when it when it rolls back? That's something I understand that it does that, but I didn't really understand how you actually know it's not updated. Is it because the features are missing and you know that way or?
Amos_King:
That's how I knew. That's how I knew. I didn't try to monitor it or anything. You could build stuff into it so that you can monitor it. If you're not looking at a console on that device, you probably are not going to know. Without testing it.
Allen_Wyma:
think there's also like nerves hub is it right? Do you using
Amos_King:
Mm-hmm.
Allen_Wyma:
that one too?
Amos_King:
I am not right now. But yeah, NurseHub allows you to control systems and put them into... So, you know, if you have a deployment, I'm going to say a small one. Let's say you have 10 devices, and you have like two of them that are test devices, a few of them that are for like regular customers, and then a few of them are for like bleeding edge customers. you can actually control different deployments and it will give you feedback of if it succeeded or if it failed and rolled back. And you can get stuff back from the command line too if you're deploying to a device in your desk from the command line that will tell you, hey, yeah, this worked or this didn't.
Allen_Wyma:
Now I just made my window bigger. And I saw behind you something in a nice blue box. The Grisp board.
Amos_King:
Oh, yeah, I have
Allen_Wyma:
Maybe
Amos_King:
two
Allen_Wyma:
it's
Amos_King:
of
Allen_Wyma:
good
Amos_King:
them back
Allen_Wyma:
to
Amos_King:
there.
Allen_Wyma:
talk about that one and how it would compare, right? Because they're kind of competing in the fact that they're kind of like Windows Linux, where it's like they're in the same space, but they're not running the same way. If I remember Grisp, it's more like a RTOS or something. It's kind of like straight
Amos_King:
Yeah,
Allen_Wyma:
on hardware.
Amos_King:
Grisp is running Erlang directly on the hardware and you can run Elixir on it. But it's being run at the hardware level and the operating system really is kind of the beam on that one instead of being Linux based. That is Peer does that. I keep, I'm ducking my shoulder to look at it so, because then I'm reminded about it. I, you know, the advantages and disadvantages that I'm not totally sure of. Uh, I have the Grisp board, um, the Grisp 2. I have two of them and I got them so that I could play around with them, but I've never, I've never done Grisp and Anger. So I can't say that I know a ton of the difference between the two other than, um, the Grisp is running the beam like closer to the hardware. and not on top of the Linux operating system.
Allen_Wyma:
Yeah, that's the one thing I
Amos_King:
I wish I could
Allen_Wyma:
did
Amos_King:
be
Allen_Wyma:
see.
Amos_King:
more exciting than that.
Allen_Wyma:
Okay. Yeah, I think the GRISP one was early only, but I think GRISP two were released a later version was allowing you to use elixir. That was something that was kind of interesting. Like that was all like on the was it that what is it called again? We it was all crowdsourced quite a few years ago.
Amos_King:
Yeah. I can't remember what that website is called now. Uh, yeah. But yeah, that's where I got those. It was, I looked at the money and, and sat and waited for my year and a half and then they showed up.
Allen_Wyma:
Hell
Amos_King:
and
Allen_Wyma:
yeah.
Amos_King:
then I just barely touched them.
Allen_Wyma:
Yeah, that's oh man, I got so many things like that. If I had a stack of ebooks I bought, it'd be I'd need like 10 houses to fill them all. I keep
Amos_King:
Oh,
Allen_Wyma:
buying
Amos_King:
watch
Allen_Wyma:
books,
Amos_King:
it.
Allen_Wyma:
never reading them.
Amos_King:
If you get into embedded device stuff and you start by it, you'll just have boxes and boxes full of sensors and chips. I think I have everything that you need to build an arcade machine, like just sitting in a box somewhere and has for multiple years. Here, I have this behind me. I know this is a podcast and nobody can see this, but this is a little... I have a big row of relays. So relays can, with electricity, it's like a switch that you can turn on and off, and terminals and a Raspberry Pi hooked to it. And this is so that I can run the sprinkler system at my house, on my yard, and turn it on and off and run all of that through Elixir, Phoenix, or whatever. So there's all
Adi_Iyengar:
That's
Amos_King:
kinds
Adi_Iyengar:
so cool.
Amos_King:
of... But it's, I mean, it's just sitting here. It would be cool
Adi_Iyengar:
Yeah.
Amos_King:
if it was actually hooked up to my house, but that's what I'm saying
Adi_Iyengar:
Right.
Amos_King:
is like, you just start buying stuff. Cause you're like, Oh, I got this project idea. And one day, one day maybe I'll get to completing that project idea. Um, and I got that idea actually from Todd Resadek who there it's, it's older. It needs to be updated, but he has a project where it's all GitHub where he replaced the sprinkler system in his house. And if you've ever had to deal with a sprinkler system in a house, the controllers for it, most of them are terrible. And so being able to have your own interface is kind of a neat idea. We moved into our house and had a sprinkler system and the controller broke. And so I was like, oh, perfect, I'm going to replace it. And then I found out like there was in the documentation for the controller when I was trying to figure out what wires I needed to plug into this thing. I found where if I hold two buttons together, it'll reset the controller and then it worked. So it kind of slowed me down on worrying about getting this gadget off the ground.
Adi_Iyengar:
I guess that's what happens when you're an embedded engineer, right? Like regular software engineers, we have a ton of side projects that just sit up in our disk hard drive. But if you're embedded engineer, you have side projects that normally sit in the hard drive, but also the physical hardware associated with them.
Amos_King:
It's,
Adi_Iyengar:
So.
Amos_King:
that's right. You have, you have to have hard drives and box drives, fill up these box drives and set them all over your house. And if you have a significant other, you hope that they don't start yelling at you about boxes of hardware that you're never going to do anything with.
Allen_Wyma:
Yeah, so so so you kind of like me where it's like you got stuff coming in from Amazon and you're like hoping you get home before your wife sees the delivery and you're like, it's kind of scuttling into the corner. So she doesn't ask you what did you buy now? And when are you gonna when you're gonna finish the first project you started?
Amos_King:
Right, right. None of them are ever, I don't know that I've ever finished a project at home that's an embedded systems project. Like I can get it to a certain point where it like does what I was interested in having it do. Maybe not to the level that I had, but then I'm like, okay, I can do this. I know I can do this. Time to move on. So yes, yes, I do go home and like, or ship it to the office. and hide it until I actually have something working. And then I show it to her and she's like, yeah, it's impressive, Amos. She's not near as impressed with it as I am.
Allen_Wyma:
Well, I mean, so you have nothing working right now that you personally use around your house.
Amos_King:
Embedded devices that I built work around my house. No, not currently, not currently. The last thing that I built that I used regularly was a, so I roast my own coffee and I built a little device that would check the temperature and moisture in the coffee as it was roasting and then push it out to a web server so that I could graph it, use that for a little while. The last thing that I built that I never really used was a door alarm, which was just ridiculously easy to build and just felt like doing it one day. And it took like an hour and built a little door alarm. But it was actually, I guess, not really. I used it on a door, but it was really just an RF sensor and a light on the other side of an RF light. so that you cross, you walk through the beam, like a laser in a spy ship, and it would set off a little alarm. And then I turned the alarm to silent and had it count. Just not for anything, just for fun. Because I didn't really care that people walk through that door or open that door. I just was curious at how it worked. Maybe I should put one in though. Now you see, now you got me thinking though. Because it's wintertime and it's cold. People come in from the garage and leave the door open and forget to close it or they shut it but it doesn't shut all the way. And then I have cold air blowing into my house. So maybe I need to bring this thing back out and check and see when my door is open. Track how long it's open and then figure out who...
Adi_Iyengar:
Sounds like a business idea to me.
Amos_King:
Yeah, yeah. Who came in and left that door open? That way I can pick which kid to complain at.
Allen_Wyma:
touch you have like
Amos_King:
Oh, one cool...
Allen_Wyma:
an alarm for your thermostat usually to figure out which kid touched the thermostat I thought was the big one.
Amos_King:
Oh, that would be a good one. Because yeah, that's a problem. But, okay, so I just, I thought about this. This was the most fun project. It was pretty easy to do, but I had a Bluetooth RFID thing that I could keep in my pocket. I had a little battery in it, and it was a proximity sensor. And then I set up one in my office with some relays. that when I would go walk to my office, it would turn on the lights in the office. And when I'd walk out of the office, the lights would automatically go out. I just thought it was really cool to me that I built this thing. And then I ended up disconnecting it because I had somebody working in the office with me and I got up to go to the bathroom and all the lights went out on them. So the consequences to hardware sometimes are a little different to think about. It's like, Oh, I want to automate this. Well, what happens when I walk out of the room, but I have a guest in that. Is it okay to have the lights go out? Probably not, but it's just not something that I thought about at the time.
Adi_Iyengar:
have a guest RFID Bluetooth that they can hold on to.
Amos_King:
Yeah, yeah. And have it search for anything. Yeah,
Adi_Iyengar:
Oh
Amos_King:
that would have been smart. It just, it was just was not on my mind when I was building. So that one was fun.
Adi_Iyengar:
That's really cool. I'm definitely, like this give me enough motivation to go try nerves again. So that's definitely gonna try and build something before, before the new year.
Amos_King:
Turning a light on and off is really rather simple. And
Adi_Iyengar:
I'll
Amos_King:
then
Adi_Iyengar:
start with that.
Amos_King:
throw a Bluetooth sensor on it and you can do all kinds of things. And you can buy little cheap battery powered proximity Bluetooth low energy devices that can just hook on your key chain.
Allen_Wyma:
The best part for me is I just I just take the train up to Shenzhen I can get whatever heck I want. I go straight to the manufacturer for even cheaper.
Amos_King:
Way cheaper.
Allen_Wyma:
Yeah. Yeah, that's something I've thought about, right? I'm always thinking something I want to build like, yeah, I actually I had some similar thing to what you had where you you'd come in and out and things are tough. Nowadays, you can get that for I mean, they have all these home things, right?
Amos_King:
Mm-hmm.
Allen_Wyma:
That you can do most of the stuff. So it's kind of like, it's like similar to your situation with the controller, right? You figured out how to make it work again. So then you're like, Oh, I don't need to build a new one. Although I still want to, but it probably won't be as good as the one that I bought. Right. Like I have so much stuff like that right now.
Amos_King:
But there's something about that, right? Well, Chris McCord, right? If you ever follow him on Twitter or anything, you see that Chris is building his own power tools. And it's like, yeah, you might be able to get some, but there's something about doing it yourself that maybe it's a little bit of pride. Maybe it's just the learning process. Like I love to learn. So the those things like that you can do around your house. Yeah, I can buy a sprinkler controller or I can build one. Now the building one is going to take a lot of time and maybe get me in in trouble with my spouse. But as long as I keep the dishes clean, she won't I can get away with all kinds of stuff.
Adi_Iyengar:
I guess
Amos_King:
But that's
Adi_Iyengar:
that is
Amos_King:
also
Adi_Iyengar:
one
Amos_King:
how
Adi_Iyengar:
of
Amos_King:
you,
Adi_Iyengar:
the- sorry go ahead.
Amos_King:
I was gonna say that's also how you get into a big collection of having a bunch of hardware sitting around your house that's like half done projects or planned projects. I have boxes and boxes of hardware that are, they've never been touched. They're just planned projects.
Allen_Wyma:
Yeah, I actually we were talking about buying stuff like, to be as I was trying to get into nerves a while back for a couple of different things I want to work on. Like one of them was what I say remember, remember, do you know about Huron or Huron? I don't know how you call it her hair.
Amos_King:
Yeah, blue herring,
Allen_Wyma:
Yeah, yeah, blue
Amos_King:
the Bluetooth
Allen_Wyma:
hair.
Amos_King:
library.
Allen_Wyma:
Yeah, I think I was probably one of the people that chart was pushing that to get done. Because I was like,
Amos_King:
Mm-hmm.
Allen_Wyma:
yeah, because I wanted to get like these Bluetooth beacons to get going a long time ago. And my idea was like, wait, what if I sell a bunch of these beacons to like local businesses to kind of advertise, you know, that they're around and trying to get people in. So that was something I was trying to get into. And like, I went nuts and I just bought tons of raspberry pi screens and batteries and I got like 50 16 gigabyte SD card sitting in a drawer that never been open. Because I heard a lot from like, a lot of guys in the nurse team that they always brick their SD at the time we had group on over here. So I just grew up on a crap ton of these cards and just got them all in. And now it's just like, I lost the motivation became messy. But that's something I want to get back into.
Amos_King:
You haven't lived until you burnt out a couple of cards. So you should get into that. There's some really cool stuff that you could do. I could see like, tell me if this is your idea, because this is what I got whenever you told me about the hardware that you bought, is like a little screen next to a product, and when somebody walks by, that screen turns on and gives a little ad for the.
Allen_Wyma:
Yeah, that's something I could definitely do. And I think people would buy that to a certain extent. If the box was good, I think they would buy
Amos_King:
Mm-hmm.
Allen_Wyma:
it. And also, yeah, you'd have to have the right demo. I think 90% of it is probably about the demo. So what is it going to
Amos_King:
Thank
Allen_Wyma:
do? Is it
Amos_King:
you.
Allen_Wyma:
going to make a noise? Is it going to just show something? What's it going to sell lots of this kind of stuff to? But I think the idea, yeah, it could work. So that's something I was. thinking about actually I bought a bunch of at least about two different printers, thermal printers, because I was thinking about like writing up like some kind of simple like ticketing system for a restaurant and see if
Amos_King:
Thank
Allen_Wyma:
they'd
Amos_King:
you.
Allen_Wyma:
be interested because there's quite a lot of like bad. There's so many bad products out there for companies that it wouldn't be too hard to knock them out. But the problem is that there's a lot of stuff that these bad products actually handle for you. Like I was thinking for a long time, oh, what about you know, I can, I could probably I could build, you know, a P is a POS? Yeah, I could build a POS terminal.
Amos_King:
Yeah.
Allen_Wyma:
But then I went to the grocery store. And then like, I was started watching more about what they're doing. And I was like, Okay, well, you have to think about all the keystrokes and everything. And this kind of stuff that makes a big difference, right? I'm still watching. And then I noticed that the cashier starts putting like she's got two people eventually, it she ends up kind of putting them to the side. So you have to be able to cash like, mid orders and say, okay, this, you know, this, this guy, they, they, they need to go grab something because it's like five cents until they get like 10% off or something, right? Okay, so let's put this guy's to the order, you don't want to rescan everything, you don't want to avoid the transaction, you want to park that transaction. And you can park maybe up to five or something if you have a really busy day. So there's like, okay, I never thought about that. That's something to think about how would I want to do that. And then when you become an Elixir developer, all you ever do is think about what if this thing breaks, right?
Amos_King:
Yeah.
Allen_Wyma:
So it's like, well, I don't want to just have that memory. Maybe I want to put that into like, you know, what is it this space to EKS? What's it called? I want to say EKS, you know,
Amos_King:
It's...
Allen_Wyma:
I'm talking about Yeah, yeah.
Adi_Iyengar:
That's
Allen_Wyma:
So
Adi_Iyengar:
it.
Allen_Wyma:
put into debts, right? Because I don't, you know, if it ever crashes, I want to restart everything. Because, you know, you think about the because you look at the people who work in the store. They're really painful sometimes because they get drowned up all the bad equipment.
Amos_King:
All day long. Well,
Allen_Wyma:
Yeah,
Amos_King:
and
Allen_Wyma:
exactly.
Amos_King:
then when you're doing POS, you also have to start tracking inventory. That's a bare minimum to get into the market. So
Allen_Wyma:
Oh,
Amos_King:
now
Allen_Wyma:
yeah.
Amos_King:
you need to track inventory as it's coming in and going out of the store. And then if somebody cancels a transaction, you need to put it back in the inventory. If
Allen_Wyma:
Oh yeah.
Amos_King:
somebody doesn't return, you possibly put it back in the inventory, depending on what's being returned. Otherwise, maybe it doesn't go back on the shelf. Yeah. That's a big thing, but you said there about you start thinking about failure. And I think that's actually what makes Elixir great for embedded systems. So when I'm thinking about embedded systems, I'm thinking about manufacturing, mostly recently. And whenever you have a robot that's out, I don't know, maybe it's building car doors, right? And it stops working, even for a few minutes. If you're building 30,000 doors a day and it's down for 10 minutes, how many doors did you not build? How much money did you just leave on? Not only does that robot stop, but anything that's after it in the line of the factory has to stop because it's no longer getting its supply. That is the thing that thinking about that failure and not having to reboot a system but having your supervisors reboot small subsections. they restart up fast. And so you think more about recovery than actually like failure. And then when failure does happen, hopefully it doesn't restart the whole system and that you don't go down. And then if it does, instead of the whole system going down, since we're thinking about recovery, is there things that we can do to limp along and maybe just reduce our output instead of stopping our output? because that's money in manufacturing. And that's really what gets me about using Erlang is that's a whole host of problems that if you're coding in C, it's a lot more to think about where Elixir and Erlang, I mean, there are libraries in C that help. It's built into the beam. This is how it works. And since it's so core to it that you're not reaching for an external library, it is the core of your system.
Allen_Wyma:
Yeah, we've been certain section off pieces of your system, right? Like when you have
Amos_King:
Mm-hmm.
Allen_Wyma:
your supervision tree, you say, okay, this stuff group together, etc. Right? That's what you're talking about.
Amos_King:
Yeah. And then configuring those supervision trees to keep from having catastrophic failures is a whole new interesting topic. Transient is your friend. That's so that you can have a supervisor that's transient. It's something that fails over and over, but if its supervisor fails, the supervisor above that doesn't restart it. Do that for jobs a lot, like background jobs, so they don't take down the whole system. which can be good for reading sensors. Because if, more than likely, if there is a mess up on reading a sensor, it's because we need to go back and read the data sheet correctly, but you don't want your system to shut down because you swapped a one and a zero in there somewhere. Thank you.
Adi_Iyengar:
I guess this episode was pretty cool. We got to learn about nerves, Alexa, but also some potential good business opportunities from you guys.
Amos_King:
Hahaha.
Adi_Iyengar:
It does. I'm like Alan giving a legitimate business ideas on a public forum. Great. Do you guys want to talk about something else? Should we transition to PIX? I know it's late for you over there.
Allen_Wyma:
Yeah, I mean, if you have another topic, I can stick around
Adi_Iyengar:
I'm sorry.
Allen_Wyma:
for a bit longer.
Adi_Iyengar:
Um... I mean, I'm all set. I'm honestly like, I'm not very knowledgeable in this domain, so I don't feel very confident bringing up some topics, but I mean, yeah, if you guys have something interesting, I mean, if you wanna give like a quick pitch to binary noggin, happy to let you do that.
Amos_King:
Okay, yeah, I can do that.
Adi_Iyengar:
Cool, awesome. So
Amos_King:
Think about it.
Adi_Iyengar:
yeah, I mean, I guess I can mention to the list is where they can reach you and what kind of projects you guys have expertise in and stuff like that. So, yeah, I think that's a great question. I think that's a great question.
Amos_King:
Just go. You all right? Oh, man. That looks rough, man. I'm sorry. Yeah, so here at Binary Noggin, we work with different companies, being a project team or helping out on, as part of the team, usually using our expertise in Elixir and Erlang to help process large amounts of data. or even build your products. We've been involved with a few startups in the last year. We've had two of the companies that we worked with go public on the New York Stock Exchange. So we'll take a little bit of credit for that. Not all of it. It takes a lot of business sense to get there too. But we've been around the block and seen a few of those things and we'd love to help other people out. You can find out more about us at BinaryNoggin.com or on Twitter as Binary Noggin. We're on LinkedIn too. Just grab us anywhere.
Adi_Iyengar:
Awesome, awesome, that sounds great. I guess we can transition this to your picks now. Alan, do you have any picks for us?
Allen_Wyma:
Yeah, so as kind of alluded to earlier, I just got the Steam Deck in and I've been playing games a little bit crazy. So I think it's pretty cool thing. So if anybody's a gamer, I think Adi and Sasha are big gamers, right? And so I was never the gamer. I mean, I have a Mac. I don't really have a full time PC. I think my PC is in a drawer somewhere. Never touch it because obviously Windows is not really my game. But I got Steam Deck and I've just been buying games like crazy. So I think I have an addictive personality where it's like when I got started into nerves, I just started buying everything. I got into Steam Deck and I'm buying crap ton of games recently. So that's my bad personality, but yeah, I think that's a pretty cool tool. Um, I wonder if you can put, I'm sure you can probably put, um, nerves on it. Maybe I'm sure Conn is probably done it already. So it would be interesting to see.
Amos_King:
Connor, if you've done that, get ahold of Alan. Tell him about it.
Adi_Iyengar:
I feel like if you can put that on a Switch, I'm pretty sure you can get it on a Steam Deck. Awesome. Amos, do you have any picks for us?
Amos_King:
Yeah, I have one. I've been reading this recently and it's just a really good book. I'm going to hold it up here for you guys, even the listeners can't see it. It's Crafting Interpreters by Robert Neistrom.
Allen_Wyma:
Awesome book.
Amos_King:
It's available online for free, but buying this big heavy book is also awesome. Support him and then you don't have to be online whenever you want to read it. For somebody who stares at screens all day, I really hate staring at screens after work. So I like to have a dentry books. So yeah, grab this book. It's really good. There's some really interesting ideas in there that can apply outside of interpreters too, and also help you think about domain specific languages within your applications if you want to use those.
Allen_Wyma:
That is, I think he is working on Dart at Google, right? This guy,
Amos_King:
Oh, I had no idea.
Allen_Wyma:
I think so. Yeah, he's a pretty smart guy. They're doing this pretty cool stuff with Dart.
Adi_Iyengar:
vehicle.
Amos_King:
A dart is really neat. I didn't know it was him that was working on it though. Somebody just told me, I think it might've been Quinn Wilton maybe who told me.
Allen_Wyma:
Yeah.
Amos_King:
It pretty much if Quinn says, hey, I like this book, I try to go get it. So it might've
Adi_Iyengar:
Agreed
Amos_King:
been Quinn
Adi_Iyengar:
with that.
Amos_King:
who told me I should read this. Thanks, Quinn.
Adi_Iyengar:
Awesome, I guess my pick this week, I'm trying to come up with something on the spot. Oh right, I actually saw in some news that Assassin's Creed Valhalla is available for free for a few
Amos_King:
Thanks.
Adi_Iyengar:
weeks. So yeah, go and get it. It's still a relatively new game. And I think it's like a holiday discount that Ubisoft is. So Alan, I'm not sure if it works on Steam Deck. I'm pretty sure it will work on Steam Deck. So maybe I can get a free AAA game. But that's pretty much it, unless Alan Avis, you guys have anything else to add?
Amos_King:
I don't. Thanks for having me. I know that we had to push things back a little bit and I really appreciate you guys working around my schedule this morning. And Alan, thanks for staying up really late.
Allen_Wyma:
Now you owe me so when I go back home and I go to Casey, I'll be crushing on your couch and we'll be playing with stuff all night will be building
Amos_King:
Perfect.
Allen_Wyma:
nerve stuff.
Amos_King:
That works for me. We can have some barbecue too. And here, I'll try this. You're in Hong Kong, right? How long have you been there?
Allen_Wyma:
Wow, I knew so I was in Shanghai before here for another four years. I think I've been here for on almost 10 years, nine or 10 years or something.
Amos_King:
Okay, then I'm gonna butcher this, but shish and knee.
Allen_Wyma:
Yeah, that's Mandarin. But yeah, I understand.
Amos_King:
Oh, not the same. Okay.
Allen_Wyma:
No, no. Be careful what you say. That's a very difficult subject to talk about
Amos_King:
Yeah,
Allen_Wyma:
over here.
Amos_King:
I'm sure my stepmom is from Taiwan and that's just
Allen_Wyma:
Ah.
Amos_King:
like the only thing I remember how to say
Allen_Wyma:
Thank you. That's what it means.
Adi_Iyengar:
Awesome. Well, this was awesome. It was great having gamers. And for our listeners, we'll catch you again next week. Bye.
Amos_King:
See ya.