Re: Could String internalize an ArrayBuffer?

2015-12-05 Thread Isiah Meadows
Response inline On Sun, Dec 6, 2015 at 12:19 AM, Boris Zbarsky wrote: > On 12/5/15 8:44 AM, Coroutines wrote: >> >> What I want is to be able to view a String through a typed array >> without duplicating the memory/contents of that string. > > > The big problem with this is

Could String internalize an ArrayBuffer?

2015-12-05 Thread Coroutines
I'm not sure what I'm asking for/looking for. What I want is to be able to view a String through a typed array without duplicating the memory/contents of that string. As I understand it, typed arrays operate over an ArrayBuffer, not Strings. Does anyone know of a way to do this? If it's not

Re: Could String internalize an ArrayBuffer?

2015-12-05 Thread Boris Zbarsky
On 12/5/15 8:44 AM, Coroutines wrote: What I want is to be able to view a String through a typed array without duplicating the memory/contents of that string. The big problem with this is that the actual in-memory representations of strings and arraybuffers can be quite different in

Re: PRNG - currently available solutions aren't addressing many use cases

2015-12-05 Thread Raymond Toy
On Tue, Dec 1, 2015 at 1:45 PM, David Bruant wrote: > Le 01/12/2015 20:20, Michał Wadas a écrit : > >> >> As we all know, JavaScript as language lacks builtin randomness related >> utilities. >> All we have is Math.random() and environment provided RNG - window.crypto >> in

Reflection to know if executed within a generator/async ?

2015-12-05 Thread Raul-Sebastian Mihăilă
Actually I may have misunderstood. I guess you want held to be false in the yielding context. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Reflection to know if executed within a generator/async ?

2015-12-05 Thread Claude Pache
> Le 4 déc. 2015 à 18:31, Andrea Giammarchi a > écrit : > > > async works with old code, old code cannot be promoted to async one. All I am > trying to explain is that I'd love to give well known, de-facto standard, > universally used APIs the ability to behave,

Reflection to know if executed within a generator/async ?

2015-12-05 Thread Raul-Sebastian Mihăilă
To Andrea: A function like the one you describe would be practical only if, when called in a sync context, it could wait by blocking, unlike when being called in an async context. Otherwise, it doesn't work: ``` let theValue; function fetchTheValue() { return fetch('/theValue')