
Show Notes
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.
Elixir Outlaws, 19/02/2022
On today’s episode of the Elixir Outlaws, Chris Keathley and Sean Cribbs are going to talk about Embedded Systems, Microcontrollers, Rust, Raspberry Pi, Zig, etc. There is a compelling benefit of Rust, you can’t use this block of memory, and you can check that at compile time. There is a whole class of memory problems that Rust is stopping you from being able to interact with, but you kind of give it all up. If you dump the thing on a single-threaded, single-core M0 processor.
Episode Highlights
Zig is very appropriate for the embedded stuff, because if you are dealing with it, then you give up a lot of the benefits of Rust in an embedded context, says Chris.
There is a lot to work with Rust to, like write wrappers around unsafe type things to the point where you aren’t really getting a lot of its benefits.
There was a project in which Sean was working years ago that was leaning heavily on top of DPDK and which is the Data Plane Developer Kit. Basically, it lets you write network programs using kernel bypass. So, you basically get direct access to the network interface card, and it does some memory tricks and the network buffers into, huge pages that are user space rather than being, passed into kernel buffers and then hand it off with context switches into the userspace. So, you kind of gets the opportunity to do some packet-level programming there.
A whole class of problems could happen in a Zig Application that just can’t happen unless you use obviously giant caveat. On the other hand, Rust is going to keep you from making those mistakes.
Rust also has the notion of marking variables undefined, which was always a potential bug in C programs.
For those of you who don’t know, in old versions of C, you had to declare all your variables, you couldn’t declare them in scope, you couldn’t declare them, in your FOR loop, it had to be declared at a higher scope before you could use it in at least the version of C, which was like a pre ANSI.
Zig is an appropriate choice for the embedded work that Chris was doing, and he is starting to get into places where he really does want an arthouse like of some sort.
We are working on an API; its job is basically to produce these ginormous JSON documents and serve them to another app that produces the front end for our customers.
Sean could have switched back to Alexa or like Jason Library, but that would have made things worse, so there are still like times when you have to take that risky bet.
As a leader of an organization, you choose the culture you want, and then, based on that culture, you bring together people, and you tell them to make a decision, and then all you do is ratify that decision once they’ve come to a decision.
Sean recommends people to read the book “Kill It With Fire.” One of the things the author talks about is when there is a big problem, and they really want to solve it, the executives have to be into solving the problem. Sometimes they want to be to be involved, and they end up getting in the way. So, the strategy that she is picked in previous situations is they want to be involved, so they want to have a war room.
Chris has been in big company land where if you do anything without asking for permission in triplicate, you get your hands slapped.
There is a situation in mind where we are trying to figure out what the next major iteration of our platform is going to look like, and some of that means like questioning the assumptions that were made over the last three years building this product, and then you don’t like on the one hand we want to try things and see if they work like prototypes and whatnot and on the other hand, there is just a massive amount of functionality to figure out, says Chris
Chris is building new things then trying to get to the next level
More from Elixir Outlaws
We had a request from Andy Jones to talk about Little's Law. Thanks for the suggestion, Andy. Keep those coming. This is way late coming out, but our life queue was backed up.
Sean and Amos talk tech with Raúl Chouza and Carlo Gilmar.
Amos and Sean chat with a great crew of guests hosts from Mindvalley: Bruno Goncalves, John Wong, Fadhil Luqman, and Anton Satin.