Skip to content

Instantly share code, notes, and snippets.

@GrooveStomp
GrooveStomp / week2-ex01.hs
Created June 13, 2014 05:58
Yorgey class - week 2 exercise
{-# OPTIONS_GHC -Wall #-}
module LogAnalysis where
import Log
import qualified Data.Text as T
import Control.Monad
import Data.Char
parseMessage :: String -> LogMessage
parseMessage = parseMessage' . T.split (==' ') . T.pack
@GrooveStomp
GrooveStomp / tmux-session
Created July 9, 2014 05:33
Trying to install hdevtools
[aaron@ubuntu|~/code/yorgey-haskell-course/week-03|git:master|rb:2.1.2p95]
↳ cabal install hdevtools
Resolving dependencies...
In order, the following would be installed:
cmdargs-0.10.7 (reinstall) changes: transformers-0.4.1.0 -> 0.3.0.0
ghc-paths-0.1.0.9 (new package)
mtl-2.1.3.1 (latest: 2.2.1) (new version)
parsec-3.1.5 (reinstall) changes: mtl-2.2.1 -> 2.1.3.1
network-2.5.0.0 (reinstall)
hdevtools-0.1.0.5 (new package)
@GrooveStomp
GrooveStomp / bash-session
Created July 9, 2014 06:00
Trying to install hoogle
↳ cabal install hoogle
Resolving dependencies...
In order, the following will be installed:
cmdargs-0.10.7 (reinstall) changes: transformers-0.3.0.0 -> 0.4.1.0
haskell-src-exts-1.15.0.1 (new package)
parsec-3.1.5 (reinstall) changes: mtl-2.1.3.1 -> 2.2.1
network-2.5.0.0 (reinstall)
simple-sendfile-0.2.15 (reinstall) changes: network-2.5.0.0 added
streaming-commons-0.1.3.1 (reinstall) changes: network-2.5.0.0 added
wai-3.0.0.2 (reinstall) changes: network-2.5.0.0 added
@GrooveStomp
GrooveStomp / ghc-pkg_check
Created July 9, 2014 06:11
Checking GHC Dependencies
↳ ghc-pkg check
There are problems in package warp-3.0.0.3:
Warning: library-dirs: /home/aaron/.cabal/lib/x86_64-linux-ghc-7.8.2/warp-3.0.0.3 doesn't exist or isn't a directory
Warning: haddock-interfaces: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/warp-3.0.0.3/html/warp.haddock doesn't exist or isn't a file
Warning: haddock-html: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/warp-3.0.0.3/html doesn't exist or isn't a directory
import-dirs: /home/aaron/.cabal/lib/x86_64-linux-ghc-7.8.2/warp-3.0.0.3 doesn't exist or isn't a directory
cannot find any of ["Network/Wai/Handler/Warp.hi","Network/Wai/Handler/Warp.p_hi","Network/Wai/Handler/Warp.dyn_hi"]
cannot find any of ["Network/Wai/Handler/Warp/Buffer.hi","Network/Wai/Handler/Warp/Buffer.p_hi","Network/Wai/Handler/Warp/Buffer.dyn_hi"]
cannot find any of ["Network/Wai/Handler/Warp/Timeout.hi","Network/Wai/Handler/Warp/Timeout.p_hi","Network/Wai/Handler/Warp/Timeout.dyn_hi"]
cannot find any of ["Network/Wai/Handler/Warp/Internal.hi"
@GrooveStomp
GrooveStomp / cabal-install-hoogle
Created July 9, 2014 06:41
Remove .ghc, fresh "cabal install hoogle"
↳ cabal install hoogle
Resolving dependencies...
Downloading dlist-0.7.1...
Configuring dlist-0.7.1...
Building dlist-0.7.1...
Preprocessing library dlist-0.7.1...
[1 of 1] Compiling Data.DList ( Data/DList.hs, dist/build/Data/DList.o )
In-place registering dlist-0.7.1...
Creating package registration file: /tmp/pkgConf-dlist-0.729823.1
Installing library in
@GrooveStomp
GrooveStomp / ghc-pkg-check-new-results
Created July 9, 2014 06:47
ghc-pkg check new results
↳ ghc-pkg check
Warning: haddock-interfaces: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/network-2.5.0.0/html/network.haddock doesn't exist or isn't a file
Warning: haddock-html: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/network-2.5.0.0/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/parsec-3.1.5/html/parsec.haddock doesn't exist or isn't a file
Warning: haddock-html: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/parsec-3.1.5/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/text-1.1.1.3/html/text.haddock doesn't exist or isn't a file
Warning: haddock-html: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/text-1.1.1.3/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /home/aaron/.cabal/share/doc/x86_64-linux-ghc-7.8.2/syb-0.4.2/html/syb.haddock doesn't exist or isn't a file
Warning: haddock-html: /home/aaron/.cabal/share/d
@GrooveStomp
GrooveStomp / cabal-install-haskell-src-exts
Created July 10, 2014 02:40
Trying to install haskell-src-exts-1.15.0.1
[aaron@ubuntu|~/code/yorgey-haskell-course/week-03|git:master|rb:2.1.2p95]
↳ cabal install haskell-src-exts-1.15.0.1
Resolving dependencies...
[1 of 1] Compiling Main ( /tmp/haskell-src-exts-1.15.0.1-45950/haskell-src-exts-1.15.0.1/dist/setup/setup.hs, /tmp/haskell-src-exts-1.15.0.1-45950/haskell-src-exts-1.15.0.1/dist/setup/Main.o )
Linking /tmp/haskell-src-exts-1.15.0.1-45950/haskell-src-exts-1.15.0.1/dist/setup/setup ...
Configuring haskell-src-exts-1.15.0.1...
Building haskell-src-exts-1.15.0.1...
Preprocessing library haskell-src-exts-1.15.0.1...
[ 1 of 22] Compiling Language.Haskell.Exts.Annotated.Syntax ( src/Language/Haskell/Exts/Annotated/Syntax.hs, dist/build/Language/Haskell/Exts/Annotated/Syntax.o )
Failed to install haskell-src-exts-1.15.0.1
@GrooveStomp
GrooveStomp / bashfiles
Created July 17, 2014 20:26
touchpad enable/disable with autocomplete
# ~/.bash.d/touchpad.sh
touchpad ()
{
echo "WARNING: This script is currently hardware-specific.";
echo " You should only use this on the Dell XPS 13.";
local arg=$1;
local touchpad_id=$(xinput list | grep Trackpad | sed 's/^.*id=//' | sed -re 's/[[:space:]]+.*//');
case $arg in
info)
xinput list | grep --line-buffered Trackpad
@GrooveStomp
GrooveStomp / rspec-spec-output
Created July 22, 2014 18:02
concurrent-ruby spec run
↳ rspec spec
No DRb server is running. Running in local process instead ...
Compiled extensions not installed, pure Ruby Atomic will be used.
...............................................................................................................................................................................................................................................................................................................................
................................................................................................................*..............................................................................................................................................................................................................
..................................................................................................................................................................................................................................................
@GrooveStomp
GrooveStomp / concurrent-ruby-rake-output
Created July 28, 2014 19:33
concurrent-ruby rake run failures
Pending:
Concurrent::Agent clojure-like behaviour waits with sending functions to other agents until update is done
# Not yet implemented
# ./spec/concurrent/agent_spec.rb:436
Failures:
1) Concurrent::RubyThreadPoolExecutor#overload_policy :caller_runs #post does not create any new threads when the queue is at capacity
Failure/Error: expect(Thread.list.length).to be < initial + 5
expected: < 8