Re: [Pharo-users] [ANN] ArchLinux pharo-vm / pharo-launcher packages

2014-03-19 Thread Laurent Laffont
Le mercredi 19 mars 2014, 15:05:56 Damien Cassou a écrit :
> On Tue, Mar 18, 2014 at 10:40 PM, Laurent Laffont
>  wrote:
> > you can now install pharo vm on Arch with:
> 
> 
> that's brilliant. Thanks. Can I reference your work in
> http://www.smalltalkhub.com/#!/~Pharo/PharoLauncher ?

Sure !

Laurent


> 
> 




Re: [Pharo-users] What's wrong with this code?

2014-03-19 Thread Ben Coman




Friedrich Dominicus wrote:

  Bernat Romagosa  writes:

  
  
ouch, I added a . in the middle, sorry!

elements := #('eins' 'zwei' 'drei' 'vier').
elements
do: [ :element | (Delay forSeconds: 2) wait ]
displayingProgress: [ :element | 'Working on', element asString ].

2014-03-18 9:55 GMT+01:00 Bernat Romagosa
:

Without having tried it, I think you're missing a #wait message in
there:



elements := #('eins' 'zwei' 'drei' 'vier').
elements do: [ :element | (Delay forSeconds: 2) wait ].

displayingProgress: [ :element | 'Working on', element asString ].

  
  Sorry even with that I do not see the 'Working on ' message.
It's just a progress bar with nothing else. No "Working on" anywhere.

Regards
Friedrich


  


I'm not sure what the expected result is, but if you debug/step into
that code a few times you find yourself in...
    Array(Collection)>>do:displayingProgress:every:

Looking at _expression_...
 aStringOrBlock isString
I guessed something might be learnt from stepping through...
    elements := #('eins' 'zwei' 'drei' 'vier').
    elements do: [ :element | (Delay forSeconds: 2) wait ]
displayingProgress: 'MyProgress'
and indeed progress bar text is updated by the line...
    bar label: aStringOrBlock.

Now stepping through your original script, #label: never seems to be
executed 
So replacing...
    [ProgressNotification signal: '' extra: (oldLabel := newLabel)]
with...
    [   bar label: newLabel.    
        ProgressNotification signal: '' extra: (oldLabel := newLabel).
    ].
seems to do the trick, although as I said before, I don't know what the
expected behaviour is.  Is that what you need?

I've not looked at this code before so I've learnt something new today.
In particular, for a while I was wondering purpose ProgressNotification
served since tracing through it seemed to do nothing, and then I
realised it might be used something like this...
    elements := #('eins' 'zwei' 'drei' 'vier' ).
    [   elements do: [ :element | (Delay forSeconds: 2) wait ] 
    displayingProgress: [ :element | 'Working on ', element
asString ] 
    ] on: ProgressNotification do: 
    [     :notice | 
          self inform: notice extraParam printString. 
  notice resume 
    ]

I've logged a case
https://pharo.fogbugz.com/f/cases/13101/Progress-bar-progressive-text-update-not-working

cheers -ben





Re: [Pharo-users] Pharo3 Can not decompile anymore?

2014-03-19 Thread Esteban Lorenzano
he… I did not know that checkSourcesFileAvailability: is gone… but there has to 
be an equivalent, check around:

PharoFilesOpener>>#sourcesFileOrNil

Esteban

On 19 Mar 2014, at 18:07, Hilaire Fernandes  wrote:

> And what about #checkSourcesFileAvailability: gone?
> 
> Hilaire
> 
> Le 19/03/2014 17:52, Esteban Lorenzano a écrit :
>> Nope, opal compiler does not decompile… you need the sources and changes 
>> there. 
>> 
>> Esteban
>> 
>> On 19 Mar 2014, at 17:47, Hilaire Fernandes  
>> wrote:
>> 
>>> Hello,
>>> 
>>> In Pharo3 installation, when I remove both the .source and .changes
>>> files (yeah yeah I know), the browser nor the debugger can show me
>>> decompiled method code to give me a Smalltalk representation?
>>> 
>>> Is there an option to get it back?
>>> 
>>> Thanks
>>> 
>>> Hilaire
>>> 
>>> 
>>> -- 
>>> Dr. Geo http://drgeo.eu
>>> 
>>> 
>> 
>> 
>> 
> 
> -- 
> Dr. Geo http://drgeo.eu
> 
> 




