Skip to content

Instantly share code, notes, and snippets.

module Foo where
fdf
foo :: [Char]
foo = "foo"
~
@gilligan
gilligan / Makefile
Created February 8, 2015 18:26
parallel make issue
dst/foo.x dst/bar.x dst/baz.x : src/foo.y src/bar.y src/baz.y
foobar-compiler src dst
# with "make -j 8" the foobar-compiler will be invoked 3 times instead of once
# it runs once for each file :(
@gilligan
gilligan / Makefile
Created February 8, 2015 19:10
parallel make problem
all: foo
foo: dst/foo.x dst/bar.x dst/baz.x
dst/foo.x dst/bar.x dst/baz.x : src/foo.y src/bar.y src/baz.y
@./magic
clean:
rm dst/*
@gilligan
gilligan / Makefile
Created February 8, 2015 21:10
Makefile
all: foo
foo: dst/.build
dst/.build : src/foo.y src/bar.y src/baz.y
./magic
@touch dst/.build
dst/baz.x : dst/bar.x
clean:
-rm -rf dst/*
-rm -rf dst/.build
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
var buildMap = function(env) {
return R.reduce(λ(obj, elem) {
var kv = R.split(':', elem);
var key = kv[0];
var val = kv[1];
@gilligan
gilligan / Xorg.0.log
Created May 25, 2015 00:26
xorg and nixos configuration files
[ 165.023]
X.Org X Server 1.16.4
Release Date: 2014-12-20
[ 165.023] X Protocol Version 11, Revision 0
[ 165.023] Build Operating System: Linux 3.12.27 x86_64
[ 165.023] Current Operating System: Linux nixoslappy 3.14.34 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64
[ 165.023] Kernel command line: initrd=\efi\nixos\pnhjgx3v9pkxyhqhjcxh62l2axwnwd3g-initrd-initrd.efi systemConfig=/nix/store/siybfc2y9prrwk6bab8bz8yh0460axwb-nixos-14.12.496.5f7d374 init=/nix/store/siybfc2y9prrwk6bab8bz8yh0460axwb-nixos-14.12.496.5f7d374/init loglevel=4
[ 165.023] Build Date: 01 March 2015 04:27:12AM
[ 165.023]
[ 165.023] Current version of pixman: 0.32.6
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@gilligan
gilligan / config.nix
Last active June 29, 2018 09:28
Getting started with nix and haskell
{ pkgs }:
{
allowBroken = true;
allowUnfree = true;
haskellPackageOverrides = self : super : (let inherit (pkgs.haskell-ng) lib; in {
ghc-mod = lib.overrideCabal super.ghc-mod (oldAttrs: {
src = pkgs.fetchgit {
url = https://github.com/kazu-yamamoto/ghc-mod;
//
// stripPath('/foo/bar/baz', ['x', 'foo', 'bar']) => 'bar/baz'
//
var stripPath = λ(path, names) {
var f = R.flip(R.strLastIndexOf)(path);
var indexList = R.map( λ(name) {
return {
n: name,
pos: f(name)