Issue 61 2017-06-29
Welcome to another issue of Haskell Weekly! Haskell is a purely functional programming language that focuses on robustness, concision, and correctness. This is a weekly summary of what’s going on in its community.
Haxl is a big hammer for doing I/O concurrently, testing I/O, and modularity (caching & memoization).
I’m going to give a short introduction to Brick, a Haskell library for building terminal user interfaces. So far I’ve used brick to implement Conway’s Game of Life and a Tetris clone. I’ll explain the basics, walk through an example snake application, and then explain some more complicated scenarios.
STG’s lowering to C-- and the decisions taken when implementing it were based in the ‘90s. That’s not to say that the GHC team hasn’t done an awesome job keeping it up to date; they have! But, I wonder what a complete rewrite of this lowering would look like. Hence, I’m trying to experiment in this space and see what happens.
Come change how 6.5+ million K-12 US students learn Math, Language Arts, Social Studies and more. Use data, advanced type systems, great product design and deep pedagogy to change lives.
In this post I want to argue that threads are also a resource, in the sense that they require management after we’ve created them. A stray thread will consume memory, CPU cycles, and really whatever resource it might need to execute.
The value in this approach is that I don’t have to think about what functions to call to collect the images: it’s always
images. In the prior example, I had to think about the how to collect the images each time, and it took brain power better spent elsewhere.
I hope the primary thing you take away from it is a deeper understanding of how monad transformer stacks interact with operations in the base monad, and how monad-control works in general.
RecordWildCardsis a GHC extension that makes working with Haskell records more convenient. The extension has been blogged about in a few places already, so this post intends to provide a different motivating example: binary parsing.
I’ve written a few libraries now and have tried out different naming and exporting conventions. I’ve developed a bit of a feel for how it is to write and use them, and I’m going to put out my personal preferences and opinions on library design here.
There are quite a few ways to store mutable data in Haskell. Let’s talk about some of them! Specifically, we will focus on mutable containers that store a single value that can be modified by one or more threads at any given time. I’m not going to go into a ton of detail here — I just want to give an overview.
In C# sometimes I sorely miss something like an
INumber<T>interface with methods add, subtract, multiply, and others. The lack of this means it is cumbersome to write generic code on numbers.
Package of the week
This week’s package of the week is data-has, a library that provides a simple extensible product system.
- Announcing haskus-system 0.7
- Defeating evil with data structures
- stack2nix first public release
- Streaming combinators and extracting flat parallelism
- Typing Nix
- When competing with C, fudge the benchmark