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
"""Looking for collisions in Mooltipass "TRNG" output. | |
The "TRNG" outputs 32 bit blocks whitened with Jenkins one at a time hash, | |
keeping no state between samples. Running ent or diehard on the output stream | |
produces a predictable "pass" result, since these tests do not take the 32 bit | |
block structure into account. | |
Excessive collisions found by the following test would disprove the null | |
hypothesis that each 32 bit sample from the "TRNG" is uniformly distributed. |
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
"""Poke interesting instructions from Python. | |
Uses the nifty trick in https://github.com/AmihaiN/pyAsm to run snippets then | |
inspect registers. (Use at own risk, nasm.exe source not verified, etc.) | |
""" | |
from pyAsm import pyAsm, A_32BIT | |
def regs(reg, sep='\n', txt=''): | |
txt = txt.strip() | |
acc = [] |
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
-- S D O | |
fp_1 :: (src -> i -> o) -- interpreter | |
-> src -- + source code | |
-- partial application magic happens here | |
-> (i -> o) -- = executable | |
-- Static Dyn Output | |
fp_2 :: ((src -> i -> o) -> src -> (i -> o)) -- fp_1 | |
-> (src -> i -> o) -- + interpreter | |
-- partial application magic happens here |
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
:::::::::::::: | |
t.erl | |
:::::::::::::: | |
-module(t). | |
-export([go/0, l/0, run/1]). | |
%% @doc load | |
l()-> | |
net_adm:ping('a@ak-desktop'), | |
net_adm:ping('b@ak-desktop'), |
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
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} | |
import Data.Vector as V | |
import Data.Word | |
import Data.Bits | |
data Instr = Seed Word32 | |
| Mutate Word32 | |
| JmpFwd Word16 | |
| JmpRev Word16 |
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
> (c 'trace) | |
#(module trace) | |
> (l 'trace) | |
(#(module trace)) | |
> (: trace start) | |
IN [ myfunc, x=0 ] | |
IN [ myfunc, x=1 ] | |
IN [ myfunc, x=2 ] | |
IN [ myfunc, x=3 ] | |
OUT[ myfunc, x=3 => 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
%% @doc Function description. | |
-spec f( Item::type() % description of item | |
, Action::type() % yet another description | |
... | |
) -> type() % blah | |
f(Item,Action) -> |
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
ak@rifter:~/code/erl/erlang_rebar_example_project$ rebar generate-upgrade previous_release=dummynode_first -v | |
DEBUG: Rebar location: "/home/ak/bin/rebar" | |
DEBUG: Entering /home/ak/code/erl/erlang_rebar_example_project | |
DEBUG: Available deps: [] | |
DEBUG: Missing deps : [] | |
DEBUG: Predirs: ["/home/ak/code/erl/erlang_rebar_example_project/apps/dummy_app", | |
"/home/ak/code/erl/erlang_rebar_example_project/rel"] | |
DEBUG: Entering /home/ak/code/erl/erlang_rebar_example_project/apps/dummy_app | |
DEBUG: Available deps: [] | |
DEBUG: Missing deps : [] |
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
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)", | |
"^.git/.*"]}, | |
{excl_archive_filters, [".*"]}, |
OlderNewer