Re: [Pharo-users] Pharo3 Can not decompile anymore?

2014-03-19 Thread Esteban Lorenzano
Nope, opal compiler does not decompile… you need the sources and changes there. 

Esteban

On 19 Mar 2014, at 17:47, Hilaire Fernandes  wrote:

> Hello,
> 
> In Pharo3 installation, when I remove both the .source and .changes
> files (yeah yeah I know), the browser nor the debugger can show me
> decompiled method code to give me a Smalltalk representation?
> 
> Is there an option to get it back?
> 
> Thanks
> 
> Hilaire
> 
> 
> -- 
> Dr. Geo http://drgeo.eu
> 
> 




Re: [Pharo-users] Pharo3 Can not decompile anymore?

2014-03-19 Thread Hilaire Fernandes
And what about #checkSourcesFileAvailability: gone?

Hilaire

Le 19/03/2014 17:52, Esteban Lorenzano a écrit :
> Nope, opal compiler does not decompile… you need the sources and changes 
> there. 
> 
> Esteban
> 
> On 19 Mar 2014, at 17:47, Hilaire Fernandes  
> wrote:
> 
>> Hello,
>>
>> In Pharo3 installation, when I remove both the .source and .changes
>> files (yeah yeah I know), the browser nor the debugger can show me
>> decompiled method code to give me a Smalltalk representation?
>>
>> Is there an option to get it back?
>>
>> Thanks
>>
>> Hilaire
>>
>>
>> -- 
>> Dr. Geo http://drgeo.eu
>>
>>
> 
> 
> 

-- 
Dr. Geo http://drgeo.eu




[Pharo-users] Pharo3 Can not decompile anymore?

2014-03-19 Thread Hilaire Fernandes
Hello,

In Pharo3 installation, when I remove both the .source and .changes
files (yeah yeah I know), the browser nor the debugger can show me
decompiled method code to give me a Smalltalk representation?

Is there an option to get it back?

Thanks

Hilaire


-- 
Dr. Geo http://drgeo.eu




Re: [Pharo-users] What's wrong with this code?

2014-03-19 Thread Ben Coman




Ben Coman wrote:

  
Friedrich Dominicus wrote:
  
Bernat Romagosa  writes:

  

  ouch, I added a . in the middle, sorry!

elements := #('eins' 'zwei' 'drei' 'vier').
elements
do: [ :element | (Delay forSeconds: 2) wait ]
displayingProgress: [ :element | 'Working on', element asString ].

2014-03-18 9:55 GMT+01:00 Bernat Romagosa
:

Without having tried it, I think you're missing a #wait message in
there:



elements := #('eins' 'zwei' 'drei' 'vier').
elements do: [ :element | (Delay forSeconds: 2) wait ].

displayingProgress: [ :element | 'Working on', element asString ].


Sorry even with that I do not see the 'Working on ' message.
It's just a progress bar with nothing else. No "Working on" anywhere.

Regards
Friedrich


  
  
  
I'm not sure what the expected result is, but if you debug/step into
that code a few times you find yourself in...
    Array(Collection)>>do:displayingProgress:every:
  
Looking at _expression_...
 aStringOrBlock isString
I guessed something might be learnt from stepping through...
    elements := #('eins' 'zwei' 'drei' 'vier').
    elements do: [ :element | (Delay forSeconds: 2) wait ]
displayingProgress: 'MyProgress'
and indeed progress bar text is updated by the line...
    bar label: aStringOrBlock.
  
Now stepping through your original script, #label: never seems to be
executed 
So replacing...
    [ProgressNotification signal: '' extra: (oldLabel := newLabel)]
with...
    [   bar label: newLabel.    
        ProgressNotification signal: '' extra: (oldLabel := newLabel).
    ].
seems to do the trick, although as I said before, I don't know what the
expected behaviour is.  Is that what you need?
  
