lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


(I think we've diverged from the original post, so changing subject line)

On 26 October 2010 11:30, Jonathan Castello <twisolar@gmail.com> wrote:
> On Tue, Oct 26, 2010 at 2:40 AM, Matthew Wild <mwild1@gmail.com> wrote:
>> Suddenly producing an ugly script like this doesn't look as nice
>> compared to a clean VM implementation, so I headed in the latter
>> direction[1]. I'm breaking for work at the moment, but collaborators
>> welcome to help me finish :)
>>
>> Matthew
>>
>> [1]: http://code.matthewwild.co.uk/ljs
>
> Client-side Javascript doesn't have a good way to handle binary
> characters, IIRC, so you might want to architect it with that in mind.
>

As far as I know it's quite possible, bar some browser API problems
(with \0, etc.). The only other problem I foresee would be inefficient
internal representations of binary data, like using wide character
strings. As far as I know V8 uses UTF-8 internally.

In any case, I'm sure we can cope with any ugliness until they finally
decide on a standard for binary representation in Javascript. They
need it for the FileReader and websocket APIs for example.

Node (which I'm currently using for testing lvm.js) now has binary
buffer support, so it might be worth also adding support for those in
the meantime.

Regards,
Matthew