| // Adapted from http://lukajcb.github.io/blog/functional/2018/01/03/optimizing-tagless-final.html | |
| import { Applicative, Applicative1 } from 'fp-ts/lib/Applicative' | |
| import { Apply, Apply1, Apply2C, applySecond, liftA4 } from 'fp-ts/lib/Apply' | |
| import * as array from 'fp-ts/lib/Array' | |
| import * as const_ from 'fp-ts/lib/Const' | |
| import { HKT, Type, Type2, URIS, URIS2 } from 'fp-ts/lib/HKT' | |
| import { IO, io, URI as IOURI } from 'fp-ts/lib/IO' | |
| import { Option, some } from 'fp-ts/lib/Option' | |
| import { getProductSemigroup, Semigroup } from 'fp-ts/lib/Semigroup' |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * xI'm still very new to Kafka, eventsourcing, stream processing, etc. I'm in the middle of building my first production system with this stuff and am writing this at the request of a few folks on Twitter. So if you do have experience, please do me and anyone else reading this a favor by pointing out things I get wrong :)
- The Log — http://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying
- Turning the database inside out — http://www.confluent.io/blog/2015/03/04/turning-the-database-inside-out-with-apache-samza/
- Why local state is a fundamental primitive in stream processing — http://radar.oreilly.com/2014/07/why-local-state-is-a-fundamental-primitive-in-stream-processing.html
- Samza
- Various functional systems been exposed to over past year or so, React, Flux, RX, etc.
| public class GuidGenerator | |
| { | |
| public static Guid CreateGuidFromName(Guid @namespace, string name) | |
| { | |
| return CreateGuidFromName(@namespace, name, 5); | |
| } | |
| //Implements rfc 4122 | |
| public static Guid CreateGuidFromName(Guid @namespace, string name, int version) | |
| { |
Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.
As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:
- publish
- request
- start/stop subscription
| package Vect | |
| import scala.language.higherKinds | |
| sealed trait Nat | |
| sealed trait Z extends Nat | |
| sealed trait S[N <: Nat] extends Nat | |
| trait Exists[A, +B[_ <: A]] { | |
| type fst <: A |
| /** | |
| * A LessCSS version of the 960 Grid System | |
| * | |
| * http://lesscss.org/ | |
| * http://960.gs/ | |
| */ | |
| /********************************************************************* | |
| * Settings * | |
| *********************************************************************/ |