MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
At DICOM Grid, we recently made the decision to use Haskell for some of our newer projects, mostly small, independent web services. This isn't the first time I've had the opportunity to use Haskell at work - I had previously used Haskell to write tools to automate some processes like generation of documentation for TypeScript code - but this is the first time we will be deploying Haskell code into production.
Over the past few months, I have been working on two Haskell services:
I will write here mostly about the first project, since it is a self-contained project which provides a good example of the power of Haskell. Moreover, the proces
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
(ns kleene) | |
;; | |
;; Inspired by "Regexes, Kleene Algebras and Real Ultimate Power" | |
;; http://plastic-idolatry.com/erik/oslo2014.pdf | |
;; | |
;; What do we want to do?... | |
;; | |
;; (def p1 (times (Var. "w") (Var. "o") (Var. "w")) | |
;; (matches? p1 "wow") ;; true |
## Alexey Kachayev, 2014 | |
## Link to slides: | |
## http://goo.gl/n4ylC4 | |
## Basic: | |
## type Parser = String -> Tree | |
## Composition | |
## type Parser = String -> (Tree, String) |
import Pipes | |
# defservice Profile do ... end | |
# defservice Device do ... end | |
# defservice Push do ... end | |
send = pipe do | |
profile <- Profile.all &1 | |
badge <- Profile.get_badge_size profile | |
device <- Device.sessions profile |
package main | |
import ( | |
"fmt" | |
"net/http" | |
auth "github.com/abbot/go-http-auth" | |
) | |
func Secret(user, realm string) string { | |
if user == "john" { |
## | |
## Pairing heap data structure | |
## More information on wiki: | |
## http://en.wikipedia.org/wiki/Pairing_heap | |
## | |
## Data types | |
## Heap :: (Elem | None, Subs) | |
## Subs :: None | (Heap, Subs) | |
## |