<div dir="ltr">Hi Alistair,<div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 7, 2018 at 12:32 PM, Alistair Grant <span dir="ltr"><<a href="mailto:akgrant0710@gmail.com" target="_blank">akgrant0710@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On 7 April 2018 at 20:29, K K Subbu <<a href="mailto:kksubbu.ml@gmail.com">kksubbu.ml@gmail.com</a>> wrote:<br>
> On Saturday 07 April 2018 08:14 PM, Eliot Miranda wrote:<br>
>><br>
>> $ cd image<br>
>> $ ./buildspurtrunkreaderimage.sh<br>
>> $ myvm spurreader.image<br>
>> squeak> 3 + 4!<br>
>> 7<br>
>> squeak> Smalltalk quit!<br>
><br>
><br>
> Nice. This can become a good smoke test at the end of the build*.sh:<br>
><br>
> /bin/echo -e '14*3!\nSmalltalk quit!' | $VM spurreader.image<br>
><br>
> Now there's the answer to life, the universe and everything ;-)<br>
><br>
> Regards .. Subbu<br>
<br>
<br>
</div></div>Interesting idea...  But even the old VM doesn't provide the answer.<br></blockquote><div><br></div><div>It will do, but that \n must be a ^M.  So if one types '3+4! followed by ctrl-v carriage return, followed by Smalltalk quit!' then echo will echo a carriage return.  But since the REPL is actually reading chunk format (hence the !'s) one doesn't need the carriage return at all and one should be able to say</div><div><br>echo '3+4!Smalltalk quit!' | $VM spurreader.image</div><div><br></div><div>and see "squeak> 7</div><div>squeak> " printed to stdout</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Piped input is working in general with my new test VM.  I'll have to<br>
figure out why the reader image doesn't handle it.<br></blockquote><div><br></div><div>I think the details are in the nextChunkNoTag method in the CogTools-Listener package.  I was trying to do the simplest thing that could possibly work here, not produce a usable listener.  The ! requirement is absurd for general use but acceptable for someone simply wanting to exercise (potentially non-blocking) reading from stdin.</div><div></div></div><div class="gmail_extra"><br></div><br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>