News for hackers. Stuff that matters.
Re:Blink-dev – Intent to Ship: SharedArrayBuffer by riquito on Friday April 07, 2017 @02:50AM (#14057678)
I've just stumpled once again on atob/btoa not working with characters like or 𝒞 and here I read about SharedArrayBuffers, which is way a greater goal. Of course they're right to work on such projects, go for it, but I can't avoid to be baffled by the fact that (apparently) more mundane operations don't receive love.

Other examples would be MD5 removed from subtlecrypto, killing any way to speak with services that use it for non-cryptographic operations, or the missing functions to encode/decode hex strings, which maybe are not everyday use cases but are provided by most languages and would need an afternoon to write with tests.

I want a better standard library. Just my discouraged 5 cents.

Re:Blink-dev – Intent to Ship: SharedArrayBuffer by ygra on Friday April 07, 2017 @02:58AM (#14057708)
atob/btoa is atrocious from an API design standpoint. Here we are, designing an API to convert things to Base64 and back and we use a string as a byte array substitute, nevermind the fact that strings are not limited to Latin-1. There's probably a bunch of libraries that solve this, but stumbling over this in a library that has no outside dependencies is a bit annoying since you have to solve it yourself ... again.
Re:Blink-dev – Intent to Ship: SharedArrayBuffer by IIIIIIIIIIII on Friday April 07, 2017 @03:53AM (#14057938)
I'm just curious since I never used this feature, are you talking about this issue?

> The "Unicode Problem"

> Since DOMStrings are 16-bit-encoded strings, in most browsers calling window.btoa on a Unicode string will cause a Character Out Of Range exception if a character exceeds the range of a 8-bit ASCII-encoded character. There are two possible methods to solve this problem:

https://developer.mozilla.org/en/docs/Web/API/WindowBase64/B...

Re:Blink-dev – Intent to Ship: SharedArrayBuffer by riquito on Sunday April 09, 2017 @02:48AM (#14070850)
Yes, that one