Testing Nim Code Using Github Actions
Github has really improved lately with the addition of Github Actions. I’ll just refer to them as GA from here on. It’s very easy to add continuous integration tests and builds of your code if you’re using one of their supported languages like Node.js, Python or Ruby. But what if you want to test your Nim project? What are your options? Compile nim from scratch GA’s are declared in YAML and let you run arbitrary commands.
I’m a big fan of Graphviz. It’s an amazing tool to quickly generate all kinds of graph diagrams. See this simple example. Figure 1: Bruce’s wisdom l1 [label="I get up in the evenin’"]; l2 [label="And I ain’t got nothin’ to say"]; l3 [label="I come home in the mornin’"]; l4 [label="I go to bed feelin’ the same way"]; l1 -> l2 -> l3 -> l4; Links to code for all examples will be provided at the end.
Covid-19 Status (2020-03-29)
I’ve been following reports of this coronavirus since december. It looked bad. The reports coming out of China foretold that it was much more serious than influenza, but not having any data I didn’t realize it was so infectious. Now that data is starting to come out on a regular basis I’ve decided to keep a personal journal of the virus’ progress. Disclaimer: I am NOT a medical professional. This blog is based on limited research and observations in my spare time.
The Blogging Legacy
If you look at the history of my blogging you’ll see intermittent activity in between long bouts of silence. If you were able to look under the hood you would have seen multiple rounds of blog software migrations and hosting provider changes. I’ve already lost count of how many. Probably at least 6 different software tools and the same number of providers. Putting something on the Internet is challenging. Sure many sites make it easy to put something up in a matter of minutes.
Docker Now Supports Adding Host Mappings
In my previous blog entry, I mentioned that Docker didn’t provide any way to add host-to-ip mappings to /etc/hosts. Well, the most recent version of Docker (1.3.1) now addresses that issue with a new add hosts option. Let’s take a quick look at what it does. Given a standard default /etc/hosts. % docker run -it ubuntu cat /etc/hosts 172.17.0.8 b14031841b2b 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters We can add a mapping for server ‘foo’ at ‘10.