Skip to content

Instantly share code, notes, and snippets.

View ggreg's full-sized avatar

Greg Leclercq ggreg

View GitHub Profile
@djspiewak
djspiewak / streams-tutorial.md
Created March 22, 2015 19:55
Introduction to scalaz-stream

Introduction to scalaz-stream

Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.

The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca

@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.

@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy
@staltz
staltz / introrx.md
Last active May 2, 2024 12:31
The introduction to Reactive Programming you've been missing
@carl297r
carl297r / PersistedGameOfPingPongWithSnapshots.scala
Last active August 29, 2015 13:58
A game of ping pong using two Akka Actors, persisted using Event Sourcing through Akka Persistence. Adapted from Jonas Bonér's example https://gist.github.com/jboner/9990435 to add Snapshots.
package demo
// Adapted from Jonas Bonér's example https://gist.github.com/jboner/9990435
import akka.actor.{Props, ActorSystem}
import akka.persistence.{EventsourcedProcessor, SnapshotOffer}
object PersistedPingPong extends App {
case object Ball //The Command
@honza
honza / Rocket.hs
Last active August 29, 2015 13:56
BSD/MIT licensed
-- This is a Haskell implementation of aphyr's
-- "Clojure from the ground up - modeling"
--
-- http://aphyr.com/posts/312-clojure-from-the-ground-up-modeling
--
-- Compile this with:
--
-- $ ghc -O Rocket.hs
import GHC.Exts
@jboner
jboner / akka-cluster-implementation-notes.md
Last active March 4, 2023 22:30
Akka Cluster Implementation Notes

Akka Cluster Implementation Notes

Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.

Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.

Akka Gossip

Gossip state

This is the Gossip state representation:

@massie
massie / KryoRegistrator.scala
Created October 29, 2013 23:59
Here's an example of how to embed Avro objects into a Kryo stream. You only need to register each Avro Specific class in the KryoRegistrator using the AvroSerializer class below and you're ready to go.
/*
* Copyright (c) 2013. Regents of the University of California
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@apurvam
apurvam / graphdb-simulator.cpp
Last active December 16, 2020 19:55
A program which simulates the read and write behavior of LinkedIn's GraphDB
/* Instructions on compilation and execution
* =========================================
*
* Compile this program with pthreads:
*
* g++ -Wall -lpthread -o graphdb-simulator graphdb-simulator.cpp
*
* Before you run this program, you need to create the following
* directories:
*