Re: [Newbies] Some sample code to help understand Morphic applications

2006-10-18 Thread Michael Davies
An RSS reader? You may want to work with Derek O'Connell, who is
working on a similar newbie project. His project is a Stockchart that shows rising companies in blue and falling ones inred, and he has also written a simple RSS reader:
http://minnow.cc.gatech.edu/squeak/5873Looks interesting - I'll have a closer look at that, thanks! 
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] problem with big dictionary

2006-10-18 Thread Petr Fischer
Hi, what is wrong with this code:
-
cnt := 500.
s := ' jasdfh afhahkjasdf asdf sd'.
d := Dictionary new: cnt.
1 to: cnt do: [ :i |
d at: i put: (i asString, s).
(i \\ 5 = 0) ifTrue: [ Transcript show: i; cr. ].
].
d size.
-

Squeak (latest 3.9) hangs randomly after 600 000 - 1 000 000 iterations
(about 129MB of RAM [2GB] used before hang).

hang = white squeak window, no interaction possible, 100% of cpu usage

Thanks for suggestions, pf

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Some sample code to help understand Morphic applications

2006-10-18 Thread Michael Davies
On 10/18/06, Another Dave [EMAIL PROTECTED] wrote:
Neither Squeak 3.8 nor 3.9 will give me that file in button, but now thatI know the .mcz extension means Monticello I can make my incoming directorya repository and open it. From there I can load the image.
Sorry, I assumed it was the .st file you were having problems with.
Starting things off with SampleImageViewerMorph newin a workspace isreally basic, but it is something that us new guys just don't get untilwe've done a few examples. That's been my experience too - once you understand the 'shape' of the solution you're trying to build, it's easier to use the browsers to find relevant code to learn from 
I gather that the final class in the listing willgenerally be the one that you start the program with--bottom-up programming,
as in Forth?If I understand you right, then the answer's 'no' - everything's listed alphabetically in the browser - it's just a co-incidence that this reflects the level of the classes in this case.
System browser, rt click on class category, then select printOut is another
command that isn't talked about much, and I guess you have to just knowthat the .html output listing is not really HTML, but now I have a printedlisting with lots of comments, and a running program with buttons and
graphics.Nice! Thanks!No problem,Michael 

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: problem with big dictionary

2006-10-18 Thread Klaus D. Witzel

Hi Petr,

it just passed 1 250 000 here, without the symptoms you describe, on a 1GB  
WinXP notebook.


What platform are you using?

/Klaus

P.S. I always declare temps explicitly in a workspace, I don't like the  
possible surprise and also because I want to see the temps when I  
interrupt the DoIt with alt-.


On Wed, 18 Oct 2006 14:35:42 +0200, Petr Fischer  
[EMAIL PROTECTED] wrote:



Hi, what is wrong with this code:
-
cnt := 500.
s := ' jasdfh afhahkjasdf asdf sd'.
d := Dictionary new: cnt.
1 to: cnt do: [ :i |
d at: i put: (i asString, s).
(i \\ 5 = 0) ifTrue: [ Transcript show: i; cr. ].
].
d size.
-

Squeak (latest 3.9) hangs randomly after 600 000 - 1 000 000 iterations
(about 129MB of RAM [2GB] used before hang).

hang = white squeak window, no interaction possible, 100% of cpu usage

Thanks for suggestions, pf



___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: problem with big dictionary

2006-10-18 Thread Klaus D. Witzel

Hi Petr,

hm, I think that I've seen that, have a look at

- http://bugs.impara.de/view.php?id=4709

Find the word workaround on that page. Perhaps this helps you, too.

/Klaus

On Wed, 18 Oct 2006 16:04:39 +0200, Petr Fischer wrote:


Klaus D. Witzel píše v St 18. 10. 2006 v 15:45 +0200:

Hi Petr,

it just passed 1 250 000 here, without the symptoms you describe, on a  
1GB

WinXP notebook.

What platform are you using?



Ubuntu Linux (Dapper)
kernel: 2.6.15-27-686 #1 SMP PREEMPT
PentiumM (Sonoma) 1.86GHz, 2GB RAM

