conduit Questions
0
I would like to be able to play simple[1] audio in realtime from GHCI, starting and stopping independent oscillators and samples ("voices").
Using Bash on Linux, it's easy[2] to pipe data into a c...
1
Solved
I am trying to spawn a process from within a Haskell program, and I would like to print its standard error stream to the screen while also writing the same stream to a file, much like what the tee ...
1
Solved
In the "Coroutine Pipelines" article in Monad.Reader Issue 19, the author defines a generic Coroutine type:
newtype Coroutine f m a = Coroutine
{ resume :: m (Either (f (Coroutine f m a)) a)
}
...
Mythicize asked 19/7, 2017 at 13:27
1
There is an archived thread on reddit which says essentially conduit/pipes cannot be arrows b/c arrows need to be synchronous. The thread is linked here https://www.reddit.com/r/haskell/comments/rq...
Barbellate asked 23/2, 2017 at 14:41
2
Solved
I've added the following rewrite rule to conduit without issue:
{-# RULES "ConduitM: lift x >>= f" forall m f.
lift m >>= f = ConduitM (PipeM (liftM (unConduitM . f) m))
#-}
I'm tr...
2
Solved
I understand "." (dot) as function composition. I understand "|" (pipe) as "or," guard introduction syntax (from here ), but I saw an answer on http-conduits using ".|" that makes use of this opera...
Barthold asked 3/12, 2016 at 23:17
1
Solved
The two resources I found that suggested recipes for streaming downloads using popular Haskell libraries were:
https://haskell-lang.org/library/http-client#Streaming
http://www.alfredodinapoli.co...
1
I use haskell for line-based data processing, i.e. tasks where you can apply sed, awk and similar tools. As a trivial example, let's prepend 000 to every line from standard input.
I have three alt...
3
I have a conduit pipeline processing a long file. I want to print a progress report for the user every 1000 records, so I've written this:
-- | Every n records, perform the IO action.
-- Used for ...
Sensational asked 16/7, 2014 at 16:30
1
Solved
Setting
I need to traverse a directory over 100+ .txt files, open every one and do some function on each, then combine the results. These files are huge, on the order of 10GB. Some common operati...
Tacmahack asked 13/8, 2016 at 18:54
1
Solved
The title says it all. I've seen that some people apparently use Data.Conduit.List.map id as identity conduit, but is this the recommended way to stream data unchanged?
1
I really like the concept of conduit/pipes for applying operations to a streaming IO source. I am interested in building tools that work on very large log files. One of the attractions of moving to...
1
Solved
I am trying to construct a Conduit that receives as input ByteStrings (of around 1kb per chunk in size) and produces as output concatenated ByteStrings of 512kb chunks.
This seems like it should ...
1
Solved
I want the same data to be split in two "branches" to be processed separately, then "joined"...
+----------+
+---------+ -->| doublber |--- +--------+
+--------+ | |-- +----------+ -->| ...
2
Solved
I have written a following parsing code using attoparsec:
data Test = Test {
a :: Int,
b :: Int
} deriving (Show)
testParser :: Parser Test
testParser = do
a <- decimal
tab
b <- decim...
Norword asked 5/6, 2014 at 11:21
1
Solved
I've been playing around with conduit-extra's UNIX package, which basically allows for an easy creation of a server using UNIX domain sockets, specifically using the runUnixServer funciton.
The pr...
2
Solved
I'm writing a programme where an input file is split into multiple files (Shamir's Secret Sharing Scheme).
Here's the pipeline I'm imagining:
source: use Conduit.Binary.sourceFile to read from ...
3
Solved
I have seen people recommending pipes/conduit library for various lazy IO related tasks. What problem do these libraries solve exactly?
Also, when I try to use some hackage related libraries, it i...
Bulwerlytton asked 30/3, 2014 at 8:44
1
Solved
Let's assume we create the file a.txt.gz as follows:
$ echo "foobar" > a.txt
$ gzip a.txt
I intend to use zlib-conduit in order to emulate zcat in Haskell.
I'm looking for a simple example t...
Aspergillosis asked 26/1, 2014 at 4:1
1
Solved
I use the http-conduit library version 2.0+ to fetch the contents from a http:// URL:
import Network.HTTP.Conduit
myurl = ... -- Your URL goes here
main = do content <- simpleHttp myurl
print ...
Sigmoid asked 23/1, 2014 at 14:16
4
Solved
Here's some code that implements a small receiving server using conduit, network-conduit, and stm-conduit. It receives data on a socket and then streams it through an STM-channel to the main thread...
Fimbria asked 6/1, 2014 at 15:57
1
Solved
Function runTCPClient from network-conduit has the following signature:
runTCPClient :: (MonadIO m, MonadBaseControl IO m)
=> ClientSettings m -> Application m -> m ()
MonadIO m provid...
1
Solved
First up, a simplified version of the task I want to accomplish: I have several large files (amounting to 30GB) that I want to prune for duplicate entries. To this end, I establish a database of ha...
Kathrinekathryn asked 11/11, 2012 at 14:23
1
I am writing application which will download some files by HTTP. Up to some point I was using following code snippet to download page body:
import network.HTTP
simpleHTTP (getRequest "http://www.h...
Sparkman asked 16/11, 2013 at 10:45
3
Solved
As the title says, I'd like to be able to read lines from a file that is inside a zip archive, using zip-conduit (the zip files I'm dealing with are very big, so I need to be able to do this in con...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.