This file contains 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
> nix-build -A haskellPackages.liblastfm --dry-run | |
these derivations will be built: | |
/nix/store/030bhqpnza6xjr7x1ljyxijz96y3aqcx-byteable-0.1.1.tar.gz.drv | |
/nix/store/05dx9vjkqdg61886gjj0d4qd4gpvp7i2-haskell-cryptohash-ghc7.8.3-0.11.6-shared.drv | |
/nix/store/0dla3dkdijwwdazcmr3ngbr0w902sb0z-crypto-numbers-0.2.3.tar.gz.drv | |
/nix/store/0dyjz5fmwqy2cyvdg0nwnsfv4ywaxms5-bootstrap-glibc.drv | |
/nix/store/0g5wn1j1rnvv8mcswivw370y6c1j88ng-haskell-punycode-ghc7.8.3-2.0-shared.drv | |
/nix/store/0ikg161x1s06gr3n4k31qxbkkx5q5c6z-haskell-setenv-ghc7.8.3-0.1.1.1-shared.drv | |
/nix/store/0j2wgcfg3r6y2hhsywdzcjb5r67vwq4z-smallcheck-1.1.1.tar.gz.drv | |
/nix/store/0rixhgcs1nkdmfbpi7sdszb9gm2b1bx7-xz-5.0.5.tar.bz2.drv |
This file contains 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
>> nix-shell -p myHaskellPackages.dotfiles | |
these derivations will be built: | |
/nix/store/7rq3fqv0ia687v70bhxb609fnid340wl-dotfiles-9999.drv | |
building path(s) `/nix/store/c0k5926bn1gsvwfln6ahncx0awihgb13-dotfiles-9999' | |
building /nix/store/c0k5926bn1gsvwfln6ahncx0awihgb13-dotfiles-9999 | |
unpacking sources | |
unpacking source archive /nix/store/g761dl7mirwfcawgw4hpknmz2gcd6hcd-biegunka | |
source root is biegunka | |
patching sources | |
configuring |
This file contains 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
# I'm just calling same `sudo nixos-rebuild switch` command many times from the same directory | |
yep@nixos : ~ >> sudo nixos-rebuild switch | |
building Nix... | |
building the system configuration... | |
these derivations will be built: | |
/nix/store/6r8b8k9b59fi3nckb8w1dzxxydp4s87j-unit.drv | |
/nix/store/cf68gijlb05fjcpzsnjl7yhq92b9mmv4-system-units.drv | |
/nix/store/g83gindm03c4wzbwj99nvcviszyp1527-nixos-14.10.git.7d0a7ed.drv | |
/nix/store/ha3vd3igichjwlj263nz0ap2vk0hn69s-sshd.pam.drv |
This file contains 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
There are problems in package yaml-0.8.9.3: | |
dependency "base-4.7.0.1-1acdd7bb255299e13f52849f98f9b3f2" doesn't exist | |
dependency "bytestring-0.10.4.0-3b693323d00f6a0050c2715338d2dd69" doesn't exist | |
dependency "containers-0.5.5.1-b89e8be9f833fcd6797b611973bba2ab" doesn't exist | |
There are problems in package void-0.6.1: | |
dependency "base-4.7.0.1-1acdd7bb255299e13f52849f98f9b3f2" doesn't exist | |
There are problems in package vector-0.10.12.1: | |
dependency "base-4.7.0.1-1acdd7bb255299e13f52849f98f9b3f2" doesn't exist | |
dependency "deepseq-1.3.0.2-d8a716b4bcd889c2b54a65c492a75647" doesn't exist | |
There are problems in package unordered-containers-0.2.5.1: |
This file contains 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 = print 1 |
This file contains 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
@-moz-document domain("manage.windowsazure.com") { | |
#headerbar-wrapper { | |
width: 100%; | |
margin-left: 0; | |
left: 0; | |
} | |
#fxshell-navpane { | |
left: 0; | |
margin-left: 0; | |
} |
This file contains 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
>> nix-shell -p haskellngPackages.cabal2nix | |
these derivations will be built: | |
/nix/store/34i3bkyry0lfxbxmcx4s1ilricwhhqv3-hscolour-1.21.tar.gz.drv | |
/nix/store/1dvakqvcwk4hsfzl3fhy2fml30j0ar3y-hscolour-1.21.drv | |
/nix/store/giqr5pcds9r1mpwi806r4yvsq6pi50wh-haskell-mtl-2.1.3.1.drv | |
/nix/store/si9rsg03d181vwxwavpgyvxxjhn7hc5d-haskell-logict-0.6.0.2.drv | |
/nix/store/04xhj4cz4cwcj9xa74b0z1q0934iypj9-haskell-smallcheck-1.1.1.drv | |
/nix/store/0l3p4a85a0r6m0sg6rld7agj3l7jyyi3-tasty-golden-2.2.2.4.tar.gz.drv | |
/nix/store/0pyk34zzr2m1wh16fgyhn5gxrxs101gg-syb-0.4.4.tar.gz.drv | |
/nix/store/0qql92h7l71g9ncz3mdzh6maim6qkbwr-abstract-deque-0.3.tar.gz.drv |
This file contains 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
################## PART ONE | |
> ("a" + "b" * 3).length | |
4 | |
> ("a" + , "b" * 3).length | |
6 | |
################## PART TWO | |
> if (2 > 1) { echo "two is larger than one" } else { echo "no it is not" } | |
no it is not |
This file contains 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
import Data.Numbers.Primes | |
semiPrime :: Int -> Bool | |
semiPrime list = 2 == (length $ primeFactors list) | |
semiPrimesBelow :: Int -> Int | |
semiPrimesBelow n = length $ filter semiPrime [1..n-1] | |
main = putStrLn $ show $ semiPrimesBelow (10^8) |
This file contains 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
moddule = 10 ^ 8 | |
lastDigits x = x `mod` moddule | |
fastPow :: Integer -> Integer -> Integer -> Integer | |
fastPow base 1 m = mod base m | |
fastPow base pow m | even pow = mod ((fastPow base (div pow 2) m) ^ 2) m | |
| odd pow = mod ((fastPow base (div (pow-1) 2) m) ^ 2 * base) m | |
tetration a 1 = lastDigits a | |
tetration a k = lastDigits ( fastPow a' (tetration a' k') moddule) |