[Cuis-dev] Cuis on SqueakJS (was: Bitmap size mismatch)

Vanessa Freudenberg vanessa at codefrau.net
Thu Oct 26 22:36:26 PDT 2023


Hi Juan,

primitive 184 (Object>>pin) was missing. I added that to the VM as a no-op
answering true and now it works.

There is no HostWindowPlugin, that's why there is an error when resizing
the window.

Spur Cuis is slower than necessary because there is a full GC
in VectorEngineDrawer>>pvtSetForm:. So it often collects garbage manually
which is slow (you can see that if you open the JS console).

This link uses a spur image:

      https://tinyurl.com/cuis6053spur

And btw there's actually a bug in th v3 image: Behavior>>identityHash
should be deleted, since in v3 there is no primitive 175.

Vanessa

On Wed, Oct 25, 2023 at 10:32 AM Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> On 10/24/2023 10:34 PM, Vanessa Freudenberg via Cuis-dev wrote:
>
> Hi all,
>
> I was trying to run Cuis on SqueakJS for fun. The spur images need some
> prims that SqueakJS doesn't have yet, but the v3 image worked. Or almost
> worked. The Transcript was showing tons of errors which made the system
> unusable:
>
> HybridCanvas(MorphicCanvas)>>drawWorld:repair:
>
> BitBIt >> copyBits failed. Will retry with parameters rounded. Requested
> parameters are:
>
> #('dest, source, halftone, rule:' Form(1512x807×32) nil a Bitmap:1 of
> length 1 0)
>
> #('dest, extent, source, clipOrigin, clipExtent' 523 at 46 158 at 280 0 at 0 0 at 0
> 681 at 326)
>
> #('colorMap' a Bitmap:4096 of length 4096)
>
> #copyBitsAgain failed. Requested BitBIt operation not performed. Call
> stack follows:
>
> BitBitCanvasEngine(BitBIt)>>copyBitsAgain
>
>
> Turned out the BitBlt failed because some bitmaps were 1 word longer than
> width*height would require, and my (10 year old) version of BitBlt
> complained about that, it expected an exact size match.
>
> I implemented a workaround in my VM which warns about the mismatch but
> doesn't fail the BitBlt primitive. It works now, try it here 🎉
>
>     https://tinyurl.com/cuis6053
>
> Cuis on a phone 😍 although not exactly usable there (you could set
> highdpi to false in the URL but then the UI gets huge).
>
> But my question is: Was the image wrong or the VM? I've never seen this
> problem in Squeak images, old or new.
>
> Vanessa
>
> [image: IMG_0FC5A40A0908-1.jpeg]
>
>
> Hi Vanessa,
>
> This is very nice, thank you!
>
> WRT the (self wordsPerLine * height) + 1, it is there because of a bug in
> VectorEnginePlugin, that could access an invalid position beyond the end.
> See senders of #VEPapi5. But as SqueakJS doesn't include the
> VectorEnginePlugin, that hack is not needed. Just pushed an update for
> that. In order to use it, you'd need to pull repo, start Cuis with an
> OpenSmalltalk VM, do World / Changes / Install new updates, then save the
> image.
>
> Still, I wonder why the Spur image flavors won't run on SqueakJS. Is Cuis
> using some primitive that Squeak doesn't use? (I mean, Spur Squeak does run
> on SqueakJS, right?) If so, do you plan to include them? If not, please
> tell which they are, I can borrow workaround code for them from older Cuis,
> or from Squeak, so Spur Cuis will run on SqueakJS.
>
> Main reason is that in the future I'd like to have a single, immediate,
> Unicode ready Character class. Right now Character is the old byte style
> from Smalltalk-80, and UnicodeCodePoint is immediate on Spur but not on V3.
> I'd like to clean all that.
>
> Thanks!
>
> --
> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20231026/546f8e54/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noname
Type: image/jpeg
Size: 88802 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20231026/546f8e54/attachment-0001.jpe>


More information about the Cuis-dev mailing list