[Cuis] OSProcess status

David T. Lewis lewis at mail.msen.com
Sun Dec 22 16:58:49 CST 2013


On Sat, Dec 21, 2013 at 04:26:02PM -0300, Juan Vuletich wrote:
> Hi Dave,
> 
> (below)
> On 12/18/2013 8:55 PM, David T. Lewis wrote:
> >Hi Juan,
> >
> >On Wed, Dec 18, 2013 at 12:45:03AM -0300, Juan Vuletich wrote:
> >>With the appropriate compatibility package and / or some tweaks to Cuis
> >>(I described them elsewhere in this thread), it looks like you could
> >>support Cuis with exactly the same code as Squeak.
> >Yes I agree.
> >
> >>Given that extracting the code from a MCZ file is not hard, I could
> >>write a simple tool to allow converting an MCZ file to .pck.st format.
> >>This tool would also convert newline characters (cr, crlf, lf) to Cuis
> >>default: lf.
> >I think this tool would be useful, and it would make it easier to bring
> >existing packages into Cuis.
> >
> >>This means that if your code specifically requires a cr or crlf string
> >>or character, instead of including them in a string literal, you would
> >>need to use #cr, #lf or #crLf. The good part is that your code would be
> >>line ending agnostic. BTW, to require a default line terminator, I'd
> >>suggest adding #newLineString to Squeak, answering the same as #cr (in
> >>Cuis it answers #lf).
> >Yes I agree, and it would be a good thing for me to make those changes.
> >
> >>Would all this be ok for you? If so, all we need to do is to run this
> >>tool when you publish a new version of OSProcess.MCZ, and publish the
> >>result to the Cuis GitHub repo.
> >Yes this is ok, I like this approach.
> >
> >I should mention also that running OSProcess in Cuis helps to find bugs
> >in OSProcess. For example, OSProcess class>>isUnix was broken, and I did
> >not notice the problem until I loaded it in Cuis. So this is is a good
> >thing.
> >
> >Dave
> >
> 
> This is nice to know, thanks!
> 
> I've just pushed to github 18 updates, and 3 updated and 1 new package. 
> Some of the updates and the new package are to support OSProcess code in 
> Cuis. Please check it, and let me know if I forgot about something.
>

Hi Juan,

I just tried loading your latest updates, after figuring out how to use
git for the first time. I'm afraid I'm a slow learner, but it was worthwhile,
and I think I will learn to like git quit a lot once I get used to it.

I installed the SqueakCompatibility and Network-Kernel packages, then filed
in sources from OSProcess-dtl.87.mcz. I used the unix tr command to convert
line endings to <lf>, and that works without any problem.

The only thing that was missing at that point was WriteStream>>cr and WriteStream>>lf
from Squeak. If you could add those to SqueakCompatibility, that would be
everything required to load and run OSProcess in Cuis without modification.

Most OSProcess tests run and pass, and the few failures are intermittent,
and so are very likely associated with the OSProcess tests themselves and
not necessarily Cuis. Overall that is very good, and it means that OSProcess
will work fine on Cuis for all practical uses (the tests are a real torture
test with lots of multiprocessing and potential timing problems).

I did manage to lock up my image once while trying to debug one of the tests,
and I also crashed my VM once due to an X11 error that is probably related
to multiple VM processes talking to X11 display on the same socket (so again,
probably not a Cuis problem, and probably not a practical concern for most
people). So save your image before running the OSProcess tests, just in case.
Also, it is best to use an interpreter VM for running the tests, as Cog is
missing some support required by the test suite. I am testing on Linux, and
I expect most things to work on OS X also.  Only a few things will work on
Windows, so please do expect the tests to pass there.

I have an account on github (I am dtlewis290 at gmail.com). I will try making
an OSProcess package there when I get some time to educate myself (yes I
know it is easy, I just have not done it before). I am not sure if this
should be one package (OSProcess), or if it should be OSProcess-base,
OSProcess-unix, OSProcess-tests, etc.

Thanks for doing the SqueakCompatibility package, it works great.

Dave





More information about the Cuis mailing list