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
Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] | |
Eshell V5.9.2 (abort with ^G) | |
1> c(reftrick). | |
{ok,reftrick} | |
2> spawn(fun() -> reftrick:plain() end). | |
<0.38.0> | |
time(reftrick): 3.410ms recv1 | |
time(reftrick): 704.826ms recv2 | |
3> spawn(fun() -> reftrick:plain() 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
-module(reftrick). | |
-compile(export_all). | |
%% Luke Gorrie's favourite profiling macro. | |
-define(TIME(Tag, Expr), | |
(fun() -> | |
%% NOTE: timer:tc/4 does an annoying 'catch' so we | |
%% need to wrap the result in 'ok' to be able to | |
%% detect an unhandled exception. | |
{__TIME, __RESULT} = |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Clojure port of Scheme's SRFI-26 ``Curry Upon This'' macro package | |
;;; (strictly inferior to Clojure's built-in lambda-syntax). | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;_* Declarations ===================================================== | |
(ns cut | |
(:use clojure.test)) | |
(declare gen slot? rest-slot? eval?) |
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
#!/usr/bin/mawk -f | |
# long lines | |
length() > 79 | |
# trailing whitespace | |
/[ ]+$/ | |
# tabs | |
/[\t]/ |
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(bench). | |
-compile(export_all). | |
%% Luke Gorrie's favourite profiling macro. | |
-define(TIME(Tag, Expr), | |
(fun() -> | |
%% NOTE: timer:tc/4 does an annoying 'catch' so we | |
%% need to wrap the result in 'ok' to be able to | |
%% detect an unhandled exception. | |
{__TIME, __RESULT} = |
NewerOlder