Skip to content

Instantly share code, notes, and snippets.

View KirinDave's full-sized avatar

Dave Fayram KirinDave

View GitHub Profile
ping_any_master(AllNodes) ->
error_logger:info_msg("~nAttempting to connect to master via: ~p~n", [AllNodes]),
[N|RN] = AllNodes,
ping_any_master(N, RN, AllNodes).
ping_any_master(N, [], AllNodes) ->
ping_any_master(N, AllNodes, AllNodes);
ping_any_master(N, RN, AllNodes) ->
case net_adm:ping(N) of
pong ->
// Simply place the following text in a bookmark on your browser bar to make any page better.
javascript:(function () {document.getElementsByTagName("body")[0].style.fontFamily="Comic Sans, Comic Sans MS";})();void(0);
<!DOCTYPE html>
<html>
<head>
<title>BAD DATA</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="en-us" http-equiv="Content-Language" />
</head>
<body>
<header><h1>BAD DATA</h1></header>
Line 1
Line A
Line B
Line C
int_val neko_interp_loop( neko_vm *VM_ARG, neko_module *m, int_val _acc, int_val *_pc ) {
register int_val acc ACC_REG = _acc;
register int_val *pc PC_REG = _pc;
# ifdef VM_REG
register neko_vm *vm VM_REG = VM_ARG;
# endif
# ifdef NEKO_THREADED
static void *instructions[] = {
# undef _NEKO_OPCODES_H
# undef OPBEGIN
int_val neko_interp_loop( neko_vm *VM_ARG, neko_module *m, int_val _acc, int_val *_pc ) {
register int_val acc ACC_REG = _acc;
register int_val *pc PC_REG = _pc;
# ifdef VM_REG
register neko_vm *vm VM_REG = VM_ARG;
# endif
# ifdef NEKO_THREADED
static void *instructions[] = {
# undef _NEKO_OPCODES_H
# undef OPBEGIN
; He's asking why this isn't tail recursive.
(def date-seq
(fn [d1 d2]
(loop [b (-> d1
(.dayOfMonth)
(.withMinimumValue))
e d2]
(cons b (if (time/before? b e)
class String
def monkeypatched
puts "Invisible Cavemen!"
end
end
=> nil
#>> "madness".monkeypatched # prints “Invisible Cavemen!”
(ns blogpost.bloomfilters)
(defprotocol BloomFilterable
(make-hash [object])
(human-readable-hash [object]))
;; Some type examples:
(deftype MyType [three data fields])
(defrecord MyRecord [three data fields])
(deftype MyIntHolder [#^int data])