lua-users home
lua-l archive

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


On Wed, Sep 22, 2010 at 11:05:37PM +0200, Lavergne Thomas wrote:
> So here, even if I think its stupid, what is done on Windows is perfectly correct according to C99 and I don't think this is different in previous version of the standard.
> The problem is more that Lua try to write binary data on a text stream and fortunately for us, this perfectly works on all UNIX, and too bad for Windows users, this is not the case for them.
> 
> Perhaps, one of the first time we see that Lua doesn't fully respect C standards...

Given the spirit of C is at the heart of UNIX, not allowing binary data
to stdin and stdout would prevent compress, gzip, tar, cpio, and dozens
of other tools from working.  Even if it is within the letter of the
specification, anything that damages binary data to stdin and stdout I
believe to be outside of the spirit of the language.

Also, I can't think of any operating systems other than Windows that
don't allow binary data to pass undamaged though stdin and stdout.  Even
our boot loader gets this "right".

Piping the output of luac is useful.  I repeat my assertion that it
would be a shame if Lua was bloated to prevent issues with systems that
work outside the spirit.

B.