This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> updateNowPlaying (Artist "Amenra") (Track "Némelèndèlle") Nothing Nothing Nothing Nothing Nothing Nothing ak sk s | |
Loading package tagged-0.4.4 ... linking ... done. | |
Loading package pretty-1.1.1.0 ... linking ... done. | |
Loading package array-0.4.0.1 ... linking ... done. | |
Loading package deepseq-1.3.0.1 ... linking ... done. | |
Loading package bytestring-0.10.0.0 ... linking ... done. | |
Loading package containers-0.5.0.0 ... linking ... done. | |
Loading package text-0.11.2.3 ... linking ... done. | |
Loading package attoparsec-0.10.2.0 ... linking ... done. | |
Loading package blaze-builder-0.3.1.0 ... linking ... done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main :: IO () | |
main = do | |
initCapturing | |
xmproc <- spawnPipe xmobar_run | |
xmonad $ defaultConfig | |
{ borderWidth = 7 | |
, focusFollowsMouse = False | |
, focusedBorderColor = orangeDarkestColor | |
, keys = liftM2 union myKeys (keys defaultConfig) | |
, layoutHook = myLayoutHook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Data/Array/Repa/Algorithms/Matrix/Boolean.hs:28:3: | |
Couldn't match type `Array r3 ((Z :. Int) :. Int) e1' | |
with `CDL l => Array U DIM2 l' | |
Expected type: m (Matrix l) | |
Actual type: m (Array r3 ((Z :. Int) :. Int) e1) | |
In a stmt of a 'do' block: | |
computeP | |
$ fromFunction (Z :. h1 :. w2) | |
$ \ ix | |
-> joinAllS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):014:0> class Symbol | |
irb(main):015:1> def append( x ) (self.to_s << x.to_s).to_sym end | |
irb(main):016:1> end | |
=> nil | |
irb(main):017:0> def us ( n ) Enumerator.new { |list| x = :":"; loop { x = x.append(:":"); list << x } }.take(n)[n-1] end | |
=> nil | |
irb(main):018:0> us(10000) | |
=> :"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> git pull --rebase origin master | |
usage: git merge-base [-a|--all] <commit> <commit>... | |
or: git merge-base [-a|--all] --octopus <commit>... | |
or: git merge-base --independent <commit>... | |
-a, --all output all common ancestors | |
--octopus find ancestors for a single n-way merge | |
--independent list revs not reachable from others | |
usage: git merge-base [-a|--all] <commit> <commit>... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> cabal-dev ghci | |
cabal-dev: user error (Warning: cannot determine version of /usr/bin/fake-ghc-cabal-dev : | |
"== GHC Arguments: Start ==\n--numeric-version\n== GHC Arguments: End ==\n" | |
cabal: ghcInvocation: the programVersion must not be Nothing | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
octave:13> factorial 0 | |
ans = 1.2414e+61 | |
octave:14> factorial 1 | |
ans = 6.0828e+62 | |
octave:15> factorial 2 | |
ans = 3.0414e+64 | |
octave:16> factorial 10 | |
ans = | |
6.0828e+62 1.2414e+61 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE UnicodeSyntax #-} | |
import Control.Applicative ((<$>)) | |
import System.Environment (getArgs) | |
import Text.Regex.Posix ((=~)) | |
main ∷ IO () | |
main = do | |
pattern ← head <$> getArgs | |
mapM_ putStrLn =<< dropWhile (\α → not $ α =~ pattern) . lines <$> getContents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def palindrome? (string) | |
filtered = string.downcase.gsub(/\W/,'') | |
filtered.reverse == filtered | |
end | |
def count_words (sentence) | |
words = sentence.downcase.split(/\W/) | |
result = {} | |
words.uniq.select{ |w| !w.empty? }.each do |e| | |
result.store(e, words.count(e)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE UnicodeSyntax #-} | |
module Graph | |
( Distance, Graph, Vertex | |
, fromList, findShortestPath, findShortestPaths, findShortestPaths_ | |
) where | |
import Control.Monad (when) | |
import Control.Monad.Reader (Reader, ask, runReader) | |
import Control.Monad.State (StateT, execStateT, get, put) | |
import Data.Function (on) |