Generate nix.conf for Cachix in bash. Because sometimes it's just unnecessary to download cachix the binary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| nix build --no-link "$@" nixpkgs#stdenv | |
| stdenv="$(nix eval --raw nixpkgs\#stdenv)" | |
| store="$(nix eval --raw --expr builtins.storeDir)" | |
| bashPath="$(dirname "$(realpath "$(type -p bash)")")" | |
| exec bash --rcfile /proc/self/fd/19 19<<END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \newcommand{\paper}{letterpaper} | |
| \newcommand{\maxlines}{20} | |
| \usepackage[vmargin=3cm,\paper]{geometry} | |
| \usepackage{tikzpagenodes} | |
| \usepackage{lipsum} | |
| \usepackage{background} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sizeof(int) = 4 | |
| RAND_MAX = 2147483647 | |
| NUM = 536870911 | |
| BLOCK_LEN = 2097152 | |
| block = 4.859 s | |
| naive = 6.024 s | |
| 1 - (block / naive) = 0.193 | |
| block = 4.637 s | |
| naive = 5.826 s | |
| 1 - (block / naive) = 0.204 |
dram.like || (wip && interesting)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Parser where | |
| newtype Parser a = P { parse :: String -> [(a, String)] } | |
| instance Functor Parser where | |
| fmap g p = P (\inp -> case parse p inp of | |
| [] -> [] | |
| [(v, out)] -> [(g v, out)]) | |
| instance Applicative Parser where |
This is a link to something, which is cleaner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ltac detect := | |
| match goal with | |
| | [ |- context G [ forall x : ?T, _ (* ?E *) ] ] => | |
| idtac G T; fail | |
| end. | |
| Theorem test : (forall x, x = 1) = (forall x, x = 2). | |
| Proof. | |
| try detect. | |
| (* As shown above: _ matches inside binders expectedly |