[ANN] Phratch: Scratch on Pharo2.0

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

[ANN] Phratch: Scratch on Pharo2.0

jannik laval
Hi Pharoers,

I am porting Scratch and BYOB on Pharo 2.0. The name of the project is Phratch.
To begin, I took Scat (a port of Scratch on Pharo1.3) and modify it to make it work on Pharo 2.0. For that I integrated FileSystem.
Then, I took BYOB and port it in the project.

I have some bugs, but the main features are working.
The main issue is that it is slow. I will investigate that too.

The goal for me is to use it for teaching software engineering and robotics.
I hope to use Phratch and Pharo 2.0 to create new features.

The project is on SmalltalkHub, and a google code page is available, mainly for reporting issues: https://code.google.com/p/phratch/

To download Phratch, just run this code:

Gofer it
    url: 'http://smalltalkhub.com/mc/JLaval/Phratch/main';
    package: 'ConfigurationOfPhratch';
    load.
(Smalltalk at: #ConfigurationOfPhratch) loadBleedingEdge.

Cheers,
Jannik
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

jannik laval
Hi Serge,

On Mar 24, 2013, at 9:06 PM, Serge Stinckwich <[hidden email]> wrote:

> Hi Jannik,
>
> nice work ! When we start Scat, we have the same idea of using it for
> robotics and integrate alternate version of Scratch.

Thank you

>
> But why fork the Scat effort with another Google project ?

We could merge them.
Just I saw that there is no update on the Scat Google code since 2011, so I create one.
Then, about the files to download, there are some changes inside the skin folder to integrate BYOB.

Cheers,
Jannik

>
> Regards,
>
> On Sun, Mar 24, 2013 at 8:56 PM, jannik.laval <[hidden email]> wrote:
>> Hi Pharoers,
>>
>> I am porting Scratch and BYOB on Pharo 2.0. The name of the project is Phratch.
>> To begin, I took Scat (a port of Scratch on Pharo1.3) and modify it to make it work on Pharo 2.0. For that I integrated FileSystem.
>> Then, I took BYOB and port it in the project.
>>
>> I have some bugs, but the main features are working.
>> The main issue is that it is slow. I will investigate that too.
>>
>> The goal for me is to use it for teaching software engineering and robotics.
>> I hope to use Phratch and Pharo 2.0 to create new features.
>>
>> The project is on SmalltalkHub, and a google code page is available, mainly for reporting issues: https://code.google.com/p/phratch/
>>
>> To download Phratch, just run this code:
>>
>> Gofer it
>>    url: 'http://smalltalkhub.com/mc/JLaval/Phratch/main';
>>    package: 'ConfigurationOfPhratch';
>>    load.
>> (Smalltalk at: #ConfigurationOfPhratch) loadBleedingEdge.
>>
>> Cheers,
>> Jannik
>
>
>
> --
> Serge Stinckwich
> UCBN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://doesnotunderstand.org/
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Phratch: Scratch on Pharo2.0

Stéphane Ducasse
In reply to this post by jannik laval

On Mar 24, 2013, at 8:56 PM, jannik.laval <[hidden email]> wrote:

> Hi Pharoers,
>
> I am porting Scratch and BYOB on Pharo 2.0. The name of the project is Phratch.
> To begin, I took Scat (a port of Scratch on Pharo1.3) and modify it to make it work on Pharo 2.0. For that I integrated FileSystem.
> Then, I took BYOB and port it in the project.

Excellent!

> I have some bugs, but the main features are working.
> The main issue is that it is slow. I will investigate that too.
>
> The goal for me is to use it for teaching software engineering and robotics.
> I hope to use Phratch and Pharo 2.0 to create new features.
>
> The project is on SmalltalkHub, and a google code page is available, mainly for reporting issues: https://code.google.com/p/phratch/
>
> To download Phratch, just run this code:
>
> Gofer it
>    url: 'http://smalltalkhub.com/mc/JLaval/Phratch/main';
>    package: 'ConfigurationOfPhratch';
>    load.
> (Smalltalk at: #ConfigurationOfPhratch) loadBleedingEdge.

I loaded it using the pharo20 one click.
But it does not work. Apparently got blocked in WeakSet something.
Loading NScratch….

I reloaded. And it seems ok.

How do we open Scratch?

Stef

Esteban it got blocked in this method.

initialize: aString
        "We fill RPackageSet with a collection of matching RPackage.
         Since this is accessed a lot of times, we optimized the code for speed on resolution, and now
        we have what you see.  
        This code should be something like this:
       
        packageName := aString.
        packages := RPackageOrganizer default packages
                select: [ :each | each name = packageName or: [ each name beginsWith: packageName, '-' ] ]
       
        sadly, that's incredible slow, so, we changed.
        BEWARE: Don't change this code without paying attention to speed.
        "
        | size separatorIndex first |
       
        self initialize.
               
        packageName := aString asSymbol.
        size := packageName size.
        first := packageName at: 1.
        separatorIndex := size + 1.
        packages := RPackage organizer packages
                select: [ :each | | eachSize |
                        eachSize := each name size.
                        (size == eachSize and: [ packageName == each name ])
                                or: [
                                        eachSize > size
                                                and: [
                                                        (((each name at: separatorIndex) == $-)
                                                        and: [ (each name at: 1) == first ])
                                                        and: [ (each name beginsWith: packageName) ] ] ] ]


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

jannik laval
In reply to this post by jannik laval
Interesting !
I will see that.

Who is active on this project ?
Should it work on Pharo2.0 ?

I am interesting if we can merge efforts.

Cheers,
Jannik

On Mar 24, 2013, at 9:09 PM, Serge Stinckwich <[hidden email]> wrote:

> BTW, Scat SmalltalkHub repository is here:
>
> http://smalltalkhub.com/#!/~bromagosa/Scat
>
> Regards,
>
> On Sun, Mar 24, 2013 at 9:06 PM, Serge Stinckwich
> <[hidden email]> wrote:
>> Hi Jannik,
>>
>> nice work ! When we start Scat, we have the same idea of using it for
>> robotics and integrate alternate version of Scratch.
>>
>> But why fork the Scat effort with another Google project ?
>>
>> Regards,
>>
>> On Sun, Mar 24, 2013 at 8:56 PM, jannik.laval <[hidden email]> wrote:
>>> Hi Pharoers,
>>>
>>> I am porting Scratch and BYOB on Pharo 2.0. The name of the project is Phratch.
>>> To begin, I took Scat (a port of Scratch on Pharo1.3) and modify it to make it work on Pharo 2.0. For that I integrated FileSystem.
>>> Then, I took BYOB and port it in the project.
>>>
>>> I have some bugs, but the main features are working.
>>> The main issue is that it is slow. I will investigate that too.
>>>
>>> The goal for me is to use it for teaching software engineering and robotics.
>>> I hope to use Phratch and Pharo 2.0 to create new features.
>>>
>>> The project is on SmalltalkHub, and a google code page is available, mainly for reporting issues: https://code.google.com/p/phratch/
>>>
>>> To download Phratch, just run this code:
>>>
>>> Gofer it
>>>    url: 'http://smalltalkhub.com/mc/JLaval/Phratch/main';
>>>    package: 'ConfigurationOfPhratch';
>>>    load.
>>> (Smalltalk at: #ConfigurationOfPhratch) loadBleedingEdge.
>>>
>>> Cheers,
>>> Jannik
>>
>>
>>
>> --
>> Serge Stinckwich
>> UCBN & UMI UMMISCO 209 (IRD/UPMC)
>> Every DSL ends up being Smalltalk
>> http://doesnotunderstand.org/
>
>
>
> --
> Serge Stinckwich
> UCBN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://doesnotunderstand.org/
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

jannik laval
In reply to this post by Stéphane Ducasse
Hi Stef,

On Mar 24, 2013, at 9:14 PM, Stéphane Ducasse <[hidden email]> wrote:

>
> On Mar 24, 2013, at 8:56 PM, jannik.laval <[hidden email]> wrote:
>
>> Hi Pharoers,
>>
>> I am porting Scratch and BYOB on Pharo 2.0. The name of the project is Phratch.
>> To begin, I took Scat (a port of Scratch on Pharo1.3) and modify it to make it work on Pharo 2.0. For that I integrated FileSystem.
>> Then, I took BYOB and port it in the project.
>
> Excellent!
>
>> I have some bugs, but the main features are working.
>> The main issue is that it is slow. I will investigate that too.
>>
>> The goal for me is to use it for teaching software engineering and robotics.
>> I hope to use Phratch and Pharo 2.0 to create new features.
>>
>> The project is on SmalltalkHub, and a google code page is available, mainly for reporting issues: https://code.google.com/p/phratch/
>>
>> To download Phratch, just run this code:
>>
>> Gofer it
>>   url: 'http://smalltalkhub.com/mc/JLaval/Phratch/main';
>>   package: 'ConfigurationOfPhratch';
>>   load.
>> (Smalltalk at: #ConfigurationOfPhratch) loadBleedingEdge.
>
> I loaded it using the pharo20 one click.
> But it does not work. Apparently got blocked in WeakSet something.
> Loading NScratch….

Strange, it works for me...

>
> I reloaded. And it seems ok.
>
> How do we open Scratch?

When the load is finished, a workspace is opened with this line:
ScratchFrameMorph open

Cheers,
Jannik

>
> Stef
>
> Esteban it got blocked in this method.
>
> initialize: aString
> "We fill RPackageSet with a collection of matching RPackage.
> Since this is accessed a lot of times, we optimized the code for speed on resolution, and now
> we have what you see.  
> This code should be something like this:
>
> packageName := aString.
> packages := RPackageOrganizer default packages
> select: [ :each | each name = packageName or: [ each name beginsWith: packageName, '-' ] ]
>
> sadly, that's incredible slow, so, we changed.
> BEWARE: Don't change this code without paying attention to speed.
> "
> | size separatorIndex first |
>
> self initialize.
>
> packageName := aString asSymbol.
> size := packageName size.
> first := packageName at: 1.
> separatorIndex := size + 1.
> packages := RPackage organizer packages
> select: [ :each | | eachSize |
> eachSize := each name size.
> (size == eachSize and: [ packageName == each name ])
> or: [
> eachSize > size
> and: [
> (((each name at: separatorIndex) == $-)
> and: [ (each name at: 1) == first ])
> and: [ (each name beginsWith: packageName) ] ] ] ]
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

stephane ducasse
In reply to this post by jannik laval
Hi Jannik and Bernat

I was wondering if it is necessary to keep the CCodeGenerator and Primitives-Plugins inside the system.
In addition may be this code is really outdated so may be packaging it in a separate package for archival
would make sense.

I'm surprised that so many classes do not have class comments :).
BTW pay attention that
        - PhratchPreferences has the same disease that the old Preferences class (RIP).
       
        - SensorBoardMorph open  in the class comment -> DNU

        - (PaintCanvas new brushCursorSize: 21 color: Color yellow) display -> DNU
In fact this code is quite scary…. :)


Jannik what is the different between byob and Scratch.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

stephane ducasse
In reply to this post by jannik laval
>
> ScratchFrameMorph open

It does not work

 Path / 'Users' / 'ducasse' / 'Workspace' / 'FirstCircle' / 'ActiveResearch' / 'Pharo' / 'PharoHarvestingFixes' / '20' / 'Released' / 'ScratchSkin'

not found.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

jannik laval
In reply to this post by stephane ducasse

On Mar 24, 2013, at 9:34 PM, stephane ducasse <[hidden email]> wrote:

Hi Jannik and Bernat

I was wondering if it is necessary to keep the CCodeGenerator and Primitives-Plugins inside the system.
In addition may be this code is really outdated so may be packaging it in a separate package for archival
would make sense.

I'm surprised that so many classes do not have class comments :).
BTW pay attention that
- PhratchPreferences has the same disease that the old Preferences class (RIP).

Yes, I just did it expecting remove it soon.


- SensorBoardMorph open  in the class comment -> DNU

- (PaintCanvas new brushCursorSize: 21 color: Color yellow) display -> DNU
In fact this code is quite scary…. :)

Thanks for the report


Jannik what is the different between byob and Scratch.

byob allows one to build its own block (http://byob.berkeley.edu/#download)
Go to Variable categorie: there is a "new block" button.

It does not work for now: It works only on my machine, I have to commit the code.

Jannik

Stef

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

jannik laval
In reply to this post by stephane ducasse
Strange, the repository should be downloaded at the installation.

Jannik

On Mar 24, 2013, at 9:35 PM, stephane ducasse <[hidden email]> wrote:

>>
>> ScratchFrameMorph open
>
> It does not work
>
> Path / 'Users' / 'ducasse' / 'Workspace' / 'FirstCircle' / 'ActiveResearch' / 'Pharo' / 'PharoHarvestingFixes' / '20' / 'Released' / 'ScratchSkin'
>
> not found.
>
> Stef


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

Bernat Romagosa
Jannik, you should write to the Scat list. Joan and I kind of gave up about two years ago but there has been some new people (Irfan khan, Dave Mason, ...) contributing a bit to the project. These were our last news right before giving up: https://code.google.com/p/scat/wiki/PublicRelease

By the way, the source code was also moved to stHub: http://smalltalkhub.com/#!/~bromagosa/Scat, I've just added you as a contributor.

Cheers,

Bernat.


2013/3/24 jannik.laval <[hidden email]>
Strange, the repository should be downloaded at the installation.

Jannik

On Mar 24, 2013, at 9:35 PM, stephane ducasse <[hidden email]> wrote:

>>
>> ScratchFrameMorph open
>
> It does not work
>
> Path / 'Users' / 'ducasse' / 'Workspace' / 'FirstCircle' / 'ActiveResearch' / 'Pharo' / 'PharoHarvestingFixes' / '20' / 'Released' / 'ScratchSkin'
>
> not found.
>
> Stef





--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

Alain Busser
In reply to this post by jannik laval
As I have seen, BYOB allows to build objects (hence its name) and program with objets. It is a functional language and allows recursivity.

But its creator is porting it to JavaScript, under the name of "snap!" (if it is to find it easier with Google he may have surprises :-D). It is possible to beta-test it online, and I found it veeeeeryyyyyyy  slow! So having a Scratch-like which would run on all the platforms and not too slowly, would be great (if only, because a tablet don't have a keyboard and it is easier to program "à la Scratch" when you don't have a real keyboard).

By the way, Scratch is being ported to flash (instead of Squeak). If anyone understands why I would appreciate to know; I don't understand  the logics...

Alain

On Mon, Mar 25, 2013 at 12:39 AM, jannik.laval <[hidden email]> wrote:

On Mar 24, 2013, at 9:34 PM, stephane ducasse <[hidden email]> wrote:

Hi Jannik and Bernat

I was wondering if it is necessary to keep the CCodeGenerator and Primitives-Plugins inside the system.
In addition may be this code is really outdated so may be packaging it in a separate package for archival
would make sense.

I'm surprised that so many classes do not have class comments :).
BTW pay attention that
- PhratchPreferences has the same disease that the old Preferences class (RIP).

Yes, I just did it expecting remove it soon.


- SensorBoardMorph open  in the class comment -> DNU

- (PaintCanvas new brushCursorSize: 21 color: Color yellow) display -> DNU
In fact this code is quite scary…. :)

Thanks for the report



Jannik what is the different between byob and Scratch.

byob allows one to build its own block (http://byob.berkeley.edu/#download)
Go to Variable categorie: there is a "new block" button.

It does not work for now: It works only on my machine, I have to commit the code.

Jannik

Stef


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

jannik laval
In reply to this post by Bernat Romagosa
Hi,

I just merge your last changes with Phratch source-code.
I think you shoud try Phratch and see the bug tracker of Phratch, because I added some.

What I did in Phratch, is that it does not break the Pharo image. There is no other modifications than in the package of Phratch.
I saw that Scat modify Morphic and Graphics to add some instance variables, that I don't have in Phratch.

I saw also your bug-tracker and I resolved some issues: PNG transparency, Camera images, and a part of GIF import.

What is the Scat mailing list ? Like that I can communicate directly with the team.

Cheers,
Jannik

2013/3/25 Bernat Romagosa <[hidden email]>
Jannik, you should write to the Scat list. Joan and I kind of gave up about two years ago but there has been some new people (Irfan khan, Dave Mason, ...) contributing a bit to the project. These were our last news right before giving up: https://code.google.com/p/scat/wiki/PublicRelease

By the way, the source code was also moved to stHub: http://smalltalkhub.com/#!/~bromagosa/Scat, I've just added you as a contributor.

Cheers,

Bernat.


2013/3/24 jannik.laval <[hidden email]>

Strange, the repository should be downloaded at the installation.

Jannik

On Mar 24, 2013, at 9:35 PM, stephane ducasse <[hidden email]> wrote:

>>
>> ScratchFrameMorph open
>
> It does not work
>
> Path / 'Users' / 'ducasse' / 'Workspace' / 'FirstCircle' / 'ActiveResearch' / 'Pharo' / 'PharoHarvestingFixes' / '20' / 'Released' / 'ScratchSkin'
>
> not found.
>
> Stef





--
Bernat Romagosa.



--

~~Dr. Jannik Laval~~
École des Mines de Douai
Enseignant-chercheur
http://www.jannik-laval.eu

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

Sven Van Caekenberghe-2

On 25 Mar 2013, at 13:50, jannik laval <[hidden email]> wrote:

> What I did in Phratch, is that it does not break the Pharo image. There is no other modifications than in the package of Phratch.
> I saw that Scat modify Morphic and Graphics to add some instance variables, that I don't have in Phratch.

;-)

Great!
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

jannik laval
In reply to this post by Alain Busser
Yes, I saw all these work.
Now, I prefer to have it on Pharo to make my own work on it.

I just commited a new source with BYOB partly working: You can build your block, but the right-click menu does not work to remove blocks, duplicate... 
I hope to fix that soon.

Cheers,
Jannik

2013/3/25 Alain Busser <[hidden email]>
As I have seen, BYOB allows to build objects (hence its name) and program with objets. It is a functional language and allows recursivity.

But its creator is porting it to JavaScript, under the name of "snap!" (if it is to find it easier with Google he may have surprises :-D). It is possible to beta-test it online, and I found it veeeeeryyyyyyy  slow! So having a Scratch-like which would run on all the platforms and not too slowly, would be great (if only, because a tablet don't have a keyboard and it is easier to program "à la Scratch" when you don't have a real keyboard).

By the way, Scratch is being ported to flash (instead of Squeak). If anyone understands why I would appreciate to know; I don't understand  the logics...

Alain


On Mon, Mar 25, 2013 at 12:39 AM, jannik.laval <[hidden email]> wrote:

On Mar 24, 2013, at 9:34 PM, stephane ducasse <[hidden email]> wrote:

Hi Jannik and Bernat

I was wondering if it is necessary to keep the CCodeGenerator and Primitives-Plugins inside the system.
In addition may be this code is really outdated so may be packaging it in a separate package for archival
would make sense.

I'm surprised that so many classes do not have class comments :).
BTW pay attention that
- PhratchPreferences has the same disease that the old Preferences class (RIP).

Yes, I just did it expecting remove it soon.


- SensorBoardMorph open  in the class comment -> DNU

- (PaintCanvas new brushCursorSize: 21 color: Color yellow) display -> DNU
In fact this code is quite scary…. :)

Thanks for the report



Jannik what is the different between byob and Scratch.

byob allows one to build its own block (http://byob.berkeley.edu/#download)
Go to Variable categorie: there is a "new block" button.

It does not work for now: It works only on my machine, I have to commit the code.

Jannik

Stef





--

~~Dr. Jannik Laval~~
École des Mines de Douai
Enseignant-chercheur
http://www.jannik-laval.eu

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] [ANN] Phratch: Scratch on Pharo2.0

Bernat Romagosa
In reply to this post by jannik laval
Hi Jannik,

Great! Thanks for taking this project further on, maybe someday we'll finally have a working Scratch on Pharo... :)

The mail list is [hidden email].

Cheers!

Bernat.


2013/3/25 jannik laval <[hidden email]>
Hi,

I just merge your last changes with Phratch source-code.
I think you shoud try Phratch and see the bug tracker of Phratch, because I added some.

What I did in Phratch, is that it does not break the Pharo image. There is no other modifications than in the package of Phratch.
I saw that Scat modify Morphic and Graphics to add some instance variables, that I don't have in Phratch.

I saw also your bug-tracker and I resolved some issues: PNG transparency, Camera images, and a part of GIF import.

What is the Scat mailing list ? Like that I can communicate directly with the team.

Cheers,
Jannik


2013/3/25 Bernat Romagosa <[hidden email]>
Jannik, you should write to the Scat list. Joan and I kind of gave up about two years ago but there has been some new people (Irfan khan, Dave Mason, ...) contributing a bit to the project. These were our last news right before giving up: https://code.google.com/p/scat/wiki/PublicRelease

By the way, the source code was also moved to stHub: http://smalltalkhub.com/#!/~bromagosa/Scat, I've just added you as a contributor.

Cheers,

Bernat.


2013/3/24 jannik.laval <[hidden email]>

Strange, the repository should be downloaded at the installation.

Jannik

On Mar 24, 2013, at 9:35 PM, stephane ducasse <[hidden email]> wrote:

>>
>> ScratchFrameMorph open
>
> It does not work
>
> Path / 'Users' / 'ducasse' / 'Workspace' / 'FirstCircle' / 'ActiveResearch' / 'Pharo' / 'PharoHarvestingFixes' / '20' / 'Released' / 'ScratchSkin'
>
> not found.
>
> Stef





--
Bernat Romagosa.



--

~~Dr. Jannik Laval~~
École des Mines de Douai
Enseignant-chercheur
http://www.jannik-laval.eu




--
Bernat Romagosa.