RSSAmplifier

Blog

Eric Codes

Recent Posts

ericcodes.ioRSS feed ↗16 posts

Latest posts

Functional Core, Imperative Shell in Nushell

Gary Bernhardt gave a famous talk called Boundaries . In this talk he introduces a pattern he calls the Functional Core, Imperative Shell. The Imperative Shell is a sequence of steps that sits at the edges of your code. The Functional Core contains the business logic in the form of pure, total functions. I will demonstrate what this means in the form of a recent shell script I wrote in Nushell.…

Using nix and nushell for reproducible scripts

So in ham radio, we have the concept of QSL cards. These are postcards that we physically mail to each other in order to confirm we've made contact. This practice has mostly moved to electronic means of doing the same thing. This can be done via a website like Logbook of the World or qrz.com . There are also folks that send what are called eqsl cards via email. A while back I received one of these…

Playing with Nushell

Over at my Ham Radio blog, I wrote a blog post using Nushell to manipulate adif logs and explore the POTA API: Using adifmt with Nushell

Gleam my new obsession

I love Rust, but... In my previous blog post I stated that I started defaulting to Rust for my personal projects. While I really like Rust for its type-system, I'm not a huge fan of its learning curve. There is definitely a bit of a sunk-cost with a dash of Stockholm syndrome whenever I say I love Rust. I'd often joke, "I love Rust, but what I really want is a simpler Haskell with a C-like syntax"…

Favorite Rust Crates for one-off scripts

I am not a professional Rust programmer. Most of my Rust code are back-scratchers that are hacked together to scratch an itch. Over time, I have built up a set of crates that I like to use that make gluing together a script easier. These are tasks that I used to reach to Python for. My thought process goes like this, "If I want to share this project, I'd like to use a lingua franca, so other…

The Baked Potato Radial

I recently watched Michael KB9VBR's YouTube video on using a Faraday cloth as a radial network. He has been using a window screen for this purpose, but found that a Faraday cloth has the same performance with less weight. I was almost about to click "Buy It Now" on the Faraday cloth when I had a thought, "Would a Mylar blanket work the same way as the Faraday cloth or window screen?". So at lunch…

Simplified Ham Alerts on a deGoogled Phone

In my previous post I showed how to get notifications from HamAlert on a deGoogled phone. That solution requires setting up Node Red to template HamAlert spots and forward them the ntfy. After I wrote that post, I noticed that ntfy had support to template JSON posted to it. This means that anyone with access to a ntfy server can receive HamAlert spots on their deGoogled phone without needing to…

Ham Alerts on a deGoogled Phone

This blog has been a bit neglected the past few months because I fell down an amateur radio rabbit hole. I got my technician license in March, my General in April, and I'm taking my Extra test at the end of June. You can follow all my ham radio adventures on Mastodon.radio . My ham radio related code can be found on my ham radio GitLab repository A big aspect of amateur radio is contacting people…

Common Golang Code Review Comments

We use linters at work all the time. As good as they are, they do not catch everything. Here are some common code review comments I have seen that linters miss. This is not meant to be a comprehensive list. This is simply to provide answers for when these comments occur. I will update this document when needed. Inline error checking In order to limit the scope of variables, prefer to inline error…

Interesting Links for Week 7 of 2024

This week was a slow week for links. I ended up getting pretty sick this weekend, so I was unable to catch up on my queue of links. I have a backlog of FOSSDEM talks that I want to watch. Next week's "Interesting Links" post is going to be hefty. Look out for it. Using your Laptop TPM as a Secure Key Store: Are we there yet? This FOSSDEM talk went into depth on how to use a laptop's TPM 2.0 module…

Interesting Links for Week 6 of 2024

Austral: A Systems Language with Linear Types and Capabilities I came across Austral a month ago. While writing Common Golang Code Review Comments , Golang's foot guns made me think about it again. Austral has similar design goals to Golang and Zig. Borretti is building a language that "must be simple enough fit in a single person’s head" and makes writing secure code easy. Austral has proper…

Interesting Links for Week 5 of 2024

A Basic USB-C Primer https://hackaday.com/2024/01/30/a-basic-usb-c-primer/ Hackaday posted a USB C primer that goes into the details of how this complicated port works. Karrot https://karrot.world/ Karrot is a community organizing platform. It is open source and uses the MIT license. It provides a platform for local groups to coordinate face-to-face activities. It is also designed for democratic…

Zero to Production In Rust, Chapter 2

This blog post continues our Zero To Production In Rust read through. Today we are reading chapter 2. Luca starts by introducing what he calls "Problem-based Learning". I like this approach to teaching a language. It presents us with a problem to solve, and we solve it. I have learned a few languages, and it wasn't until I solved my own problems did I start to "get it". This approach Luca takes is…

Zero to Production In Rust, Chapter 1

For 2024, I want to embrace Rust as a backend platform. I have used it professionally for a proxy-wasm Envoy TCP filter. I had to parse a binary protocol. The nom crate made chopping up the TCP packets quite nice. The resulting parsing code ended up resembling the BNF grammar for the protocol. The parser functions mapped to the symbols defined in the grammar. A coworker who has little experience…

Starting guile-crdt

I noticed that in the The Heart of Spritely: Distributed Objects and Capability Security whitepaper, there was mention that the Goblins team intends to implement a standard library of CRDT patterns. Now, I have no expectation that this CRDT library I'm writing will be that standard library, but I know enough about CRDTs to use that as an excuse to write a library in Guile: guile-crdt Way back in…

How I built this site

I wanted to launch a blog for myself. I knew that I wanted to use a static site generator. I also wanted to give Tailwind an honest try. I looked at Hugo first. It seems to be a very popular choice. We use it at work. I never really cared for it. Hugo is a very sophisticated static site generator, but much more than I need. The next SSG I looked at was Cobalt . It worked well enough. I had a basic…