I've not looked at this code before so I've learnt something new today.
In particular, for a while I was wondering purpose ProgressNotification
served since tracing through it seemed to do nothing, and then I
realised it might be used something like this...
    elements := #('eins' 'zwei' 'drei' 'vier' ).
    [   elements do: [ :element | (Delay forSeconds: 2) wait ] 
    displayingProgress: [ :element | 'Working on ', element
asString ] 
    ] on: ProgressNotification do: 
    [     :notice | 
          self inform: notice extraParam printString. 
  notice resume 
    ]
  
I've logged a case
  https://pharo.fogbugz.com/f/cases/13101/Progress-bar-progressive-text-update-not-working
  
cheers -ben


Friedrich, Peter, Bernat, 
I've uploaded slice 13101 to the Pharo30Inbox.  Could you review and
comment on the issue tracker whether that is satisfactory.
cheers -ben









Re: [Pharo-users] [Pharo-dev] Tiling Window Manager in 3.0: working but still issues with WorldMorph

2014-03-19 Thread p...@highoctane.be
Would you mind putting the configuration in the 3.0 Metarepo?

Phil




On Wed, Mar 12, 2014 at 6:52 PM, Laurent Laffont
wrote:

> Hi Phil,
>
> with latest ConfigurationOfTilingWindow manager World management (almost)
> works. Still a  little display issue when creating a new world (need to
> change back and forth, seems to be some World repaint issue).
>
> I've also merged some experiments with GrowlMorph.
>
> Laurent
>
>
> Le mardi 11 mars 2014, 13:27:57 Laurent Laffont a écrit :
> > Thanks a lot Phil. I will try to have a look.
> >
> > Laurent
> >
> >
> > Le samedi 8 mars 2014, 11:57:30 p...@highoctane.be a écrit :
> > > TWM works in 3.0 after some work on icons and updating menus.
> > >
> > > Gofer new
> > > smalltalkhubUser: 'LaurentLaffont' project: 'TilingWindowManager';
> > > configuration;
> > > load.
> > >
> > > ((Smalltalk at:#ConfigurationOfTilingWindowManager) project version:
> '3.0')
> > > load
> > >
> > > You can also use
> > >
> > > ((Smalltalk at:#ConfigurationOfTilingWindowManager) project version:
> > > #development) load
> > >
> > > but this will for sure change over time.
> > >
> > > There is the World management icon which is still there and it looks
> like
> > > it can create worlds but switching between them just breaks havoc.
> > >
> > > Maybe should we just remove that feature from TWM as 3.0 doesn't seem
> to be
> > > multiworld friendly.
> > >
> > > Nothing done on tests nor themeing (which appears to be not that
> working
> > > well in 3.0 either due to theming changes);
> > >
> > > At least the thing is back :-) [I missed it...]
> > >
> > > Phil
> >
> >
>
>
>


Re: [Pharo-users] What's wrong with this code?

2014-03-19 Thread Nicolai Hess
I think the ProgressNotification was only used in
older pharo version (like 1.4, where this displayProgress: ...
with progress title worked)


2014-03-19 16:46 GMT+01:00 Ben Coman :

>  Friedrich Dominicus wrote:
>
> Bernat Romagosa  
>  writes:
>
>
>
>  ouch, I added a . in the middle, sorry!
>
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements
> do: [ :element | (Delay forSeconds: 2) wait ]
> displayingProgress: [ :element | 'Working on', element asString ].
>
> 2014-03-18 9:55 GMT+01:00 Bernat Romagosa 
> :
>
> Without having tried it, I think you're missing a #wait message in
> there:
>
>
>
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements do: [ :element | (Delay forSeconds: 2) wait ].
>
> displayingProgress: [ :element | 'Working on', element asString ].
>
>
>  Sorry even with that I do not see the 'Working on ' message.
> It's just a progress bar with nothing else. No "Working on" anywhere.
>
> Regards
> Friedrich
>
>
>
>
>
> I'm not sure what the expected result is, but if you debug/step into that
> code a few times you find yourself in...
> Array(Collection)>>do:displayingProgress:every:
>
> Looking at expression...
>  aStringOrBlock isString
> I guessed something might be learnt from stepping through...
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements do: [ :element | (Delay forSeconds: 2) wait ]
> displayingProgress: 'MyProgress'
> and indeed progress bar text is updated by the line...
> bar label: aStringOrBlock.
>
> Now stepping through your original script, #label: never seems to be
> executed
> So replacing...
> [ProgressNotification signal: '' extra: (oldLabel := newLabel)]
> with...
> [   bar label: newLabel.
> ProgressNotification signal: '' extra: (oldLabel := newLabel).
> ].
> seems to do the trick, although as I said before, I don't know what the
> expected behaviour is.  Is that what you need?
>
> I've not looked at this code before so I've learnt something new today. In
> particular, for a while I was wondering purpose ProgressNotification served
> since tracing through it seemed to do nothing, and then I realised it might
> be used something like this...
> elements := #('eins' 'zwei' 'drei' 'vier' ).
> [   elements do: [ :element | (Delay forSeconds: 2) wait ]
> displayingProgress: [ :element | 'Working on ', element asString ]
> ] on: ProgressNotification do:
> [ :notice |
>   self inform: notice extraParam printString.
>   notice resume
> ]
>
> I've logged a case
> https://pharo.fogbugz.com/f/cases/13101/Progress-bar-progressive-text-update-not-working
>
> cheers -ben
>


Re: [Pharo-users] Calculate angle between two vectors (probably @Igor :)

2014-03-19 Thread MartinW
Nicolai Hess wrote
> in testIsInFieldOfVision
> subject has velocity 100@0, I understand this as "moves from left to
> right".
> testobject other2 and other3 are above and below subect, and not behind
> and
> in front, both should be visible with the fieldOfView.

Oh, thank you. I made a new testcase. Which is unfortunately passing :( So i
am still looking for a solution…
 


Nicolai Hess wrote
> Btw. the field of view is rather big, 0.75*Float Pi is 135 degree, but
> clock *and* counterclockwise
> ->  270 degree field of view.

That's correct. Most birds have the eyes on the sides of their heads - thus
they have a wide visual field. Some as wide as 360 degrees.



--
View this message in context: 
http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351p4749824.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Phratch Website + version 3.0 in dev

2014-03-19 Thread jannik laval
2014-03-19 15:34 GMT+01:00 Hilaire Fernandes :

> Great news!
>
> Le 19/03/2014 15:10, jannik laval a écrit :
> > - version 3.0 is the version in development. What is new here: Before
> > this version Phratch was really slow. I am cleaning the code, and now it
> > begins to be fast, really fast ! We also begun to write tests.
>
> I am curious. What did you finally find out for speed up?
>

Hum, some crappy things.
For example, to manage the z-index of the bubble talk:
- a loop to draw all the morph
- a second loop that select the buuble (isKindOf: bubble !!!) and draw only
the bubble.
These two loops are in the same method and called on each step... for a
bubble that appears only 1 or 2 times in an application

Removing the second loop makes Phratch 2x faster.

I am continuing to clean that.
I also find the problem with click-event. Now when I click, it works fine !

Cheers,
Jannik





>
> Hilaire
>
>
> --
> Dr. Geo http://drgeo.eu
>
>
>


-- 

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


Re: [Pharo-users] Phratch Website + version 3.0 in dev

2014-03-19 Thread Hilaire Fernandes
Great news!

Le 19/03/2014 15:10, jannik laval a écrit :
> - version 3.0 is the version in development. What is new here: Before
> this version Phratch was really slow. I am cleaning the code, and now it
> begins to be fast, really fast ! We also begun to write tests.

I am curious. What did you finally find out for speed up?

Hilaire


-- 
Dr. Geo http://drgeo.eu




Re: [Pharo-users] [ANN] ArchLinux pharo-vm / pharo-launcher packages

2014-03-19 Thread Damien Cassou
On Tue, Mar 18, 2014 at 10:40 PM, Laurent Laffont
 wrote:
> you can now install pharo vm on Arch with:


that's brilliant. Thanks. Can I reference your work in
http://www.smalltalkhub.com/#!/~Pharo/PharoLauncher ?

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



[Pharo-users] Phratch Website + version 3.0 in dev

2014-03-19 Thread jannik laval
Dear all,

I am pleased to announce Phratch website: www.phratch.com
Thanks to the support of ESUG, it is possible to make visible this
wonderful project.

For now, what is available on the site:
- a presentation of Phratch (you can refer to it now)
- installation files, there is a portable version for Windows, Linux, MacOS.
- tutorials
- block documentation: generated from a Phratch image !
- Some elements for Jetstorm (a lot of new articles will come soon)
- a category with news

Now about the versions, I am developing the version 3.0
Why this number ? Why a third version in one year of work ?
It is clear that a lot of work is already done. Each version represents
strong changes in the architecture.
- version 1.0 is the port of Scratch + BYOB + Panther in Pharo. It is
working but not extendable.
- version 2.0 makes Phratch really extendable. We can develop our own block
for everything in Pharo. I also make Phratch more modular with the use of
Pragmas for some menus, declaration of blocks... It is available only in
Pharo 3.0. There are some languages available, I hope more people can
translate in other languages (http://www.phratch.com/archives/612).
- version 3.0 is the version in development. What is new here: Before this
version Phratch was really slow. I am cleaning the code, and now it begins
to be fast, really fast ! We also begun to write tests.

I am really happy to have the support of ESUG and Pharo.
Thanks to the community to make Pharo as usable as it it, it makes our
dreams possible.

Cheers,
-- 

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


Re: [Pharo-users] Calculate angle between two vectors (probably @Igor :)

2014-03-19 Thread Igor Stasenko
On 16 March 2014 17:01, MartinW  wrote:

> Hello,
> i probably made some embarassing mistake, but as i cannot find it, i ask
> you
> to have a look at this method.
> It should calculate the angle between two vectors. And vectors are
> instances
> of Point (perhaps here is already a misconception?).
> It is used in my flocking simulation PharoBoids
> (http://smalltalkhub.com/#!/~MartinWalk/Boids)
>
> Here is my version of the method:
>
> angleBetween: vector1 and: vector2 onError: aBlock
> | cosinusOfAngle innerProductOfVectors productOfVectorsLengths|
> innerProductOfVectors := (vector1 dotProduct: vector2).
> productOfVectorsLengths := (vector1 r) * (vector2 r).
> productOfVectorsLengths = 0 ifTrue: [ ^ aBlock value ].
> cosinusOfAngle := innerProductOfVectors / productOfVectorsLengths.
> ^ cosinusOfAngle arcCos
>
>

>
> But my Boids behave wrong when i use it. I found another implementation of
> the same problem by Igor Stasenko which works and looks like this:
>
> angleBetween: p1 and: p2 ifDegenerate: aBlock
> " Calculate an angle (in radians) between two vectors.
> Evaluate a block, in case if calculation not possible because one of the
> vectors has zero length "
>
> | x1 y1 x2 y2 dot2 n2 |
> x1 := p1 x.
> y1 := p1 y.
> x2 := p2 x.
> y2 := p2 y.
>
> dot2 := x1 * x2 + (y1 * y2).
> dot2 := dot2 * dot2.
>
> n2 := (x1*x1 + (y1*y1)) * (x2*x2 + (y2*y2)).
>
> n2 = 0 ifTrue: [ ^ aBlock value ].
>
> ^ (dot2 / n2) arcCos
>
> Can anybody explain the problem of my method? M.
>
>
> yours looks correct.
i'm just using squares to avoid taking square roots of vector lengths.


>
> --
> View this message in context:
> http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


-- 
Best regards,
Igor Stasenko.


Re: [Pharo-users] What's wrong whith this code?

2014-03-19 Thread PBK Research
Well I did some experiments, and I seem to have a solution. In the method
Collection>>do:displayingProgress:every:, you will find (three lines from
the end) the line:
 ifFalse: [ProgressNotification
signal: '' extra: (oldLabel := newLabel)].

If you replace that with:

 ifFalse: [bar label: (oldLabel :=
newLabel)].

you will find that the examples of changing labels will work. I haven't
tested this as thoroughly as I should, so there may be other consequences,
but clearly this is where the problem lies. 

 

Peter Kenny


  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
PBK Research
Sent: 19 March 2014 09:09
To: nicolaih...@web.de; 'Any question about pharo is welcome'
Subject: Re: [Pharo-users] What's wrong whith this code?


Note however that the first example used in the method comment, which
displays a static label, does work. There is something wrong in the method
of computing the changing label in the second example. I can't follow the
code here, so I can't see the error, but it should be clear where to look.
 
Peter Kenny

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Nicolai Hess
Sent: 19 March 2014 08:56
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] What's wrong whith this code?


2014-03-19 8:17 GMT+01:00 Friedrich Dominicus
:


Bernat Romagosa  writes:

> ouch, I added a . in the middle, sorry!
>
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements
> do: [ :element | (Delay forSeconds: 2) wait ]
> displayingProgress: [ :element | 'Working on', element asString ].
>
> 2014-03-18 9:55 GMT+01:00 Bernat Romagosa
> :
>
> Without having tried it, I think you're missing a #wait message in
> there:
>
>
>
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements do: [ :element | (Delay forSeconds: 2) wait ].
>
> displayingProgress: [ :element | 'Working on', element asString ].

Sorry even with that I do not see the 'Working on ' message.
It's just a progress bar with nothing else. No "Working on" anywhere.

Regards
Friedrich





It doesn't work anymore. (This worked in Pharo 1.4)
In the comment of Collection>>do:displayingProgress:
is a example, that doesn't work:
Smalltalk allClasses 
do:[:aClass| (Delay forMilliseconds: 1) wait]
displayingProgress:[:aClass| 'Processing ', aClass name].


This should show the class names but it shows
only a single progressbar.








Re: [Pharo-users] Calculate angle between two vectors (probably @Igor :)

2014-03-19 Thread Nicolai Hess
2014-03-19 8:49 GMT+01:00 MartinW :

> Nicolai Hess wrote
> > This was of course wrong, I don't know what the
> > other method computes, but not the angle between two vectors.
>
> Yes i also wrote a test and i think my method is right.
>
>
> Nicolai Hess wrote
> > Now the question is, why do you think your method is wrong / the boids
> > behave wrong?
>
> When i use my method to calculate the field of vision the Boids always fly
> from top left to down right and if i turn on the circling option, they
> crowd
> in the bottom right quadrant.
> If i give them a 360 degree field of vision by always returning true for
> isInFieldOfVision they behave correctly. This means they fly in a nice
> circle around the center and if circling is turned off, the swarm flies in
> different directions each time you start the simulation.
>
> Perhaps the problem is not the calculation of the angle but is in the
> isInFieldOfVision: method...
>

:) yes and I think the testcases in testIsInFieldOfVision
are wrong, or I misunderstand how the boids are moving.

in testIsInFieldOfVision
subject has velocity 100@0, I understand this as "moves from left to right".
testobject other2 and other3 are above and below subect, and not behind and
in front, both should be visible with the fieldOfView.
Btw. the field of view is rather big, 0.75*Float Pi is 135 degree, but
clock *and* counterclockwise
->  270 degree field of view.


And it is funny to change the field of view to 0, after the boids started.


>
>
>
> --
> View this message in context:
> http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351p4749697.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] What's wrong whith this code?

2014-03-19 Thread PBK Research
Note however that the first example used in the method comment, which
displays a static label, does work. There is something wrong in the method
of computing the changing label in the second example. I can't follow the
code here, so I can't see the error, but it should be clear where to look.
 
Peter Kenny

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Nicolai Hess
Sent: 19 March 2014 08:56
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] What's wrong whith this code?


2014-03-19 8:17 GMT+01:00 Friedrich Dominicus
:


Bernat Romagosa  writes:

> ouch, I added a . in the middle, sorry!
>
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements
> do: [ :element | (Delay forSeconds: 2) wait ]
> displayingProgress: [ :element | 'Working on', element asString ].
>
> 2014-03-18 9:55 GMT+01:00 Bernat Romagosa
> :
>
> Without having tried it, I think you're missing a #wait message in
> there:
>
>
>
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements do: [ :element | (Delay forSeconds: 2) wait ].
>
> displayingProgress: [ :element | 'Working on', element asString ].

Sorry even with that I do not see the 'Working on ' message.
It's just a progress bar with nothing else. No "Working on" anywhere.

Regards
Friedrich





It doesn't work anymore. (This worked in Pharo 1.4)
In the comment of Collection>>do:displayingProgress:
is a example, that doesn't work:
Smalltalk allClasses 
do:[:aClass| (Delay forMilliseconds: 1) wait]
displayingProgress:[:aClass| 'Processing ', aClass name].


This should show the class names but it shows
only a single progressbar.








Re: [Pharo-users] What's wrong whith this code?

2014-03-19 Thread Nicolai Hess
2014-03-19 8:17 GMT+01:00 Friedrich Dominicus :

> Bernat Romagosa  writes:
>
> > ouch, I added a . in the middle, sorry!
> >
> > elements := #('eins' 'zwei' 'drei' 'vier').
> > elements
> > do: [ :element | (Delay forSeconds: 2) wait ]
> > displayingProgress: [ :element | 'Working on', element asString ].
> >
> > 2014-03-18 9:55 GMT+01:00 Bernat Romagosa
> > :
> >
> > Without having tried it, I think you're missing a #wait message in
> > there:
> >
> >
> >
> > elements := #('eins' 'zwei' 'drei' 'vier').
> > elements do: [ :element | (Delay forSeconds: 2) wait ].
> >
> > displayingProgress: [ :element | 'Working on', element asString ].
> Sorry even with that I do not see the 'Working on ' message.
> It's just a progress bar with nothing else. No "Working on" anywhere.
>
> Regards
> Friedrich
>
>

It doesn't work anymore. (This worked in Pharo 1.4)
In the comment of Collection>>do:displayingProgress:
is a example, that doesn't work:
Smalltalk allClasses
do:[:aClass| (Delay forMilliseconds: 1) wait]
displayingProgress:[:aClass| 'Processing ', aClass name].

This should show the class names but it shows
only a single progressbar.


[Pharo-users] Pharo3 release delayed!

2014-03-19 Thread Esteban Lorenzano
Ladies and gentlemen,

For achieving a great 3.0 release we still have some tasks that we still need 
to prepare. They are not many, but we (Pharo Board) think it deserves some more 
effort:

1) Technically, there are still some minor bugs to tackle around RPackage and 
Nautilus. We do not miss much and that could be done in a couple of days work 
(in fact, I'm working on them and trying to have it before
going to Argentina next week), but in order to be sure, we better wait a bit 
:). It would be great to see more eyeballs focused on these issues.
2) We want to create a real marketing strategy this time, and that requires 
preparation time. "Marketing strategy" sounds probably really bombastic, but in 
our case it means to create pages, send mails, construct the progress log, etc. 
We we need some time to prepare it properly.

