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
scanning "applications/omnipresence/ebin/omnip_sup.beam" | |
warn_behaviour omnip_sup.erl:58: The return type {'ok',{_,[{_,{atom() | tuple(),atom(),'undefined' | [any()]},'permanent' | 'temporary' | 'transient','brutal_kill' | 'infinity' | non_neg_integer(),'supervisor' | 'worker','dynamic' | [atom() | tuple()]}]}} in the specification of init/1 is not a subtype of 'ignore' | {'ok',{{'one_for_all',non_neg_integer(),non_neg_integer()} | {'one_for_one',non_neg_integer(),non_neg_integer()} | {'rest_for_one',non_neg_integer(),non_neg_integer()} | {'simple_one_for_one',non_neg_integer(),non_neg_integer()},[{_,{atom() | tuple(),atom(),'undefined' | [any()]},'permanent' | 'temporary' | 'transient','brutal_kill' | 'infinity' | non_neg_integer(),'supervisor' | 'worker','dynamic' | [atom() | tuple()]}]}}, which is the expected return type for the callback of supervisor behaviour | |
1 Dialyzer warnings | |
Somewhat easier to read: | |
{ok,{'_',[{'_',{atom,'|',tuple,atom,undefined,'|',[any]}, | |
permanent |
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 python2 | |
import re | |
import sys | |
fn = sys.argv[1] | |
lines = [line.rstrip('\n') for line in open(fn)] | |
def get_callid(line): |
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
%% -*- coding: utf-8 -*- | |
-module(wat_clauses). | |
%% wat_clauses: | |
%% a warning should be emitted as 2nd clause will never match (given 1st clause) | |
-export([authenticate_nouns/1]). | |
%% API |
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
-module(propfolding). | |
-export([get/1]). | |
get (Doc) -> | |
{Stars, AreaID, CheckinDate, HotelID, Rooms} = | |
lists:foldl( | |
fun | |
({<<"stars">>, Stars}, Acc) -> setelement(1, Acc, Stars); | |
({<<"areaID">>, AreaID}, Acc) -> setelement(2, Acc, AreaID); | |
({<<"checkinDate">>, <<Year:4, $-, Month:2, $-, Day:2>>}, Acc) -> |
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
# For rπ only: -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard | |
git clone [email protected]:ckolivas/cgminer.git cgminer.git | |
cd cgminer.git/ | |
git checkout v4.2.3 # The latest | |
./autogen.sh | |
CFLAGS="-O2 -Wall -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" ./configure --enable-bflsc | |
CXXFLAGS="-O2 -Wall -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" make | |
sudo ./cgminer -o stratum+tcp://eu-stratum.btcguild.com:3333 -u radioxid_monolith -p 123b |
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
-module(thear). | |
-export([simplify/1]). | |
-spec simplify (E) -> E when E::term(). | |
simplify (E) -> | |
S = fun | |
({add,E1,{num,0}}) -> | |
S(E1); |
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
%% Copyright © 2013 Pierre Fenoll ‹[email protected]› | |
%% See LICENSE for licensing information. | |
%% -*- coding: utf-8 -*- | |
-module(ifdef_in_fun). | |
%% 12:40 < stobix>| Grr... It would seem that I can't use ifdef directives inside function bodies. Any reason why, or is it just a design flaw? | |
%% 1> c(ifdef_in_fun). | |
%% ifdef_in_fun.erl:16: syntax error before: '-' | |
%% ifdef_in_fun.erl:18: syntax error before: '-' |
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
%% Copyright © 2013 Pierre Fenoll ‹[email protected]› | |
%% See LICENSE for licensing information. | |
%% -*- coding: utf-8 -*- | |
-module(keyfold). | |
%% keyfold: extension to stdlib's lists module. | |
%% Intersection of lists:fold{l,r}/3 and lists:keymap/3. | |
-include_lib("eunit/include/eunit.hrl"). |
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
otp_vsn () -> | |
R = fun (D, U) -> 10 * (D - $0) + U - $0 end, | |
case erlang:system_info(otp_release) of | |
[$R, D,U ] -> R(D,U) + 0.00; | |
[$R, D,U, $A ] -> R(D,U) + 0.01; | |
[$R, D,U, $B ] -> R(D,U) + 0.02; | |
[$R, D,U, $B, DD,UU] -> R(D,U) + R(DD,UU) / 10 + 0.00 | |
end. | |
%% On R16B02: otp_vsn() = 16.2 |
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
-module(my_tests). | |
-include_lib("eunit/include/eunit.hrl"). | |
e_test () -> | |
{setup, fun () -> ok end, | |
fun () -> ok end, | |
fun () -> {inorder, [ | |
?_assertMatch(fail, hard) %% Does not fail! | |
]} end}. |