Functional Event Sourcing Decider
Thinkbeforecoding - Jérémie Chassaing
by Jérémie Chassaing
2y ago
this post is part of the F# Advent Calendar 2021 After years of talks and workshops about Functional Event Sourcing, I noticed that I published only 4 posts on the topic. The first of them is a rant in 2013 about Martin Fowler's article from 2005 describing something that could be called Command Sourcing and is misleading people into thinking the are doing Event Sourcing. The second is a simple drawing describing the flow of Functional Event Soucing. Really usefull, many people told me somthing clicked once they saw this picture. But still a bit short. I made a few wording change since then. I ..read more
Visit website
Applicative Computation Expressions - 3
Thinkbeforecoding - Jérémie Chassaing
by Jérémie Chassaing
3y ago
this post is part of the F# Advent Calendar 2020 In this third installment of our series about applicative computation experessions, we'll jump to practice with Lego Mindstorm Ev3. This should demonstrate a non trivial, real life use case for applicatives. Even if you don't have a mindstorm set at home, follow this post. We'll mix binary protocols and category theory - lightly explained - to provide a nice and safe API. Mindstorm control over bluetooth A few years back, I wrote a quick fsx script to control lego mindstorm in F#. I worked again on it recently to port it to net5.0. Once paired a ..read more
Visit website
Applicative Computation Expressions - 2
Thinkbeforecoding - Jérémie Chassaing
by Jérémie Chassaing
3y ago
In the last post we used BindReturnand MergeSources to implement the applicative. The advantage of implementing them is that it will work for any number of and!. When using let! with a single and!, it makes one call to MergeSources to pair arguments and one call to BindReturn to pass values to the function. When using let! with two and!, it makes two calls to MergeSources to tuple arguments and one call to BindReturn to pass values to the function. This can be expensive, so you can provide specific implementations for given numbers of paramters to reduce the number of calls. For two arguments ..read more
Visit website
Applicative Computation Expressions
Thinkbeforecoding - Jérémie Chassaing
by Jérémie Chassaing
3y ago
In the last post we saw how to implement applicatives using map, map2 and apply to define <!>and <*>operators. This time, we will use Computation Expressions to achieve the same result. This is not yet part of F# 5.0, you need the --langversion:preview flag to compile the following code. Let's start again with our Query<'t>type. As a reminder, we created it to access a service that is called with a list of properties to return for a given document. This is a mock version of such service. In real world, you'll call Elastic Search indicating the document id and the properties y ..read more
Visit website
Applicatives IRL
Thinkbeforecoding - Jérémie Chassaing
by Jérémie Chassaing
3y ago
This is the content of the presentation of the same name I did at Open FSharp (San Francisco) and NewCrafts (Paris) Monads are all the rage in FP land... but Applicatives are also very useful and quite easy to get. We'll go through 3 real use cases to discover what they're up to. Examples will be in F#. This is of course applicable in other languages with currying. Options We start with a simple structure: Option<'t>. As a reminder, its definition is 1: 2: 3: type Option<'t> = | Some of 't | None It's a value that either contains a value of type 't (the Some case) o ..read more
Visit website
Full F# Blog - Part 3
Thinkbeforecoding - Jérémie Chassaing
by Jérémie Chassaing
4y ago
I promised a third part in the this FSharp.Blog series, and take the occasion of this new edition of the F# Advent Calendar to write it ! This time we'll see how to install autorenewable letsencrypt certificates on azure functions. You probably already know letsencrypt, they provide free SSL certificates for everybody. Having a public website today without HTTPS is totally discouraged for security and privacy reasons, and most major browser issue warnings even if no form is posted. Using HTTPS on a static readonly web site is highly advise to prevent Man in the middle HTTP or script injection ..read more
Visit website

Follow Thinkbeforecoding - Jérémie Chassaing on FeedSpot

Continue with Google
Continue with Apple
OR