Building and Importing NixOS AMIs on EC2

Posted on August 30, 2020 by Jack Kelly
Tags: aws, coding, nix

Update (2020-09-03): /u/zimbatm on lobste.rs suggested the nixos-generators project. Added link and brief discussion.

Update (2020-11-29): Added notes on the impact of instance limits on Packer builds.

The NixOS project publishes Amazon Machine Images (AMIs) that are a great base for reproducible servers. This post describes how NixOS and EC2 work together, first showing how to build upon the NixOS project’s public AMIs; and then digging all the way into the scripts maintainers use to build, import and distribute new AMIs on AWS.

Getting a NixOS AMI

There are few good ways to get AMI IDs for NixOS project images:

Read more...

How to Follow an Issue

Posted on August 26, 2020 by Jack Kelly
Tags: coronavirus, media, rant

Roughly six months ago, the COVID-19 pandemic reached Australia, and began upending things down under (mid-March was when major events like the F1 Grand Prix were first cancelled). Do you consider yourself well-informed? How well do you remember everything that’s happened? Do you remember the rise and fall of hydroxychloroquine as a potential “miracle cure”? If pressed, could you back up the things you think you remember, even where the media has retreated from things they once said, quietly edited or retracted their stories, and deleted all their embarrassing tweets?

Most people reading this are already rightfully suspicious of the Murdoch press, but unfortunately the “respectable” sources are also terrible. Even from them, you must expect bad behaviour at all times: institutional bias, misleading wording, and cherry-picking. Don’t even expect real cherries, but you might find some if you’re lucky. Constant vigilance is necessary if you hope to engage with the media and come away with any truth at all.

I will use the tale of hydroxychloroquine as an example, because it’s recent and I have the links, but there’s no reason to expect anything different with any other issue, Hopefully you’ll understand the level of attention required to accurately track even one issue. When each new issue comes along, will need to decide whether it’s worth your time to follow it properly, or to let it pass. Anything less means you will be acting on bad information, which is worse than useless.

Read more...

Abstracting over Applicative, Alternative, Divisible, and Decidable

Posted on August 19, 2020 by Jack Kelly
Tags: haskell, coding

Justin Le recently put out a two-part series on “Enhancing Functor Structures Step-By-Step” (Part 1, Part 2). In the footnotes of Part 2, he mentions there’s no combined Applicative/Divisible class:

class DivisibleApplicative f where
  conquerpure :: a -> f a
  divideAp :: (a -> (b, c)) -> (b -> c -> a) -> f b -> f c -> f a

Let’s see if we can build one.

Read more...
All Posts | RSS | Atom
Copyright © 2024 Jack Kelly
Site generated by Hakyll (source)