replicateM :: Monad m => Int -> m a -> m [a]
mapM :: Monad m => (a -> m b) -> [a] -> m [b]
sequence :: Monad m => [m a] -> m [a]
- Does not work on infinite lists
- You can’t consume any results until everything has been processed
- You have to run the entire computation, even if you don’t need every result
- This wastes memory by buffering every result
main = do
xs <- sequence . repeat $ getLine
mapM_ putStrLn xs
-- 期待通りに動かない例
- How to build library-agnostic streaming sources
- composewell/streaming-benchmarks: Benchmarks to compare Haskell streaming library performance
History
- ✕ Lazy IO
- Deprecated enumerator
- iteratee
- ストリーム処理ライブラリはなぜ必要なのか
io-streams
Pipes
- Pipes.Tutorial
- Pipes
- Pipes - London Haskell
- Examining Hackage: pipes
- pipes-parseの概要
- https://twitter.com/argumatronic/status/626168311957434368
- The pipes-safe package
- The pipes-concurrency package
- Shortcut fusion for pipes
Conduit
- conduit library
- https://hackage.haskell.org/package/conduit
- Conduit最速入門2019 - Qiita
- Conduit Overview
- Simpler conduit library based on monadic folds
- 5分で分かるコンジット
- ConduitとHaskellでネットワークプロキシサーバを作る
- Conduitの使い方
- Conduits - Dealing with streaming data
- [翻訳] Conduit Overview - School of Haskell
- Thoughts on Conduits
- Counties and Conduit
- Parallel/Pipelined Conduit
- 進捗を取りながらファイルをダウンロードする
- Summary of the Haskell Conduit package
- Proposed conduit reskin
- Sharing, Space Leaks, and Conduit and friends
- udp-conduit: Simple fire-and-forget conduit UDP wrappers
- ConduitベースのTCPサーバ・クライアント
- ConduitベースのTCPクライアント Ver 0.2
- Uniqhash Machines Implementation Using MealyM ~ Bows and Arrows
Conduits were created for the Yesod web framework. My understanding is that they were designed to be blazingly fast. Early versions of the library were highly stateful.
Pipes focus on elegance. They have just one type instead of several, form monad (transformer) and category instances, and are very “functional” in design.
Machines
Arrow based
- Programming with Arrows
- The auto package
- machinecell
- Arrow化pipeはFRPの夢を見るか?
- Arrow化pipeはFRPの夢を見るか?(GUI編)
Others
- quiver
- fumieval/boombox
- bch29/streaming-png
- First class stream fusion
- Stream fusion for streaming, without writing any code
- Tweag I/O - How to compose streaming programs
- THE EXODUS TO STREAMGARD, AN EPIC POEM
- Event Sourcing is a transferable skill | Arkency Blog
- Exploiting Vector Instructions with Generalized Stream Fusion | Lambda the Ultimate
-
[Drinkery the boozy streaming library - School of Haskell School of Haskell](https://www.schoolofhaskell.com/user/fumieval/drinkery-the-boozy-streaming-library) - Event Sourcing, Functionally - Arnaud Bailly (2017) : haskell
- Streaming UTF-8 in Haskell and Rust
- Faster Coroutine Pipelines | University of Oxford Podcasts - Audio and Video Lectures
- ssadler/piped: Haskell streaming library targeting Conduit API while being smaller and faster
- streaming: an elementary streaming prelude and general stream type.
- dunai: Generalised reactive framework supporting classic, arrowized and monadic FRP.
- Bodigrim/chimera: Lazy infinite compact streams with cache-friendly O(1) indexing and applications for memoization
- Back to old tricks .. (or, baby steps in Rust) – Control.Monad.Writer
- Copilot: home
- Introduce BIO: A Simple Streaming Abstraction - Z.Haskell
- Streamly