Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate streams into a separate package #355

Closed
lehins opened this issue Jan 16, 2021 · 9 comments
Closed

Separate streams into a separate package #355

lehins opened this issue Jan 16, 2021 · 9 comments
Assignees

Comments

@lehins
Copy link
Contributor

lehins commented Jan 16, 2021

This is a long shot, but I thought I'd ask anyways.

Data.Vector.Fusion.Stream.Monadic is a quite useful module and I know of at least two packages that could use it without depending on vector, namely massiv and streamly. There are a few others I found, but they are less maintained.
Another benefit of splitting it into its own package would force us to write some tests and maybe even benchmarks for the stream functionality itself.

Thoughts?

@Bodigrim
Copy link
Contributor

Sounds good.

@chessai
Copy link
Member

chessai commented Jan 16, 2021 via email

@Shimuuar
Copy link
Contributor

+1

Another benefit of splitting it into its own package would force us to write some tests and maybe even benchmarks for the stream functionality itself.

We'll also have to review document and possible clean up public API of package instead of treating it as implementation detail of vector.

What is place of Bundle in this? Should it go into new package or remain part of vector proper?

@lehins
Copy link
Contributor Author

lehins commented Jan 17, 2021

I am pleasantly surprise to see everyone supporting this!

What is place of Bundle in this?

Bundle will have to stay inside of vector, because Bundle depends on Vector class:

data Chunk v a = Chunk Int (forall m. (PrimMonad m, Vector v a) => Mutable v (PrimState m) a -> m ())

But that's ok, because I don't think there is any desire to make Bundle work with anything else other than vector.

Now that I have your guy's support I'll start working on this, but only after I am done with vector-0.12.2.0 release (which is pretty close, I got quite heads way with backporting functionality last night).

I would really like to see this split before release of vector-0.13.0.0. A bit of bikeshedding: name for new package? Things that come to mind:

  • vector-stream
  • stream-fusion
  • ...

@Shimuuar
Copy link
Contributor

Do you plan to make it part of 0.13 release? If so I'll it to list (compiling it right now)

Wrt name is have slight preference for vector-stream but don't acre much about it.

@Shimuuar
Copy link
Contributor

You do. Sorry, missed that

@Shimuuar Shimuuar mentioned this issue Jan 17, 2021
6 tasks
@Bodigrim
Copy link
Contributor

+1 to vector-stream

@lehins lehins self-assigned this Jan 17, 2021
@Boarders
Copy link
Contributor

Boarders commented Mar 6, 2021

Just a random idea, which may be horrible, but how feasible would it be as a long term goal for text and vector to share this streaming framework?

@Shimuuar
Copy link
Contributor

Shimuuar commented Mar 6, 2021

I think it's doable although stream types are subtly different. text's one is strict in both elements and state, and vector's is lazy. Whether it's something that should be done is another question entirely. And much more difficult to answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants