Skip to content

Instantly share code, notes, and snippets.

View thiago-negri's full-sized avatar

Thiago Negri thiago-negri

View GitHub Profile
@thiago-negri
thiago-negri / Edsl.hs
Created August 15, 2012 00:57
Simple EDSL to test a calculator
module Edsl where
--
-- Imports
import Control.Monad.Trans.State.Lazy
(State, evalState, modify, get)
import Data.Char
(toLower)

Keybase proof

I hereby claim:

  • I am thiago-negri on github.
  • I am thiagonegri (https://keybase.io/thiagonegri) on keybase.
  • I have a public key ASBSDsTqHPh9NG1RXrKpqhmf_lWrnpzyPBFGREQZsNn7XAo

To claim this, I am signing this object:

@thiago-negri
thiago-negri / Main.hs
Created August 22, 2012 23:58
Cloud Haskell example
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
module Main (main) where
import Prelude hiding (catch)
import System.Environment (getArgs, getProgName)
import Control.Monad (forM, replicateM_, forever, void, liftM)
import Data.Binary (Binary)
@thiago-negri
thiago-negri / gist:2706161
Created May 16, 2012 00:05
Sample telnet chat in Haskell
module Main(main) where
import Network
import System.IO
import Control.Monad
import Control.Concurrent
import Data.List
type Message = String
(function() {
// see https://github.com/brianreavis/selectize.js/issues/470
// extended from https://gist.github.com/bkosborne/56ee6a6559ac66d64490
// gist at https://gist.github.com/thiago-negri/132bf33b5312e2da823c
Selectize
.define('no_results', function(options) {
var self = this;
options = $