Skip to content

Instantly share code, notes, and snippets.

@chrisdone
chrisdone / ackermann.dhall
Last active Apr 7, 2020 — forked from Gabriel439/ackermann.dhall
Ackermann function in Dhall
View ackermann.dhall
-- Credit to: https://news.ycombinator.com/item?id=15186988
let iterate
: (Natural Natural) Natural Natural
= \f n ->
fold (n + 1) f 1
let increment : Natural Natural = \n -> n + 1
let ackermann
@chrisdone
chrisdone / rust-day5.rs
Created Dec 10, 2017 — forked from samuelhnrq/rust-day5.rs
My solution for the fifth day of advent of code
View rust-day5.rs
extern crate time;
use std::fs::File;
use std::io::prelude::*;
fn main() {
let mut inpt = File::open("input/xmas5.txt").expect("file not found");
let mut content = String::new();
inpt.read_to_string(&mut content).unwrap();
let tm = time::now();
@chrisdone
chrisdone / expression_problem.hs
Created Nov 2, 2016 — forked from elnygren/expression_problem.clj
Solving the Expression Problem with Haskell
View expression_problem.hs
{-# LANGUAGE NamedFieldPuns #-}
-- The Expression Problem and my sources:
-- http://stackoverflow.com/questions/3596366/what-is-the-expression-problem
-- http://blog.ontoillogical.com/blog/2014/10/18/solving-the-expression-problem-in-clojure/
-- http://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/
-- http://www.ibm.com/developerworks/library/j-clojure-protocols/
-- To begin demonstrating the problem, we first need some
@chrisdone
chrisdone / Experiment1.hs
Last active Sep 1, 2016 — forked from idontgetoutmuch/Experiment1.hs
An experiment with data analysis
View Experiment1.hs
{-# LANGUAGE OverloadedLabels, TypeOperators, DataKinds, FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
import Labels
import Labels.Cassava
import Data.Vector ( Vector )
import Data.Text ( Text )
import Data.Text.Lazy.Encoding
import qualified Data.Text.Lazy as LT
import Data.Csv hiding ( decodeByName )
import Data.Csv.Streaming
@chrisdone
chrisdone / local.js
Created Jan 17, 2012 — forked from mightybyte/local.js
Javascript for digestive-functors massInput
View local.js
/*******************************************************************************
* Main entry point.
*/
$(document).ready(function(){
setupErrors();
setupDates();
setupAutoHide();
setupManageItems();
setupConfirms();
});
You can’t perform that action at this time.