Survey of Rust CLI Utilities

󰃭 2020-03-29 | #cli #rust #unix

In this post I wanted to go over a few CLI utilities written in Rust that I am excited about. There are a lot of different Rust CLI tools out there, but I wanted to focus on ones that replace some of the GNU Core Utilities with Rust alternatives. The tools I will be talking about are exa, ripgrep, and bat.

You may be wondering why would you need alternatives for trusted utilities that have been around for decades? Well, a few reasons. First, they are written in Rust! Which for me is reason alone to use them. Secondly, some of these tools are makeovers with pretty colors and sane defaults, and sometimes they are even faster than the original. Some of the effort behind these tools goes to support the RedoxOS project which I highly recommend checking out if you haven’t.

Continue reading 


Make Your Own less in C

󰃭 2020-03-29 | #c #less #unix

Lately, I’ve had a new appreciation for minimalist C applications. There is a certain Zen quality about C that I really like. Knowledge of the possible “footguns” actually makes me more focused and insistent on writing good code. It is a bit like weight training but for programmers. Coding in other languages like Python feels trivial after spending a bit of time wrangling some C. less is one of the original Unix terminal applications for viewing files. It is a good example of the Unix philosophy: “Do one thing, and do it well”. It differentiates itself from editors by not loading the entire file into ram. The wikipedia page has a very detailed explanation. If you haven’t used less before, I would recommend giving it a spin before continuing with the rest of this post.

Continue reading 


Compile a Hello World example in C with musl and tcc

󰃭 2020-03-29 | #c #linux #musl #tcc #void

Continuing my exploration of suckless tools I wanted to try compiling a program with tcc and musl. tcc stands for Tiny C Compiler, and musl is a lightweight libc alternative to glibc. I was generally sold on the principal of these tools, but I could not for the life of me find documentation on how to get these two working together.

Turns out it is rather quite trivial if you use the right OS. In my case, I was doing this on Void Linux running inside of a QEMU vm. The reason I chose Void, was because it has a musl build, so all of the tools are built with musl instead of glibc. musl-devel is not available on the glibc version.

Continue reading 


DIY Internet Radio

󰃭 2020-03-29 | #darkice #go #icecast2 #nginx #radio

This post will layout the steps for setting up an internet radio using only Debian packages. The last part of it will go over how to create a Golang proxy server to make a fun website to host your stream.

One of my other hobbies besides programming is music. I love listening to music, making music, and even curating music. One thing I’ve always wanted to participate in is a silent disco, either as a listener or a DJ. If you aren’t familiar with a silent disco, it is simply a group of people all listening to the same music via headphones. So I thought to myself how hard might it be to make one myself? Turns out either really hard or fairly easy depending on the approach you take.

Continue reading 