Skip to content

Instantly share code, notes, and snippets.

View kvanbere's full-sized avatar
:octocat:
We write and test real time control software. @cuedo

Kyle Van Berendonck kvanbere

:octocat:
We write and test real time control software. @cuedo
View GitHub Profile
{-# LANGUAGE OverloadedStrings, RecordWildCards, LambdaCase #-}
import Conduit
import Data.Conduit
import Data.Conduit.Network
import qualified Data.ByteString.Char8 as BS
import Data.Conduit.TMChan
import Text.Printf (printf)
import Control.Concurrent.STM
import qualified Data.Map as Map
@kvanbere
kvanbere / Main.hs
Created March 30, 2014 02:24 — forked from gelisam/Main.hs
-- in reply to http://www.reddit.com/r/haskell/comments/21mja6/make_lllegal_state_transitions_unrepresentable/
--
-- We implement a tiny language with three commands: Open, Close, and Get.
-- The first Get after an Open returns 1, the second Get returns 2, and so on.
--
-- Get is only valid while the state is open, and
-- Open must always be matched by a Close.
-- We enforce both restrictions via the type system.
--
-- There are two valid states: Opened and Closed.
@kvanbere
kvanbere / _vimrc
Created January 12, 2014 11:16 — forked from jonashw/_vimrc
let mapleader=","
"enable pathogen
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
"git status on statusline
set statusline=%t
set statusline+=%m
set statusline+=\ %{fugitive#statusline()}

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
#include <stdio.h>
#if defined(__GNUC__)
#define unreachable() \
__builtin_unreachable()
#define assertion(cond) \
do \
{ \
-- Description: A red-black tree implementation in Haskell
-- Author: Cedric Van Goethem
-- Version 1, 2013
type Tree a = Node a
data Color = Red | Black deriving (Eq, Show)
data Node a = Node a Color (Node a) (Node a) | Nil deriving (Eq, Show)
tree :: (Ord a) => a -> Tree a
tree x = Node x Black Nil Nil
@kvanbere
kvanbere / fix-UBIF-typo.dsl
Created November 10, 2012 03:47 — forked from Lekensteyn/fix-UBIF-typo.dsl
ACPI UBIX fix for Toshiba Satellite L750D
/*
* ACPI UBIX fix for Toshiba Satellite L750D
* https://bbs.archlinux.org/viewtopic.php?id=152543
*
* Symptoms:
* ACPI Exception: AE_AML_PACKAGE_LIMIT, Index (0x0000000000000011) is beyond end of object (20120320/exoparg2-418)
* ACPI Error: Method parse/execution failed [\_SB_.BAT1.UBIX] (Node ffff880203e8a168), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
* ACPI Error: Method parse/execution failed [\_SB_.BAT1._BIX] (Node ffff880203e8a0f0), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
* ACPI Exception: AE_AML_PACKAGE_LIMIT, Evaluating _BIX (20120320/battery-419)
*