Comments (20)
@AlexaDeWit would -codecs be a better name since it will also have decoding?
from purescript-arraybuffer.
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.
from purescript-arraybuffer.
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
from purescript-arraybuffer.
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.
from purescript-arraybuffer.
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?
from purescript-arraybuffer.
No problem on my side, I have only used binary arraybuffers myself.
from purescript-arraybuffer.
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.
from purescript-arraybuffer.
Would merging to a temporary branch suffice? @athanclark will probably change the API as well and 2 major bumps could be a bit strange...
from purescript-arraybuffer.
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.
from purescript-arraybuffer.
I have created https://github.com/jacereda/purescript-arraybuffer/tree/v9 including your PR.
from purescript-arraybuffer.
Cheers to that. So I assume we expect that @athanclark 's work will also end up here as part of the v9 release?
from purescript-arraybuffer.
https://github.com/AlexaDeWit/purescript-arraybuffer-encoding This is where the new library will live btw.
from purescript-arraybuffer.
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.
from purescript-arraybuffer.
Sounds good. My changes also rip out text-encoding completely, so you may have to resolve conflicts if we did it differently.
from purescript-arraybuffer.
or text-codecs...
from purescript-arraybuffer.
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.
from purescript-arraybuffer.
purescript-arraybuffer-codecs maybe, minus the "text" bit. Is decent.
from purescript-arraybuffer.
https://github.com/AlexaDeWit/purescript-arraybuffer-codecs renamed, I'll die on this hill and all that. <3
from purescript-arraybuffer.
I think #23 will take a while.
I cherry-picked your changes to master and published v9.0.0. Thanks.
from purescript-arraybuffer.
The v10 branch has been merged to master, tell me if you have any problem with the new API in your -arraybuffer-codecs.
from purescript-arraybuffer.
Related Issues (20)
- 8 bit read/writes should not send an Endianness argument HOT 1
- why do Getter results live in Eff? HOT 4
- why does `fromArray` take an `Array Number` argument instead of `Array Int`? HOT 2
- Expand String Conversion Support To Full Utf-16 Range of Code Points HOT 5
- `as_Array` is broken HOT 6
- purescript-quotient HOT 2
- export Typed.part' HOT 6
- typelevel dependency HOT 2
- transfer to purescript-contrib HOT 1
- Don't export Typed.part' HOT 1
- Polyfill is not defined when using `spago bundle-app` HOT 21
- publishing a breaking release as v12.0.0
- Sync issue labels with standard names
- ST instead of Effect? HOT 5
- fromUint8Array, toUint8Array HOT 1
- Reification
- Slice and subArray documentation reversed HOT 1
- BigInt64Array, BigUint64Array
- Mutability of types in Data.ArrayBuffer.ArrayBuffer HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-arraybuffer.