<div dir="ltr">Hi Alistair,<br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 15, 2018 at 10:47 AM Alistair Grant <<a href="mailto:akgrant0710@gmail.com">akgrant0710@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
On Sun, 14 Oct 2018 at 22:03, Alistair Grant <<a href="mailto:akgrant0710@gmail.com" target="_blank">akgrant0710@gmail.com</a>> wrote:<br>
><br>
> Hi All,<br>
><br>
> Just in case there aren't automatic notifications of submissions to<br>
> VMMakerInbox...<br>
><br>
> I've submitted the following changes (more information after the descriptions):<br>
<br>
There haven't been any negative comments, and it only affects the<br>
simulator, so I'll take this as approval. :-)<br>
<br>
What's the process for moving a package from the inbox to the main<br>
repository?  I can use Monticello to copy the package across easily<br>
enough, but how to remove it from the Inbox?  (I've got write<br>
permission for the main repository).<br></blockquote><div><br></div><div>Simply don't bother deleting it; just leave it there.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
Alistair<br>
<br>
<br>
<br>
> Name: VMMaker.oscog-AlistairGrant.2455<br>
> Author: AlistairGrant<br>
> Time: 14 October 2018, 8:59:01.383815 pm<br>
> UUID: 9e8e4134-b30b-4734-9477-95d556650155<br>
> Ancestors: VMMaker.oscog-eem.2454<br>
><br>
> VMClass strlen, strncpy and getenv<br>
><br>
> Pharo stores UTF8 encoded strings in ByteArrays (ByteString, strictly<br>
> speaking, expects to only store characters that can be represented as<br>
> a single byte in UTF8, e.g. ascii).  ByteArrays are also used within<br>
> the simulator to represent buffers allocated by the simulator.  As<br>
> such, the strings may either be the length of the ByteArray or less<br>
> than the ByteArray size and null terminated.<br>
><br>
> These changes extend strlen: and strncpy:_:_: to handle ByteArrays and<br>
> add some tests (tests for strings in the object memory are todo).<br>
><br>
> InterpreterPrimitives>>primitiveGetenv: returned nil rather than 0 in<br>
> the simulator when a variable that isn't defined is requested.<br>
><br>
><br>
> Name: VMMaker.oscog-AlistairGrant.2456<br>
> Author: AlistairGrant<br>
> Time: 14 October 2018, 9:25:11.249348 pm<br>
> UUID: 47b0319d-df10-4ece-84fc-324d0d35fe1d<br>
> Ancestors: VMMaker.oscog-AlistairGrant.2455<br>
><br>
> FakeStdinStream and FilePluginSimulator do double duty with the #atEnd<br>
> flag to allow #sqFile:Read:Into:At: to break out of its loop.  This is<br>
> brittle as a additional calls to #atEnd breaks the simulation - which<br>
> is what Pharo does.<br>
><br>
> Instead of doing double duty with #atEnd, do the same as the actual<br>
> plugin (sqFileReadIntoAt() in sqFilePluginBasicPrims.c) and ignore the<br>
> number of bytes to read when input is from stdin (FakeStdinStream) and<br>
> only ever read a single byte (fixes the problem and is closer to the<br>
> real plugin behaviour).<br>
><br>
><br>
> Background:<br>
><br>
> I've successfully got a Pharo 7 image (with FileAttributesPlugin)<br>
> running StdioListener in the VM simulator, but have made a few changes<br>
> at each level:<br>
><br>
> - Created a modified Pharo image that avoids FFI:<br>
> -- It doesn't load FreeType fonts or Iceberg to avoid FFI callouts.<br>
> -- Uses UnixOSProcessPlugin>>primitiveGetCurrentWorkingDirectory<br>
> instead of an FFI callout.<br>
> - StdioListener has changes to work with Zinc streams<br>
> - VMMaker has changes (in addition to the patches above):<br>
> -- Added UnixOSProcessPluginSimulator so that<br>
> primitiveGetCurrentWorkingDirectory can be used instead of FFI.<br>
><br>
> Can someone tell me whether FFI is expected to work within the simulator?<br>
><br>
> Thanks,<br>
> Alistair<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>