# [luatex] read and write streams

David Carlisle d.p.carlisle at gmail.com
Thu Nov 19 13:20:05 CET 2015

On 19 November 2015 at 11:52, Hans Hagen <pragma at wxs.nl> wrote:
> On 11/19/2015 12:19 AM, David Carlisle wrote:
>>
>> Hi,
>>
>> I just noticed (after extending \newread and \newwrite to 128 streams)
>> that only write streams are extended and that input streams are still
>> restricted to 16.
>>
>> I could of course undo the change to \newread but it seems strangely
>> unsymmetric
>> is there any technical reason in the internals not to allow 128 input
>> streams?
>
>
> different internals indeed, so for now just 16 input streams

OK (for now?) I'll revert my change to the allocation macro.

>  (i never needed
> that many output streams but i can imagine that some users need it; i wonder
> if input streams are used that often)
>
> Hans

I don't know what you count as "often"?
Looking in the latex area (only) in texlive 2015 I see over a hundred
files using it:

cd  /usr/local/texlive/2015/texmf-dist/tex/latex
find . -type f -exec grep -H '\\newread'  \{\} \; | wc -l

114

Whether anyone wants to load more than 14 of them into luatex
in the same document is of course a harder question to answer,
it is though perhaps more likely than needing a few thousand
catcode tables:-)

Although I have to admit that I was asking on the grounds of symmetry
in the design of the language rather than actual use.
That isn't necessarily a bad thing though...

David