Browsing Stackage with VS Code and Glean| simonmar.github.io
Rethinking Static Reference Tables in GHC June 22, 2018It seems rare these days to be able to make an improvement that’s unambiguously better on every axis. Most changes involve a tradeoff of some kind. With a compiler, the tradeoff is often between performance and code size (e.g. specialising code to make it faster leaves us with more code), or between performance and complexity (e.g. adding a fancy new optimisation), or between compile-time performance and runtime performance. Recently ...| Simon Marlow
Fixing 17 space leaks in GHCi, and keeping them fixed June 20, 2018In this post I want to tackle a couple of problems that have irritated me from time to time when working with Haskell. GHC provides some powerful tools for debugging space leaks, but sometimes they’re not enough. The heap profiler shows you what’s in the heap, but it doesn’t provide detailed visibility into the chain of references that cause a particular data structure to be retained. Retainer profiling was supposed to h...| Simon Marlow
Hotswapping Haskell October 17, 2017This is a guest post by Jon Coens. Jon worked on the Haxl project since the beginning in 2013, and nowadays he works on broadening Haskell use within Facebook. From developing code through deployment, Facebook needs to move fast. This is especially true for one of our anti-abuse systems that deploys hundreds of code changes every day. Releasing a large application (hundreds of Kloc) that many times a day presents plenty of intriguing challenges. Haskell’s...| Simon Marlow
Asynchronous Exceptions in Practice January 24, 2017Asynchronous exceptions are a controversial feature of Haskell. You can throw an exception to another thread, at any time; all you need is its ThreadId: throwTo :: Exception e => ThreadId -> e -> IO () The other thread will receive the exception immediately, whatever it is doing. So you have to be ready for an asynchronous exception to fire at any point in your code. Isn’t that a scary thought? It’s an old idea - in fact, when we origina...| Simon Marlow
Haskell in the Datacentre December 8, 2016At Facebook we run Haskell on thousands of servers, together handling over a million requests per second. Obviously we’d like to make the most efficient use of hardware and get the most throughput per server that we can. So how do you tune a Haskell-based server to run well? Over the past few months we’ve been tuning our server to squeeze out as much performance as we can per machine, and this has involved changes throughout the stack. In this pos...| Simon Marlow
Haskell positions at Facebook August 24, 2016Want to write Haskell for a living? At Facebook we’re looking for Spam Fighters. A large part of this job involves writing Haskell code to run on our Sigma/Haxl platform. It’s a fascinating and exciting area to work in, using state of the art tools and systems, working with amazing people, and of course you get to write Haskell every day. Come and see what it’s like to write Haskell code that runs at Facebook scale! Job description and applic...| Simon Marlow
Stack traces in GHCi, coming in GHC 8.0.1 February 12, 2016tl;dr In the upcoming GHC 8.0.1 release, if you start GHCi with ghci -fexternal-interpreter -prof (any packages you use must be built for profiling), then you get access to detailed stack traces for all the code you load into GHCi. Stack traces can be accessed via assert, error, Debug.Trace.traceStack, and the API in GHC.Stack. Background Haxl users at Facebook do a lot of development and testing inside GHCi. In fact, we’ve built a ...| Simon Marlow
Fun With Haxl (Part 1) October 20, 2015This is a blog-post version of a talk I recently gave at the Haskell eXchange 2015. The video of the talk is here, but there were a lot of questions during the talk which aren’t very audible on the video, so hopefully this post will be useful to folks who weren’t at the event. If you want to play with the examples yourself, the code is available on github, and to run the examples you’ll need to cabal install haxl sqlite first, or the stack equivale...| Simon Marlow
Indexing Hackage: Glean vs. hiedb| simonmar.github.io