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
{ok, RawCDs} = core_cds:find_all(), | |
FilteredCDs = lists:filter(fun(CD) -> | |
Now = date(), | |
case ecdm_cd:maturity_date(CD) of | |
undefined -> | |
true; | |
Value when Value < Now -> | |
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
;;;###autoload | |
(defun ispell-hl-minor-mode (&optional arg) | |
"Toggle Ispell Highlight mode. | |
With prefix ARG, turn Ispell Highlight mode on if arg is positive. | |
In Ispell Highlight mode, changing the buffer contens will spell | |
the words around the cursor and highlight miss-spelled ones!" | |
(interactive "P") | |
(setq ispell-hl-minor-mode | |
(not (or (and (null arg) ispell-hl-minor-mode) |
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
?FORALL({FunName, ArgName, Op}, {ident(), ident(), op()}, | |
begin | |
Expr = lists:flatten( | |
io_lib:format("(defn ~s [~s] (~s (mod ~s) 0))", | |
[FunName, ArgName, Op, ArgName])), | |
Tokens = jxa_lex:lex(Expr), | |
[] == Tokens | |
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
keyword_style_ident() -> | |
":" ++ string(). | |
defvar_style_ident() -> | |
"*" ++ string() ++ "*". | |
split_ident() -> | |
string() ++ "-" ++ string(). | |
normal_ident() -> |
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(jxat_lexer_proper). | |
-include_lib("proper/include/proper.hrl"). | |
to_string({ident, _, Ident}) -> | |
Ident; | |
to_string({char, _, Char}) -> | |
[$\\, Char]; | |
to_string({syntax_quote, 0, "`"}) -> | |
"`"; |
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 jxat-spec test) | |
(deftype+ foo (bar baz) {bar baz}) | |
(deftype boo () :ok) | |
(deftype+ hoo (a) a) | |
(defspec internal-test () (foo :this :is)) | |
(defn internal-test () | |
{:this :is :a :test}) |
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
This technology allows you to implement distributed systems using | |
proven algorithms in well tested implementations (riak and | |
riak_core). If you don't grok distributed systems, rely on folks | |
that do. | |
Eric B. Merritt | |
Afiniate, CTO |
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
;;; | |
;;; Eshell stuff | |
;;; | |
(when (fboundp 'eshell) | |
;; This and rmb are my two vices. rmb is defined as an eshell alias. | |
(defalias 'eshell/lo #'eshell/exit) | |
(defalias 'eshell/logout #'save-buffers-kill-emacs) | |
;; I'm obsessive/compulsive with clear. |
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
No Optimization | |
Rules fired: 8723 | |
Time = 120.195321 sec, 72.57354052908599 rules/sec, rule execution time 13.779126561962627 msec | |
With 'optimizanion' | |
Rules fired: 8723 | |
Time = 156.990103 sec, 55.56401221037481 rules/sec, rule execution time 17.997260460850626 msec | |
optimization slowed things down significantly. |
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
with Ada.Text_IO; use Ada.Text_IO; | |
with Ada.Containers; | |
with Interfaces.C; | |
with Ada.Unchecked_Conversion; | |
procedure Hello is | |
function Amem_Hash(K1 : Interfaces.C.Unsigned_Long; | |
K2 : Interfaces.C.Unsigned_Long; | |
K3 : Interfaces.C.Unsigned_Long) | |
return Ada.Containers.Hash_Type is |
OlderNewer