Skip to content

Transient Purescript-Text-Encoding is overly burdensome. #20

Closed

Description

@AlexaDeWit

The transient dependency on the text encoding library is there to provide a very specific use-case that is not general to all users of this library, and thus makes more sense to be removed. Ideally this could be a two stage process where first a new library is released providing the needed functionality, and then the functionality in this library can be removed, alongside a link and explanation that a new library now provides this behavior.

This issue is being created in response to #19

Activity

  1. AlexaDeWit commented on Dec 6, 2018

    @AlexaDeWit
    ContributorAuthor

    Oh crap, this is especially needed as this underlying library is now deprecated.

    https://github.com/inexorabletash/text-encoding

    In the deriving library I'll want to try and abstract this problem out.... which means back to my old nightmare.

  2. jacereda commented on Dec 6, 2018

    @jacereda
    Collaborator

    What if you restrict it to UTF-8? There's a small polyfill here that could serve as a starting point:

    https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder

  3. AlexaDeWit commented on Dec 6, 2018

    @AlexaDeWit
    ContributorAuthor

    I lack a minimalist isomorphism to do the decode easily available. I don't remember the full history of the work I was doing.

    I'm also thinking of working further at erasing the need for a polyfill in the other library, but that is more of a long term goal.

  4. AlexaDeWit commented on Dec 6, 2018

    @AlexaDeWit
    ContributorAuthor

    I kind of agree with the "breakout" library idea actually, as I'm considering improving another library I maintain which has minimal behaviour for base64 encoding, and wrapping these dependencies in a library specifically for working with strings, base64, and arraybuffers collectively.

    Did you want to preserve some semblance of the string encoding/decoding for this lib here?

  5. jacereda commented on Dec 6, 2018

    @jacereda
    Collaborator

    No problem on my side, I have only used binary arraybuffers myself.

  6. AlexaDeWit commented on Dec 6, 2018

    @AlexaDeWit
    ContributorAuthor

    If you were to release the stripped down version a la my PR here as another major version, I think I can commit to having a library up by the end of the weekend to provide the now missing functionality, and I could PR your Readme to include a note about what changed and how to resolve the problem.

    What do you think?

    Important to note I also removed the Show instance as it depended on a node-only inspect.

  7. jacereda commented on Dec 6, 2018

    @jacereda
    Collaborator

    Would merging to a temporary branch suffice? @athanclark will probably change the API as well and 2 major bumps could be a bit strange...

  8. AlexaDeWit commented on Dec 6, 2018

    @AlexaDeWit
    ContributorAuthor

    Sure, I can always do my next library using a local fork copied into the directory. Make a branch for me to merge into and I'll update the PR.

  9. jacereda commented on Dec 7, 2018

    @jacereda
    Collaborator
  10. AlexaDeWit commented on Dec 7, 2018

    @AlexaDeWit
    ContributorAuthor

    Cheers to that. So I assume we expect that @athanclark 's work will also end up here as part of the v9 release?

  11. AlexaDeWit commented on Dec 7, 2018

    @AlexaDeWit
    ContributorAuthor

    https://github.com/AlexaDeWit/purescript-arraybuffer-encoding This is where the new library will live btw.

  12. athanclark commented on Dec 7, 2018

    @athanclark
    Collaborator

    I'm right in the middle of thoroughly testing my branch - I'll make sure to pull whatever you've changed. I don't have any form of text-encoding integration right now - I ripped out everything, so any upgrades should be smooth, and I haven't touched arraybuffer-types.

  13. AlexaDeWit commented on Dec 7, 2018

    @AlexaDeWit
    ContributorAuthor

    Sounds good. My changes also rip out text-encoding completely, so you may have to resolve conflicts if we did it differently.

  14. jacereda commented on Dec 7, 2018

    @jacereda
    Collaborator

    @AlexaDeWit would -codecs be a better name since it will also have decoding?

  15. jacereda commented on Dec 7, 2018

    @jacereda
    Collaborator

    or text-codecs...

  16. AlexaDeWit commented on Dec 7, 2018

    @AlexaDeWit
    ContributorAuthor

    I'll give the name some thought. My intent also intends to include working with a wrapped base64 type (still text underneath ofc), but yeah, I'm not fully happy with the name either. If/When I rename though that link will still be valid for a while to find under the new name. Github rename redirects are cozy.

  17. AlexaDeWit commented on Dec 7, 2018

    @AlexaDeWit
    ContributorAuthor

    purescript-arraybuffer-codecs maybe, minus the "text" bit. Is decent.

  18. AlexaDeWit commented on Dec 7, 2018

    @AlexaDeWit
    ContributorAuthor

    https://github.com/AlexaDeWit/purescript-arraybuffer-codecs renamed, I'll die on this hill and all that. <3

  19. jacereda commented on Jan 22, 2019

    @jacereda
    Collaborator

    I think #23 will take a while.

    I cherry-picked your changes to master and published v9.0.0. Thanks.

  20. jacereda commented on Feb 1, 2019

    @jacereda
    Collaborator

    The v10 branch has been merged to master, tell me if you have any problem with the new API in your -arraybuffer-codecs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions