[Vm-dev] re: Simulating the Cog V3 VM

Eliot Miranda eliot.miranda at gmail.com
Mon May 16 17:59:12 UTC 2016


Hi Laura, Hi Balloon Plugin Experts,

On Mon, May 16, 2016 at 10:15 AM, Laura Perez Cerrato <
lauraperezcerrato at gmail.com> wrote:

>
> I thought I'd share how things are coming along since the other day,
> since you've all been so welcoming :) First of all, thanks for that!
> As a newbie VM developer you've been of so much help.
>
> After loading the fix Elliot uploaded earlier, everything seems to be
> working as expected. A debbuger pops up whenever a redraw is issued
> (from my understanding), displaying the message "Error: inconsistent
> values: 2047 vs 0", which is triggered by calling BalloonArray>>at:.
> However, I've noticed that there's a comment in that message stating
> "Debug only..." on top of the error block, so I guess everything's
> working fine. Proceeding performs the redraw accordingly. So, besides
> this minor annoyance, the simulator seems to be working ok.
>

Yes, I don't understand the Balloon simulation code enough to be able to
fix this.  It has been a persistent annoyance.  I encourage anyone who does
understand the code to take a look.  As I understand it there is an Array
of floats in the plugin whose values should mirror an array of
floating-point values in the simulated heap, and that inconsistencies arise
because of bugs in the simulation code.  But as I say I don't understand
the code well enough to fix it.  If you do have expertise here we can try
and help you reproduce an example by simulating a specific image.


I've also tried generating the source for JPEGReadWriter2 only using
> the snippet provided in one of the workspaces and compiling the
> resulting sources; which also seems to be working accordingly.
>
> I've noticed that building the Spur VMMaker image by means of the
> scripts provided now fails when trying to automatically load all the
> necessary packages to have a working VM simulation environment: when
> initializing the last version of OSProcess, a debugger pops up
> alerting that primitiveChangeClassTo: failed. Proceeding seems to
> continue the package loading without further issues. On first starting
> the image, the same debugger pops up. Proceeding then again seems to
> have no effect in the things I've tried so far.
>

Ah, this is a V3 issue.  I'm sure that the same code won't fail under Spur,
which has a more general change-class primitive.  Can you post the stack of
the failure?  Perhaps there's a different way to implement it under V3.

I'll now work on trying to debug my modifications to the plugin from
> the VM simulator.
>
> I also thought I'd share a bit more about the project I'm working on.
> I'm working with Juan at Satellogic on satellite imagery processing.
> As we mostly work with 8-bit deep images and currently the plugin only
> supports writing 32-bit deep images to disk, we found adding support
> for such a feature would come handy in time.
>

Cool!

My apologies if my messages seem odd; I'm not used to participating in
> mailing lists. I hope I can contribute something more valuable in the
> future :)
>

Don't downplay your contribution.  Simply being involved and using the
simulator for development is a big step that few developers attempt.
You're very welcome and your contribution is much appreciated.  Thank you.


> -Laura Perez Cerrato
>
>
> On 12 May 2016 at 12:23, Laura Perez Cerrato
> <lauraperezcerrato at gmail.com> wrote:
> > Craig,
> > Thanks for the offering! If you could point me in the right direction
> > in order to take this approach I'd greatly appreciate it. Is there any
> > documentation available on the subject?
> >
> > -Laura Perez Cerrato
> >
> >
> > On 12 May 2016 at 10:23, Craig Latta <craig at blackpagedigital.com> wrote:
> >>
> >>
> >> Hi--
> >>
> >>      Eliot writes:
> >>
> >>> The system is designed for one to be able to Instantiate a plugin and
> >>> use it in objects in the current image by using an InterpreterProxy
> >>> instance to interface the plugin code with ordinary Smalltalk
> >>> objects.  But I've never done this so I can't help.  Perhaps
> >>> someone with experience of dong this can provide help.
> >>
> >>      I've done this, for network access used by remote messaging between
> >> two simulators on different machines (or a simulator and a normal
> >> system). I originally took the LargeIntegerPlugin simulator support as
> >> my example, but have worked with this technique extensively since then.
> >> Laura, I'd be happy to help if you'd like.
> >>
> >>
> >>      thanks,
> >>
> >> -C
> >>
> >> --
> >> Craig Latta
> >> Black Page Digital
> >> Amsterdam
> >> craig at blackpagedigital.com
> >> +31 6 2757 7177 (SMS ok)
> >> + 1 415 287 3547 (no SMS)
> >>
>



-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160516/c3bf8f18/attachment-0001.htm


More information about the Vm-dev mailing list