Skip to content

Instantly share code, notes, and snippets.

View ygrenzinger's full-sized avatar

Yannick Grenzinger ygrenzinger

View GitHub Profile
@ygrenzinger
ygrenzinger / frequency2.erl
Created April 9, 2017 19:42
frequency "refactoring"
%% Based on code from
%% Erlang Programming
%% Francecso Cesarini and Simon Thompson
%% O'Reilly, 2008
%% http://oreilly.com/catalog/9780596518189/
%% http://www.erlangprogramming.org/
%% (c) Francesco Cesarini and Simon Thompson
-module(frequency2).
-export([start/0,allocate/0,deallocate/1,stop/0]).
@ygrenzinger
ygrenzinger / LookingForSpeaker-ContinuousDelivery.md
Created April 29, 2017 15:21
Looking for speakers for the continuous delivery Paris

Hello to you,

Achieving continuous delivery in software development is a complex subject requiring modern management and robust technical capabilities. This is why I want to share around the subject and try to organize regular events in the "Continuous Delivery to Lean Entreprise" meetup in Paris.

However finding speaker takes times. So I need your help :)

Are you interested to spread your experience ? It could be success or difficulties. Do you know great speaker I can contact ?

@ygrenzinger
ygrenzinger / PocTry.java
Created July 14, 2017 09:18
PoC List of Try
package fp;
import io.vavr.control.Try;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
@ygrenzinger
ygrenzinger / playing-with-projections.clj
Created August 13, 2017 18:45
playing-with-projections try with Clojure
(ns playing-with-projections.core
(:require [clojure.data.json :as json]))
;; time helpers with Java 8 API
(def zoneId (java.time.ZoneId/systemDefault))
(defn parse-timestamp [str] (java.time.Instant/parse str))
(defn convert-to-datetime [instant] (java.time.LocalDateTime/ofInstant instant zoneId))
(defn enrich-datetime-info [event]
(let [instant (parse-timestamp (get event "timestamp"))
@ygrenzinger
ygrenzinger / List.oz
Last active October 15, 2017 19:48
Oz Mooc
declare
fun {AppendLists L1 L2}
if L1.1 == nil then L2
else
L1.1 | {AppendLists L2.2 L2}
end
end
declare
fun {Fact N}
@ygrenzinger
ygrenzinger / Transform.oz
Created October 21, 2017 19:08
Transform to Records in Oz Mooc
declare
fun {Transform L}
local Label Fields Values R in
Label = {List.nth L 1}
Fields = {List.nth L 2}
Values = {List.nth L 3}
R = {Record.make Label Fields}
local AssignValuesToFields in
fun {AssignValuesToFields Fs Vs}
@ygrenzinger
ygrenzinger / Tree.oz
Created November 4, 2017 15:05
Tree Oz MOOC
declare
fun {Infix Tree}
case Tree
of leaf then nil
[] btree(K left:L right:R) then
{Append {Append {Infix L} [K]} {Infix R}}
end
end
declare
@ygrenzinger
ygrenzinger / Reverse.oz
Created November 12, 2017 19:51
Reverse with Oz Cell
declare
fun {Reverse L}
local C in
C = {NewCell nil}
for E in L do
C := E | @C
end
@C
end
end
@ygrenzinger
ygrenzinger / HelloAkkaActor.scala
Created November 14, 2017 15:25
Carbon IT afternoon discovering Akka Actors
import akka.actor.{Actor, ActorRef, ActorSystem, Props}
trait Strings {
val START = "Let the fun begin!"
val NOINT = "Please give me an Int"
val ASK = "Factorial?"
implicit class Format(s: String) {
def isInt: Boolean = s.forall(_.isDigit)
}
@ygrenzinger
ygrenzinger / ForCollect.oz
Created December 25, 2017 12:50
Dataflow programming in Oz language
declare
proc {ForCollect Xs P Ys}
Acc={NewCell Ys}
proc {C X} R2 in
@Acc=X|R2 Acc:=R2
end
in
for X in Xs do
{P C X}
end