Skip to content

Instantly share code, notes, and snippets.

Anti-Entropy and Dissemination

Purpose

Quick and reliable propagation.

More applicable to cluster wide metadata: small, infrequent, must be propagated reliably.

Types:

#include <ctime>
#include <unistd.h>
namespace {
const double kTimePeriod = 0.1;
bool Crash() {
std::time_t start = std::time(nullptr);
module type EXAMPLE = sig
class example_class : int ->
object
method get_i : int
method compare : example_class -> bool
end
end
module Example : EXAMPLE = struct
class example_class (i : int) =
####################################
# Akka Actor Reference Config File #
####################################
# This is the reference config file that contains all the default settings.
# Make your edits/overrides in your application.conf.
akka {
# Akka version, checked against the runtime version of Akka.
version = "2.3.4"
;; based on something I found online, but no longer have original link to.
(defvar *per-dir-hook-alist*
'(("/home/alex/dev/project" project-c-mode-hook)))
(defun af-directory-based-c-hook ()
(make-local-variable 'c-recognize-knr-p)
(make-local-variable 'c-enable-xemacs-performance-kludge-p)
(make-local-variable 'c-comment-only-line-offset)
(make-local-variable 'c-hanging-braces-alist)

Keybase proof

I hereby claim:

  • I am afeinberg on github.
  • I am strlen (https://keybase.io/strlen) on keybase.
  • I have a public key whose fingerprint is 7529 3E9B 3AC7 3FFE EB5D B58D 96AB B90E 4330 B9E9

To claim this, I am signing this object:

alexs-mac-pro:~ alex% cat hi.c
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv) {
return strlen(argv[1]);
}
alexs-mac-pro:~ alex% !clang
clang -S hi.c
alexs-mac-pro:~ alex% cat hi.s
module Histogram
where
import Data.Array
data Histogram = Histogram {
numBuckets :: Int
, histStep :: Int
, histBuckets :: Array Int Int
, histBounds :: Array Int Int
module Histogram
where
import Data.Array
data Histogram = Histogram {
numBuckets :: Int
, histStep :: Int
, histBuckets :: Array Int Int
, histBounds :: Array Int Int
@afeinberg
afeinberg / unroll.cc
Created December 20, 2011 09:12
compile with g++ -S -O3 unroll.cc
.file "unroll.cc"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "%d\n"
.text
.p2align 4,,15
.globl _Z3bari
.type _Z3bari, @function
_Z3bari: ;; (would still get unrolled -funroll-loops)