slurping pages from minnow... [was: Re: Source Forge Changes for 3.2.1]
Stephan Rudlof
sr at evolgo.de
Wed Dec 19 18:53:10 UTC 2001
goran.hultgren at bluefish.se wrote:
>
...
> <CSOTD>
> "A small snippet that plays a tune when something has changed at the
> Squeak Swiki!
> It simply polls the recent changes page every 30 seconds in a separate
> Process.
> Do note though that a too small Delay might overload the poor Swiki. Set
> it reasonably high..."
I think better would be e.g. 30 *minutes* instead... (your code snippet
slurps the whole content of the page)
Greetings,
Stephan
> | oldContent newContent |
> oldContent _ nil.
> [[Smalltalk at: #Stop ifAbsent:[true]] whileTrue: [
> newContent _ 'http://minnow.cc.gatech.edu/squeak/recent' asUrl
> retrieveContents contents.
> (oldContent ~= newContent) ifTrue:[
> (FMSound majorChordOn: FMSound flute1 from: #c4) play.
> oldContent _ newContent
> ].
> (Delay forSeconds: 30) wait.
> ]] forkAt: Processor userBackgroundPriority
> </CSOTD>
--
Stephan Rudlof (sr at evolgo.de)
"Genius doesn't work on an assembly line basis.
You can't simply say, 'Today I will be brilliant.'"
-- Kirk, "The Ultimate Computer", stardate 4731.3
More information about the Squeak-dev
mailing list
|