Skip to content
New issue

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

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

Already on GitHub? # to your account

Printing sinks should take ContextShift + EC #1427

Merged
merged 1 commit into from
Mar 14, 2019
Merged

Printing sinks should take ContextShift + EC #1427

merged 1 commit into from
Mar 14, 2019

Conversation

monadplus
Copy link
Contributor

Add stdoutLines and stdinLines as commented in the issue #1328

@monadplus monadplus changed the title stdoutLines and stdinLines Printing sinks should take ContextShift + EC Mar 10, 2019
_.map(_.show).through(text.encode(charset)).through(stdout(blockingExecutionContext))

/** Stream of `String` read asynchronously from standard input decoded in UTF-8. */
def stdinUtf8[F[_]](bufSize: Int, blockingExecutionContext: ExecutionContext)(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about stdinText and taking a charset param defaulted to UTF8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this generalization possible ?
I though converting from bytes to string has to be done ad hoc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, we don't have a decode(c: CharSet) method at this point in time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how do I proceed ?

@mpilquist mpilquist merged commit 43ef402 into typelevel:series/1.0 Mar 14, 2019
@mpilquist mpilquist added this to the 1.0.5 milestone Jun 10, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants