Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
So, uh, the two things the blog post covers are actively awful practices. Let's look at Logging. Logging boils down to ServantLogConfig, which carries a function Text -> IO (). This is bad. Text is not a great type for logging, since it's relatively slow and encodings aren't guaranteed to be sensible (cf this bug where logging to a file was broken based on environment encoding). You want something like LogStr from fast-logger, or even a ByteString.Builder or Text.Builder even.
Just wandered by this post. I agree completed with what you've express here. I saw the linked content a few days ago and thought "too bad they are encoding bad practices." Freckle has a similar pagination library to that esqueleto one, though it is API focused https://github.com/freckle/yesod-page-cursor.