<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Passing Curiosity: Posts tagged monads</title>
    <link href="https://passingcuriosity.com/tags/monads/monads.xml" rel="self" />
    <link href="https://passingcuriosity.com" />
    <id>https://passingcuriosity.com/tags/monads/monads.xml</id>
    <author>
        <name>Thomas Sutton</name>
        
        <email>me@thomas-sutton.id.au</email>
        
    </author>
    <updated>2013-04-24T00:00:00Z</updated>
    <entry>
    <title>FP-Syd, April 2013</title>
    <link href="https://passingcuriosity.com/2013/fpsyd-april-2013/" />
    <id>https://passingcuriosity.com/2013/fpsyd-april-2013/</id>
    <published>2013-04-24T00:00:00Z</published>
    <updated>2013-04-24T00:00:00Z</updated>
    <summary type="html"><![CDATA[<p>Trevor McDonell gave a presentation about <strong>the <a href="http://hackage.haskell.org/package/accelerate">Accelerate</a> Haskell
library</strong>, which provides an EDSL for writing code which is compiled and
executed on the GPU.</p>
<p>The approach involves using an EDSL to write CUDA code in a Haskell program.
This is generates code to be compiled and shipped to the GPU at run time.
Being Haskell, there’s a bunch of nice types involved: matrices have shapes,
matrix and scalar programs/fragments are of different types, and there are a
few of typeclasses.</p>
<p>Trevor demonstrated a <a href="https://github.com/AccelerateHS/accelerate-examples/tree/master/examples/hashcat">brute-force MD5 collision finder</a> written with
Accelerate which was very impressive.</p>
<p>Mark Hibberd spoke about <strong>interpreters and little languages with the <a href="http://hackage.haskell.org/package/free">Free</a>
package</strong>. Essentially, this boiled down to using Free with its functor and
monad instances to replace an API full of <code>IO a</code> typed operations, each of
them possibly unsafe, with a nice monadic EDSL and a single <code>IO</code> interpreter
function.</p>
<p>The various operations in the API no longer “do” the operation but build up a
data structure describing the operations to be performed as a little data
structure (essentially an AST) which the client code passes to an evaluation
function.</p>
<p>The more advanced theory categories and groups and left adjoint functors and
such left me behind, but his running example of a password manager library (to
generate, store and retrieve passwords) very illuminated the practical side of
using this technique. I’m quite looking forward to Jed Wesley-Smith’s YOW!
Lambda Jam talk about a similar topic: <a href="http://a.confui.com/public/conferences/5137e4d6680d707f99000005/locations/5137e4d6680d707f99000006/schedule/topics/515a436d567ee9da9000014e?framehost=http://www.yowconference.com.au">Connection Management, FP Style: A
Case Study</a>.</p>]]></summary>
</entry>

</feed>
