Skip to content

Instantly share code, notes, and snippets.

View quchen's full-sized avatar

David Luposchainsky quchen

View GitHub Profile
{1, Infinity, 1},
1 <= #1 <= 10,
RGBColor[0.368417, 0.506779, 0.709798],
RGBColor[0.880722, 0.611041, 0.142051],
module Main (main) where
-- Does not typecheck yet :-(
main = putStr (hello (:) [] succ minBound)
s f g x = f x (g x)
k x _ = x
hello :: (char -> io -> io) -> io -> (char -> char) -> char -> io
hello = s (s (k s) (s (k (s (k s))) (s (k (s (k (s (k s))))) (s (s (k s) (s (k
(s (k s))) (s (k (s (k (s (k s))))) (s (s (k s) (s (k (s (k s))) (s (k (s (k
#!/usr/bin/env stack
{- stack
--resolver lts-12.0
--package text
--package vector
--package base
--package random
quchen / fusion2018.html
Last active July 17, 2018 12:19
Links to scraped Fusion 2018 livesets
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Fusion 2018 – Scraped Soundcloud links</title>
<h1>Fusion 2018 – Scraped Soundcloud links</h1>
{-# LANGUAGE LambdaCase #-}
-- | Teaching terrible coding practices with the help of purely functional
-- programming. Today: Node.hs!
module NodeHs where
import Control.Concurrent
import Control.Exception
quchen /
Last active February 13, 2018 14:53

Keybase proof

I hereby claim:

  • I am quchen on github.
  • I am quchen ( on keybase.
  • I have a public key ASATANMe9QP9201JvWflq0SKHe2ZN6BiVOGtul61dDKMtQo

To claim this, I am signing this object:

import qualified Data.Set as S
import System.IO.Unsafe
import System.Directory
import System.Environment
import Control.Exception
import Data.List
newtype Song = Song String
deriving (Show, Read, Eq)
quchen / Prompt.hs
Created April 2, 2014 19:25
My custom prompt printer
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import System.IO
import System.Environment
import qualified System.Exit as Exit
import Text.Printf
quchen / playlist
Created January 25, 2014 17:50
electronic single tracks/adam beyer, ida engberg - lovecraft.mp3
electronic single tracks/Alberto Ruiz - Alien (Dani Sbert Remix).mp3
electronic single tracks/alex di stefano - multiverse.mp3
electronic single tracks/barnt - geffen.mp3
electronic single tracks/Bas Thomas - Second 2 None (Mike Maass Remix).mp3
electronic single tracks/black vel - assign (fabian schumann remix).mp3
electronic single tracks/boris brejcha - angel in the sky.mp3
electronic single tracks/Bunte Bummler - Youre Mine.mp3
electronic single tracks/C.P. - Metal Heart %28einsauszwei edit%29.mp3
electronic single tracks/Cari Lekebusch - Obscurus Sanctus.mp3
quchen / spawn-bookkeeping.hs
Last active December 27, 2015 17:29
This is a mock-up of an extended "spawn" method for Pipes.Concurrent that keeps track of metadata of the buffers. It should be fully compatible with the existing API.
-- | Store the metadata of a buffer.
data BufferMeta = BufferMeta { currentSize :: Int
, maxSize :: Maybe Int
-- | Like spawn', but also keeps track of metadata associated with the buffer.
spawn'' :: Buffer a
-> IO (Output a, Input a, STM (), STM BufferMeta)