So... Pharo3 release date has been moved to April 22.

Cheers,
Esteban

Re: [Pharo-users] Calculate angle between two vectors (probably @Igor :)

2014-03-19 Thread MartinW
Nicolai Hess wrote
> This was of course wrong, I don't know what the
> other method computes, but not the angle between two vectors.

Yes i also wrote a test and i think my method is right.


Nicolai Hess wrote
> Now the question is, why do you think your method is wrong / the boids
> behave wrong?

When i use my method to calculate the field of vision the Boids always fly
from top left to down right and if i turn on the circling option, they crowd
in the bottom right quadrant.
If i give them a 360 degree field of vision by always returning true for
isInFieldOfVision they behave correctly. This means they fly in a nice
circle around the center and if circling is turned off, the swarm flies in
different directions each time you start the simulation.

Perhaps the problem is not the calculation of the angle but is in the
isInFieldOfVision: method...



--
View this message in context: 
http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351p4749697.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] What's wrong whith this code?

2014-03-19 Thread Friedrich Dominicus
Bernat Romagosa  writes:

> ouch, I added a . in the middle, sorry!
>
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements
> do: [ :element | (Delay forSeconds: 2) wait ]
> displayingProgress: [ :element | 'Working on', element asString ].
>
> 2014-03-18 9:55 GMT+01:00 Bernat Romagosa
> :
>
> Without having tried it, I think you're missing a #wait message in
> there:
> 
> 
> 
> elements := #('eins' 'zwei' 'drei' 'vier').
> elements do: [ :element | (Delay forSeconds: 2) wait ].
> 
> displayingProgress: [ :element | 'Working on', element asString ].
Sorry even with that I do not see the 'Working on ' message.
It's just a progress bar with nothing else. No "Working on" anywhere.

Regards
Friedrich