Plutus: Pioneers Program 4th cohort - Lecture 5 - Minting
This weeks' lesson is focused on NFT (Non-fungible token), which are "tokens" (non-divisible, duplicable, or copyable). Cardano contains thr… ...more
This weeks' lesson is focused on NFT (Non-fungible token), which are "tokens" (non-divisible, duplicable, or copyable). Cardano contains thr… ...more
In our previous log, we have seen that we had to problematics: Splitting effects by concerns Having one target implementation A way to mitigate that… ...more
Cardano smart contract's code is splitted in two parts: on-chain and off-chain On-chain code is executed during transaction/data blockchain incorporat… ...more
After a while, it's tempting to have large effects, just because it's easier, or because they target one implementation. For example, in the codebases… ...more
Ouroboros is the consensus protocol powering Cardano. It is the first secured (and proven to be) proof-of-stake (PoS) blockchain protocol. Unlike proo… ...more
When it come to designing effects, an efficient way to know where to start is to look for IO (especially in embed/embedFinal). Let's have a look at a … ...more
Following the Plutus Pioneers Program 1st & 2nd lectures, this one takes a step closer to real world use cases. We are able to tests validators, l… ...more
Polysemy comes with many functions and interpreters relying on -threaded. However, whenever an issue (such as an Error) happens: failing :: Members … ...more
For a long time I have been interested in blockchain ecosystem for multiple reasons: A wide range of applications A very innovative field Lots of adv… ...more
In previous logs we have seen how to build interpreters thanks to Strategy. data BindE (m :: Type -> Type) a where BindE :: m a -> (a -> m … ...more
Polysemy provides some interpreters changing the returned value: runWriter :: Monoid o => Sem (Writer o ': r) a -> Sem r (o, a) The easiest… ...more
Polysemy provides many ways to combine both effects and interpreters, let's start with a simple Db effects: data Db (m :: Type -> Type) a where E… ...more
As seen in a previous log, some effects allow type classes to be supported. To enable Applicative, there is the NonDet effect, which works with Error … ...more
One of the effect used over and over again in our previous example is State, however, it's lack of atomicity can cause problems: incHundred :: Members… ...more
As part of the Haskell folklore, Polysemy supports MonadFix for with Fixpoint. Let's imagine a usecase where we want to find the sources of a source: … ...more
Polysemy comes with an useful effect to group other effects: Bundle. It comes with a useful function: sendBundle :: forall e r' r a. (Member e r… ...more
In a previous log, we saw that we are able to call other interpreters during interpretations. interpretBindTactic :: InterpreterFor BindE r interpretB… ...more
In a previous log, we introduce Final as an alternative to Embed. If we look at the intents: Embed aims to lift any Monad to Sem Final aims to embed … ...more
In a previous log, we ended with a solution for Resource which wasn't Error resistant. The solution is to use the soo-deperecated withLowerToIO. Let's… ...more
In a previous log, we introduced bindS providing a way to bind higher-order effects. Tactics also provide *T equivalent, starting with our example: da… ...more
In a previous log, we introduced liftS and runS which helps running higher-order effects in the interpretation Monad. However, you sometime have effec… ...more
Polysemy comes with many effects, today we'll have a look at Async which is the effect for and over async package. It enables running and driving asyn… ...more
In a previous log, we introduced Higher-order effects definition and interpretation through tactics. Some elements from tactics are already deprecated… ...more
In a previous log, we introduced Higher-order effects definition and interpretation through tactics. We'll see in another log an alternative way to de… ...more
One thing that sets polysemy apart is that it allows defining Higher-order effects. As higher-order functions, higher-order effects are effects define… ...more
Whenever you might have varying strategies to fetch some data, you might want to use Input: data Input i m a where Input :: Input i m i it comes wi… ...more
While you could perfectly stay in pure computation, using already defined Monad (such as IO) is a widespread usage. That's what Embed has been designe… ...more
In the previous post we have introduced an effect which mimics ElasticSearch indexing: newtype Id = Id {getId :: Int} deriving stock (Eq, Ord, Show)… ...more
From time to time, you already have a some effects and interpreters setup, but you want to add some actions without changing the behavior. It's one of… ...more
At some point you'll have a lot of effects, which is not an issue, however you might duplicated types (usually, I would advise to use newtype, but you… ...more
In a previous log we have seen a way to cache computation and a way to inject effects. Let see what it take to build a caching effect: data Cache k v … ...more
As seen previously we can have interpreters which relies on other interpreters. While you could simply add the required effects to the list, you may w… ...more