Skip to content

Instantly share code, notes, and snippets.

View rrnewton's full-sized avatar

Ryan Newton rrnewton

View GitHub Profile
This file has been truncated, but you can view the full file.
execve("/u/crest-team/opt/bin/stack", ["stack", "build"], [/* 129 vars */]) = 0
brk(0) = 0x3d73000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8adcfd2000
mmap(NULL, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8adcfcd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8adcfcc000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8adcfcb000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8adcfca000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8adcfc9000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8adcfc8000
@rrnewton
rrnewton / random cabal attempt.txt
Last active September 5, 2015 02:05
Random attempt on a random laptop to install the same package in stack and cabal
$ cabal --version
cabal-install version 1.20.1.0
$ cabal install turtle
Resolving dependencies...
Configuring ansi-wl-pprint-0.6.7.3...
Downloading clock-0.5.1...
Configuring hostname-1.0...
Configuring managed-1.0.0...
Configuring optional-args-1.0.0...
Building ansi-wl-pprint-0.6.7.3...
@rrnewton
rrnewton / Main.hs
Created September 3, 2015 14:44
Stack docker hello world (getting errors)
main = print "hello world"
@rrnewton
rrnewton / cabal test output, ghc 7.8.3
Last active November 16, 2015 10:56
pacman test outputs
$ cabal test
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring packman-0.2...
Preprocessing library packman-0.2...
[1 of 4] Compiling GHC.Packing.PackException ( dist/build/GHC/Packing/PackException.hs, dist/build/GHC/Packing/PackException.o )
[2 of 4] Compiling GHC.Packing.Type ( GHC/Packing/Type.hs, dist/build/GHC/Packing/Type.o )
[3 of 4] Compiling GHC.Packing.Core ( GHC/Packing/Core.hs, dist/build/GHC/Packing/Core.o )
[4 of 4] Compiling GHC.Packing ( GHC/Packing.hs, dist/build/GHC/Packing.o )
@rrnewton
rrnewton / Future.hs
Created August 24, 2015 22:55
For Omer
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MagicHash #-}
-- |
module Data.LVar.Future where
import Control.DeepSeq
import Control.Exception (throw)
@rrnewton
rrnewton / SpecList.hs
Created August 5, 2015 01:11
SpecList
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Data.Proxy
class SpecList a where
type List a :: *
@rrnewton
rrnewton / bad_output.hs
Last active August 29, 2015 14:24
Bad output with unfinished bits
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}
module Ghostbuster where
import Prelude hiding (Int, Maybe(..), Bool(..))
data TypeDict a where
data TyEquality a b where
Refl :: TyEquality a a
@rrnewton
rrnewton / Output.hs
Created June 29, 2015 13:34
Output of lowerDict on "p4"
Prog [DDef {tyName = TypeDict,
kVars = [(a, Star)],
cVars = [],
sVars = [],
cases = [KCons {conName = ArrowTyDict,
fields = [ConTy TypeDict [VarTy a],ConTy TypeDict [VarTy b]],
outputs = [ConTy ArrowTyDict [VarTy a,VarTy b]]},
KCons {conName = IntDict,
fields = [],
let rec spower : int -> int code -> int code =
fun n x ->
if n = 0 then <1>
else < ~x * ~(spower (n-1) x) >
let spowern n = <fun x -> ~(spower n <x> )>
let powExp exp = ! (spowern exp)
@rrnewton
rrnewton / memory_minimized.c
Created March 16, 2015 02:41
memory papi example minimized
#include "papi.h"
#include <stdlib.h>
#include <stdio.h>
// Make sure to create some cache misses:
void do_misses() {
int i;
int sz = 30 * 1000 * 1000;
double* data = malloc(sz * sizeof(double));
for(i=0; i<sz; i++) data[i] = i*100;