TL;DR: There is no Nix-native way of doing that. In this post I describe the process that led to the creation of Nix Package Versions, the tool that provides this functionality.
In his post about a Telegram bot Joachim Breitner mentions compiling his program into a static binary to have it run in Amazon’s version of Linux without needing to build it inside a container. I was interested in experimenting with Amazon Lambda and having statically linked Haskell programs sounded like a great idea too, so this is a write-up of what it took to get those things working.
Often I need to download many images from a web page and end up trying and adjusting far too many snippets from Stack Overflow.
Imagine you want to write a parser to match any of a set of strings that you know beforehand.
In functional programming languages you may find yourself overflowing the stack. This post describes techniques to achieve unbounded recursion without fear of the stack.
At the current state of web technologies, having our application be unavailable during every upgrade is not acceptable anymore. And if you are updating your application often, which you should, being available during updates is even more important. In this post I will walk you through hot-swapping docker containers without letting any request drop with just one command.
Haskell’s laziness can cause problems with recursive functions if they are not handled properly. In some cases this can be dealt with by using an accumulating parameter. Haskell’s wiki page on the subject does a great job in explaining how that works. Here I register some benchmarks on the wiki’s examples so we can see how much that matters.
As my Elm codebase grows, I start to see more and more places where it would be great to share some business logic between my front-end Elm and my back-end Node. This is how I got my Node code to call my Elm functions synchronously.
Redux is just great, but to be fair there isn’t an elegant way to perform asynchronous actions on it.
It was my most effective attack. Three companies went down. It was also accidental and with undesired consequences.
We all know how important code comments are, but we all aim for that marvellous holy grail of coding: the self documenting code. That is, code that does not need comments, you can read it like a book.
Rollup.js is a nice bundler that gets all of your dependencies and packs them together with our code. It works like a charm, but the documentation on how to get up and running with it can be very confusing. Let’s make crystal clear!
If you have used SASS for some time you will know that if you are within a media query and try to extend a class that is outside of the media query you will get an error. Let’s find a way around it.
Forget about setting up test servers for unit testing. Give a custom response to any HTTP request in your code with jasmine-ajax.
Building apps that have appropriate looks on iPhone and Android is a breeze with Ionic.
But sometimes we need more than
.platform-ios. We need device-specific css files.
Ionic provides a very nice system for you to track the usage of your app with the $ionicAnalytics plugin. But if you are reading this you probably already know that, so let’s get to the heart of the matter.
Well, that seems pretty trivial, right? You just connect the adapter and it should just work. Well, it should, but it doesn’t.
Some languages such as Java allow us to declare methods and variables in a class as private, restraining anything outside the class itself to access them.