Skip to content

Instantly share code, notes, and snippets.

View dedup_dotnet_publish_output.sh
#!/bin/bash
set -euo pipefail
# Our build consists of separate "dotnet publish" commands that are
# directed to separate subdirectories of the output.
primary="subdirA"
secondary=" subdirB subdirC "
if [ $# -eq 0 ]; then
@rrnewton
rrnewton / gcc_output.txt
Created Feb 22, 2018
GCC compliing hello world
View gcc_output.txt
execve("/usr/bin/gcc", ["gcc", "hello.c"], [/* 53 vars */]) = 0
brk(NULL) = 0x19a0000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=145885, ...}) = 0
mmap(NULL, 145885, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4235f53000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
@rrnewton
rrnewton / treebench_gcc_add1.s
Last active Jan 24, 2017
Assembly generated by add1-tree microbenchmark
View treebench_gcc_add1.s
treebench_c_bumpalloc.exe: file format elf64-x86-64
.........
00000000000025c0 <add1Tree>:
25c0: 41 57 push %r15
25c2: 41 56 push %r14
25c4: 41 55 push %r13
25c6: 41 54 push %r12
@rrnewton
rrnewton / Standalone.hs
Created Jun 27, 2016
A negative result not demonstrating the problem from trac #5642
View Standalone.hs
-- A standalone hacked down version of Trac #5642. This one is TOO
-- hacked down and it does not exhibit the problem.
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE GADTs #-}
module Standalone where
View Bad_build.txt
$ make build-nix
stack build
bindings-DSL-1.0.23: configure
bindings-DSL-1.0.23: build
bindings-DSL-1.0.23: copy/register
bindings-libffi-0.3: configure
bindings-libffi-0.3: build
bindings-libffi-0.3: copy/register
bindings-hpx-0.1: configure
bindings-hpx-0.1: build
@rrnewton
rrnewton / sumvector.txt
Last active Mar 6, 2016
Add example output from running sumvector in 155653b5711de91e61ecf52d083ba2c51c24a597
View sumvector.txt
grab https://github.com/iu-parfunc/unboxed_sums_paper/commit/155653b5711de91e61ecf52d083ba2c51c24a597
Commands to reproduce:
cd microbenchmarks
stack install --local-bin-path=./bin ./sumvector/
./bin/sumvector 1000 -o criterion.html $REGRESSES +RTS -t -s
benchmarking unboxed0
time 6.437 μs (6.435 μs .. 6.438 μs)
1.000 R² (1.000 R² .. 1.000 R²)
mean 6.438 μs (6.437 μs .. 6.440 μs)
View hackage-mirror.sh
#!/bin/sh
echo "Cleaning up..."
rm 00-index.tar.gz
mkdir -p package
echo "Downloading index..."
if [ ! -e 00-index.tar.gz ] ; then
wget http://hackage.haskell.org/packages/archive/00-index.tar.gz
fi
@rrnewton
rrnewton / CoreSimpl.hs
Last active Oct 23, 2015
Costs of laziness: Compiling a simple strict function over maybes
View CoreSimpl.hs
==================== Tidy Core ====================
2015-10-23 00:34:33.918129 UTC
Result size of Tidy Core = {terms: 45, types: 45, coercions: 9}
lvl_r39S :: Int
[GblId, Str=DmdType b]
lvl_r39S = patError @ Int "CostOfLaziness.hs:(9,3)-(10,14)|case"#
foo [InlPrag=NOINLINE] :: Maybe Int -> Int
View Strace of stack build.txt
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