<br><br><div class="gmail_quote">On Tue, Oct 5, 2010 at 12:23 PM, Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you both, it worked in my Linux test! And Levente tested it in<br>
Windows. Does that mean only Mac needs tested and clean up the<br>
stream-usage to be able to include this into 4.2? Bert, I was not<br>
clear if that what you meant in your reference to work needed by<br>
platform maintainers..?<br></blockquote><div><br></div><div>I wrote it on Mac and use it regularly on Mac. It works on Mac. Mac == unix at this level.</div><div><br></div><div>But the VM support needs to get merged into the trunk before we an add it to 4.2.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
<br>
On Mon, Oct 4, 2010 at 10:26 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
> Hi Both,<br>
><br>
> 2010/10/3 Levente Uzonyi <<a href="mailto:leves@elte.hu">leves@elte.hu</a>><br>
>><br>
>> On Sun, 3 Oct 2010, Chris Muller wrote:<br>
>><br>
>>> Thanks for the code Eliot. Can you give me a hint about proper usage.<br>
>>> In the current trunk I tried<br>
>>><br>
>>> CrLfFileStream newForStdio<br>
><br>
> Levente, as usual, is exactly right. use e.g. StandardFileStream stdout.<br>
><br>
>>><br>
>>> but I was not able to nextPutAll: a String onto that (rwmode was not<br>
>>> set).<br>
>>><br>
>>> I also found StandardFileStream<br>
>>> class>>#standardIOStreamNamed:forWrite: but it has undeclared<br>
>>> variable, "stdioFiles". Is that supposed to be a class-inst var<br>
>>> defined at the StandardFileStream level? Senders did not help me<br>
>>> understand what arguments I should pass...<br>
>><br>
>> That class instance variable is missing, but the code still works. Try<br>
>> this:<br>
>><br>
>> CrLfFileStream stdout nextPutAll: 'Hello World!'.<br>
><br>
> That's right. This is missing:<br>
> StandardFileStream class<br>
> instanceVariableNames: 'stdioFiles'<br>
> best<br>
> Eliot<br>
>><br>
>> Levente<br>
>><br>
>>><br>
>>> Sorry for my confusion..<br>
>>><br>
>>> - Chris<br>
>>><br>
>>><br>
>>> On Mon, Sep 27, 2010 at 1:09 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>><br>
>>>> On Sun, Sep 26, 2010 at 10:18 PM, Eliot Miranda<br>
>>>> <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi Levente,<br>
>>>>><br>
>>>>> On Sun, Sep 26, 2010 at 7:13 PM, Levente Uzonyi <<a href="mailto:leves@elte.hu">leves@elte.hu</a>> wrote:<br>
>>>>>><br>
>>>>>> On Sun, 26 Sep 2010, Eliot Miranda wrote:<br>
>>>>>><br>
>>>>>>> Hi Chris,<br>
>>>>>>><br>
>>>>>>> I have code for this, but right now I need to crack some crabs, so<br>
>>>>>>> I<br>
>>>>>>> don't have time to verify this code in 4.1 :) Use at your own risk<br>
>>>>>>> ;)<br>
>>>>>>> The<br>
>>>>>>> most important thing is the StandardFileStream>>stdioHandles<br>
>>>>>>> primitive<br>
>>>>>>> for<br>
>>>>>>> accessing the streams. N.B. some work needs to be done on the win32<br>
>>>>>>> FilePlugin support code before this will work on Windows.<br>
>>>>>><br>
>>>>>> All three streams seem to be working on Windows Vista with the latest<br>
>>>>>> CogVM.<br>
>>>>>> This seems to be a really cool feature, though I think CrLfFileStream<br>
>>>>>> should be deprecated, so MultiByteFileStream support would be better<br>
>>>>>> IMO.<br>
>>>>><br>
>>>>> The streams work if directed to files. But they will /not/ work if<br>
>>>>> directed to input or output in a console window. I should have been<br>
>>>>> clearer, sorry. The work needed is in<br>
>>>>> platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c where if input<br>
>>>>> and/or<br>
>>>>> output is the console we need to use ReadConsole & WriteConsole in<br>
>>>>> place of<br>
>>>>> ReadFile & WriteFile.<br>
>>>><br>
>>>> Hmmm. Turns out I was confused about this. One doesn't need<br>
>>>> ReadConsole &<br>
>>>> WriteConsole; ReadFile & WriteFile should do just fine. But the Cog<br>
>>>> code<br>
>>>> doesnt work in either an MS-DOS console window or a cygwin console<br>
>>>> window.<br>
>>>> If anyone's familiar with this area of Windows please feel free to take<br>
>>>> a<br>
>>>> look...<br>
>>>> TIA<br>
>>>> Eliot<br>
>>>>><br>
>>>>> cheers<br>
>>>>> Eliot<br>
>>>>>><br>
>>>>>><br>
>>>>>> Levente<br>
>>>>>><br>
>>>>>>><br>
>>>>>>><br>
>>>>>>> On Sun, Sep 26, 2010 at 2:46 PM, Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>><br>
>>>>>>> wrote:<br>
>>>>>>><br>
>>>>>>>> I am developing a simple "CommandLineProcessor" facade for easily<br>
>>>>>>>> transferring command-line arguments simply as block-arguments, so<br>
>>>>>>>> you<br>
>>>>>>>> can write smalltalk scripts in vi:<br>
>>>>>>>><br>
>>>>>>>> CommandLineProcessor do: [ : arg1 : arg2 : arg3 | "args come in as<br>
>>>>>>>> Strings" ... ]<br>
>>>>>>>><br>
>>>>>>>> and also for directing Notifications and Warnings messages to<br>
>>>>>>>> stdOut,<br>
>>>>>>>> and Errors to stdErr. It relies on OSProcess to write to stdOut and<br>
>>>>>>>> stdErr for this. However, ever since switching to Cog, writing to<br>
>>>>>>>> these streams does not seem to redirect out to Linux..<br>
>>>>>>>><br>
>>>>>>>> I don't know whether writing to these streams makes me<br>
>>>>>>>> Linux-dependent, but it really is nice to be able to write Linux<br>
>>>>>>>> scripts that employ Squeak in the back-end, but operate normally<br>
>>>>>>>> like<br>
>>>>>>>> other shell programs in the terminal window and with redirecting<br>
>>>>>>>> output, etc.<br>
>>>>>>>><br>
>>>>>>>> - Chris<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>><br>
>>>>>><br>
>>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>><br>
>><br>
>><br>
><br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br>