Skip to content

Instantly share code, notes, and snippets.


  • Bavaro, Dominican Republic
Block or report user

Report or block nponeccop

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
nponeccop /
Created Jul 13, 2018
Sample dependencies of MetaCPAN-Client
digraph Foo {
"MetaCPAN-Client" -> "LWP-Protocol-https";
"LWP-Protocol-https" -> "Test-RequiresInternet";
"LWP-Protocol-https" -> "libwww-perl";
"libwww-perl" -> "Test-RequiresInternet";
"libwww-perl" -> "Test-Fatal";
"Test-Fatal" -> "Try-Tiny";
"Try-Tiny" -> "CPAN-Meta-Check" [style=dotted];
"CPAN-Meta-Check" -> "Test-Deep";
"Try-Tiny" -> "Capture-Tiny" [style=dotted];
nponeccop / Cont.hs
Created Mar 3, 2017
State monad using Cont
View Cont.hs
{-# LANGUAGE NoMonomorphismRestriction, Rank2Types #-}
import Control.Monad.Cont
type State s v = s -> (s, v)
set :: a -> State a ()
set x = const (x, ())
get :: State a a
get = \s -> (s, s)
nponeccop / ListAlgebras.hs
Last active Feb 11, 2017
RamdaJS reduceBy() in Haskell using recursion-schemes
View ListAlgebras.hs
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeFamilies #-}
import Data.Functor.Foldable
import Data.Maybe
import qualified Data.Map as M
listCata :: ListCata a b
listCata = cata
reduceBy :: Ord k => ListAlgebra t b -> (t -> k) -> [t] -> M.Map k b
nponeccop /
Created Jan 27, 2017

A part of Hindley Milner type inference/checker

Checks only applications, there are no lets or lambda abstractions :)

Control.Unification comes from unification-fd package.
Unifier.Unifier and Unifier.Restricted can be copy-pasted from

nponeccop / mini-checker.hs
Created Jan 20, 2017
Minimal Hindley Milner type checker example using HNC Unifier
View mini-checker.hs
{-# LANGUAGE LambdaCase #-}
import Unifier.Unifier
import Unifier.Restricted
import Control.Monad.Identity
import Control.Unification (freeVar, freshen, applyBindings)
import Control.Unification.IntVar
import Control.Monad.Trans
import qualified Data.Map as M
data Expression = Atom String | App Expression Expression
nponeccop / min-unifier-hn.hs
Created Jan 19, 2017
Minimal client for HNC Unifier.Unifier module
View min-unifier-hn.hs
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-}
import Control.Unification (freeVar)
import Control.Unification.IntVar
import Control.Monad.Trans
import Control.Monad.Identity
import Unifier.Unifier
import Unifier.Restricted
t = UTerm . T
ar a b = UTerm $ TT [a, b]
digraph smtp {
init -> A [label=greet];
A -> done [label=ehlo];
nponeccop / .block
Last active Jun 30, 2016 — forked from mbostock/.block
Pan & Zoom Axes
View .block
license: gpl-3.0

10 charts of 1070 points each

The axes are still the bottleneck, so I reduced tick count

nponeccop /
Created Jun 15, 2016
24 FPS on sluggish LG L90 Duos

Lightning fast SVG chart

3x improvement vs previous version: 24 vs 8 vps on LG L90 Duos

High-end phones should all give 60 fps now

You can’t perform that action at this time.