You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project I'm working on I ran into the requirement of having some sort of
persistent FIFO buffer or pipe in Linux, i.e. something file-like that could
accept writes from a process and persist it to disk until a second process
reads (and acknowledges) it. The persistence should be both across process
restarts as well as OS restarts.
AFAICT unfortunately in the Linux world such a primitive does not exist (named
pipes/FIFOs do not persist
A monad is a fancy word for a generic type of the form MyMonad<T> (a generic type of arity 1).
A monad is special because it adds 'special powers' to the T that it wraps.
These 'special powers' won't sound very special to an imperative programmer, so you have to squint to see them but bear with me.
IEnumerable<T> is a monad that gives values of type T the special power of nondeterminism, or the ability to 'be' multiple values at once.
Nullable<T> is a monad that gives values of type T the special power of nullability, or the ability to be absent.
Task<T> is a monad that gives values of type T the special power of asynchronicity, or the ability to be used before they are computed.
The trick with monads comes when you want to play with the T values, because they are inside another type. C# introduced language changes to make dealing with values inside these monads easier:
Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.
The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca
A class for logging excessive blocking on the main thread
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters