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 / Onomatopentameters
Created December 16, 2013 03:54
Onomatopentameters
Onomatopentameter
=================
Onomatopentameters are words that when spoken make drum beats or some other cool musiclike pattern. The words themselves sound like the different drums in a trap set or a drum machine but the words themselves also make some kind of sense when put together as opposed to just patterns of onomatopoea. Here are some examples (and jokes).
Big Cat Little Cat
------------------
Old man: "Punk music is all about cats."
Young punk: "No way old man, it's about drugs and dirt and spikes."
Old man: "Then why are the drums always like - big cat little cat, big cat little cat?"
@schell
schell / loadCharacter
Created January 17, 2014 02:16
loadCharacter (into atlas)
-- | Loads a character into our atlas.
-- It does so by rendering a glyph to a texture then draws the original
-- atlas and the glyph texture into a framebuffer that is used as the new
-- atlas.
loadCharacter :: TextShaderProgram -> Atlas -> Char -> IO Atlas
loadCharacter tsp a char = do
let fp = _atlasFontFilePath a
px = _atlasPxSize a
(aW, aH) = _atlasTextureSize a
aTex = _atlasTextureObject a
{-# LANGUAGE OverloadedStrings #-}
module Web.Parsers where
import Data.Attoparsec.Text as A
import Data.Text
import Control.Applicative
import Data.Char
convertUnicode :: Text -> Either String Text
@schell
schell / test output
Created April 2, 2014 23:24
./runtests.sh - Mac OS X 10.9.2, ghc 7.8.0.20140228, cabal-install 1.18.0.3, Cabal 1.18.1.3
Running test Arr...
cat: TestDriver.tmp: No such file or directory
cat: TestDriver.tmp: No such file or directory
GHC disagrees with hastec output!
GHC says '[0,0,0,0,0,999,1041,0,0,0]', but hastec says ''
GHC disagrees with hastec -O2 output!
GHC says '[0,0,0,0,0,999,1041,0,0,0]', but hastec says ''
Running test BitOps...
cat: TestDriver.tmp: No such file or directory
cat: TestDriver.tmp: No such file or directory
let vs = [ -1, 1, -1 -- Front face
, 1, 1, -1
, -1, -1, -1
, 1, -1, -1
, -1, 1, 1 -- Back face
, 1, 1, 1
, -1, -1, 1
, 1, -1, 1
]
@schell
schell / hb 7.8
Created May 10, 2014 02:09
haste-boot 7.8
~/C/h/haste-compiler(ghc-7.8-haste-boot) haste-boot --local
Creating package directory.
ghc-pkg --no-user-package-db --global-package-db=/Users/schell/.haste/packages update libraries/rts.pkg
Reading package info from "libraries/rts.pkg" ... done.
ghc-pkg --no-user-package-db --global-package-db=/Users/schell/.haste/packages update - --force
Reading package info from stdin ... done.
Cabal-1.18.1.3: Warning: library-dirs: /Users/schell/.haste/libraries/lib/Cabal doesn't exist or isn't a directory
Cabal-1.18.1.3: Warning: library-dirs: /Users/schell/.haste/libraries/lib/Cabal doesn't exist or isn't a directory
Cabal-1.18.1.3: dependency "array-0.5.0.0-8a8df4a1c1e3bf2f33e6357d6a83003a" doesn't exist (ignoring)
Cabal-1.18.1.3: dependency "base-4.7.0.0-c4013aeda9e32c50083c0bb3acc4040c" doesn't exist (ignoring)
@schell
schell / Wire.hs
Created August 6, 2014 00:46
FRP in 88loc
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
module Main where
import Data.Time.Clock
import Control.Applicative
import Control.Monad
import Control.Monad.Identity
import System.Exit
import System.Environment
@schell
schell / designer.html
Created October 4, 2014 07:01
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@schell
schell / gist:099c2960eccb7227c9ff
Created May 16, 2015 00:37
One small reason I love working in Haskell - great community

While compiling conduit-extras ghc warns me that

Data/Conduit/Binary.hs:376:27: Warning:
    In the use of ‘S.breakByte’ (imported from Data.ByteString):
    Deprecated: "It is an internal function and should never have been exported. Use 'break (== x)' instead. (There are rewrite rules that handle this special case of 'break'.)"

Data/Conduit/Binary.hs:425:28: Warning:
    In the use of ‘inlinePerformIO’
    (imported from Data.ByteString.Internal):
 Deprecated: "If you think you know what you are doing, use 'unsafePerformIO'. If you are sure you know what you are doing, use 'unsafeDupablePerformIO'. If you enjoy sharing an address space with a malevolent agent of chaos, try 'accursedUnutterablePerformIO'."
@schell
schell / hashing-api.md
Created September 2, 2016 18:57
Hashing API

GET /

Authentication

Clients must supply the following data

Response: