Summary: memchr is faster, but the obvious implement seems to beat the builtin versions. There are two related C functions for finding the next character in a string - strchr which assumes the string has a NUL character at the end, and memchr which takes the string length as an argument. For strings where you have the size and a NUL terminator, which is fastest? Using gcc 6.2.0 64bit MSYS2 on Wind
Haskell is a great language, but debugging Haskell is undoubtedly a weak spot. To help with that problem, I've just released the debug library. This library is intended to be simple and easy to use for a common class of debugging tasks, without solving everything. As an example, let's take a function we are interested in debugging, e.g.: module QuickSort(quicksort) where import Data.List quicksort
Summary: QuickCheck had a space leak in property, now fixed (in HEAD). Using the techniques described in my previous blog post I found another space leak, this time in QuickCheck, which has now been fixed. Using QuickCheck we can chose to "label" certain inputs, for example: $ quickCheck $ \p -> label (if p > 0 then "+ve" else "-ve") True +++ OK, passed 100 tests: 54% -ve 46% +ve Here we label num
Summary: Alex and Happy had three space leaks, now fixed. Using the techniques described in my previous blog post I checked happy and alex for space leaks. As expected, both had space leaks. Three were clear and unambiguous space leaks, two were more nuanced. In this post I'll describe all five, starting with the obvious ones. 1: Happy - non-strict accumulating fold Happy contains the code: indexI
Summary: The development version of ghcid seemed to have some problems with terminating when Control-C was hit, so I investigated and learnt some things. Given a long-running/interactive console program (e.g. ghcid), when the user hits Control-C/Ctrl-C the program should abort. In this post I'll describe how that works in Haskell, how it can fail, and what asynchronous exceptions have to do with i
Summary: I've written a continuous integration system, in Haskell, designed for large projects. It works, but probably won't scale yet. I've just released bake, a continuous integration system - an alternative to Jenkins, Travis, Buildbot etc. Bake eliminates the problem of "broken builds", a patch is never merged into the repo before it has passed all the tests. Bake is designed for large, produc
Summary: You can use Shake as a library to implement other build tools. The Shake build tool is often used to define a specific build system, as an alternative to Make. But Shake is really a library, and can be used to implement other build tools. In this post I'm going to show a rough implementation of the Sake build tool using Shake. What is Sake? Extracted from the Sake documentation: Sake is a
Summary: I have just released Shake, a library that allows you to write build systems in Haskell (think Make, but much better). At the Haskell Implementors Workshop 2010 I described a Haskell build system named Shake (video here), hoping an implementation would be available "soon". Better late than never, I am delighted to announce that Shake is now available on Hackage. This version is a from scr
Summary: This post describes how to write a function in Haskell, and then call it from R. R is a very popular language for statistics, particular with biologists (and computational paleobiologists). For writing high performance code, the R developers recommend the use of C or Fortran - not languages that are particularly easy for beginners. However, you can instead write a Haskell function that ca
Summary: The Safe library has lots of small functions, none of which have INLINE pragmas on them. The lack of INLINE pragmas probably has no effect on the optimisation. I was recently asked a question about the Safe library: I was wondering why you didn't use any INLINE pragmas in the Safe library. I'm not a Haskell expert yet, but I've noticed that in many other libraries most one-liners are anno
Summary: Everyone using GHC 7 should upgrade to CmdArgs 0.7. GHC's optimiser got better, so CmdArgs optimiser avoidance code had to get better too. Update: Has this post scared you off CmdArgs? Read why CmdArgs is not dangerous. CmdArgs is a Haskell library for concisely specifying the command line arguments, see this post for an introduction. I have just released versions 0.6.10 and 0.7 of CmdArg
Summary: Hoogle can now search the GHC source code. There are also lots of small improvements in the latest version. A few weeks ago Ranjit Jhala asked me for help getting Hoogle working on the GHC documentation. As a result of this conversation, I've now released Hoogle 4.2.3, and upgraded the Hoogle web tool. For GHC developers You can search the GHC documentation using the standard Hoogle websi
Summary: Using the version control system Darcs is simple. This document describes the commands I use in my workflow. Darcs is my favourite version control system because of its simple user interface. I am able to do everything I need with a handful of simple commands. I work with darcs as a single user, without branches, occasionally accepting small external contributions. This guide is designed
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く