Erlang/OTP 17 [erts-6.4.1.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4.1.2 (abort with ^G)
1> c(zombie_timer).
{ok,zombie_timer}
2> zombie_timer:main().
-. start timer {1458135323982793,#Ref<0.0.0.79>} from <0.40.0>
-. loop is <0.40.0>
1. <0.40.0>
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
[core] | |
editor = vim | |
pager = less | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eolpager | |
[color] | |
status = auto | |
branch = auto | |
diff = auto | |
interactive = auto | |
pager = true |
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
# Build and slim Erlang | |
# Author: Matthias Lang <[email protected]> | |
# Reference: http://erlang.org/pipermail/erlang-questions/2016-February/087935.html | |
# Change the line below if you want to use a different version of Erlang | |
# (Keep in mind that patches may not apply cleanly) | |
erlang_version=otp_src_R14B03 | |
erlang_source_file:=$(PACKAGE_SOURCES)/$(erlang_version)/$(erlang_version).tar.gz | |
erlang_root=$(GTH_ERLANG_ROOT)/$(erlang_version) |
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
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%% * slurp in terms using inlined version of kernels file:consult/1 | |
%% * convert to abstract syntax tree | |
%% * annotate all tuples | |
%% * pretty print using a hook to prefix the annotated nodes with newline | |
main([]) -> | |
io:format("%% -*-erlang-*-~n"), |
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
make_random_ref_key() -> | |
<<X:264/big-unsigned-integer>> = term_to_binary(make_ref()), | |
[Key] = io_lib:format("~66.16.0b", [X]), | |
{ok, Key}. | |
make_random_md5_key() -> | |
<<X:128/big-unsigned-integer>> = crypto:hash(md5, term_to_binary(make_ref())), | |
[Key] = io_lib:format("~32.16.0b", [X]), | |
{ok, Key}. |
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
#!/usr/bin/env escript | |
% -*- mode: erlang -*- | |
main([BeamFile]) -> | |
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]), | |
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]). |
Just make Erlang to do some light-load task in a bunch of relatively short leaving processes. Calculating PI to 80th digit in batches per 10 procs with short, 8 ms, sleep in-between, to give schedulers a breath space, will do.
Run erl with 8 schedulers and no busy waiting on schedulers at all.
Python with virtualenv, curl and jq in $PATH, running CouchDB available on http://localhost:5984
git clone https://gist.github.com/f05328e7e24a1064c3ce.git test-linked
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
{ok, F} = escript:extract("cfcheck", []). | |
file:write_file("c.zip", proplists:get_value(archive, F)). |
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
var items = _.chain(this.state.docs) | |
.slice(0, 10) | |
.map(function(doc, idx) { | |
return [ | |
React.createElement(ListDivider, { | |
key: 'div' + idx, | |
inset: false | |
}), | |
React.createElement(ListItem, { | |
key: 'item' + idx, |