- Differential Dataflow - The code is ugly Rust, but the logic and linked papers are quite interesting.
- Spinning Fast Iterative Dataflows - Flink's execution model. Also, coverage in the Morning Paper.
- Discretized Streams - Spark Streaming's model of operation.
- Google's Dataflow Model - This is now also available as Apache (Incubating) Beam.
- Kafka Streams - Kafka offers "hipster stream processing," and a nice unification between tables and streams.
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/env ruby | |
class MRISC | |
def run(code) | |
tokens = code.gsub(/(\*.*?\*)|[^a-z0-9,-;@\._]/,'').split(';') | |
@vars,stack,i = {:_pc=>-1,:_oc=>0},[],0 | |
tokens.map!{|t| t.chars.first=='@' ? (@vars[t.to_sym]=i-1;nil) : (i+=1;t.split(',').map{|e|numeric?(e) ? e.to_i : e.to_sym})}.compact! | |
while @vars[:_pc] < tokens.size-1 | |
@vars[:_pc] += 1 | |
@vars[:_oc] += 1 |
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
;; See http://okmij.org/ftp/continuations/implementations.html#dynamic-wind | |
;; and http://axisofeval.blogspot.com/2012/08/delimited-continuations-do-dynamic-wind.html | |
;; Slight trick here: use identity of yield-record-tag function as the actual tag | |
(define (yield-record-tag) yield-record-tag) | |
(define (make-yield-record v k) | |
(list yield-record-tag v k)) | |
;; Yield simply aborts up to the generator's caller, delivering to it | |
;; the yielded value and the continuation for resuming after the call |
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
#!/bin/bash | |
FILE=$1 | |
if [ -d $FILE ]; then | |
DIR=$FILE | |
else | |
DIR=`dirname $FILE` | |
fi | |
function parse_git_branch { |
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
;; (mcase subject-expr (pattern action) ...) | |
(defmacro mcase (subject &rest clauses) | |
`(funcall (mlambda ,@clauses) ,subject)) | |
;; (mlambda (pattern action) ...) | |
(defmacro mlambda (&rest clauses) | |
(if (null clauses) | |
'(lambda (x) (match-error x)) | |
(let ((subject (gensym)) (fail (gensym))) | |
`(lambda (,subject) |
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
package core | |
import ( | |
"net/http" | |
) | |
// the Request struct wraps the http.Request struct, providing a slice of | |
// strings representing the positional arguments found in a url pattern, and a | |
// map[string]string called kwargs representing the named parameters captured | |
// in url parsing. |
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
/* See: http://0x10c.com/doc/dcpu-16.txt */ | |
function hex(n) { | |
return '0x' + n.toString(16); | |
} | |
function disassemble (code) { | |
var PC = 0; | |
var operand = function (bits) { |
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
(ns pallet.cache.impl | |
"An implementation namespace for pallet.cache") | |
(defprotocol CacheProtocolImpl | |
"Cache implementation interface." | |
(lookup [cache e] [cache e default] | |
"Retrieve the value associated with `e` if it exists") | |
(has? [cache e] | |
"Checks if the cache contains a value associtaed with `e`")) |
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
(require 'cl) | |
(defconst count-syllables-negative | |
'("cial" "tia" "cius" "cious" "giu" "ion" "iou" "sia$" ".ely$")) | |
(defconst count-syllables-positive | |
'("ia" "riet" "dien" "iu" "io" "li" | |
"[aeiouym]bl$" | |
"[aeiou]\\{3\\}" | |
"^mc" |