[Cuis] OSProcess status

David T. Lewis lewis at mail.msen.com
Sun Dec 15 22:08:44 CST 2013


On Sat, Dec 14, 2013 at 09:17:21PM -0300, Juan Vuletich wrote:
> On 12/14/2013 3:01 PM, David T. Lewis wrote:
> >On Fri, Dec 13, 2013 at 09:35:47AM -0200, Germ?n Arduino wrote:
> >>Hi:
> >>
> >>I remember some old threads about OSProcess. It's ported for Cuis? Where?
> >>
> >Hi Germ?n,
> >
> >I just tried loading OSProcess from some change sets that I exported
> >from Squeak. There are a number of issues to be sorted out, but overall
> >I was able to get it working.
> >
> >I have a question about how to support a package in Cuis. I keep OSProcess
> >in a Monticello repository, and I would like to keep the development
> >sources all in one place. I also would like to support Cuis, and keep
> >Cuis fully up to date with any changes that I might make. What would
> >be a good way to do this? I would not mind going through some extra
> >steps to produce the Cuis version, but I'm not sure the best way to
> >do it.
> >
> >Consider me a newbie here, as I have not yet tried out the Cuis development
> >process, so I may be asking a stupid question here.
> >
> >Thanks,
> >Dave
> 
> Hi David,
> 
> That would be great! We all would really appreciate if you support Cuis.
> 
> Yours is a very relevant question. In any case any question you (or 
> anybody) might have is welcome. At worst, it could point to some 
> deficiency in documentation or communication.
> 
> There are two separate issues. The first is that we don't use 
> Monticello. But we can read MCZ packages, and add a few tools to diff 
> them etc if useful. I don't think the file format will be a serious 
> problem, and I'd like to support the process you come with, and make it 
> the "official suggestion" on how to maintain multi dialect packages.
> 
> The second issue is library compatibility. There are a few differences 
> between Squeak, Pharo and Cuis, and they affect packages from time to 
> time. If the same person is supporting several dialects (this is not 
> always the case), then a unified code base is best. Sometimes the 
> package can be tweaked to use the common denominator, without a high 
> cost in code clarity or performance. Sometimes, a simple tweak or 
> addition to some dialect might ease things. Count on me wrt that! And 
> sometimes, a compatibility layer is the best option. I'm sure everybody 
> here will be willing to help with that.
> 

Hi,

I have updated OSProcess with some fixes for Cuis. This is not complete,
but it provides a working version that passes most tests when running on
an interpreter VM (not Cog). I have been working with fileouts from Squeak
and I am not sure how to load an mcz file into Cuis, but if anyone would
like to try it, the updated version of OSProcess is here:

  http://www.squeaksource.com/OSProcess/OSProcess-dtl.87.mcz

Before loading this, there are some changes that I made to my Cuis image
first. Here is what I did:

- Create the class Model as subclass of Object. This can just an empty class,
but the classes OSProcessAccessor, AIOEventHandler, and PseudoAioEventHandler
are subclassed from Model in Squeak. Or, if you prefer not to have a stub
Model class, you can load OSProcess, then fix the class definitions for
OSProcessAccessor, AIOEventHandler, and PseudoAioEventHandler to be subclasses
of Object (otherwise they end up under ProtoObject, which does not work).

- Implement these methods from Squeak:
    Object>>changed             (OSProcess uses changed / update mechanism throughout)
    Object>>ifNotNilDo:         (older versions of Squeak do not handle ifNotNil: the same)
    Character class>>cr         (compatibility, used in many places in OSProcess)
    Character class>>lf         (compatibility, used in many places in OSProcess)
    StandardFileStream>>fileID  (accessor needed by AttachableFileStream)

With those methods added, OSProcess can be loaded in Cuis, and most tests
will pass.

There is no class Socket in Cuis, so tests for socket operations will fail,
and there will be some undeclared references to Socket.

The line ending conventions are different in Cuis and Squeak (cr versus lf)
so the code that I loaded looks ugly in the browser. I am not sure how to
fix this (probably I am just loading the files in the wrong way), but the
code works so I am not too worried about this right now.

It's a start :)

Dave





More information about the Cuis mailing list