Minimal effort build improvements and a GHC 8.2.2 upgrade

How attempting to speed up my CI builds led to upgrading to GHC 8.2.2 (and eventually speeding up my CI builds)

vados

19 minute read

tl;dr - On a Haskell project I’m working on I started with >~20 minute cold-cache builds in the worst case in my Gitlab-powered CI environment then found some small ways to improve. Very recently I decided I wasn’t satisfied with ~10 / 15 minute builds and did the laziest, least-effort steps I could find to get to <10 minute cold-cache builds (~5min best case). Check out the [TLDR][tldr] section to see the Dockerfiles and steps I took summarized.

Haskell build issues on Arch Linux (tinfo6)

Some notes on issues I was having building haskell projects on Arch Linux

vados

1 minute read

Over the last month or two, I’ve had some unexpected/weird problems building my Haskell projects on Linux – all of a sudden the project would fail to compile fairly innocuous requirements (that had up until that time compiled just fine) and I was very confused. It turns out a change to how the `

Adding a very naive in-memory cache to my Haskell web app

How I added very naive in-memory caching to my haskell webapp

vados

28 minute read

tl;dr - I added some caching to an app I’m writing in Haskell using Servant. The implementation is pretty naive, but I’ve seen some speedups (as one would expect from skipping a database access), and am glad I was able to build such a simple solution in a language as expressive as haskell. Skip to the end TLDR section to see all the code laid out!

Continuous Integration To Continous Delivery Haskell Project With Gitlab

Adding Continuous Delivery (CD) to my Gitlab-powered CI setup for my job board Haskell-powered web application

vados

26 minute read

tl/dr; I added continuous delivery to my Haskell project (after working through adding CI). The setup is somewhat convoluted, but that’s more due to personal organizational preference. This posts rambles A LOT so feel forward to skip to the end, and check out the config files that made it happen.

Adding Sqlite Powered Fts Search To A Servant Powered Haskell App

Adding light and easy Full Text Search with SQLite3 to my servant-powered web app

vados

17 minute read

tl;dr - You may not need a big robust beautifully crafted DB like Postgres every time you build an app. Sometimes SQlite is probably enough. SQLite even provides Full Text Search addons in the way of FTS3/4 and FTS5, so that’s cool too – skim through the article for code snippets on the why/how I’m using SQLite + FTS3/4.

Moving From Server Side Sessions To Client Side Session Tokens with Servant

Documenting my move from Network.Wai.Session to Web.ClientSession

vados

12 minute read

tl;dr - I moved from server-side stored sessions provided by Network.Wai.Session to client-side signed+encrypted session tokens provided by Wai.ClientSession for my Servant-powered webapp, it’s pretty easy, skim through to see the setup code, /login and /logout code that was required.

Static Binaries for Haskell: A Convoluted Approach

A convoluted (but working) path to building binaries for a Haskell app

vados

17 minute read

tl;dr - After a bunch of trial and error, I end up building a mostly static binary from a docker container. With hindsight it was only “mostly” static because after trying to get sendmail working from haskell code, the getProtocolByName system call was failing, pointing to the fact that there were a bunch of libraries NOT included in the executable I thought was fully static (GHC warned me) that needed to be present in the same form in the deployment container. This prompted making…

Graylog as a hslogger backend in Haskell

Setting up Graylog as a hslogger backend in Haskell

vados

10 minute read

tl;dr - It’s pretty easy to use Graylog as a System.Logger backend, check out the code at the end, also if you’re interested in just regular crash-level logging with Servant, there’s some code you might like at the bottom too.