Hauptwerk
Music and sound, programming, art and fine culinary.
Wednesday, January 9, 2013
How to get the Haskell vector-fftw package working under Windows
Just a simple thing I thought I'd share, as it might help others in the future: to get the vector-fftw package working on Windows, you will need the DLLs available at http://www.fftw.org/. So far so good, but when I tried to install the package using cabal install vector-fftw --extra-include-dir=$FFTW --extra-lib-dir=$FFTW, where $FFTW is the path to the fftw DLLs, cabal told me it couldn't find them. It turns out the DLL was called fftw3-3, but the extra-libraries field of the vector-fftw cabal package asks for fftw3. So I renamed that field to fftw3-3, and all worked fine. You'll still need the DLLs to be in your PATH, though.
Tuesday, December 25, 2012
Muse at Ziggo Dome Amsterdam, 17/12/2012
This must have been the fourth time I've seen Muse live. Their concerts are always spectacular; you shouldn't expect any less. Matt's voice is as impressive on recording as it is live. All songs are played on the original key, dispelling any myths that his vocal range is manipulated digitally. The visuals are always stunning, and this concert was no exception. I'm attaching some pictures of what I call "the nexus"; a massive structure of 5 rectangular LED screens, often arranged as a pyramid, but moving independently:
The setlist was unsurprisingly centered on their latest album, The 2nd Law, which I find (even) less interesting than the previous one. I'm afraid that Muse are moving away to a style that I don't relate to very much. Nonetheless, old favourites like Knights of Cydonia, Hysteria, and Plug In Baby warmed up the evening, and leave hopes of a brighter future for Muse.
Tuesday, November 27, 2012
Coming soon in GHC HEAD: poly-kinded Typeable
With the implementation of DataKinds and kind polymorphism being complete in the 7.6 branch of GHC, it's time to start adapting libraries to make full use of this new potential. Lately I've been working on implementing the kind-polymorphic Typeable class as described in the original promotion paper in GHC. And I'm happy to say the work is nearly finished; it wasn't much, but there were some important design decisions to take. You can play with it by checking out the new-typeable GHC branch.
The Typeable class now looks like this:
Since every datatype can now be given a Typeable instance, and since handwritten instances of Typeable can lead to segmentation faults, we will also prevent users from writing their own instances of Typeable. Such instances, if present, will be ignored and raise a warning. To allow old code to still compile without changes, we've moved the monomorphic Typeable class to module Data.OldTypeable (which is deprecated).
After some more testing and documentation, the new-typeable branch will be merged with master, and kind-polymorphic Typeable will be available in GHC HEAD.
[Edited to replace github gists with more RSS/embed-friendly CSS/JS.]
The Typeable class now looks like this:
data Proxy (t :: k) = Proxy
class Typeable (a :: k) where
typeRep :: Proxy (a :: k) -> TypeRep
Note that the kind annotations are optional in this case, but I've included them to stress that this class is indeed kind-polymorphic. In this new class, we are no longer restricted to datatypes with a maximum of 7 parameters, nor do we require the parameters to be of kind *. We've renamed typeOf to typeRep, but we still define the old methods for backwards compatibility:typeOf :: forall a. Typeable a => a -> TypeRep typeOf _ = typeRep (Proxy :: Proxy a) typeOf1 :: forall t (a :: *). Typeable t => t a -> TypeRep typeOf1 _ = typeRep (Proxy :: Proxy t) typeOf2 :: forall t (a :: *) (b :: *). Typeable t => t a b -> TypeRep typeOf2 _ = typeRep (Proxy :: Proxy t)Now, each datatype only has one Typeable instance. Lists, for example, have an instance Typeable [], and Either has an instance Typeable Either. We then have a single, poly-kinded instance to deal with type application:
instance (Typeable s, Typeable a) => Typeable (s a) where
typeRep _ = typeRep (Proxy :: Proxy s) `mkAppTy` typeRep (Proxy :: Proxy a)
(Note that we're using ScopedTypeVariables in the examples.) Another cool thing is that now even type classes can have Typeable instances; since we allow abstraction over Constraint, datatypes may have parameters involving the Constraint kind, so to support Typeable for those datatypes, we need to support Typeable for type classes in general (as pointed out by Gábor Lehel). We cannot attach deriving clauses to type classes, but we can use standalone deriving:deriving instance Typeable EqTo make things easier we also provide a AutoDeriveTypeable language extension that generates a derived instance of Typeable for every data and class declaration in the module it's used.
Since every datatype can now be given a Typeable instance, and since handwritten instances of Typeable can lead to segmentation faults, we will also prevent users from writing their own instances of Typeable. Such instances, if present, will be ignored and raise a warning. To allow old code to still compile without changes, we've moved the monomorphic Typeable class to module Data.OldTypeable (which is deprecated).
After some more testing and documentation, the new-typeable branch will be merged with master, and kind-polymorphic Typeable will be available in GHC HEAD.
[Edited to replace github gists with more RSS/embed-friendly CSS/JS.]
A new beginning
Over two years have passed since I last posted here. I have been wanting to take some action, but I wasn't sure what to do. In a last attempt to preserve this blog, I have decided I will no longer try to restrict the content I blog about. In particular, recently I have been wanting to post about programming, so instead of creating a new blog for that purpose, I'll just reuse Hauptwerk. Posts will be properly labelled so that readers can select what they're interested in.
Sunday, March 28, 2010
Museum: De Pont, Tilburg, The Netherlands
A few days ago I visited the museum De Pont in Tilburg, the Netherlands. I was expecting a small private museum with a correspondingly small collection, but I was surprised. Not only was De Pont not small at all, it housed a very broad and interesting collection, together with an exhibition on Sophie Calle.
(As a slight aside, Tilburg, together with Eindhoven, is accused of being an industrial new city with lack of a vibe and therefore not a nice place to live. To me this is a bit unfair: both have a nice modern art museum and alternative/cool places to go out at night. Eindhoven also has plenty of interesting events, like the Glow or the Strp festivals. But anyway.)
The highlight of the museum was Sophie Calle's Talking to Strangers. From the museum's description: Calle invited 107 women from a ballerina to a lawyer to use their professional skills to interpret an email in which her partner breaks up with her. Calle's work is generally meticulously detailed, thereby giving meaning and profound feeling to things that could otherwise be deemed common (such as this breakup letter). There were also some other works by Calle, which consist mostly of collections of letters and photographs documenting curious events planned by her.
The rest of the space in the museum was dedicated mostly to the permanent collection, which is an eclectic but well-balanced mix of styles and techniques from the last few years. Overall, high quality and good taste. I found Laib's Wachraum, Boltanski's Les Bougies and Paine's Crop very interesting.
Below are some of the pictures I have taken at the museum. Sometimes I first picture the description and then the work, sometimes I picture only the description because the work itself could not be pictured:
(As a slight aside, Tilburg, together with Eindhoven, is accused of being an industrial new city with lack of a vibe and therefore not a nice place to live. To me this is a bit unfair: both have a nice modern art museum and alternative/cool places to go out at night. Eindhoven also has plenty of interesting events, like the Glow or the Strp festivals. But anyway.)
The highlight of the museum was Sophie Calle's Talking to Strangers. From the museum's description: Calle invited 107 women from a ballerina to a lawyer to use their professional skills to interpret an email in which her partner breaks up with her. Calle's work is generally meticulously detailed, thereby giving meaning and profound feeling to things that could otherwise be deemed common (such as this breakup letter). There were also some other works by Calle, which consist mostly of collections of letters and photographs documenting curious events planned by her.
The rest of the space in the museum was dedicated mostly to the permanent collection, which is an eclectic but well-balanced mix of styles and techniques from the last few years. Overall, high quality and good taste. I found Laib's Wachraum, Boltanski's Les Bougies and Paine's Crop very interesting.
Below are some of the pictures I have taken at the museum. Sometimes I first picture the description and then the work, sometimes I picture only the description because the work itself could not be pictured:
Subscribe to:
Posts (Atom)
