[IDEA]: Upgrade String - or introduce data type - to better handle binary data.

Tim Smart tim at fostle.com
Wed Jun 30 06:16:43 PDT 2010


If you find any interest in how Node.js currently deals with binary data, it
currently has a 'Buffer' object.

API documentation: http://nodejs.org/api.html#buffers-3
Implementation:
http://github.com/ry/node/blob/master/src/node_buffer.cc
<http://github.com/ry/node/blob/master/src/node_buffer.cc>
http://github.com/ry/node/blob/master/lib/buffer.js

<http://github.com/ry/node/blob/master/lib/buffer.js>It does have a few
drawback in terms of cost; the call to malloc is not cheap - which makes
creating new Buffer objects somewhat expensive. It does however have a nice
and simple API.

Tim.

On 30 June 2010 20:29, Brendan Eich <brendan at mozilla.com> wrote:

> We're working with the WebGL folks to standardize something that can meet
> their needs. See
>
> http://wiki.ecmascript.org/doku.php?id=strawman:typed_arrays
>
> and stay tuned here -- more coming soon on this subject.
>
> /be
>
> On Jun 30, 2010, at 1:03 AM, Ash Berlin wrote:
>
>
> On 30 Jun 2010, at 07:11, Tim Smart wrote:
>
> With recent ECMAScript taking off outside the browser (not to point at any
> one implementation, but http://nodejs.org/ is an example), the handling of
> large arbitrary amounts of text and binary data, is becoming more and more
> common.
>
> Would it be fair to make sure that future ECMAScript implementation's can
> handle these type of operations at a specification level, or would it boil
> down to preference of the VM implementer?
>
> Just a couple of thoughts, from a user of ECMAScript outside browser-land.
>
>
> This has come up before:
> https://mail.mozilla.org/pipermail/es-discuss/2009-November/010132.html
>
> I don't recall what (if any) the outcome was, but read there first.
>
> -ash
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20100701/b459093f/attachment-0001.html>


More information about the es-discuss mailing list