on master help sign in
update README
4100822Harendra Kumar
README.md+11−18
@@ -30,7 +30,8 @@ the functionality of list transformer libraries like `pipes` or
30[list-t](https://hackage.haskell.org/package/list-t), and also the logic
30[list-t](https://hackage.haskell.org/package/list-t), and also the logic
31programming library [logict](https://hackage.haskell.org/package/logict). On
31programming library [logict](https://hackage.haskell.org/package/logict). On
32the concurrency side, it subsumes the functionality of the
32the concurrency side, it subsumes the functionality of the
33−[async](https://hackage.haskell.org/package/async) package. Because it supports
33+[async](https://hackage.haskell.org/package/async) package, and provides even
34+higher level concurrent composition. Because it supports
34streaming with concurrency we can write FRP applications similar in concept to
35streaming with concurrency we can write FRP applications similar in concept to
35[Yampa](https://hackage.haskell.org/package/Yampa) or
36[Yampa](https://hackage.haskell.org/package/Yampa) or
36[reflex](https://hackage.haskell.org/package/reflex).
37[reflex](https://hackage.haskell.org/package/reflex).
@@ -59,18 +60,6 @@ processing a million elements. The timings for streamly and vector are in the
59
60
60![Streaming Operations at a Glance](charts-0/KeyOperations-time.svg)
61![Streaming Operations at a Glance](charts-0/KeyOperations-time.svg)
61
62
62−For more details on streaming library ecosystem and where streamly fits in,
63−please see
64−[streaming libraries](https://github.com/composewell/streaming-benchmarks#streaming-libraries).
65−Also, see the [Comparison with Existing
66−Packages](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html)
67−section in the streamly tutorial.
68−
69−For more information on streamly, see:
70−
71− * [Streamly.Tutorial](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html) module in the haddock documentation for a detailed introduction
72− * [examples](https://github.com/composewell/streamly/tree/master/examples) directory in the package for some simple practical examples
73−
74## Streaming Pipelines
63## Streaming Pipelines
75
64
76Unlike `pipes` or `conduit` and like `vector` and `streaming`, `streamly`
65Unlike `pipes` or `conduit` and like `vector` and `streaming`, `streamly`
@@ -338,12 +327,16 @@ for a console based FRP game example and
338[CirclingSquare.hs](https://github.com/composewell/streamly/tree/master/examples/CirclingSquare.hs)
327[CirclingSquare.hs](https://github.com/composewell/streamly/tree/master/examples/CirclingSquare.hs)
339for an SDL based animation example.
328for an SDL based animation example.
340
329
341−## Comparison with the `async` package
330+## Further Reading
331+
332+For more information, see:
342
333
343−Streamly provides higher level concurrency compared to the `async` package, it
334+ * [A comprehensive tutorial](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html)
344−can be used wherever you would want to use the `async` package. [See this
335+ * [Some practical examples](https://github.com/composewell/streamly/tree/master/examples)
345−tutorial for a quick comparison of streamly with
336+ * [Comparison with other packages](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html)
337+ * [Streaming benchmarks comparing streamly with other streaming libraries](https://github.com/composewell/streaming-benchmarks)
346−async](https://github.com/composewell/streamly/blob/master/docs/Async.md).
338+ * [Quick tutorial comparing streamly with the async package](https://github.com/composewell/streamly/blob/master/docs/Async.md)
339+ * [Concurrency benchmarks comparing streamly with async](https://github.com/composewell/concurrency-benchmarks)
347
340
348## Contributing
341## Contributing
349
342
src/Streamly/Prelude.hs+3
@@ -929,6 +929,9 @@ mapMaybeM f = fmap fromJust . filter isJust . mapM f
929-- Transformation by Reordering
929-- Transformation by Reordering
930------------------------------------------------------------------------------
930------------------------------------------------------------------------------
931
931
932+-- XXX to scale this we need to use a slab allocated array backed
933+-- representation for temporary storage.
934+--
932-- | Returns the elements of the stream in reverse order.
935-- | Returns the elements of the stream in reverse order.
933-- The stream must be finite.
936-- The stream must be finite.
934--
937--
src/Streamly/SVar.hs+5
@@ -338,6 +338,11 @@ data SVar t m a = SVar
338 svarStyle :: SVarStyle
338 svarStyle :: SVarStyle
339
339
340 -- Shared output queue (events, length)
340 -- Shared output queue (events, length)
341+ -- XXX For better efficiency we can try a preallocated array type (perhaps
342+ -- something like a vector) that allows an O(1) append. That way we will
343+ -- avoid constructing and reversing the list. Possibly we can also avoid
344+ -- the GC copying overhead. When the size increases we should be able to
345+ -- allocate the array in chunks.
341 , outputQueue :: IORef ([ChildEvent a], Int)
346 , outputQueue :: IORef ([ChildEvent a], Int)
342 , outputDoorBell :: MVar () -- signal the consumer about output
347 , outputDoorBell :: MVar () -- signal the consumer about output
343 , readOutputQ :: m [ChildEvent a]
348 , readOutputQ :: m [ChildEvent a]