[Vm-dev] Adding VectorEnginePlugin to standard VM distributions for Cuis/Squeak

Juan Vuletich JuanVuletich at zoho.com
Wed Jul 21 23:05:57 UTC 2021


Hi Eliot, Hi David,

Thanks for your interest in VectorEnginePlugin! It is exciting to know 
that it will be included in official VM builds, as this will ensure it 
is available for everybody, and it avoids the need to maintain separate 
VM builds for this.

Let me explain a little bit why it is not simply maintained as a 
Monticello repository. I wrote and maintain the plugin using Cuis, 
because Cuis has a morphic implementation that is compatible with it, 
and this eases development and testing. Cuis uses the .pck.st file 
format for packages, that is essentially a change set with very little 
additional metadata. Squeak can read .pck.st files without trouble.

Cuis can run enough of VMMaker to be able to generate C sources for 
plugins (although it can't generate the full VM or run simulated Slang). 
As Dave said, Squeak can also load VectorEnginePlugin.pck.st in a 
VMMaker Squeak image and generate C sources for it.

Dave, thanks a lot for your offer to commit the generated sources to the 
OpenSmalltalk repo, or alternatively to set up an upstream Monticello 
mirror for VectorEnginePlugin. I haven't used much Squeak, VMMaker or 
Monticello in years, if I tried to do that I'm sure I'd make a lot of 
mistakes!

Finally, if you want to try it for yourself, clone or copy as a zip file 
http://www.github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev and run it with 
one of the experimental VMs at
https://www.dropbox.com/sh/rhkt4ayq24t2xbf/AACDb3mrjMUDB8Mptd-Bi6Zsa?dl=0 . 
VMs are available for LinuxX64, Windows64 and Windows32 (built by Gerald 
Klix), LinuxX64-v3-interpreter (built by Dave) and MacOS (built by me).

Once you get Cuis running with a VM that includes VectorEnginePlugin, 
(and using the complete folder structure of that GitHub repo), you can 
do World / Preferences... / Set System Font... / DejaVu / DejaVuSans , 
or, for example, ComputerModern... / NeoEuler or 
ComputerModernConcreteRoman .

Now use center-click to bring a halo on the "About Cuis" window, or a 
Smalltalk browser. Note that in addition to the resize handle, there is 
a zoom handle at the rightCenter and a rotate handle at the bottomLeft. 
Just play with them. Note that the TrueType text is rasterized straight 
from the TrueType Bezier curves spec to the Display, at any angle and 
zoom level (no Form caching at all).

You can also do World / New Morph... / From Alphabetical List / 
M3Exp01Morph . Clone it with the topRight halo handle. See what happens 
when one of them touches another. Other example morphs, like 
M3Exp03Morph and M3Exp05Morph show how little code is needed to draw 
arbitrary shapes, while the framework handles all geometry details (such 
as detecting when the hand touches the morph, in order to drag it or 
open the halo).

If you clone the SVG repo, you can also see how we can read and turn 
into Morph structure some rather complex SVG files.

One interesting note about VectorEnginePlugin is that exactly the same 
algorithm is doing TrueType (meaning that it is good enough for text, 
i.e. better quality than Cairo) and fast enough for SVG manipulation and 
animation.

I hope you like it.

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



On 7/21/2021 4:09 PM, Eliot Miranda wrote:
> Hi David, Hi Juan,
>
> On Tue, Jul 20, 2021 at 5:48 PM David T. Lewis <lewis at mail.msen.com 
> <mailto:lewis at mail.msen.com>> wrote:
>
>
>     VectorEnginePlugin is a new plugin by Juan Vuletich that can be
>     added to
>     standard VM builds as an external plugin. Currently it is used
>     principally
>     by Cuis, but is applicable to Squeak and related images as well.
>
>
> great news!
>
>
>     The Smalltalk slang source is hosted at
>     https://github.com/Cuis-Smalltalk
>     and the package file for fileIn to Cuis or Squeak is
>     https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Packages/Features/VectorEnginePlugin.pck.st.
>
>     No external platforms files are required. The plugin source can be
>     generated from any Cuis or Squeak VMMaker image and is portable
>     for any
>     platform or VM flavor. Squeak (and hence any VMMaker image)
>     already has
>     the necessary support for filing in the plugin without modification.
>
>     The minimal requirement for adding this to the opensmalltalk-vm
>     (and traditional
>     squeakvm) is to commit the generated sources to
>     src/plugins/VectorEnginePlugin/
>     and add it to the the various plugins.ext files.
>
>     Beyond that, I want to ask in advance how we should support
>     VectorEnginePlugin
>     moving forward. The simplest thing to do is treat the Cuis GitHub
>     repository
>     as the upstream repository (which it is), and just check generated
>     sources into
>     the opensmalltalk-vm and squeakvm.org <http://squeakvm.org>
>     repositories. This however is different
>     from what we usually do with plugins that live in Monticello
>     repositories
>     and are loaded into VMMaker images, usually from repositories
>     hosted on
>     source.squeak.org <http://source.squeak.org> or squeaksource.com
>     <http://squeaksource.com>.
>
>     Are there any preferences or recommendations as to how to best
>     handle this?
>     I have been tracking the VectorEnginePlugin for some time and I'm
>     willing
>     to do any administrative things that may be needed, including
>     checking in
>     generated sources and/or possibly setting up and maintaining a
>     Monticello
>     mirror of the upstream repository (e.g. a project on squeaksource) if
>     that is preferred.
>
>
> An upstream Monticello mirror would be most helpful.  We have a tiny 
> script for generating correct histories in exports to Monticello from 
> Tonel repositories if it is of help.  I will fold the 
> VectorEnginePlugin into the standard builds within the next few days 
> (not today, I need some downtime).
>
>
>     Thanks for any ideas or suggestions, and thanks to Juan for developing
>     the new VectorEnginePlugin.
>
>
> +1000!!!
>
>
>     Dave
>
>
>
> -- 
> _,,,^..^,,,_
> best, Eliot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210721/e719f131/attachment-0001.html>


More information about the Vm-dev mailing list