I hereby claim:
- I am tfausak on github.
- I am taylorfausak (https://keybase.io/taylorfausak) on keybase.
- I have a public key whose fingerprint is 9891 6E7D C1ED FC03 DEF6 9A7C 153A 2CC8 FF94 90BF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$ http post :3000/tasks content='Do something!' created='2014-10-21T00:00:00Z' | |
{ | |
"content": "Do something!", | |
"created": "2014-10-21T00:00:00.000Z" | |
} | |
$ http :3000/tasks | |
[ | |
{ | |
"content": "Do something!", |
{-# LANGUAGE OverloadedStrings #-} | |
import Control.Concurrent.STM (TVar, atomically, modifyTVar, newTVarIO, readTVar) | |
import Control.Monad.IO.Class (liftIO) | |
import Data.ByteString.Lazy.Char8 (pack) | |
import Network.HTTP.Types (hContentType, status200) | |
import Network.Wai (Application, Request, Response, rawPathInfo, responseLBS) | |
import Network.Wai.Handler.Warp (run) | |
main :: IO () |
Introduction to Haskell | |
=== | |
*** Introduction *** | |
This document is in Literate Haskell. This means that you can run this file with | |
`ghci intro.lhs` and be able to run the functions defined in this file. | |
These 2 readings here explain very well why Haskell matters, and why programmers | |
like Haskell: |
# coding: utf-8 | |
require 'active_interaction' # 1.4.1 | |
require 'active_record' # 4.2.0 | |
require 'sqlite3' # 1.3.10 | |
ActiveRecord::Base.establish_connection( | |
adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Schema.define do |
module Euler8 where -- http://projecteuler.net/problem=8 | |
import Data.Char (digitToInt, isDigit) | |
import Data.List (tails) | |
main :: IO () | |
main = getContents >>= print . euler8 | |
euler8 :: String -> Int | |
euler8 |
-- base ==4.7.0.1 | |
-- bytestring ==0.10.4.0 | |
-- connection ==0.2.4 | |
-- network ==2.4.2.3 | |
-- text ==1.1.0.0 | |
-- websockets ==0.9.3.1 | |
import Control.Concurrent (forkIO) | |
import Control.Monad (forever, void) | |
import qualified Data.ByteString as BS |
module Main1 where | |
data HashSet a = native java.util.HashSet where | |
native new :: () -> STMutable s (HashSet a) | |
native size :: Mutable s (HashSet a) -> ST s Int | |
native add :: Mutable s (HashSet a) -> a -> ST s Bool | |
native remove :: Mutable s (HashSet a) -> a -> ST s Bool | |
main :: IO () | |
main = do |
https://github.com/frege/frege
https://github.com/Frege/frege/wiki/Differences-between-Frege-and-Haskell
import Foo as Foo (Foo)
in particularmodule Foo where