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
diff --git a/Makefile b/Makefile | |
index 79c2b6c..28cb135 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -10,9 +10,9 @@ PLT_APPS = crypto public_key ssl | |
# Dependencies. | |
-DEPS = ranch | |
+DEPS = barrel |
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 | |
%%% ==Abstract Code Insertion== | |
%%% A method to get the abstract code representation directly from the | |
%%% binary beam module representation. | |
%%% | |
%%% Other methods could be used, but they are not as efficient. | |
%%% A more obvious method is to use "-compile(debug_info).", but | |
%%% this approach does not work in practice (despite the documentation) | |
%%% and would cause the generated code to be inefficient if it did work. |
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
TEST uuid_creation | |
N == 100000 (10 runs) | |
erlang:make_ref/0 get: 7161.7 us ( 1.0) | |
v1 erlang get: 79289.2 us ( 11.1) | |
v1 os get: 72063.8 us ( 10.1) | |
v3 get: 78722.5 us ( 11.0) | |
v3 compat get: 73597.6 us ( 10.3) | |
v4 crypto strong get: 218098.7 us ( 30.5) | |
v4 crypto weak get: 219091.8 us ( 30.6) | |
v4 random bigint get: 197156.6 us ( 27.5) |
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(decompile). | |
-export([file/1]). | |
file(ModuleName) when is_atom(ModuleName) -> | |
case code:which(ModuleName) of | |
BeamFilePath when is_list(BeamFilePath) -> | |
file(BeamFilePath); | |
Error when is_atom(Error) -> | |
Error | |
end; |
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
test1(A) -> | |
if | |
A =:= true -> | |
ok; | |
A =:= false -> | |
error | |
end. | |
test2(A) -> | |
case A of | |
true -> |
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
%%% -*- coding: utf-8; Mode: erlang; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | |
%%% ex: set softtabstop=4 tabstop=4 shiftwidth=4 expandtab fileencoding=utf-8: | |
%%% | |
%%%------------------------------------------------------------------------ | |
%%% @doc | |
%%% ==Abstract Code Insertion== | |
%%% A method to get the abstract code representation directly from the | |
%%% binary beam module representation. | |
%%% | |
%%% Other methods could be used, but they are not as efficient. |
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(streams). | |
-author('[email protected]'). | |
%% | |
%% Author: Torbjorn Tornkvist | |
%% http://forum.trapexit.org/viewtopic.php?p=22424#22424 | |
%% | |
%% Date: 27 Nov 1995 | |
%% | |
%% Try this: | |
%% |
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
%-*-Mode:erlang;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*- | |
% ex: set ft=erlang fenc=utf-8 sts=4 ts=4 sw=4 et: | |
%%% | |
%%%------------------------------------------------------------------------ | |
%%% @doc | |
%%% ==Enforce immediate garbage collection on a function== | |
%%% @end | |
%%% | |
%%% BSD LICENSE | |
%%% |
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
defmodule ErlangSyslog.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :syslog, | |
version: "1.0.3", | |
description: description, | |
package: package, | |
deps: deps] | |
end |
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
... | |
Path = [_ | _] = os:getenv("TEST_DIR"), | |
ReleaseConfig = filename:join([Path, "..", "rel", "files", "app.config"]), | |
{ok, _} = reltool_util:config_load(ReleaseConfig), | |
... | |
ok = reltool_util:application_start(?APPLICATION, | |
[{listen_ip, {127,0,0,1}}, | |
{listen_port, ?PORT}], infinity), | |
... |
OlderNewer