Hi Stef, On Mar 24, 2013, at 9:14 PM, Stéphane Ducasse <stephane.duca...@inria.fr> wrote:
> > On Mar 24, 2013, at 8:56 PM, jannik.laval <jannik.la...@gmail.com> 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) ] ] ] ] > >