Skip to content

Instantly share code, notes, and snippets.

Chaitanya Koparkar ckoparkar

  • Indiana University
  • Bloomington, IN
Block or report user

Report or block ckoparkar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View A.hs
-- ghc-8.6.5 -O0 -ddump-ds -ddump-simpl -ddump-to-file -fexpose-all-unfoldings -dsuppress-uniques \
-- -fforce-recomp -dsuppress-idinfo A.hs
module A where
import qualified Data.Map as M
data Foo = A Int
| B Foo Int
deriving Eq
View bug.v
Require Import List.
Require Import Omega.
Import ListNotations.
Definition strong_head {A : Type} : forall ls : list A, ls <> [] -> A.
refine (fun (ls : list A) =>
match ls with
| [] => fun _ => _
| a :: _ => fun _ => a
View pldi.patch
diff --git a/pldi19/bench.sh b/pldi19/bench.sh
index 1bf8650..412c330 100755
--- a/pldi19/bench.sh
+++ b/pldi19/bench.sh
@@ -138,9 +138,17 @@ echo "MACHINE,NAME,VARIANT,SIZE,TRIALS,ITERS,SELFTIMED(sec)" >> $LITMUS_RESULT_F
echo "Running in-memory benchmarks (Table 1)..."
echo "Sending results to $LITMUS_RESULT_FILE"
-# Some benchmarks require 100M iterations. Only used for CNF and Cap'n Proto.
+
View add1_no_gc.c
#include <assert.h>
#include <stdio.h>
// #include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <alloca.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/stat.h>
View nocase_test_litmus_add1.c
#include <assert.h>
#include <stdio.h>
// #include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <alloca.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/stat.h>
View Locs.gib
Prog {ddefs = [("Tree",
DDef {tyName = "Tree",
dataCons = [("Leaf", [(False, IntTy)]),
("Node",
[(False, PackedTy "Tree" "loc92"),
(False, PackedTy "Tree" "loc93")]),
("Node^",
[(False, CursorTy),(False, PackedTy "Tree" "loc94"),
(False, PackedTy "Tree" "loc95")]),
("INDIRECTION159", [(False, CursorTy)])]})],
View Bug.hs
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# OPTIONS_GHC -Wno-name-shadowing #-}
module Bug where
{-
`rts.c` has a minimal RTS I'm using to test the object file linking. It houses the `main` function.
The main function calls `main_expr`, which is provided by this LLVM module.
View Blade.hs
module Blade where
import qualified Data.Set as S
-- Implemented the inclusion-exclusion algorithm:
-- <https://stackoverflow.com/a/27248971>
-- (∑ Aj) in the formula
-- These all the numbers we've counted more than once
doubleCounts :: [Int]
View Tree.hs
module Tree where
data Tree = Leaf Int | Node Int Tree Tree
deriving (Show, Read, Eq, Ord)
type Forest = [Tree]
mkTree :: Int -> Tree
mkTree n =
case n of
@ckoparkar
ckoparkar / see_also.clj
Last active Jan 20, 2018
Extract see-also information from ClojureDocs
View see_also.clj
;; depends on monger
;; [com.novemberain/monger "3.1.0"]
(ns cider.nrepl.middleware.see-also
(:require [monger.core :as mg]
[monger.collection :as c]))
(defn extract-see-alsos
[]
(let [conn (mg/connect)
You can’t perform that action at this time.