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

Ported the start here example from 0.8 #609

Merged
merged 1 commit into from
May 15, 2016

Conversation

mpilquist
Copy link
Member

@mpilquist mpilquist commented May 14, 2016

  • I created a tut doc for the example, though I didn't know where to include that in the guide, so it is standalone for now.
  • I changed the signature of utf8Encode and utf8Decode -- both were working with Chunk[Byte] instead of Byte which made using them with the io package annoying. The original signatures are available under a C suffix -- utf8EncodeC and utf8DecodeC. The implementations did not exploit the chunky nature in any way, except for the handling of encoding/decoding empty strings -- utf8EncodeC andThen utf8DecodeC == id for all strings, whereas utf8Encode andThen utf8Decode == id for all non-empty strings. I believe this is due to the fact that we don't emit empty chunks in the interpreter.
  • Added a new text.lines pipe, which buffers a stream of strings and emits individual lines.

 - I created a tut doc for the example, though I didn't know where to
   include that in the guide, so it is standalone for now.

 - I changed the signature of utf8Encode and utf8Decode -- both were
   working with Chunk[Byte] instead of Byte which made using them
   with the io package annoying. The original signatures are available
   under a `C` suffix -- `utf8EncodeC` and `utf8DecodeC`.  The
   implementations did not exploit the chunky nature in any way,
   except for the handling of encoding/decoding empty strings --
   `utf8EncodeC andThen utf8DecodeC == id` for all strings, whereas
   `utf8Encode andThen utf8Decode == id` for all non-empty strings.

 - Added a new text.lines pipe, which buffers a stream of strings and
   emits individual lines.
@pchiusano
Copy link
Contributor

Cool. There was no good reason for signature of those text transducers, it was just an oversight.

@pchiusano pchiusano merged commit ca0975e into typelevel:topic/redesign May 15, 2016
@mpilquist mpilquist mentioned this pull request Jan 15, 2020
@mpilquist mpilquist deleted the topic/start-here branch February 18, 2020 12:58
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

Successfully merging this pull request may close these issues.

2 participants