Skip to content

Instantly share code, notes, and snippets.

View schell's full-sized avatar
🥑
mmm

Schell Carl Scivally schell

🥑
mmm
View GitHub Profile
@schell
schell / haskell-games.md
Last active October 1, 2018 21:28
haskellgames.com

what is it

The idea is to host haskell implementations of popular console/arcade titles as a blog series. The end goal being to ignite interest in writing games with haskell and possibly hosting a haskell game jam at some point in the future. For launch it would be nice to have 3-4 games already written.

Getting this off the ground is going to take a long time as my (schell's) free time is pretty limited ATM, so don't worry if you feel like committing to this is too much. You can commit any amount of time and write your game slowly as I figure out the details.

@schell
schell / spec.hs
Created September 1, 2018 18:18
read from ag handle - ran with `stack test :target`
-- | The `ag` search process.
agSearchProcess :: Maybe FilePath -> CreateProcess
agSearchProcess mdir = ag { std_out = CreatePipe
, std_err = CreatePipe
, cwd = mdir
}
where ag = proc "ag" ["--noheading", "TODO"]
main :: IO ()
@schell
schell / keybase.md
Created August 14, 2018 20:07
keybase.md

Keybase proof

I hereby claim:

  • I am schell on github.
  • I am schellsan (https://keybase.io/schellsan) on keybase.
  • I have a public key whose fingerprint is 19AC C373 719B 2FD0 A78C 9195 B26E 748F 892E 858E

To claim this, I am signing this object:

@schell
schell / unlit.md
Last active May 21, 2018 16:17
markdown-unlit for fintan

This is a markdown headline

Here we'll write some comments

Now let's do some more stuff

Under the subheadline we have more comments, and finally some code:

main :: IO ()
main = putStrLn "blarg!"

That was the main.

@schell
schell / Metrics.hs
Created May 19, 2018 03:17
Proto.Proto.Metrics
{- This file was auto-generated from proto/metrics.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,
UndecidableInstances, GeneralizedNewtypeDeriving,
MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,
PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports#-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}
module Proto.Proto.Metrics
(Bucket(..), Counter(..), Gauge(..), Histogram(..), LabelPair(..),
Metric(..), MetricFamily(..), MetricType(..), MetricType(),
@schell
schell / opengl crash
Created July 1, 2017 21:24
opengl crash
λupdate
λ2017-07-01 14:24:07.809 ghc[72296:17632659] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fffa3ae12cb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffb88ec48d objc_exception_throw + 48
2 AppKit 0x00007fffa1ccde82 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4480
3 libSDL2-2.0.0.dylib 0x0000000114df652c Cocoa_PumpEvents + 247
4 libSDL2-2.0.0.dylib 0x0000000114d942b8 SDL_PumpEvents_REAL + 23
5 libSDL2-2.0.0.dylib 0x0000000114d94320 SDL_WaitEventTimeout_REAL + 57
@schell
schell / varying.idr
Last active May 18, 2017 16:45
varying in idris
record VaryingT (input : Type) (m : Type -> Type) (output : Type) where
constructor VT
runVarT : input -> m (output, Inf $ VaryingT input m output)
Monad m => Functor (VaryingT a m) where
map f v = assert_total $ VT $ \ x => do
(b, v2) <- runVarT v x
pure (f b, map f v2)
@schell
schell / NEVect.idr
Created May 17, 2017 18:40
non-empty vectors
module Data.NEVect
import public Data.Fin
%access public export
%default total
||| Non-zero natural numbers: upper unbounded, unsigned integers that are
||| greater than one.
data NZNat : Type where
@schell
schell / unicodeshenanigans.hs
Last active February 28, 2017 17:19
Unicode Shenanigans
{-# LANGUAGE OverloadedStrings #-}
module Lib
( someFunc
) where
import Data.Aeson
import Data.Aeson.Parser (value)
import Data.Aeson.Text
import Data.Aeson.Types
import qualified Data.ByteString.Lazy as BL
@schell
schell / bettercoroutine.hs
Last active February 21, 2017 16:54
better freer coroutiner
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}