[squeak-dev] how to write to stdOut and stdErr under Cog

Bert Freudenberg bert at freudenbergs.de
Mon Sep 27 13:51:58 UTC 2010


On 27.09.2010, at 12:23, Hannes Hirzel wrote:

> +1, yes _very_ helpful
> 
> Is it a lot of work to do so?
> 
> --Hannes

Not really, but still some. More importantly, it requires coordinating all the platforms.

The new primitive(s) must be added to VMMaker, which calls into the platform support code, which must be written (or at the very least be stubbed out) for each platform.

This work typically falls to the few VM platform maintainers. We do not have a good process to share that burden.

Contributors have to send patches to the vm-dev list. But since no one is expert in all platforms, patches typically are supplied for one platform only. It is expected of the platform maintainers to implement the equivalent on their platform. This means significant work for them, so it might not happen soon or at all.

If patches were provided for all platforms and simply needed to be applied, the work would be much easier on the maintainers. However, we lack collaboration infrastructure to work on these patches.

- Bert -

> 
> On 9/27/10, Bert Freudenberg <bert at freudenbergs.de> wrote:
>> 
>> On 27.09.2010, at 07:20, Eliot Miranda wrote:
>> 
>>> 
>>> 
>>> On Sun, Sep 26, 2010 at 7:13 PM, Levente Uzonyi <leves at elte.hu> wrote:
>>> On Sun, 26 Sep 2010, Eliot Miranda wrote:
>>> 
>>> Hi Chris,
>>> 
>>>  I have code for this, but right now I need to crack some crabs, so I
>>> don't have time to verify this code in 4.1 :)  Use at your own risk ;)
>>> The
>>> most important thing is the StandardFileStream>>stdioHandles primitive for
>>> accessing the streams.  N.B. some work needs to be done on the win32
>>> FilePlugin support code before this will work on Windows.
>>> 
>>> All three streams seem to be working on Windows Vista with the latest
>>> CogVM.
>>> This seems to be a really cool feature, though I think CrLfFileStream
>>> should be deprecated, so MultiByteFileStream support would be better IMO.
>>> 
>>> Forgive me.  I was unaware of the subtleties when I wrote the code.  The
>>> important thing is the remembering of the three streams so that multiple
>>> clients that e.g. write to stdout will end up writing to a singe stdout
>>> stream, not multiple independent streams on stdout.  Feel free to fix my
>>> stream usage.
>>> 
>>> cheers
>>> Eliot
>> 
>> Since this comes up at least once every year it would really be awesome to
>> finally get proper stdio support :)
>> 
>> OSProcess is a fine choice for many situations, but not all. Getting this in
>> the regular VM + image will be very helpful.
>> 
>> - Bert -
>> 
>> 
>> 
> 





More information about the Squeak-dev mailing list