Questions on scratchJS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions on scratchJS

stefano federici
 
Dear All,
I have two questions about ScratchJS (that I think is an awesome project):
- is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
- can I open local projects in ScratchJS?

Thanks in advance for your help

Regards
Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113
Reply | Threaded
Open this post in threaded view
|

Re: Questions on scratchJS

stefano federici
 
I managed running ScratchJS locally by saving the page https://squeak.js.org/run/ to my PC and the dragging my Scratch.image into the page.

What I don't know is where the SqueakJS file system is stored. When I open the File>Open dialog I can see the SqueakJS and ScratchProjects folders. Where are they stored in my PC?

Thanks in advance

Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il venerdì 7 febbraio 2020, 21:39:50 CET, stefano federici <[hidden email]> ha scritto:


Dear All,
I have two questions about ScratchJS (that I think is an awesome project):
- is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
- can I open local projects in ScratchJS?

Thanks in advance for your help

Regards
Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113
Reply | Threaded
Open this post in threaded view
|

SqueakJS for Scratch (was: Questions on scratchJS:

David T. Lewis
 
Hi Stefano,

I am changing the subject line to "SqueakJS for Scratch" because google
sends me somewhere else for "ScratchJS".

I think that you are asking about running Scratch on Bert Freudenberg's
SqueakJS, which is a modern Squeak virtual machine implemented entirely
in JavaScript for HML5, rather than the traditional compiled virtual
machines that run on operating systems such as Linux and Windows.

If I understand your question correctly, you are asking about how to
run Scratch on SqueakJS locally on your PC, and you want to understand
where the Scratch files are stored on your PC.

I do not have good answers to your questions but I am sure that others
on this list can help. I am also CC'ing the squeak-dev mailing list
where some of the real Scratch and SqueakJS experts reside.

Here are some useful links for SqueakJS information:

  https://squeak.js.org/
  http://try.squeak.org/
  https://github.com/bertfreudenberg/SqueakJS

And for Scratch:

  https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/
  https://www.raspberrypi.org/blog/test-tims-nuscratch-beta/
  https://github.com/raspberrypi/scratch

Dave


On Sun, Feb 09, 2020 at 01:01:57AM +0000, stefano federici wrote:

>  
>  I managed running ScratchJS locally by saving the page https://squeak.js.org/run/ to my PC and the dragging my Scratch.image into the page.
>
> What I don't know is where the SqueakJS file system is stored. When I open the File>Open dialog I can see the SqueakJS and ScratchProjects folders. Where are they stored in my PC?
>
> Thanks in advance
>
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici
> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113
>
>      Il venerd?? 7 febbraio 2020, 21:39:50 CET, stefano federici <[hidden email]> ha scritto:  
>  
>  Dear All,
> I have two questions about ScratchJS (that I think is an awesome project):
> - is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
> - can I open local projects in ScratchJS?
>
> Thanks in advance for your help
>
> Regards
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici
> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113  
Reply | Threaded
Open this post in threaded view
|

Re: SqueakJS for Scratch (was: Questions on scratchJS:

stefano federici
 
> I am also CC'ing the squeak-dev mailing list where some of the real Scratch and SqueakJS experts reside.

Thanks a lot Dave

> I think that you are asking about running Scratch on Bert Freudenberg's SqueakJS, which is a modern Squeak virtual machine implemented entirely in JavaScript for HML5

Correct

> If I understand your question correctly, you are asking about how to run Scratch on SqueakJS locally on your PC

Yes. I partially solved the problem by downloading page https://squeak.js.org/run/ and by dragging my Scratch.image file into the page. ScratchJS runs apparently fine. I also partially solved the problem of running local files, by dragging the Scratch projects on the Scratch app running in SqueakJS

> you want to understand where the Scratch files are stored on your PC.

Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people

Thanks for your help

Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il domenica 9 febbraio 2020, 04:05:38 CET, David T. Lewis <[hidden email]> ha scritto:



Hi Stefano,

I am changing the subject line to "SqueakJS for Scratch" because google
sends me somewhere else for "ScratchJS".

I think that you are asking about running Scratch on Bert Freudenberg's
SqueakJS, which is a modern Squeak virtual machine implemented entirely
in JavaScript for HML5, rather than the traditional compiled virtual
machines that run on operating systems such as Linux and Windows.

If I understand your question correctly, you are asking about how to
run Scratch on SqueakJS locally on your PC, and you want to understand
where the Scratch files are stored on your PC.

I do not have good answers to your questions but I am sure that others
on this list can help. I am also CC'ing the squeak-dev mailing list
where some of the real Scratch and SqueakJS experts reside.

Here are some useful links for SqueakJS information:

  https://squeak.js.org/
  http://try.squeak.org/
  https://github.com/bertfreudenberg/SqueakJS

And for Scratch:

  https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/
  https://www.raspberrypi.org/blog/test-tims-nuscratch-beta/
  https://github.com/raspberrypi/scratch

Dave


On Sun, Feb 09, 2020 at 01:01:57AM +0000, stefano federici wrote:


>  I managed running ScratchJS locally by saving the page https://squeak.js.org/run/ to my PC and the dragging my Scratch.image into the page.
>
> What I don't know is where the SqueakJS file system is stored. When I open the File>Open dialog I can see the SqueakJS and ScratchProjects folders. Where are they stored in my PC?
>
> Thanks in advance
>
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici
> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113
>
>      Il venerd?? 7 febbraio 2020, 21:39:50 CET, stefano federici <[hidden email]> ha scritto: 

>  Dear All,
> I have two questions about ScratchJS (that I think is an awesome project):
> - is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
> - can I open local projects in ScratchJS?
>
> Thanks in advance for your help
>
> Regards
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici

> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113 
Reply | Threaded
Open this post in threaded view
|

Re: SqueakJS for Scratch (was: Questions on scratchJS:

stefano federici
 
>> you want to understand where the Scratch files are stored on your PC.
> Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people

UPDATE: I created and saved a project in the "SqueakJS" folder (the one shown in ScratchJS) and I made a full search in my PC. The file was not found. So, I guess projects are just saved in an internal SqueakJS DB? If it is so, this makes unfortunately ScratchJS useless for my purposes. And I have no sufficient javascript/smalltalk knowledge to try myself to change this behaviour (that I guess would possible in principle, as a lot of JS apps allow to save file locally).

Cheers
Stefano

> I am also CC'ing the squeak-dev mailing list where some of the real Scratch and SqueakJS experts reside.

Thanks a lot Dave

> I think that you are asking about running Scratch on Bert Freudenberg's SqueakJS, which is a modern Squeak virtual machine implemented entirely in JavaScript for HML5

Correct

> If I understand your question correctly, you are asking about how to run Scratch on SqueakJS locally on your PC

Yes. I partially solved the problem by downloading page https://squeak.js.org/run/ and by dragging my Scratch.image file into the page. ScratchJS runs apparently fine. I also partially solved the problem of running local files, by dragging the Scratch projects on the Scratch app running in SqueakJS

> you want to understand where the Scratch files are stored on your PC.

Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people

Thanks for your help

Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il domenica 9 febbraio 2020, 04:05:38 CET, David T. Lewis <[hidden email]> ha scritto:



Hi Stefano,

I am changing the subject line to "SqueakJS for Scratch" because google
sends me somewhere else for "ScratchJS".

I think that you are asking about running Scratch on Bert Freudenberg's
SqueakJS, which is a modern Squeak virtual machine implemented entirely
in JavaScript for HML5, rather than the traditional compiled virtual
machines that run on operating systems such as Linux and Windows.

If I understand your question correctly, you are asking about how to
run Scratch on SqueakJS locally on your PC, and you want to understand
where the Scratch files are stored on your PC.

I do not have good answers to your questions but I am sure that others
on this list can help. I am also CC'ing the squeak-dev mailing list
where some of the real Scratch and SqueakJS experts reside.

Here are some useful links for SqueakJS information:

  https://squeak.js.org/
  http://try.squeak.org/
  https://github.com/bertfreudenberg/SqueakJS

And for Scratch:

  https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/
  https://www.raspberrypi.org/blog/test-tims-nuscratch-beta/
  https://github.com/raspberrypi/scratch

Dave


On Sun, Feb 09, 2020 at 01:01:57AM +0000, stefano federici wrote:


>  I managed running ScratchJS locally by saving the page https://squeak.js.org/run/ to my PC and the dragging my Scratch.image into the page.
>
> What I don't know is where the SqueakJS file system is stored. When I open the File>Open dialog I can see the SqueakJS and ScratchProjects folders. Where are they stored in my PC?
>
> Thanks in advance
>
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici
> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113
>
>      Il venerd?? 7 febbraio 2020, 21:39:50 CET, stefano federici <[hidden email]> ha scritto: 

>  Dear All,
> I have two questions about ScratchJS (that I think is an awesome project):
> - is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
> - can I open local projects in ScratchJS?
>
> Thanks in advance for your help
>
> Regards
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici

> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113 
Reply | Threaded
Open this post in threaded view
|

Re: SqueakJS for Scratch (was: Questions on scratchJS:

timrowledge
 
Stefano, I'm curious why you wouldn't simply run the 'proper' Smalltalk version of Scratch? It will be a lot faster, easier to manage and avoids messing with web browser annoyances.

I spent a lot of time making improvements to the MIT original version in order to make it viable on the RaspberryPi SBCs and the code is completely open. If you're not familiar with using Squeak and loading packages I'm sure we can work out a way to get you a ready-built system.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Klingon Code Warrior:- 9) "A TRUE Klingon warrior does not comment his code!"


Reply | Threaded
Open this post in threaded view
|

Re: SqueakJS for Scratch (was: Questions on scratchJS:

stefano federici
 
Hi Tim, thanks for your offer. What I need is a way of running Scratch 1.4 on the new MacOS Catalina, that "banned" 32bit applications.

Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il domenica 9 febbraio 2020, 19:44:32 CET, tim Rowledge <[hidden email]> ha scritto:



Stefano, I'm curious why you wouldn't simply run the 'proper' Smalltalk version of Scratch? It will be a lot faster, easier to manage and avoids messing with web browser annoyances.

I spent a lot of time making improvements to the MIT original version in order to make it viable on the RaspberryPi SBCs and the code is completely open. If you're not familiar with using Squeak and loading packages I'm sure we can work out a way to get you a ready-built system.


tim

--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Klingon Code Warrior:- 9) "A TRUE Klingon warrior does not comment his code!"



Reply | Threaded
Open this post in threaded view
|

Re: SqueakJS for Scratch (was: Questions on scratchJS:

timrowledge
 


> On 2020-02-09, at 10:48 AM, stefano federici <[hidden email]> wrote:
>
> Hi Tim, thanks for your offer. What I need is a way of running Scratch 1.4 on the new MacOS Catalina, that "banned" 32bit applications.

Ah, of course. Related to a subject we have just been talking about - how to run 32bit images on 64 bit machines etc.

Happily we can solve this without any scary messing around since the source code can be loaded into a 64 bit image just as easily as into a 32bit one. Another nice bonus is that we get to keep all the Squeak goodness behind the scenes and can add new capabilities when needed.

Why do you particularly want the Scratch 1.4 ? MIT have moved on to Scratch 3, based on html5 or sometihng I don't care about. I certainly claim the 'real' stuff is better but I am of course biased.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Four wheels move the body. Two wheels move the soul

Reply | Threaded
Open this post in threaded view
|

Re: SqueakJS for Scratch (was: Questions on scratchJS:

stefano federici
 
> Happily we can solve this without any scary messing around since the source code can be loaded into a 64 bit image just as easily as into a 32bit one

Will this make possible to run the BYOB 3.1.1 image (https://snap.berkeley.edu/old_site/old-byob.html) too? I need to run also this app in order to show to my students how to build procedures.

> Why do you particularly want the Scratch 1.4 ? MIT have moved on to Scratch 3, based on html5 or sometihng I don't care about. I certainly claim the 'real' stuff is better but I am of course biased.

Whereas Scratch 3 (and 2) are more performant, they lack a lot of features very important to me as a teacher, such as the "FOREVER IF" block, the position of the mouse pointer (Scratch 3), the possibility to easily shrink/enlarge/rotate the sprites by using the GUI buttons/menus, the possibility to easily see the full names of the sprites, a way to show a step-by-step execution, etc

Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il domenica 9 febbraio 2020, 19:55:45 CET, tim Rowledge <[hidden email]> ha scritto:





> On 2020-02-09, at 10:48 AM, stefano federici <[hidden email]> wrote:
>
> Hi Tim, thanks for your offer. What I need is a way of running Scratch 1.4 on the new MacOS Catalina, that "banned" 32bit applications.

Ah, of course. Related to a subject we have just been talking about - how to run 32bit images on 64 bit machines etc.

Happily we can solve this without any scary messing around since the source code can be loaded into a 64 bit image just as easily as into a 32bit one. Another nice bonus is that we get to keep all the Squeak goodness behind the scenes and can add new capabilities when needed.

Why do you particularly want the Scratch 1.4 ? MIT have moved on to Scratch 3, based on html5 or sometihng I don't care about. I certainly claim the 'real' stuff is better but I am of course biased.
Four wheels move the body. Two wheels move the soul


Reply | Threaded
Open this post in threaded view
|

Re: SqueakJS for Scratch (was: Questions on scratchJS:

timrowledge
 


> On 2020-02-09, at 11:07 AM, stefano federici <[hidden email]> wrote:
>
> > Happily we can solve this without any scary messing around since the source code can be loaded into a 64 bit image just as easily as into a 32bit one
>
> Will this make possible to run the BYOB 3.1.1 image (https://snap.berkeley.edu/old_site/old-byob.html) too? I need to run also this app in order to show to my students how to build procedures.

Hmm, I truly don't know about that. The best I can say right now is a definite maybe. I *think* I did run it a couple of times on a Pi but we're talking 5-6 years ago. The issue is likely to be making sure one can get all the sources for that and working out how to install changes that may clash with changes I made to create NuScratch. IIRC, Jens Monig wrote BYOB and he's around and a helpful chap.

>
> > Why do you particularly want the Scratch 1.4 ? MIT have moved on to Scratch 3, based on html5 or sometihng I don't care about. I certainly claim the 'real' stuff is better but I am of course biased.
>
> Whereas Scratch 3 (and 2) are more performant, they lack a lot of features very important to me as a teacher, such as the "FOREVER IF" block, the position of the mouse pointer (Scratch 3), the possibility to easily shrink/enlarge/rotate the sprites by using the GUI buttons/menus, the possibility to easily see the full names of the sprites, a way to show a step-by-step execution, etc

Ah. Well I suspect NuScratch running on a current Cog VM will actually be many times faster than Scratch 3. I don't bother much with it (Scratch 3) but I've had quite a few messages from people that prefer NuScratch for speed and reliability. There are downsides though, of course. The main one is that recent tutorials will be Scratch3 based and may be confusing because of that. Another is that MIT turned off support for original-Scratch projects on their scratch.mit.edu website/forum and so you won't be able to share projects that way.



tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Decafalon (n.): The grueling event of getting through the day consuming only things that are good for you.


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] SqueakJS for Scratch (was: Questions on scratchJS:

stefano federici
In reply to this post by stefano federici
 
Thanks a lot Bert! Everything worked as you described. It worked well in my "local" version too (that is the "run" page that I downloaded to my PC).

It would be very usefulif, when dragging the scratch.image to the box in the "run" page, Scratch would open in a new TAB. Is this an easy modification of the "run" page? Sorry if I ask you, I'm not an HTML/JS expert.

Cheers
Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il lunedì 10 febbraio 2020, 00:29:58 CET, Bert Freudenberg <[hidden email]> ha scritto:


Hi Stefano,

it is possible to export your project to your hard disk:

2. Inside Scratch, click "Save" as you normally would, give it a name. I just did that and named mine "test".
3. go to https://squeak.js.org/run/ and scroll down inside the file box: 
image.png
4. click the "/Scratch/Scratch Projects/test.sb" link to download the project file.


To import an older project you simply drag-and-drop it into ScratchJS. Or drop it into the "run" page and then use Scratch's file dialog - you just need to navigate up to the right folder (Click "Computer" then "SqueakJS"):

image.png

When I just tested this it said the file was corrupted, not sure if that is a general problem or not. 
Someone should investigate - to get to the Morphic desktop, shift-click the loop in the R of the SCRATCH logo:

image.png

Feel free to file bug reports / feature requests at https://github.com/bertfreudenberg/SqueakJS/issues/

It would be relatively simple to make a proper stand-alone app out of this by packaging it via Electron, and using the actual file system instead of the in-browser file system. I just do not have the time for that currently.

Cheers!

- Bert -

On Sun, Feb 9, 2020 at  7:32 AM David T. Lewis <[hidden email]> wrote:
Hi Stefano,

I think that your understanding is correct. SqueakJS stores files
in an internal database, so the Scratch files that you saved do not
appear directly on your PC.

I do not know if it possible to copy those files to the file system
on your PC, but hopefully someone on the squeak-dev mailing list will
have an answer.

Thanks for asking,
Dave


On Sun, Feb 09, 2020 at 09:51:25AM +0000, stefano federici wrote:


>  >> you want to understand where the Scratch files are stored on your PC.
> > Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people
>
> UPDATE: I created and saved a project in the "SqueakJS" folder (the one shown in ScratchJS) and I made a full search in my PC. The file was not found. So, I guess projects are just saved in an internal SqueakJS DB? If it is so, this makes unfortunately ScratchJS useless for my purposes. And I have no sufficient javascript/smalltalk knowledge to try myself to change this behaviour (that I guess would possible in principle, as a lot of JS apps allow to save file locally).
>
> Cheers
> Stefano
>
> > I am also CC'ing the squeak-dev mailing list where some of the real Scratch and SqueakJS experts reside.
>
> Thanks a lot Dave
>
> > I think that you are asking about running Scratch on Bert Freudenberg's SqueakJS, which is a modern Squeak virtual machine implemented entirely in JavaScript for HML5
>
> Correct
>
> > If I understand your question correctly, you are asking about how to run Scratch on SqueakJS locally on your PC
>
> Yes. I partially solved the problem by downloading page https://squeak.js.org/run/ and by dragging my Scratch.image file into the page. ScratchJS runs apparently fine. I also partially solved the problem of running local files, by dragging the Scratch projects on the Scratch app running in SqueakJS
>
> > you want to understand where the Scratch files are stored on your PC.
>
> Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people
>
> Thanks for your help
>
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici
> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113
>
> Il domenica 9 febbraio 2020, 04:05:38 CET, David T. Lewis <[hidden email]> ha scritto:
>
>
>
> Hi Stefano,
>
> I am changing the subject line to "SqueakJS for Scratch" because google
> sends me somewhere else for "ScratchJS".
>
> I think that you are asking about running Scratch on Bert Freudenberg's
> SqueakJS, which is a modern Squeak virtual machine implemented entirely
> in JavaScript for HML5, rather than the traditional compiled virtual
> machines that run on operating systems such as Linux and Windows.
>
> If I understand your question correctly, you are asking about how to
> run Scratch on SqueakJS locally on your PC, and you want to understand
> where the Scratch files are stored on your PC.
>
> I do not have good answers to your questions but I am sure that others
> on this list can help. I am also CC'ing the squeak-dev mailing list
> where some of the real Scratch and SqueakJS experts reside.
>
> Here are some useful links for SqueakJS information:
>
> ?? https://squeak.js.org/
> ?? http://try.squeak.org/
> ?? https://github.com/bertfreudenberg/SqueakJS
>
> And for Scratch:
>
> ?? https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/
> ?? https://www.raspberrypi.org/blog/test-tims-nuscratch-beta/
> ?? https://github.com/raspberrypi/scratch
>
> Dave
>
>
> On Sun, Feb 09, 2020 at 01:01:57AM +0000, stefano federici wrote:
> >??
> >?? I managed running ScratchJS locally by saving the page https://squeak.js.org/run/ to my PC and the dragging my Scratch.image into the page.
> >
> > What I don't know is where the SqueakJS file system is stored. When I open the File>Open dialog I can see the SqueakJS and ScratchProjects folders. Where are they stored in my PC?
> >
> > Thanks in advance
> >
> > Stefano Federici
> > -------------------------------------------------
> > Universit?? degli Studi di Cagliari
> > Facolt?? di Studi Umanistici
> > Dipartimento di Pedagogia, Psicologia e Filosofia
> > Via Is Mirrionis 1, 09123 Cagliari, Italia
> > -------------------------------------------------
> > Tel: +39 349 818 1955 Fax: +39 070 675 7113
> >
> >?? ?? ?? Il venerd?? 7 febbraio 2020, 21:39:50 CET, stefano federici <[hidden email]> ha scritto:??
> >??
> >?? Dear All,
> > I have two questions about ScratchJS (that I think is an awesome project):
> > - is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
> > - can I open local projects in ScratchJS?
> >
> > Thanks in advance for your help
> >
> > Regards
> > Stefano Federici
> > -------------------------------------------------
> > Universit?? degli Studi di Cagliari
> > Facolt?? di Studi Umanistici
>
> > Dipartimento di Pedagogia, Psicologia e Filosofia
> > Via Is Mirrionis 1, 09123 Cagliari, Italia
> > -------------------------------------------------
> > Tel: +39 349 818 1955 Fax: +39 070 675 7113?? 

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] SqueakJS for Scratch (was: Questions on scratchJS:

stefano federici
 
I just noticed that, whereas Scratch manages quite well projects whose size is more than 250MBs, it seems that ScratchJS cannot load projects bigger than 20MBs. Is this a limitation that can be overcome? I'm very interested to it as my students are developping multimedia projects that require a lot of memory.

Cheers
Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il martedì 11 febbraio 2020, 09:57:55 CET, stefano federici <[hidden email]> ha scritto:


Thanks a lot Bert! Everything worked as you described. It worked well in my "local" version too (that is the "run" page that I downloaded to my PC).

It would be very usefulif, when dragging the scratch.image to the box in the "run" page, Scratch would open in a new TAB. Is this an easy modification of the "run" page? Sorry if I ask you, I'm not an HTML/JS expert.

Cheers
Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il lunedì 10 febbraio 2020, 00:29:58 CET, Bert Freudenberg <[hidden email]> ha scritto:


Hi Stefano,

it is possible to export your project to your hard disk:

2. Inside Scratch, click "Save" as you normally would, give it a name. I just did that and named mine "test".
3. go to https://squeak.js.org/run/ and scroll down inside the file box: 
image.png
4. click the "/Scratch/Scratch Projects/test.sb" link to download the project file.


To import an older project you simply drag-and-drop it into ScratchJS. Or drop it into the "run" page and then use Scratch's file dialog - you just need to navigate up to the right folder (Click "Computer" then "SqueakJS"):

image.png

When I just tested this it said the file was corrupted, not sure if that is a general problem or not. 
Someone should investigate - to get to the Morphic desktop, shift-click the loop in the R of the SCRATCH logo:

image.png

Feel free to file bug reports / feature requests at https://github.com/bertfreudenberg/SqueakJS/issues/

It would be relatively simple to make a proper stand-alone app out of this by packaging it via Electron, and using the actual file system instead of the in-browser file system. I just do not have the time for that currently.

Cheers!

- Bert -

On Sun, Feb 9, 2020 at  7:32 AM David T. Lewis <[hidden email]> wrote:
Hi Stefano,

I think that your understanding is correct. SqueakJS stores files
in an internal database, so the Scratch files that you saved do not
appear directly on your PC.

I do not know if it possible to copy those files to the file system
on your PC, but hopefully someone on the squeak-dev mailing list will
have an answer.

Thanks for asking,
Dave


On Sun, Feb 09, 2020 at 09:51:25AM +0000, stefano federici wrote:


>  >> you want to understand where the Scratch files are stored on your PC.
> > Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people
>
> UPDATE: I created and saved a project in the "SqueakJS" folder (the one shown in ScratchJS) and I made a full search in my PC. The file was not found. So, I guess projects are just saved in an internal SqueakJS DB? If it is so, this makes unfortunately ScratchJS useless for my purposes. And I have no sufficient javascript/smalltalk knowledge to try myself to change this behaviour (that I guess would possible in principle, as a lot of JS apps allow to save file locally).
>
> Cheers
> Stefano
>
> > I am also CC'ing the squeak-dev mailing list where some of the real Scratch and SqueakJS experts reside.
>
> Thanks a lot Dave
>
> > I think that you are asking about running Scratch on Bert Freudenberg's SqueakJS, which is a modern Squeak virtual machine implemented entirely in JavaScript for HML5
>
> Correct
>
> > If I understand your question correctly, you are asking about how to run Scratch on SqueakJS locally on your PC
>
> Yes. I partially solved the problem by downloading page https://squeak.js.org/run/ and by dragging my Scratch.image file into the page. ScratchJS runs apparently fine. I also partially solved the problem of running local files, by dragging the Scratch projects on the Scratch app running in SqueakJS
>
> > you want to understand where the Scratch files are stored on your PC.
>
> Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people
>
> Thanks for your help
>
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici
> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113
>
> Il domenica 9 febbraio 2020, 04:05:38 CET, David T. Lewis <[hidden email]> ha scritto:
>
>
>
> Hi Stefano,
>
> I am changing the subject line to "SqueakJS for Scratch" because google
> sends me somewhere else for "ScratchJS".
>
> I think that you are asking about running Scratch on Bert Freudenberg's
> SqueakJS, which is a modern Squeak virtual machine implemented entirely
> in JavaScript for HML5, rather than the traditional compiled virtual
> machines that run on operating systems such as Linux and Windows.
>
> If I understand your question correctly, you are asking about how to
> run Scratch on SqueakJS locally on your PC, and you want to understand
> where the Scratch files are stored on your PC.
>
> I do not have good answers to your questions but I am sure that others
> on this list can help. I am also CC'ing the squeak-dev mailing list
> where some of the real Scratch and SqueakJS experts reside.
>
> Here are some useful links for SqueakJS information:
>
> ?? https://squeak.js.org/
> ?? http://try.squeak.org/
> ?? https://github.com/bertfreudenberg/SqueakJS
>
> And for Scratch:
>
> ?? https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/
> ?? https://www.raspberrypi.org/blog/test-tims-nuscratch-beta/
> ?? https://github.com/raspberrypi/scratch
>
> Dave
>
>
> On Sun, Feb 09, 2020 at 01:01:57AM +0000, stefano federici wrote:
> >??
> >?? I managed running ScratchJS locally by saving the page https://squeak.js.org/run/ to my PC and the dragging my Scratch.image into the page.
> >
> > What I don't know is where the SqueakJS file system is stored. When I open the File>Open dialog I can see the SqueakJS and ScratchProjects folders. Where are they stored in my PC?
> >
> > Thanks in advance
> >
> > Stefano Federici
> > -------------------------------------------------
> > Universit?? degli Studi di Cagliari
> > Facolt?? di Studi Umanistici
> > Dipartimento di Pedagogia, Psicologia e Filosofia
> > Via Is Mirrionis 1, 09123 Cagliari, Italia
> > -------------------------------------------------
> > Tel: +39 349 818 1955 Fax: +39 070 675 7113
> >
> >?? ?? ?? Il venerd?? 7 febbraio 2020, 21:39:50 CET, stefano federici <[hidden email]> ha scritto:??
> >??
> >?? Dear All,
> > I have two questions about ScratchJS (that I think is an awesome project):
> > - is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
> > - can I open local projects in ScratchJS?
> >
> > Thanks in advance for your help
> >
> > Regards
> > Stefano Federici
> > -------------------------------------------------
> > Universit?? degli Studi di Cagliari
> > Facolt?? di Studi Umanistici
>
> > Dipartimento di Pedagogia, Psicologia e Filosofia
> > Via Is Mirrionis 1, 09123 Cagliari, Italia
> > -------------------------------------------------
> > Tel: +39 349 818 1955 Fax: +39 070 675 7113?? 

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] SqueakJS for Scratch (was: Questions on scratchJS:

stefano federici
 
Thanks a lot Bert! I was able to open a 225MB project and run it without any problem. Opening it took a while, but... it worked :) Working with the scripts is a different matter, but, if you are not in a hurry, it works too.

Cheers
Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il martedì 11 febbraio 2020, 23:43:21 CET, Bert Freudenberg <[hidden email]> ha scritto:


Glad you got it working, Stefano!

The SqueakJS VM currently has an artificial limit of 100 MB. This is not an actual limit, but just there to prevent bugs from filling up all the memory. 

There is a line "this.totalMemory = 100000000;" in the JS file somewhere. You could try appending another 0 to that and see if it works.

- Bert -


On Tue, Feb 11, 2020 at 1:20 AM stefano federici <[hidden email]> wrote:
I just noticed that, whereas Scratch manages quite well projects whose size is more than 250MBs, it seems that ScratchJS cannot load projects bigger than 20MBs. Is this a limitation that can be overcome? I'm very interested to it as my students are developping multimedia projects that require a lot of memory.

Cheers
Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il martedì 11 febbraio 2020, 09:57:55 CET, stefano federici <[hidden email]> ha scritto:


Thanks a lot Bert! Everything worked as you described. It worked well in my "local" version too (that is the "run" page that I downloaded to my PC).

It would be very usefulif, when dragging the scratch.image to the box in the "run" page, Scratch would open in a new TAB. Is this an easy modification of the "run" page? Sorry if I ask you, I'm not an HTML/JS expert.

Cheers
Stefano


Stefano Federici
-------------------------------------------------
Università degli Studi di Cagliari
Facoltà di Studi Umanistici
Dipartimento di Pedagogia, Psicologia e Filosofia
Via Is Mirrionis 1, 09123 Cagliari, Italia
-------------------------------------------------
Tel: +39 349 818 1955 Fax: +39 070 675 7113

Il lunedì 10 febbraio 2020, 00:29:58 CET, Bert Freudenberg <[hidden email]> ha scritto:


Hi Stefano,

it is possible to export your project to your hard disk:

2. Inside Scratch, click "Save" as you normally would, give it a name. I just did that and named mine "test".
3. go to https://squeak.js.org/run/ and scroll down inside the file box: 
image.png
4. click the "/Scratch/Scratch Projects/test.sb" link to download the project file.


To import an older project you simply drag-and-drop it into ScratchJS. Or drop it into the "run" page and then use Scratch's file dialog - you just need to navigate up to the right folder (Click "Computer" then "SqueakJS"):

image.png

When I just tested this it said the file was corrupted, not sure if that is a general problem or not. 
Someone should investigate - to get to the Morphic desktop, shift-click the loop in the R of the SCRATCH logo:

image.png

Feel free to file bug reports / feature requests at https://github.com/bertfreudenberg/SqueakJS/issues/

It would be relatively simple to make a proper stand-alone app out of this by packaging it via Electron, and using the actual file system instead of the in-browser file system. I just do not have the time for that currently.

Cheers!

- Bert -

On Sun, Feb 9, 2020 at  7:32 AM David T. Lewis <[hidden email]> wrote:
Hi Stefano,

I think that your understanding is correct. SqueakJS stores files
in an internal database, so the Scratch files that you saved do not
appear directly on your PC.

I do not know if it possible to copy those files to the file system
on your PC, but hopefully someone on the squeak-dev mailing list will
have an answer.

Thanks for asking,
Dave


On Sun, Feb 09, 2020 at 09:51:25AM +0000, stefano federici wrote:


>  >> you want to understand where the Scratch files are stored on your PC.
> > Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people
>
> UPDATE: I created and saved a project in the "SqueakJS" folder (the one shown in ScratchJS) and I made a full search in my PC. The file was not found. So, I guess projects are just saved in an internal SqueakJS DB? If it is so, this makes unfortunately ScratchJS useless for my purposes. And I have no sufficient javascript/smalltalk knowledge to try myself to change this behaviour (that I guess would possible in principle, as a lot of JS apps allow to save file locally).
>
> Cheers
> Stefano
>
> > I am also CC'ing the squeak-dev mailing list where some of the real Scratch and SqueakJS experts reside.
>
> Thanks a lot Dave
>
> > I think that you are asking about running Scratch on Bert Freudenberg's SqueakJS, which is a modern Squeak virtual machine implemented entirely in JavaScript for HML5
>
> Correct
>
> > If I understand your question correctly, you are asking about how to run Scratch on SqueakJS locally on your PC
>
> Yes. I partially solved the problem by downloading page https://squeak.js.org/run/ and by dragging my Scratch.image file into the page. ScratchJS runs apparently fine. I also partially solved the problem of running local files, by dragging the Scratch projects on the Scratch app running in SqueakJS
>
> > you want to understand where the Scratch files are stored on your PC.
>
> Correct. So that I can easily open my old Scratch projects and I can send projects that I develop in ScratchJS to other people
>
> Thanks for your help
>
> Stefano Federici
> -------------------------------------------------
> Universit?? degli Studi di Cagliari
> Facolt?? di Studi Umanistici
> Dipartimento di Pedagogia, Psicologia e Filosofia
> Via Is Mirrionis 1, 09123 Cagliari, Italia
> -------------------------------------------------
> Tel: +39 349 818 1955 Fax: +39 070 675 7113
>
> Il domenica 9 febbraio 2020, 04:05:38 CET, David T. Lewis <[hidden email]> ha scritto:
>
>
>
> Hi Stefano,
>
> I am changing the subject line to "SqueakJS for Scratch" because google
> sends me somewhere else for "ScratchJS".
>
> I think that you are asking about running Scratch on Bert Freudenberg's
> SqueakJS, which is a modern Squeak virtual machine implemented entirely
> in JavaScript for HML5, rather than the traditional compiled virtual
> machines that run on operating systems such as Linux and Windows.
>
> If I understand your question correctly, you are asking about how to
> run Scratch on SqueakJS locally on your PC, and you want to understand
> where the Scratch files are stored on your PC.
>
> I do not have good answers to your questions but I am sure that others
> on this list can help. I am also CC'ing the squeak-dev mailing list
> where some of the real Scratch and SqueakJS experts reside.
>
> Here are some useful links for SqueakJS information:
>
> ?? https://squeak.js.org/
> ?? http://try.squeak.org/
> ?? https://github.com/bertfreudenberg/SqueakJS
>
> And for Scratch:
>
> ?? https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/
> ?? https://www.raspberrypi.org/blog/test-tims-nuscratch-beta/
> ?? https://github.com/raspberrypi/scratch
>
> Dave
>
>
> On Sun, Feb 09, 2020 at 01:01:57AM +0000, stefano federici wrote:
> >??
> >?? I managed running ScratchJS locally by saving the page https://squeak.js.org/run/ to my PC and the dragging my Scratch.image into the page.
> >
> > What I don't know is where the SqueakJS file system is stored. When I open the File>Open dialog I can see the SqueakJS and ScratchProjects folders. Where are they stored in my PC?
> >
> > Thanks in advance
> >
> > Stefano Federici
> > -------------------------------------------------
> > Universit?? degli Studi di Cagliari
> > Facolt?? di Studi Umanistici
> > Dipartimento di Pedagogia, Psicologia e Filosofia
> > Via Is Mirrionis 1, 09123 Cagliari, Italia
> > -------------------------------------------------
> > Tel: +39 349 818 1955 Fax: +39 070 675 7113
> >
> >?? ?? ?? Il venerd?? 7 febbraio 2020, 21:39:50 CET, stefano federici <[hidden email]> ha scritto:??
> >??
> >?? Dear All,
> > I have two questions about ScratchJS (that I think is an awesome project):
> > - is it possible to run ScratchJS locally? I tried to run index.html in the SqueakJS-master\scratch folder, but I just got a black square in the upper left corner
> > - can I open local projects in ScratchJS?
> >
> > Thanks in advance for your help
> >
> > Regards
> > Stefano Federici
> > -------------------------------------------------
> > Universit?? degli Studi di Cagliari
> > Facolt?? di Studi Umanistici
>
> > Dipartimento di Pedagogia, Psicologia e Filosofia
> > Via Is Mirrionis 1, 09123 Cagliari, Italia
> > -------------------------------------------------
> > Tel: +39 349 818 1955 Fax: +39 070 675 7113??