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 (https://keybase.io/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
#[lang="strdup_uniq"]
#[cfg(not(test))]
#[allow(missing_doc)]
#[inline]
pub unsafe fn strdup_uniq(ptr: *u8, len: uint) -> ~str {
from_buf_len(ptr, len)
}
View gist:8789334
%====Set up Listings===============================================================
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{darkred}{rgb}{0.5,0,0}
\lstloadlanguages{Haskell}
\lstnewenvironment{code}
{ % \centering
\lstset{}%
\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:
pass
return
View gist:8265340
(load "mkprelude.scm")
(define peanoo
(lambda (n out)
(conde
[(== 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 README.md
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$ ./install_lots.sh --enable-tests
./install_lots.sh: 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-1.2.5.2 added,
atomic-primops-0.4 added, monad-par-0.3.4.6 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
manually.
Resolving dependencies...
Configuring lvish-1.1.0.3...
Building lvish-1.1.0.3...
Preprocessing library lvish-1.1.0.3...
Control/LVish/SchedIdempotentInternal.hs:33:0:
warning: #warning "Compiling with non-scalable deque."
You can’t perform that action at this time.