Skip to content

Instantly share code, notes, and snippets.

@cdepillabout
cdepillabout / juggling-data
Last active March 14, 2020 16:08
Days practicing 5 minutes of juggling, and days new records were set
Index,Date,NewRecord
0,2019-06-23
1,2019-06-24
2,2019-06-25
3,2019-06-26
4,2019-06-27
5,2019-06-28
6,2019-06-29
7,2019-06-30
8,2019-07-01
@cdepillabout
cdepillabout / purescript-build-output-err-haddock.txt
Last active November 6, 2019 10:19
Error when building purescript with --haddock option to stack
Building library for purescript-0.13.4..
[ 1 of 163] Compiling Control.Monad.Logger
[ 2 of 163] Compiling Control.Monad.Supply
[ 3 of 163] Compiling Control.Monad.Supply.Class
[ 4 of 163] Compiling Language.PureScript.Comments
[ 5 of 163] Compiling Language.PureScript.AST.SourcePos
[ 6 of 163] Compiling Language.PureScript.Crash
[ 7 of 163] Compiling Language.PureScript.AST.Operators
[ 8 of 163] Compiling Language.PureScript.Docs.Css
[ 9 of 163] Compiling Language.PureScript.Docs.Utils.MonoidExtras
$ cabal new-install exe:ormolu -v3
File monitor 'config' unchanged.
this build was affected by the following (project) config files:
- /home/illabout/git/ormolu/cabal.project.local
Reading available packages of hackage.haskell.org...
Using most recent state (could not read timestamp file)
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
index-state(hackage.haskell.org) =
File monitor 'improved-plan' unchanged.
@cdepillabout
cdepillabout / dependently-typed-tensor.hs
Created May 30, 2019 17:01
A half-working dependently typed tensor library based on the linear package
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE KindSignatures #-}
@cdepillabout
cdepillabout / stretchly.nix
Created April 13, 2019 03:25
nix file for stretchly
with (import ~/git/nixpkgs {});
let
libs = [
alsaLib
at-spi2-atk
atk
cairo
cups
dbus
@cdepillabout
cdepillabout / example.hs
Created April 11, 2019 02:08
show how quantifiedconstraints can be used for writing highly polymorphic versions of functions like pure
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wall #-}
module MaybeT where
@cdepillabout
cdepillabout / maybet.hs
Created April 10, 2019 05:50
show maybet
{-# LANGUAGE InstanceSigs #-}
module MaybeT where
import Control.Monad.Trans
newtype MaybeT m a = MaybeT { unMaybeT :: m (Maybe a) }
instance MonadTrans MaybeT where
lift :: Monad m => m a -> MaybeT m a
@cdepillabout
cdepillabout / cudatoolkit-release-18.09-and-19.03.diff
Created March 20, 2019 03:14
Git diff between cudatoolkit derivation from release-18.09 and release-19.03 branch
$ git diff release-18.09 release-19.03 -- pkgs/development/compilers/cudatoolkit/default.nix
diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix
index e44c21abe94..3a34d14f8ad 100644
--- a/pkgs/development/compilers/cudatoolkit/default.nix
+++ b/pkgs/development/compilers/cudatoolkit/default.nix
@@ -1,6 +1,6 @@
-{ lib, stdenv, makeWrapper, fetchurl, requireFile, perl, ncurses, expat, python27, zlib
-, gcc48, gcc49, gcc5, gcc6
-, xorg, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
+{ lib, stdenv, makeWrapper, fetchurl, requireFile, perl, ncurses5, expat, python27, zlib
@cdepillabout
cdepillabout / set-proof-example.idr
Created December 4, 2018 04:00
Some proofs of simple things from set theory, including how to define power sets and subsets. All in Idris.
module Set2
--
-- This module has some proofs of things from set theory. Inspired by
-- chapter 13 of the book Type Theory and Formal Proofs.
--
-- A power set of some given set s.
PowerSet : (s : Type) -> Type
PowerSet s = s -> Type
these derivations will be built:
/nix/store/x5bvnh074wh774yd3n73zgylicjxf408-gi-gdk-3.0.16.drv
/nix/store/8smaas6jq95knzqbw6inlfhlw97bla0y-gi-gtk-3.0.25.drv
/nix/store/4a8avkmjxv5sb30qzcshshlx92pwwww0-gi-vte-2.91.19.drv
/nix/store/912iwrga7jvxn3vawab29hmnfsrpsv3z-termonad-1.0.0.0.drv
/nix/store/br77czswyk786k0ak8j4hwradp2xxbxw-ghc-8.4.4-with-packages.drv
/nix/store/g8gags5q5hiiqpzxx45y1kwzf0xkvmf9-termonad-with-packages-8.4.4.drv
building '/nix/store/x5bvnh074wh774yd3n73zgylicjxf408-gi-gdk-3.0.16.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/dxljd69cp3m5cgfl53h0fjbq202m0fm7-ghc-8.4.4.