<div dir="ltr"><div>Yeah, I would want to get the arguments from the stack, but everything else is unnecessary to do things like FloatArrayPlugin.</div><div><br></div><div>BTW, did anyone use Lowcode in Pharo? I didn't know it, I just saw references to it in the opensmalltalk-vm source tree and saw a presentation about it.. it looks like writing primitives using Cog JIT RTL opcodes from within the image, and you can call functions from external libraries too...<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 1, 2020 at 1:14 AM David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The interpreter proxy provides the interface to the Smalltalk call<br>
stack, along with a number of other functions. Without that interface,<br>
you cannot take arguments off the stack or return values back to the image.<br>
It also provides the tools you need to (for example) create a new instance<br>
of String that you can return back to the image.<br>
<br>
Dave<br>
<br>
<br>
On Sun, May 31, 2020 at 12:14:36PM +0700, Luciano Notarfrancesco wrote:<br>
> About the interpreterProxy, it looks like there???s a subset of slang that???s<br>
> good enough for a lot of applications and might not really need<br>
> interpreterProxy. I don???t remember all that it is used for, but thinking<br>
> about MiscPrimitivePlugin and FloatArrayPlugin, all they do is receive<br>
> arrays (of floats, bytes, it would be nice to also have float64, int32 and<br>
> int64) and read/write stuff from/to them. They never deal with the object<br>
> memory, they don???t instantiate objects, they don???t even access instance<br>
> variables. This subset is all I need for my use case, and I???m guessing is<br>
> also all that would be needed for a vector graphics plugin and many other<br>
> applications.<br>
> <br>
> On Sun, 31 May 2020 at 4:25 AM, Philip Bernhart via Cuis-dev <<br>
> <a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br>
> <br>
> > Hi David,<br>
> ><br>
> > "David T. Lewis via Cuis-dev" <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> writes:<br>
> ><br>
> > > Don't believe everything you read on vm-dev ;-)<br>
> > > If you are interested in writing your own primitives for just about<br>
> > > any reason at all, then named primitives are exactly what you want.<br>
> ><br>
> > Ok, if you say so. But why should I believe you? :-)<br>
> ><br>
> > > Regarding stand-along slang generation, as a point of comparison you<br>
> > > may want to take a look at the interactive "slang browsing" in the<br>
> > > traditional VMMaker. This is set up to attempt C code translation for<br>
> > > any instance-side method in any class (not just the VM classes).<br>
> ><br>
> > I don't know what you want to say with that. If just as a feature to<br>
> > compare code between old and "new", then it's interesting and cool.<br>
> ><br>
> > Still... there is the problem of how to sustainable co-evolve against<br>
> > the same VM interface. For example which implementation of the<br>
> > interpreterProxy should be serialized? I would need some answers<br>
> > around that whole massive topic, before starting to implement<br>
> > a Cuis Slang PluginMaker.<br>
> ><br>
> > Anyway the feature inspired me to implement that for Cuis Slang:<br>
> ><br>
> ><br>
> > <a href="https://github.com/Phantasus/Cuis-Smalltalk-Slang/blob/master/Journal.md#30th-may-2020-jpb" rel="noreferrer" target="_blank">https://github.com/Phantasus/Cuis-Smalltalk-Slang/blob/master/Journal.md#30th-may-2020-jpb</a><br>
> ><br>
> ><br>
> > Thanks,<br>
> > Philip<br>
> > --<br>
> > Cuis-dev mailing list<br>
> > <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
> > <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
> ><br>
</blockquote></div>