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
<<Start:60, _Version:4, Mid:6, _Variant:2, End:56>> = crypto:rand_bytes(16), | |
<<Start:60, 4:4, Mid:6, 2:2, End:56>>. |
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(paths). | |
-include_lib("proper/include/proper.hrl"). | |
%% Just to see a bunch of results without gen_symbolics | |
%prop_test_output() -> | |
% numtests(2, ?FORALL(X, expanded_paths(), | |
% collect(fun print/1, | |
% X, | |
% 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
diff group.erl ~/.kerl/builds/r14b04_64/otp_src_R14B04/lib/kernel/src/group.erl | |
35c35 | |
< put(line_buffer, proplists:get_value(line_buffer, Options, history:load())), | |
--- | |
> put(line_buffer, proplists:get_value(line_buffer, Options, [])), | |
647d646 | |
< history:add(Line), |
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
λ lfe → master* → ./lfe | |
{"init terminating in do_boot",{undef,[{lfe_boot,start,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}} | |
Crash dump was written to: erl_crash.dump | |
init terminating in do_boot () | |
λ lfe → master* → ./lfe -pa ebin | |
Erlang R15B (erts-5.9) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] | |
LFE Shell V5.9 (abort with ^G) | |
> (defun (a x y) (+ x y)) |
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
9> gen_udp:open(8789, [binary, {active,true}]). | |
{ok,#Port<0.665>} | |
10> inet:i(udp). | |
Port Module Recv Sent Owner Local Address Foreign Address State Type | |
665 inet_udp 0 0 <0.49.0> *:8789 *:* BOUND DGRAM | |
ok |
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
24> proper:quickcheck(dispcount_prop:prop_parallel_nocrash(), [{numtests, 5000}]). | |
.................................................................................................................................................................................................................! | |
Failed: After 210 test(s). | |
{[{init,{state,[],undefined}}],[[{set,{var,1},{call,dispcount,checkout,[{call,erlang,element,[2,{call,dispcount,dispatcher_info,[prop_dispatch]}]}]}}],[{set,{var,2},{call,dispcount,checkout,[{call,erlang,element,[2,{call,dispcount,dispatcher_info,[prop_dispatch]}]}]}},{set,{var,3},{call,dispcount,checkout,[{call,erlang,element,[2,{call,dispcount,dispatcher_info,[prop_dispatch]}]}]}}]]} | |
History: {{[{init,{state,[],undefined}}], | |
[[{set,{var,1}, | |
{call,dispcount,checkout, | |
[{call,erlang,element, | |
[2, | |
{call,dispcount,dispatcher_info, |
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
58> [timer:tc(dispcount,checkout,[Info]) || _ <- lists:seq(1,100)]. | |
[{34,{ok,{<0.62.0>,#Ref<0.0.0.470>},#Ref<0.0.0.398>}}, | |
{22,{ok,{<0.64.0>,#Ref<0.0.0.472>},#Ref<0.0.0.399>}}, | |
{3,{error,busy}}, | |
{26,{ok,{<0.59.0>,#Ref<0.0.0.474>},#Ref<0.0.0.328>}}, | |
{21,{ok,{<0.61.0>,#Ref<0.0.0.476>},#Ref<0.0.0.458>}}, | |
{20,{ok,{<0.63.0>,#Ref<0.0.0.478>},#Ref<0.0.0.402>}}, | |
{38,{ok,{<0.57.0>,#Ref<0.0.0.480>},#Ref<0.0.0.326>}}, | |
{20,{ok,{<0.66.0>,#Ref<0.0.0.482>},#Ref<0.0.0.457>}}, | |
{3,{error,busy}}, |
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(tend_gist_load). | |
-export([run/0]). | |
run() -> ':)'. |
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(lazy). | |
-compile(export_all). | |
-include_lib("eunit/include/eunit.hrl"). | |
%% A lazy list is build from cells containing the value of their current | |
%% computation and a function that will return the next one. | |
%% Once a lazy list is over, the atom 'done' is returned. | |
-define(lcell(Term, Fun), {Term, Fun}). | |
-type lcell() :: {term(), fun(() -> tuple() | 'done' )} | |
| 'done'. |
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
#lang racket | |
(require racket/match) | |
(require racket/string) | |
(define (to-roman x) | |
(define (digit digits) | |
(match digits | |
[(list 1 x _ _) (list x)] | |
[(list 2 x _ _) (list x x)] | |
[(list 3 x _ _) (list x x x)] |
OlderNewer