Skip to content

Instantly share code, notes, and snippets.

View rrnewton's full-sized avatar

Ryan Newton rrnewton

View GitHub Profile
@rrnewton
rrnewton / gist:a3ed0851b9382f21170df73458d32740
Created September 30, 2025 15:30
Breaking down the 27317 cargo vendored file types
[~/playground/scx/vendor (main)]
$ find | xargs file > /tmp/all_files.txt
$ wc /tmp/all_files.txt
27317 102247 3104103 /tmp/all_files.txt
$ sed 's/[0-9]//g' /tmp/all_file_types.txt | sort | uniq -c | sort -nr
10265 ASCII text
4645 directory
3082 C source, ASCII text
2827 current ar archive
2480 Rust Source file
./tests/ghc-e/should_run/T2636.hs:main = print "main"
./tests/linear/should_run/LinearTypeable.hs:main = print (isJust x)
./tests/parser/should_run/BinaryLiterals0.hs:main = print lst
./tests/parser/should_run/ParserMultiWayIf.hs:main = print $ x5 == 2 && x6 == "maybe" && x7 == 0
./tests/codeGen/should_run/cgrun074.hs:main = print (sum (concat (map longlistof [1..100])))
./tests/codeGen/should_run/cgrun040.hs:main = print (f2 (f3 (f1 3)) 4)
./tests/codeGen/should_run/cgrun011.hs:main = print foO
./tests/codeGen/should_run/cgrun001.hs:main = print ( f () )
./tests/codeGen/should_run/cgrun050.hs:main = print (f (VFn (F $ (\x -> VInt (x+3)))))
./tests/codeGen/should_run/T14754.hs:main = print (alg 3 1)
#!/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 February 22, 2018 16:36
GCC compliing hello world
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
(define x 33)
@rrnewton
rrnewton / treebench_gcc_add1.s
Last active January 24, 2017 15:42
Assembly generated by add1-tree microbenchmark
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 June 27, 2016 21:13
A negative result not demonstrating the problem from trac #5642
-- 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
$ 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 March 6, 2016 20:19
Add example output from running sumvector in 155653b5711de91e61ecf52d083ba2c51c24a597
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)
#!/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