I am in Livorso right now for the Effect Days π
Tomorrow is conference day, you'll need to wait for next week for the highlights π
Wait, how did I get here you ask? (To effect
I mean, of course π)
Let's take a step back to 3+ years ago π«‘
package.json before effect
December 2021. I am trying to solve all the same problems, one package at the time:
"dependencies": {
"crypto-js": "^4.0.0",
"date-fns": "^2.25.0",
"date-fns-tz": "^1.1.6",
"fp-ts": "^2.11.5",
"js-cookie": "^2.2.1",
"lodash": "^4.17.19",
"qs": "^6.9.1",
"ts-pattern": "^3.3.3",
"zod": "^3.11.6",
// ...
},
"devDependencies": {
"typescript": "^4.4.4",
// ...
}
I am already all-in into functional programming. fp-ts
helps, but it was getting ugly, fast:
import { ErrorMessage } from "app-types";
import * as IO from "fp-ts/IO";
import { pipe } from "fp-ts/lib/function";
import * as O from "fp-ts/Option";
import * as TE from "fp-ts/TaskEither";
export const grpcRequest = <Request, Response>(
buildRequest: IO.IO<Request>,
makeRequest: (req: Request) => Promise<Response>,
onError?: (error: unknown) => ErrorMessage
): TE.TaskEither<ErrorMessage, Response> =>
pipe(
buildRequest,
TE.fromIO,
TE.chain((req) =>
TE.tryCatch(
() => makeRequest(req),
(error) =>
pipe(
onError,
O.fromNullable,
O.fold(
(): ErrorMessage => "Request error, impossible to continue",
(customError) => customError(error)
)
)
)
)
);
fp-ts
tamed/typed errors, but not much else beyond that (still better than "plain" TypeScript π).
Multiple packages where required to fill gaps, together with custom implementations for things like http requests, utils functions, dates and more.
And then effect
The solution at the time was called fp-ts
v3. I was on the lookout, but with doubts on what could really be improved.
And then landed effect
: A bright future for Effect.
The news is out! π’ We have made the decision to unite and collaborate on *Effect* as a generational project that aims to create a more cohesive and powerful ecosystem of libraries that are accessible and useful to developers of all levels. #TypeScript
A bit of an announcement: fp-ts merging into @EffectTS_ together with @GiulioCanti dev.to/effect-ts/a-brβ¦
The exploration started π€
fp-ts migrations
I started from my (multitude) of projects running fp-ts
.
I actually wrote a post about it at the time (now mostly out of date): From fp-ts to effect-ts: How to guide.
So old that I was still using using
npm
instead ofpnpm
π
npm uninstall fp-ts
npm install @effect/io @effect/data
Using fp-ts
as a stepping stone helped, a lot. It was not anymore about learning effect
(without any documentation or stability whatsoever at the time).
It all came down to migrating a single function at the time. Way easier and constrained problem. Easing my way into effect
one function at the time π«‘
Community
Effect has the best Discord channel out there.
Before the official documentation, learning was all inside Discord.
Effect Days 2024
The day of the announcement for the 1st Effect Days, I had 0 doubts: I got the full ticket right away π«‘
In the months leading to the conference I upped my effect
game, publishing content and resources. These were all meant for me to learn (they always are).
Getting started to @EffectTS_ with the `Effect` type π‘ How to refactor any function to use Effect β Full type-safety β Error handling β Dependency injection This is how step by step ππ§΅
After the conference the community kept getting bigger, most modules joined a single effect
package, plenty of documentation and resources, and I released a course about effect
(Effect: Beginners Complete Getting Started).
Effect Days 2025
All leading to today, here in Livorno, for the 2nd Effect Days. As a speaker this time π
Very excited to announce @SandroMaglione as a speaker at Effect Days 2025! π Sandro is a tech content creator, educator, and passionate advocate for Effect! Grab your ticket to Effect Days ποΈ effect.website/events/effect-β¦
There is a whole story behind how I came to be a speaker, and how I prepared my talk (TLDR: it's been a long process).
That's a story for later, wait for a future newsletter π
You may have missed the open source release of my Sync Engine for the web:
My Sync Engine for the Web is now open source π Local-first, offline-first web sync engine with CRDT-based synchronization End-to-end client/server implementation π github.com/typeonce-dev/sβ¦
No other major project in the making, focus all on the Effect Days.
I'll come back from the conference with insights and a new charge for more and more content π
See you next π