<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 8 March 2018 at 22:59, Alistair Grant <span dir="ltr"><<a href="mailto:akgrant0710@gmail.com" target="_blank">akgrant0710@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>Hi Eliot,<br>
<br>
On Wed, Mar 07, 2018 at 10:46:41PM +0000, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
><br>
> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
> <a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2347.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>VMMaker/VMMaker.oscog-eem.<wbr>2347.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: VMMaker.oscog-eem.2347<br>
> Author: eem<br>
> Time: 7 March 2018, 2:46:20.98144 pm<br>
> UUID: 062614a7-e3da-4b30-997a-<wbr>9568911b9ff5<br>
> Ancestors: VMMaker.oscog-akg.2346<br>
><br>
> Review of Alistair's recent FilePlugin changes:<br>
><br>
> Alistair, in var:type: declarations use symbols for types, as these are shared in lots of cases.<br>
<br>
In my defense, the slang code I was looking at used strings.  But this<br>
makes sense and I'll change.<br>
<br>
<br>
> With several plugins, but especially the FilePlugin and SocketPlugin, avoid using cCode: 'aString(...)' inSmalltalk: [passive default] because this is not simulateable.  For example in FilePlugin>>#<wbr>primitiveFileWrite you'll see<br>
>       bytesWritten := self<br>
>                                               sqFile: file<br>
>                                               Write: count * elementSize<br>
>                                               From: (interpreterProxy cCoerce: (interpreterProxy firstIndexableField: array) to: #'char *')<br>
>                                               At: startIndex - 1 * elementSize.<br>
> instead of a self cCode: 'sqFileWriteFromAt(...)' form and you'll find an implementation at FilePluginSimulator>>#sqFile:<wbr>Write:From:At:<br>
<br>
It looks like it's at the point where I need to understand<br>
the simulator (which I haven't looked at yet).<br>
<br>
I haven't seen it yet, but I'll definitely watch Clémnt's video.<br>
Where else should I look to get started with the simulator?<br></blockquote><div><br></div><div>Here is a beginner picking the brains of the experts...</div><div><a href="http://forum.world.st/Exploring-the-simulator-was-Re-REPL-image-for-simulation-td4896870.html">http://forum.world.st/Exploring-the-simulator-was-Re-REPL-image-for-simulation-td4896870.html</a><br></div><div><br></div><div>which Clement summarised here...</div><div><a href="https://clementbera.wordpress.com/2016/05/30/simulating-the-cog-vm/">https://clementbera.wordpress.com/2016/05/30/simulating-the-cog-vm/</a><br></div><div><br></div><div>cheers -ben</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> In primitiveConnectToFile[<wbr>Descriptor] you write<br>
><br>
>       interpreterProxy failed ifFalse:<br>
>               [^interpreterProxy pop: 3 "rcvr, name, writeFlag"<br>
>                                                       thenPush: filePointer].<br>
>       ^interpreterProxy primitiveFail.<br>
><br>
> but there's no point calling primitiveFail a secoind time given that interpreterProxy failed tells you the primitive has already failed.  Simply write<br>
><br>
>       interpreterProxy failed ifFalse:<br>
>               [interpreterProxy pop: 3 "rcvr, name, writeFlag"<br>
>                                                       thenPush: filePointer]<br>
<br>
OK.<br>
<br>
Thanks for the feedback,<br>
Alistair<br>
<br></blockquote></div><br></div></div>