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
XOR, Stream Ciphers, and Crib dragging | |
Boolean Logic | |
``` | |
AND OR XOR | |
---- ---- ---- | |
TT|T TT|T TT|F | |
TF|F TF|T TF|T |
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.Ratio | |
import Data.Complex | |
import Data.Array | |
data LispNumber = Complex (Complex Double) | |
| Rational (Ratio Integer) | |
| Float Double | |
| Integer Integer | |
lispMath :: (Num a) => (a -> a -> a) -> LispNumber -> LispNumber -> LispNumber |
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
module Clustering | |
import Data.Floats | |
-- Feature Normalization | |
-- {{{ | |
foldl1List : (a -> a -> a) -> List a -> a | |
foldl1List func (x :: xs) = | |
case xs of | |
[] => x |
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
Warning: haddock-interfaces: /Library/Haskell/ghc-7.6.3/lib/haskell-platform-2013.2.0.0/doc/html/haskell-platform.haddock doesn't exist or isn't a file | |
Warning: haddock-html: /Library/Haskell/ghc-7.6.3/lib/haskell-platform-2013.2.0.0/doc/html doesn't exist or isn't a directory |
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
-- Does not work (in any reasonable amount of time) | |
allHasCount : Vect n (a, Nat) -> Nat -> Bool | |
allHasCount [] n = True | |
allHasCount ((a, b) :: xs) n = b == n && allHasCount xs n | |
addCount : (a -> a -> a) -> (a, Nat) -> (a, Nat) -> (a, Nat) | |
addCount f (a, n) (b, m) = (f a b, n + m + 1) | |
foldrHomoByte : (a:Vect 5 (b,Nat)) -> (f:b -> b -> b) -> (p:allHasCount a 1 = True) -> toIntegerNat (snd (foldr1 (addCount f) a)) = 9 |
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
MOV $23133,%ebx | |
MOV $12733,%eax | |
MOV $27798,%ecx | |
CMP %eax,%ebx | |
JL L1 | |
JMP L2 | |
L1: | |
IMUL %eax,%ebx | |
ADD %eax,%ebx | |
MOV %ebx,%eax |
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
/** @constructor */ | |
var i$VM = function() { | |
this.valstack = []; | |
this.valstack_top = 0; | |
this.valstack_base = 0; | |
this.ret = null; | |
this.callstack = []; | |
} |
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
Programming_Misc/Haskell/integral » ghc-pkg list | head | |
/usr/local/Cellar/ghc/7.8.3/lib/ghc-7.8.3/package.conf.d: | |
Cabal-1.18.1.4 | |
array-0.5.0.0 | |
base-4.7.0.1 | |
bin-package-db-0.0.0.0 | |
binary-0.7.1.0 | |
rts-1.0 | |
bytestring-0.10.4.0 | |
containers-0.5.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
Programming_Misc/Haskell/integral » cabal exec runhaskell Main.hs | |
benchmarking integral/mine | |
time 49.60 ns (48.52 ns .. 50.70 ns) | |
0.996 R² (0.994 R² .. 0.998 R²) | |
mean 50.25 ns (49.22 ns .. 51.44 ns) | |
std dev 3.635 ns (2.956 ns .. 4.986 ns) | |
variance introduced by outliers: 85% (severely inflated) | |
benchmarking integral/not mine | |
time 50.62 ns (49.77 ns .. 51.62 ns) |
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
Programming_Misc/Haskell/integral » cabal build && cabal install && .cabal-sandbox/bin/integralbench | |
Building integralbench-0.1.0.0... | |
Preprocessing executable 'integralbench' for integralbench-0.1.0.0... | |
[1 of 1] Compiling Main ( Main.hs, dist/build/integralbench/integralbench-tmp/Main.o ) | |
Linking dist/build/integralbench/integralbench ... | |
Resolving dependencies... | |
Notice: installing into a sandbox located at | |
/Users/jp/Programming_Misc/Haskell/integral/.cabal-sandbox | |
Configuring integralbench-0.1.0.0... | |
Building integralbench-0.1.0.0... |
OlderNewer