borar

@borar.bsky.social

Another approach for early returns in #fsharp, but specifically for Async computations: gist.github.com/Savelenko/5e...

Async with early return capability CE for F#

Async with early return capability CE for F#. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

@romain-deneau.bsky.social · 2mo ago

C# developers use early return to avoid nesting. #fsharp doesn't have that — so guard logic keeps adding indentation levels. 📝 New article: how a tiny custom computation {} CE brings early exits back, without giving up functional style. 🔗 romain-deneau.hashnode.dev/a-real-world...

While I understand the good intentions behind such reocurring statements, I am less careful and "politically" balanced: #fsharp is absolutely inherently better. The "needs" are irrelevant, objective properties are what matters in engineering. Just like precise power tools vs manual mediaval tools.

Post nicht verfügbar.

Functional programming and its idioms are the most fitting and sensible interpretation/realization of #eventsourcing. Fold multiple composable values of types provided by the layered model, alongside the use-case specific version, apply model logic, store a new record. "Aggregates" are a mistake.

I think I understood the popularity of "modern" as a term. It embodies the implicit and unconcious understanding that most of the (visible online) software industry is a web of ad-hoc, anti-fundamental knowledge, hype-driven, half-assed ideas which break easily. Then its on to the next "modern".

My 5c about this, as always somewhat heretical. "Bounded context" is vague and not really interesting/useful. Vertical slice architecture is not an architecture, but a principle *within* an architecture. In particular, in the Onion architecture (my default). #DDD 🔽

Tomasz Ducin@ducin.dev · last yr.

Fellow #DDD folks out there, Can someone explain to me what is a _practical_ difference between a vertical slice and a bounded context?

Working on refining my #eventsourcing design/template for #haskell applications. Using GADTs we can turn on or off optimistic concurrency check using "global" journal versions. Depending on the on/off setting, the "concurrent change detected" outcome becomes impossible and need not be handled.

Bild

Streams per entity are fundamentally in conflict with the basic essence of #eventsourcing. The essence being that we can compute *anything* by folding all records. Counter-example: find all customers in a system where each customer has a dedicated journal/stream by customer ID.

Is the cabal 'data-files' machinery useful for static files needed by a Haskell Web application, for example CSS, JS and similar? What are best practices for "packaging" together the latter and the build product of cabal? A build system on top of cabal? #haskell

Beyond basic programs, HM-like type systems can be quite mysterious and awesome. The definitions and types of the #purescript functions below look strange at the first sight. I wonder how IWSAMs will fare when ported to #fsharp.

Bild

Another suspicious property of aggregates is that they (I think) collapse the application and model layers of the application. If an aggregate is essentially the scope/boundary of everything which is allowed to happen (consistently) within a use-case, then it means that the model layer 🔽

I am following the Lit tutorial. It is striking how the combination of reactice properties, declarative event listeners and the properties object inside of the web component class are essentially like a Halogen component! #purescript

My perspective, much more focused: at its core, #EventSourcing is a storage mechanism where the application persists records about observations or conclusions and computes various values by folding them from past records, interpreting the sequence of records in different ways.

Kuba@kuba.zalas.pl · 2y ago

At its core, I see #EventSourcing as a transformation of a command and past events to a list of new events. The command is an intent to perform an action. Events capture decisions made. We can also get an error back if the command cannot be executed.

(Command, List<Event>) -> Either<Error, List<Event>>