Wed, Dec 12, 2018 Sun, Jun 25, 2017
I’ve been hosting this site with NearlyFreeSpeech.NET for a little over 2 years now, and have been using Hugo to generate it for slightly longer. I decided it might be a good idea to dump my setup somewhere so that I can refer back to it at a later date, and since I’m doing so I may as well make the details public as a post.
Continuous Integration is an important and widely used practice when it comes to software development. Over recent years, several projects have cropped up to help provide automated testing and delivery as part of your Continuous Integration system.
Since reading BlaXpirit’s excellent blog post regarding using Travis CI with Nim, I’ve been making use of Travis to build and test several of my open source projects. In that blog post, another Continuous Integration service is mentioned: Circle CI.Thu, May 25, 2017
After having read the blog post titled Faster Command Line Tools in D by Jon Degenhardt on the D Blog, I was interested to see how Nim would stack up performing the same task.
Rather than explain the task again, I might as well quote the reference post that inspired me:
It’s a common programming task: Take a data file with fields separated by a delimiter (comma, tab, etc), and run a mathematical calculation involving several of the fields.Fri, Sep 30, 2016
Nim is a statically typed programming language that compiles to C featuring a tracing garbage collector, zero overhead iterators, and powerful compile time evaluation of user defined functions. It features an indentation based syntax with a powerful AST based macro system. Thanks to the fact that Nim currently compiles to C, it can run on many platforms and architectures via a native binary. Cross compilation (for example, compiling a Windows executable on Linux) is also possible with the correct compiler configuration.Sat, Mar 19, 2016
Laravel 5 includes a handy system to create scheduled tasks that are ran through the artisan console. In order to run these command automatically, the documentation recommends using a cron job to call the schedule:run artisan command every minute.
One problem: minimal CentOS 7 installs do not come with cron installed. We can easily replicate this functionality using systemd timers however, without having to install any extra dependencies. The best resource for learning more about systemd timers I’ve found is the Arch Linux Wiki Page “systemd/Timers”, which goes into detail on the different types of timers (monotonic and real time) as well as providing some example unit files.