squeak -version
---
3.7-7 #1 Fri Apr 14 11:44:44 UTC 2006 gcc 4.0.3
Squeak3.7 of '4 September 2004' [latest update: #5989]
Linux vernadsky 2.6.12 #1 SMP Mon Jan 2 16:52:14 UTC 2006 i686 GNU/Linux
default plugin location: /usr/lib/squeak/3.7-7/*.so




/Klaus

P.S. I always declare temps explicitly in a workspace, I don't like the
possible surprise and also because I want to see the temps when I
interrupt the DoIt with alt-.

On Wed, 18 Oct 2006 14:35:42 +0200, Petr Fischer wrote:

 Hi, what is wrong with this code:
 -
 cnt := 500.
 s := ' jasdfh afhahkjasdf asdf sd'.
 d := Dictionary new: cnt.
 1 to: cnt do: [ :i |
d at: i put: (i asString, s).
(i \\ 5 = 0) ifTrue: [ Transcript show: i; cr. ].
 ].
 d size.
 -

 Squeak (latest 3.9) hangs randomly after 600 000 - 1 000 000  
iterations

 (about 129MB of RAM [2GB] used before hang).

 hang = white squeak window, no interaction possible, 100% of cpu usage

 Thanks for suggestions, pf


___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners




___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Is there a way to watch all the messages flowing in Squeak?

2006-10-18 Thread andy . burnett

Although everything in Squeak is open,
I find it quite hard sometimes to track down what is calling what. It
would be great if I could open up a window to see which object is being
called when I e.g. right click on the surface and bring up the World menu
etc.

Is there some way to turn on the debugger
and just let it run, or something like that?

thanks
Andy B___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Re: problem with big dictionary

2006-10-18 Thread Petr Fischer
Thanks for this workaround - it works now.

But highest value for -memory parameter is 880MB (on my Ubuntu Linux).
If I try greater value than 880MB, squeak falls down with message:
bad address: negative.

pf

Klaus D. Witzel píše v St 18. 10. 2006 v 16:31 +0200:
 Hi Petr,
 
 hm, I think that I've seen that, have a look at
 
 - http://bugs.impara.de/view.php?id=4709
 
 Find the word workaround on that page. Perhaps this helps you, too.
 
 /Klaus
 
 On Wed, 18 Oct 2006 16:04:39 +0200, Petr Fischer wrote:
 
  Klaus D. Witzel píše v St 18. 10. 2006 v 15:45 +0200:
  Hi Petr,
 
  it just passed 1 250 000 here, without the symptoms you describe, on a  
  1GB
  WinXP notebook.
 
  What platform are you using?
 
 
  Ubuntu Linux (Dapper)
  kernel: 2.6.15-27-686 #1 SMP PREEMPT
  PentiumM (Sonoma) 1.86GHz, 2GB RAM
 
  squeak -version
  ---
  3.7-7 #1 Fri Apr 14 11:44:44 UTC 2006 gcc 4.0.3
  Squeak3.7 of '4 September 2004' [latest update: #5989]
  Linux vernadsky 2.6.12 #1 SMP Mon Jan 2 16:52:14 UTC 2006 i686 GNU/Linux
  default plugin location: /usr/lib/squeak/3.7-7/*.so
 
 
 
  /Klaus
 
  P.S. I always declare temps explicitly in a workspace, I don't like the
  possible surprise and also because I want to see the temps when I
  interrupt the DoIt with alt-.
 
  On Wed, 18 Oct 2006 14:35:42 +0200, Petr Fischer wrote:
 
   Hi, what is wrong with this code:
   -
   cnt := 500.
   s := ' jasdfh afhahkjasdf asdf sd'.
   d := Dictionary new: cnt.
   1 to: cnt do: [ :i |
d at: i put: (i asString, s).
(i \\ 5 = 0) ifTrue: [ Transcript show: i; cr. ].
   ].
   d size.
   -
  
   Squeak (latest 3.9) hangs randomly after 600 000 - 1 000 000  
  iterations
   (about 129MB of RAM [2GB] used before hang).
  
   hang = white squeak window, no interaction possible, 100% of cpu usage
  
   Thanks for suggestions, pf
 
 
  ___
  Beginners mailing list
  Beginners@lists.squeakfoundation.org
  http://lists.squeakfoundation.org/mailman/listinfo/beginners
 
 
 
 ___
 Beginners mailing list
 Beginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.org/mailman/listinfo/beginners
 

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: problem with big dictionary

2006-10-18 Thread Klaus D. Witzel

Petr,

yes, there seems to be a limit = 1GB in the 32bit VM's. It is perhaps  
possible to bypass the problem by using the -mmap argument but I have no  
experience with that.


Perhaps you find a more recent VM executable which fits:

- http://www.squeakvm.org/unix/

IIRC  1GB of memory is addressed in the 64bit VM's.

/Klaus

On Wed, 18 Oct 2006 17:23:00 +0200, Petr Fischer wrote:


Thanks for this workaround - it works now.

But highest value for -memory parameter is 880MB (on my Ubuntu Linux).
If I try greater value than 880MB, squeak falls down with message:
bad address: negative.

pf

Klaus D. Witzel píše v St 18. 10. 2006 v 16:31 +0200:

Hi Petr,

hm, I think that I've seen that, have a look at

- http://bugs.impara.de/view.php?id=4709

Find the word workaround on that page. Perhaps this helps you, too.

/Klaus

On Wed, 18 Oct 2006 16:04:39 +0200, Petr Fischer wrote:

 Klaus D. Witzel píše v St 18. 10. 2006 v 15:45 +0200:
 Hi Petr,

 it just passed 1 250 000 here, without the symptoms you describe, on  
a

 1GB
 WinXP notebook.

 What platform are you using?


 Ubuntu Linux (Dapper)
 kernel: 2.6.15-27-686 #1 SMP PREEMPT
 PentiumM (Sonoma) 1.86GHz, 2GB RAM

 squeak -version
 ---
 3.7-7 #1 Fri Apr 14 11:44:44 UTC 2006 gcc 4.0.3
 Squeak3.7 of '4 September 2004' [latest update: #5989]
 Linux vernadsky 2.6.12 #1 SMP Mon Jan 2 16:52:14 UTC 2006 i686  
GNU/Linux

 default plugin location: /usr/lib/squeak/3.7-7/*.so



 /Klaus

 P.S. I always declare temps explicitly in a workspace, I don't like  
the

 possible surprise and also because I want to see the temps when I
 interrupt the DoIt with alt-.

 On Wed, 18 Oct 2006 14:35:42 +0200, Petr Fischer wrote:

  Hi, what is wrong with this code:
  -
  cnt := 500.
  s := ' jasdfh afhahkjasdf asdf sd'.
  d := Dictionary new: cnt.
  1 to: cnt do: [ :i |
d at: i put: (i asString, s).
(i \\ 5 = 0) ifTrue: [ Transcript show: i; cr. ].
  ].
  d size.
  -
 
  Squeak (latest 3.9) hangs randomly after 600 000 - 1 000 000
 iterations
  (about 129MB of RAM [2GB] used before hang).
 
  hang = white squeak window, no interaction possible, 100% of cpu  
usage

 
  Thanks for suggestions, pf


 ___
 Beginners mailing list
 Beginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.org/mailman/listinfo/beginners



___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners




___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Is there a way to watch all the messages flowing in Squeak?

2006-10-18 Thread Ned Konz

[EMAIL PROTECTED] wrote:


Although everything in Squeak is open, I find it quite hard sometimes to 
track down what is calling what.  It would be great if I could open up a 
window to see which object is being called when I e.g. right click on 
the surface and bring up the World menu etc.


Is there some way to turn on the debugger and just let it run, or 
something like that?


Debugging the UI is tricky, because the debugger uses the UI. But you 
can see what methods get called using the profiler.


For instance, you can do this in a Workspace to debug the Morphic UI for 
4 seconds (4000 msec):



now := Time millisecondClockValue.
TimeProfileBrowser spyOn: [ [ Time millisecondClockValue - now  4000 ] 
whileFalse: [ World doOneCycleNow ] ]



After 4 seconds, you will see a TimeProfileBrowser pop up that will show 
what messages were called, and how many times. This works by 
interrupting the execution of the block given to spyOn: every 
millisecond or so, so it can miss methods that don't get called very 
often or are very fast.


You can also use the simulator to run code; this is much slower, but 
won't miss anything. Note that some primitives (for instance, in the 
BalloonEngine) won't simulate properly.



now := Time millisecondClockValue.
MessageTally tallySends: [ [ Time millisecondClockValue - now  2 ] 
whileFalse: [ World doOneCycleNow ] ]


--
Ned Konz
[EMAIL PROTECTED]
http://bike-nomad.com
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners