Anardil

A spot of sunlight

Articles with the programming tag

Dynamic Shell Scripting

Summary We can use declare, eval and text manipulation tools like awk and sed to dynamically redefine shell functions based on their content or name. This allows us to add lines or generate entirely new functions. Introduction Bash and other shell...

AutoCLI

Summary AutoCLI simplifies managing scripts by auto generating option menus, all in bash, without any dependencies. Sub menus, customization, and positional arguments are all supported. See autocli.sh on GitHub for the source and more examples. The...

Apocrypha

The problem When creating applications, it's handy to be able to store data between runs. Maybe you have a server that can restart when your laptop comes out of sleep. Or maybe you have a script that you want to run periodically, so it needs to check...

Practical Coprocesses

Introduction Coprocesses expose a way to run a subshell asychronously, while maintaining full communication through pipes. In a typical script, you can run commands in the background (asychronously) with the & operator. This allows tasks to be worked...

Vimrc

I've read through a lot of vimrc's, borrowing a line here or there over the past 5 years! The best nuggets and my own findings are all distilled here for your perusal. What's the best way to use this? Skim through, find something that sounds...

Hal

Introduction Hal is a artificial intelligence I wrote for the Minecraft server I run. Here I hope to shed some light onto what he does and how he works. I'm going to run with the anthropomorphized 'he' even though Hal is really just a bunch of shell...

Ray Tracing with Functional Languages

There are a few notable programming features intrinsic to functional languages that make them well suited for implementing algorithms like ray tracing. We'll be using a simple ray tracer implemented in Typed Racket as the article of discussion. For all...