import cats._, cats.data._, cats.implicits._
- Semigroup
- Band
- Commutative Semigroup
import cats._, cats.data._, cats.implicits._
Exhaustive list of data structures here.
import cats.collection._
List of data structures: BitSet, Dequeue, Diet, Discrete, DisjointSets, Heap, ISet, AvlMap, PairingHeap, PartiallyOrderedSet, Range, AvlSet, TreeList
-- Source: https://hackage.haskell.org/package/profunctors-5.4/docs/Data-Profunctor.html | |
class Profunctor p where | |
-- dimap | lmap, rmap | |
dimap :: (a -> b) -> (c -> d) -> p b c -> p a d | |
lmap :: (a -> b) -> p b c -> p a c | |
rmap :: (b -> c) -> p a b -> p a c | |
class Profunctor p => Strong p where | |
-- first' | second' |
Cats-effect Async.async
has the following pitfall:
During the execution of
async
, the effect is guaranteed to run on the backerContextShift
required by the creation of theAsync
type class. The main issue is that, if the callback is running on its onblocking execution context
, theIO
will not switch back to the main execution context (or the one running before callingasync
). And the rest of your code will be executed on theblocking execution context
. This could end up making your cpu bounded code run on a specialized thread pool that may not be ready to handle more threads running on it.
You can test it yourself by running the following snippet:
import cats._, cats.data._, cats.implicits._
import cats.effect._, cats.effect.implicits._
import fs2._, fs2.io._
PostgREST is a standalone web server which turns a PostgreSQL database into a RESTful API. It serves an API that is customized based on the structure of the underlying database.
Official documentation at http://postgrest.org/en/v5.2/index.html
There's a docker image in case of testing :-)
To configure your PostREST instance: http://postgrest.org/en/v5.2/install.html#configuration
All public gists https://gist.github.com/monadplus | |
Copyright 2019, Arnau Abella Gassol | |
MIT License, http://www.opensource.org/licenses/mit-license.php |
There are (at least) two ways to import private keys:
WIF it's just the secKey with the checksum, compression flag and nothing else.
BIP32 also contains the derivation info: pubkey, depth, derivation-index, chain-code, parent fingerprint.
STRef provides mutable references, IORef provides mutable references, exception catching, threads, and of course IO.
Rule of thumb: use the weakest abstraction.