Skip to content

Instantly share code, notes, and snippets.

🦉

David Luposchainsky quchen

🦉
Block or report user

Report or block quchen

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 helloworld.hs
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
View RandomName.hs
#!/usr/bin/env stack
{- stack
--resolver lts-12.0
--install-ghc
runghc
--package text
--package vector
--package base
--package random
--
@quchen
quchen / fusion2018.html
Last active Jul 17, 2018
Links to scraped Fusion 2018 livesets
View fusion2018.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fusion 2018 – Scraped Soundcloud links</title>
</head>
<body>
<h1>Fusion 2018 – Scraped Soundcloud links</h1>
View node.hs
{-# 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
View keybase.md

Keybase proof

I hereby claim:

  • I am quchen on github.
  • I am quchen (https://keybase.io/quchen) on keybase.
  • I have a public key ASATANMe9QP9201JvWflq0SKHe2ZN6BiVOGtul61dDKMtQo

To claim this, I am signing this object:

View interactive_sorting.hs
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
quchen / Prompt.hs
Created Apr 2, 2014
My custom prompt printer
View Prompt.hs
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import System.IO
import System.Environment
import qualified System.Exit as Exit
import Text.Printf
View playlist
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
quchen / spawn-bookkeeping.hs
Last active Dec 27, 2015
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.
View spawn-bookkeeping.hs
-- | 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)
View hello-ski.hs
s x y z = x z (y z)
k x y = x
i = s k k
c = s (s (k (s (k s) k)) s) (k k)
b = s (k s) k
hello =
s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s
b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(c k))))))))))))))))))))))))))))))))))))))))))
)))))))))))))))))))))))))))(s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s
You can’t perform that action at this time.