Skip to content

Instantly share code, notes, and snippets.

Lindsey Kuper lkuper

Block or report user

Report or block lkuper

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 gist:9701594
### Keybase proof
I hereby claim:
* I am lkuper on github.
* I am lindsey ( on keybase.
* I have a public key whose fingerprint is 6832 D0DB 85DB 2D9A 10DC B4B9 DF53 470B 4C78 460C
To claim this, I am signing this object:
View gist:9589829
pub unsafe fn strdup_uniq(ptr: *u8, len: uint) -> ~str {
from_buf_len(ptr, len)
View gist:8789334
%====Set up Listings===============================================================
{ % \centering
\csname lst@SetFirstLabel\endcsname}
{ %\centering
View gist:8553488
nbrs :: G.Graph -> G.Vertex -> [G.Vertex]
nbrs g v =
map snd edgesFromNode where
edgesFromNode = filter (\(v1, _) -> v1 == v) (G.edges g)
View gist:8393555
import threading
class LVar(object):
def __init__(self):
self.value = 0
def get(self, threshold):
while not self.value >= threshold:
View gist:8265340
(load "mkprelude.scm")
(define peanoo
(lambda (n out)
[(== n (build-num 0)) (== '(O) out)]
[(fresh (n1 res)
(-o n (build-num 1) n1)
(conso 'S res out)
(peanoo n1 res))])))
View gist:8215298
trait Printable {
fn print(&self) { println!("{:?}", *self) }
impl Printable for int {}
impl Printable for ~str {
fn print(&self) { println(*self) }
View gist:8089825
landin:lvar-examples lkuper$ git reset f550a2
Unstaged changes after reset:
M parallel-and.hs
M repeated-write-lvar-max-counter.hs
landin:lvar-examples lkuper$ git st
# On branch master
# Your branch is behind 'origin/master' by 8 commits, and can be fast-forwarded.
# (use "git pull" to update your local branch)
View gist:7936832
landin:haskell lkuper$ ./ --enable-tests
./ line 22: [: missing `]'
+ OPTS=' -fnewgeneric -fgeneric'
+ '[' -e .cabal-sandbox ']'
+ cabal install -fnewgeneric -fgeneric ./lvish ./par-classes/ ./par-transformers/ ./par-collections/ --enable-tests
Resolving dependencies...
In order, the following will be installed:
par-classes-1.0.1 (reinstall)
par-collections-1.0 *test (reinstall) changes: HUnit- added,
atomic-primops-0.4 added, monad-par- added, test-framework-0.8 added,
View gist:7932721
landin:lvish lkuper$ cabal test
Re-configuring with test suites enabled. If this fails, please run configure
Resolving dependencies...
Configuring lvish-
Building lvish-
Preprocessing library lvish-
warning: #warning "Compiling with non-scalable deque."
You can’t perform that action at this time.