[Cuis-dev] Cuis in the Web, one click to run
Vanessa Freudenberg
vanessa at codefrau.net
Tue Sep 21 17:43:10 PDT 2021
On Sun, Sep 19, 2021 at 10:58 AM Nicola Mingotti <nmingotti at gmail.com>
wrote:
>
> Hi Juan, guys,
>
> I think I made a large step forward this weekend on "CuisJS" :)
>
> Please follow the instructions here:
>
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/wiki/Run-Cuis-in-the-Web-Browser.-(SqueakJS)
>
> Now there remains only to make the auto-update to make CuisJS reflect the
> changes in Cuis-Smalltalk-Dev.
>
> let me know !
>
> Bye
> Nicola
>
Very nice! I'm impressed 😊
Older versions of Cuis used to run much faster on SqueakJS – guess the
changes in the last few years added a bit of overhead that isn't noticeable
on fast VMs.
As for long download times: SqueakJS supports a "virtual" template file
system backed by a directory structure accessed via http. It's used for
example in EtoysJS and ScratchJS.
Here's a screenshot showing these virtual files inside of Etoys. Notice
that only the image and compressed sources have today's time stamp. These
are the only files that were actually downloaded, all other files just have
virtual meta data:
[image: image.png]
Only after I click a few of the files are they actually downloaded and from
then on live locally:
[image: image.png]
If that's interesting to you I can tell you how to do it. I don't think I
ever documented that part 😅
Basically it just looks up "sqindex.json" in a directory. E.g. this one is
backed by:
https://freudenbergs.de/vanessa/squeakjs/Etoys/sqindex.json
To create sqindex.json files for a whole directory hierarchy use this
script:
https://github.com/codefrau/SqueakJS/blob/main/utils/mksqindex.py
and then when running the VM pass a "templates" option as in
https://github.com/codefrau/SqueakJS/blob/main/etoys/etoys.js#L38
Vanessa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210921/edc32084/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 571298 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210921/edc32084/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 764809 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210921/edc32084/attachment-0003.png>
More information about the Cuis-dev
mailing list