<br><br><div class="gmail_quote">On Sun, Jan 23, 2011 at 8:34 PM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu">leves@elte.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Sun, 23 Jan 2011, Chris Cunnington wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It looks to me as though you&#39;ve moved the three handles from StandardFileStream to FileStream.<br>
Could you perhaps give an example or two?<br>
<br>
Since playing with MicroSqueak I&#39;ve been staring with covetous eyes at Interpreter&gt;&gt;print: which is nothing more than printf(). I want to be able to print output not to a log file, but back to the terminal. MicroSqueak does that with #primitiveExitToDebugger (which uses #printCallStackFrom:).<br>

<br>
I figure printf() is a great candidate for a simple FFI hack. I could create a method called #terminal: (instead of #log:).<br>
<br>
I&#39;m haunted by the idea of creating a command line Squeak interface. (FWIW the input would be passive: a drop folder. Create a process with FileDirectory to see if anything has been added to a directory every five seconds. It has? Stream it up to Compiler evaluate:.) Then a person could write a script in vi, cp it to the drop folder, and know it was working in a headless image by the output sent back to terminal by #terminal:.<br>

<br>
Any examples to show how to use what you&#39;ve just created would be greatly appreciated.<br>
</blockquote>
<br></div></div>
It does the same as Eliot&#39;s original implementation with the following differences:<br>
- The API (and the implementation) is in FileStream<br>
- You get the same object if you use &quot;FileStream stdin&quot;, &quot;StandardFileStream stdin&quot; or &quot;MultiByteFileStream stdin&quot; to access the streams.<br>
- The streams are encoded using the platform&#39;s default TextConverter by default. This means that the class of the streams is MultiByteFileStream in the default case.<br>
- There&#39;s automatic line end conversion installed by default: crlf for windows, lf for other platforms (as discussed earlier).<br>
- You can turn on/off the text encoding and the line end conversion by changing the value of the &quot;Encode and decode the contents of stdio files.&quot;<br>
preference. This will change the class of the streams to StandardFileStream. This is useful when you want to access the raw<br>
streams.<br>
<br>
Due to the migration code, images shouldn&#39;t break if they&#39;re already using StandardFileStream based stdio streams. Users of CrLfFileStream based stdio streams may experience problems and have to manually fix their code and probably the streams too after (or before) updating.<br>

<br>
Just like with any other FileStreams, concurrent access to the stdio streams is not supported.<br></blockquote><div><br></div><div>Excellent!</div><div><br></div><div>Thanks, Levente. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
<br>
Levente<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Chris<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br>