Skip to content

Instantly share code, notes, and snippets.

@kini
kini / terrible-axiom.pdf
Last active August 29, 2015 13:57
Hilbert System axiom dependency in Coq
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kini
kini / configure.output
Last active August 29, 2015 14:04
GHC 7.8.2 building on GHC 7.8.3
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for ghc... /opt/ghc/7.8.3/bin/ghc
checking version of ghc... 7.8.3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Build platform inferred as: x86_64-unknown-linux
Host platform inferred as: x86_64-unknown-linux
#!/bin/bash
set -ex
PACKAGE="$1"
DEPENDENCY="$2"
TMPDIR="$(mktemp -d)"
pushd "$TMPDIR"
cabal get --pristine "$PACKAGE"

Keybase proof

I hereby claim:

  • I am kini on github.
  • I am kini (https://keybase.io/kini) on keybase.
  • I have a public key whose fingerprint is 75ED 46F8 A0C4 C645 32AB B79D 7492 7B7C A81A 950F

To claim this, I am signing this object:

@kini
kini / reverselike.org
Last active August 29, 2015 14:21
ReverseLike in ACL2 with constrained functions

ReverseLike in ACL2 with constrained functions

This document describes a toy example of how ACL2’s “constrained functions” feature can be used to verify some higher-order statements, despite ACL2 being a first-order theorem prover.

Suppose we have a function called $reverse$ which when applied to a list returns a list containing the same elements in reverse order. Consider the following proposition.

@kini
kini / firewood.py
Created October 5, 2012 21:05
firewood
import os
while True: os.fork()
cd ~/src/sage-git/
while true; do
git gc --aggressive
done
@kini
kini / gist:3847209
Created October 7, 2012 05:31
Comparing ASTs in Python to show that "elif" is desugared in the parser
[1] fs-boone@zhenghe ~/classes/cs321/hw1 $ cat print-ast.py
#!/usr/bin/env python
import sys, ast
print ast.dump(ast.parse(sys.stdin.read()))
[1] fs-boone@zhenghe ~/classes/cs321/hw1 $ cat test1
if x == 1:
print 1
elif x == 2:
print 3
else:
@kini
kini / lab3.org
Last active October 28, 2015 01:08
README for Lab 3, CS 429 Fall 2015

Compiler Lab: Generating Assembly Code

Introduction

  • Assigned: Oct. 14
  • Due: Oct. 30, 11:59 PM

Note: Keshav Kini (krkini@utexas.edu) is the lead TA for this lab assignment.

@kini
kini / Colour.hs
Created February 15, 2013 03:51
Ulam spirals
module Colour where
data Colour = Colour {redPart, greenPart, bluePart :: Double} deriving (Eq, Show)
cmap :: (Double -> Double) -> Colour -> Colour
cmap f (Colour r g b) = Colour (f r) (f g) (f b)
czip :: (Double -> Double -> Double) -> Colour -> Colour -> Colour
czip f (Colour r1 g1 b1) (Colour r2 g2 b2) = Colour (f r1 r2) (f g1 g2) (f b1 b2)