Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
October 2011
- 101 participants
- 899 messages
Re: [Pharo-project] About Dictionary >> #at:ifAbsentPut:
by Nicolas Cellier
2011/10/5 Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>:
> 2011/10/5 Michael Roberts <mike(a)mjr104.co.uk>:
>> I find the thread a bit confused in the sense
>>
>> Dictionary *new* at: x ifAbsentPut: y
>>
>> does not make sense (is academic), because the new dictionary will
>> never have x as a key. So why profile it and use that as reasoning?...
>>
>> whereas
>>
>> myDict at:x ifAbsentPut: y
>>
>> is more interesting.
>>
>
> I guess in some examples, like when you want to serialize an object
> graph with as many nodes as branches (no or few sharing), then the
> case of absence is dominating.
> Knowing that Mariano is working on Fuel, i guess that could have
> biased his judgement.
>
>> In my experience i am biased by the use of the message in the systems
>> that already use it heavily...however it always feels that the use of
>> ifAbsentXX is intentionally deferring some code because it expresses
>> exceptional cases in the application logic. Especially if the block
>> makes an object you don't want to be doing that every time and
>> discarding the result irrespective of the presence of the key. It does
>> not have to be expensive to make, just not good style near any kind of
>> loop.
>>
>> I know some people that actually don't like the ifAbsentPut: []
>> variant. and prefer to be explicit, of the form
>>
>> (myDict includesKey: x) ifFalse: [
>> Â myDict at: x put: y]
>>
>
> Both codes are valid. But note that at:ifAbsentPut: will return the
> value, or the newly put value.
> So the exact equivalent is ((myDict includesKey: x)
> Â Â ifTrue: [myDict at: x]
> Â Â ifFalse: [myDict at: x put: y])
>
> However, maybe Mariano is searching for tight inner loop optimization
> (we can only guess, because he didn't tell, he should have).
> In this case, using ifFalse: is good: because it is inlined by
> Compiler, it avoids a BlockClosure creation.
> But above code will cost two lookup in both branch, so it will be
> pretty bad too, depending on hash evaluation cost and collision rate,
> in a majority of cases, worse than block creation time.
> I would suggest to Mariano to implement in the Dictionary class of his
> choice the single lookup, block free creation code:
>
> at: key ifAbsentPutValue: aValue
> Â Â Â Â "Answer the value associated with the key.
> Â Â Â Â if key isn't found, associate it first with aValue."
>
> Â Â Â Â | index |
> Â Â Â Â ^((array at: (index := self scanFor: key))
> Â Â Â Â Â Â Â Â ifNil: [ array at: index put: (key -> aValue). aValue ]
> Â Â Â Â Â Â Â Â ifNotNil: [:value | value]
>
And please, correct me, above code is plain false :)
> But, please, please, Mariano, don't change #at:ifAbsentPut:
> As other said, conditional execution is useful both for speed and
> because in Object world, the state can change.
> Â Â Â Â aBagOfKeys do: [:key | myDict at: key ifAbsentPut: (myStream next)].
> Â Â Â Â aBagOfKeys do: [:key | myDict at: key ifAbsentPut: [myStream next]].
> won't behave the same if aBagOfKeys has duplicates, will they ?
>
> Last thing, #at:ifAbsentPut: is absolutely decoupled from
> Object>>#value, it does rely on Object>>#value
> So don't throw #at:ifAbsentPut: because you don't like Object>>#value.
> If you don't like it, don't use it, use a BlockClosure instead.
>
> Anyway, thanks to Mariano for these questions, they were biased, but
> not silly, no question is :)
>
> Nicolas
>
>> where y is either a simple value or some expression.
>>
>> here the test on the key has the same effect as expecting a block in
>> the inline ifAbsentPut: [] Â . It makes both forms basically the same,
>> with one being more compact if you prefer that. If ifAbsentPut: did
>> not expect the block then i think it would be a bit odd because you
>> would have to unroll the code in order to achieve the deferred case
>> which i feel is more common.
>>
>> cheers,
>> Mike
>>
>> On Tue, Oct 4, 2011 at 2:44 PM, Henrik Sperre Johansen
>> <henrik.s.johansen(a)veloxit.no> wrote:
>>> On 04.10.2011 12:52, Mariano Martinez Peck wrote:
>>>
>>> Hi guys. If I tell you the selector is Dictionary >> #at:ifAbsentPut:Â what
>>> would you expect the second parameter to be? the value.
>>> So, one would do:
>>> Dictionary new at: #foo ifAbsentPut: 4
>>>
>>> But if you see Dictionary >>
>>>
>>> at: key ifAbsentPut: aBlock
>>> Â Â Â "Return the value at the given key.
>>> Â Â Â If key is not included in the receiver store the result
>>> Â Â Â of evaluating aBlock as new value."
>>>
>>> Â Â Â ^ self at: key ifAbsent: [self at: key put: aBlock value]
>>>
>>> so it expects a Block. Ok, we are in Smalltalk, so implementing #value is
>>> enough.
>>>
>>> Well..the previous example works, but only because we have an ugly Object >>
>>> value that returns self.
>>> If I put instances of subclasses from ProtoObjects (proxies), that do not
>>> work anymore.
>>>
>>> So...my question is we do Dictionary at: #foo put: 4, why #at:ifAbsentPut:
>>> expects a block and not directly the value?
>>>
>>> Sven's reasons are correct I think, it's for efficiency, and elegant lazy
>>> initialization of a cache.
>>> The same reasons will never hold true when using #at:put:.
>>>
>>> in which case I need a block instead of the value object directly ?
>>>
>>> In addition to when you want delayed computation, when you have value
>>> objects who redefine/do not define #value ;)
>>>
>>> Cheers,
>>> Henry
>>>
>>
>>
>
Oct. 5, 2011
Re: [Pharo-project] About Dictionary >> #at:ifAbsentPut:
by Nicolas Cellier
2011/10/5 Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>:
> 2011/10/5 Michael Roberts <mike(a)mjr104.co.uk>:
>> I find the thread a bit confused in the sense
>>
>> Dictionary *new* at: x ifAbsentPut: y
>>
>> does not make sense (is academic), because the new dictionary will
>> never have x as a key. So why profile it and use that as reasoning?...
>>
>> whereas
>>
>> myDict at:x ifAbsentPut: y
>>
>> is more interesting.
>>
>
> I guess in some examples, like when you want to serialize an object
> graph with as many nodes as branches (no or few sharing), then the
> case of absence is dominating.
> Knowing that Mariano is working on Fuel, i guess that could have
> biased his judgement.
>
>> In my experience i am biased by the use of the message in the systems
>> that already use it heavily...however it always feels that the use of
>> ifAbsentXX is intentionally deferring some code because it expresses
>> exceptional cases in the application logic. Especially if the block
>> makes an object you don't want to be doing that every time and
>> discarding the result irrespective of the presence of the key. It does
>> not have to be expensive to make, just not good style near any kind of
>> loop.
>>
>> I know some people that actually don't like the ifAbsentPut: []
>> variant. and prefer to be explicit, of the form
>>
>> (myDict includesKey: x) ifFalse: [
>> Â myDict at: x put: y]
>>
>
> Both codes are valid. But note that at:ifAbsentPut: will return the
> value, or the newly put value.
> So the exact equivalent is ((myDict includesKey: x)
> Â Â ifTrue: [myDict at: x]
> Â Â ifFalse: [myDict at: x put: y])
>
> However, maybe Mariano is searching for tight inner loop optimization
> (we can only guess, because he didn't tell, he should have).
> In this case, using ifFalse: is good: because it is inlined by
> Compiler, it avoids a BlockClosure creation.
> But above code will cost two lookup in both branch, so it will be
> pretty bad too, depending on hash evaluation cost and collision rate,
> in a majority of cases, worse than block creation time.
> I would suggest to Mariano to implement in the Dictionary class of his
> choice the single lookup, block free creation code:
>
> at: key ifAbsentPutValue: aValue
> Â Â Â Â "Answer the value associated with the key.
> Â Â Â Â if key isn't found, associate it first with aValue."
>
> Â Â Â Â | index |
> Â Â Â Â ^((array at: (index := self scanFor: key))
> Â Â Â Â Â Â Â Â ifNil: [ array at: index put: (key -> aValue). aValue ]
> Â Â Â Â Â Â Â Â ifNotNil: [:value | value]
>
> But, please, please, Mariano, don't change #at:ifAbsentPut:
> As other said, conditional execution is useful both for speed and
> because in Object world, the state can change.
> Â Â Â Â aBagOfKeys do: [:key | myDict at: key ifAbsentPut: (myStream next)].
> Â Â Â Â aBagOfKeys do: [:key | myDict at: key ifAbsentPut: [myStream next]].
> won't behave the same if aBagOfKeys has duplicates, will they ?
>
> Last thing, #at:ifAbsentPut: is absolutely decoupled from
> Object>>#value, it does rely on Object>>#value
it does not rely, of course, hmm time to sleep a bit.
> So don't throw #at:ifAbsentPut: because you don't like Object>>#value.
> If you don't like it, don't use it, use a BlockClosure instead.
>
> Anyway, thanks to Mariano for these questions, they were biased, but
> not silly, no question is :)
>
> Nicolas
>
>> where y is either a simple value or some expression.
>>
>> here the test on the key has the same effect as expecting a block in
>> the inline ifAbsentPut: [] Â . It makes both forms basically the same,
>> with one being more compact if you prefer that. If ifAbsentPut: did
>> not expect the block then i think it would be a bit odd because you
>> would have to unroll the code in order to achieve the deferred case
>> which i feel is more common.
>>
>> cheers,
>> Mike
>>
>> On Tue, Oct 4, 2011 at 2:44 PM, Henrik Sperre Johansen
>> <henrik.s.johansen(a)veloxit.no> wrote:
>>> On 04.10.2011 12:52, Mariano Martinez Peck wrote:
>>>
>>> Hi guys. If I tell you the selector is Dictionary >> #at:ifAbsentPut:Â what
>>> would you expect the second parameter to be? the value.
>>> So, one would do:
>>> Dictionary new at: #foo ifAbsentPut: 4
>>>
>>> But if you see Dictionary >>
>>>
>>> at: key ifAbsentPut: aBlock
>>> Â Â Â "Return the value at the given key.
>>> Â Â Â If key is not included in the receiver store the result
>>> Â Â Â of evaluating aBlock as new value."
>>>
>>> Â Â Â ^ self at: key ifAbsent: [self at: key put: aBlock value]
>>>
>>> so it expects a Block. Ok, we are in Smalltalk, so implementing #value is
>>> enough.
>>>
>>> Well..the previous example works, but only because we have an ugly Object >>
>>> value that returns self.
>>> If I put instances of subclasses from ProtoObjects (proxies), that do not
>>> work anymore.
>>>
>>> So...my question is we do Dictionary at: #foo put: 4, why #at:ifAbsentPut:
>>> expects a block and not directly the value?
>>>
>>> Sven's reasons are correct I think, it's for efficiency, and elegant lazy
>>> initialization of a cache.
>>> The same reasons will never hold true when using #at:put:.
>>>
>>> in which case I need a block instead of the value object directly ?
>>>
>>> In addition to when you want delayed computation, when you have value
>>> objects who redefine/do not define #value ;)
>>>
>>> Cheers,
>>> Henry
>>>
>>
>>
>
Oct. 5, 2011
Re: [Pharo-project] About Dictionary >> #at:ifAbsentPut:
by Nicolas Cellier
2011/10/5 Michael Roberts <mike(a)mjr104.co.uk>:
> I find the thread a bit confused in the sense
>
> Dictionary *new* at: x ifAbsentPut: y
>
> does not make sense (is academic), because the new dictionary will
> never have x as a key. So why profile it and use that as reasoning?...
>
> whereas
>
> myDict at:x ifAbsentPut: y
>
> is more interesting.
>
I guess in some examples, like when you want to serialize an object
graph with as many nodes as branches (no or few sharing), then the
case of absence is dominating.
Knowing that Mariano is working on Fuel, i guess that could have
biased his judgement.
> In my experience i am biased by the use of the message in the systems
> that already use it heavily...however it always feels that the use of
> ifAbsentXX is intentionally deferring some code because it expresses
> exceptional cases in the application logic. Especially if the block
> makes an object you don't want to be doing that every time and
> discarding the result irrespective of the presence of the key. It does
> not have to be expensive to make, just not good style near any kind of
> loop.
>
> I know some people that actually don't like the ifAbsentPut: []
> variant. and prefer to be explicit, of the form
>
> (myDict includesKey: x) ifFalse: [
> Â myDict at: x put: y]
>
Both codes are valid. But note that at:ifAbsentPut: will return the
value, or the newly put value.
So the exact equivalent is ((myDict includesKey: x)
ifTrue: [myDict at: x]
ifFalse: [myDict at: x put: y])
However, maybe Mariano is searching for tight inner loop optimization
(we can only guess, because he didn't tell, he should have).
In this case, using ifFalse: is good: because it is inlined by
Compiler, it avoids a BlockClosure creation.
But above code will cost two lookup in both branch, so it will be
pretty bad too, depending on hash evaluation cost and collision rate,
in a majority of cases, worse than block creation time.
I would suggest to Mariano to implement in the Dictionary class of his
choice the single lookup, block free creation code:
at: key ifAbsentPutValue: aValue
"Answer the value associated with the key.
if key isn't found, associate it first with aValue."
| index |
^((array at: (index := self scanFor: key))
ifNil: [ array at: index put: (key -> aValue). aValue ]
ifNotNil: [:value | value]
But, please, please, Mariano, don't change #at:ifAbsentPut:
As other said, conditional execution is useful both for speed and
because in Object world, the state can change.
aBagOfKeys do: [:key | myDict at: key ifAbsentPut: (myStream next)].
aBagOfKeys do: [:key | myDict at: key ifAbsentPut: [myStream next]].
won't behave the same if aBagOfKeys has duplicates, will they ?
Last thing, #at:ifAbsentPut: is absolutely decoupled from
Object>>#value, it does rely on Object>>#value
So don't throw #at:ifAbsentPut: because you don't like Object>>#value.
If you don't like it, don't use it, use a BlockClosure instead.
Anyway, thanks to Mariano for these questions, they were biased, but
not silly, no question is :)
Nicolas
> where y is either a simple value or some expression.
>
> here the test on the key has the same effect as expecting a block in
> the inline ifAbsentPut: [] Â . It makes both forms basically the same,
> with one being more compact if you prefer that. If ifAbsentPut: did
> not expect the block then i think it would be a bit odd because you
> would have to unroll the code in order to achieve the deferred case
> which i feel is more common.
>
> cheers,
> Mike
>
> On Tue, Oct 4, 2011 at 2:44 PM, Henrik Sperre Johansen
> <henrik.s.johansen(a)veloxit.no> wrote:
>> On 04.10.2011 12:52, Mariano Martinez Peck wrote:
>>
>> Hi guys. If I tell you the selector is Dictionary >> #at:ifAbsentPut:Â what
>> would you expect the second parameter to be? the value.
>> So, one would do:
>> Dictionary new at: #foo ifAbsentPut: 4
>>
>> But if you see Dictionary >>
>>
>> at: key ifAbsentPut: aBlock
>> Â Â Â "Return the value at the given key.
>> Â Â Â If key is not included in the receiver store the result
>> Â Â Â of evaluating aBlock as new value."
>>
>> Â Â Â ^ self at: key ifAbsent: [self at: key put: aBlock value]
>>
>> so it expects a Block. Ok, we are in Smalltalk, so implementing #value is
>> enough.
>>
>> Well..the previous example works, but only because we have an ugly Object >>
>> value that returns self.
>> If I put instances of subclasses from ProtoObjects (proxies), that do not
>> work anymore.
>>
>> So...my question is we do Dictionary at: #foo put: 4, why #at:ifAbsentPut:
>> expects a block and not directly the value?
>>
>> Sven's reasons are correct I think, it's for efficiency, and elegant lazy
>> initialization of a cache.
>> The same reasons will never hold true when using #at:put:.
>>
>> in which case I need a block instead of the value object directly ?
>>
>> In addition to when you want delayed computation, when you have value
>> objects who redefine/do not define #value ;)
>>
>> Cheers,
>> Henry
>>
>
>
Oct. 4, 2011
Re: [Pharo-project] Too many semaphores, image blocked
by Schwab,Wilhelm K
Stable as a rock sounds good to me :)
The log you posted contains the string "Not enough space for external objects, set a larger size at startup!" Maybe a command-line switch to the vm will give you more memory and a way to get the image going? Good luck! I have rescued a few Pharo images, mostly ones that I damaged by running two IDEs on Linux :( As much as I don't like doing this, going to a working backup and recovering lost changes works fairly well.
Ian Bartholomew's Dolphin Goodies in general, and his Chunk Browser in particular, are excellent tools. The Chunk Browser does a wonderful job of sorting, filtering to most-recent chunks per entity (really useful), etc. Snoop is a great IDE inspector. Ghoul (Chris Uppal's work) creates a debugger-like view from Dolphin's crash dumps. Recent changes to Pharo's profiler are starting to create some of the feel of these excellent tools.
Bill
________________________________________
From: pharo-project-bounces(a)lists.gforge.inria.fr [pharo-project-bounces(a)lists.gforge.inria.fr] On Behalf Of Janko Mivšek [janko.mivsek(a)eranova.si]
Sent: Tuesday, October 04, 2011 2:57 PM
To: Pharo-project(a)lists.gforge.inria.fr
Subject: [Pharo-project] Too many semaphores, image blocked
Hi guys
I have nonstartable Pharo 1.3 image, is there any way to get it started?
This image was running all the time, being on the net directly (Aida
based web development image) and snapshoting every hour.
The problem happens at such snapshot, raising Not enough space for
external objects/too many semaphores error and block. After I killed it,
snapshoted image is not startable anymore, more exactly: it starts in
blank window and stays unresponsive.
Is this too many semaphores error related to too many open sockets
problem we discussed not to long ago?
Any help greatly appreciated. Not to mention finding a bug and removing
it forever, because Pharo should become stable as a rock, as VW for
instance is :)
Best regards
Janko
PharoDebug.log:
THERE_BE_DRAGONS_HERE
Error: Not enough space for external objects, set a larger size at startup!
4 October 2011 4:00:01 am
VM: unix - i686 - linux-gnu - Croquet Closure Cog VM [CoInterpreter
VMMaker-oscog.35]
Image: Pharo1.3 [Latest update: #13299]
SmalltalkImage(Object)>>error:
Receiver: Smalltalk
Arguments and temporary variables:
aString: 'Not enough space for external objects, set a larger size at
startup!'...etc...
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
SmalltalkImage>>maxExternalSemaphores:
Receiver: Smalltalk
Arguments and temporary variables:
aSize: 520
inProduction: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a
Semaphore...etc...
newSize: 520
needToGrow: false
maxSize: 512
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a
Semaphore...etc...
anObject: a Semaphore()
newObjects: nil
newSize: 520
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
ExternalSemaphoreTable class>>safelyRegisterExternalObject:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
anObject: a Semaphore()
objects: an Array(a Semaphore() a Semaphore() a Semaphore() a
Semaphore(a Proce...etc...
firstEmptyIndex: nil
obj: nil
sz: nil
newObjects: nil
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
[self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable
class>>registerExternalObject:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
anObject: a Semaphore()
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
[caught := true.
self wait.
blockValue := mutuallyExcludedBlock value] in Semaphore>>critical:
Receiver: a Semaphore()
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
firstLink: nil
lastLink: nil
excessSignals: 0
BlockClosure>>ensure:
Receiver: [caught := true.
self wait.
blockValue := mutuallyExcludedBlock value]
Arguments and temporary variables:
aBlock: [caught
ifTrue: [self signal]]
complete: nil
returnValue: nil
Receiver's instance variables:
outerContext: Semaphore>>critical:
startpc: 42
numArgs: 0
Semaphore>>critical:
Receiver: a Semaphore()
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
firstLink: nil
lastLink: nil
excessSignals: 0
ExternalSemaphoreTable class>>registerExternalObject:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
anObject: a Semaphore()
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
SmalltalkImage>>registerExternalObject:
Receiver: Smalltalk
Arguments and temporary variables:
anObject: a Semaphore()
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
InputEventPollingFetcher(InputEventFetcher)>>startUp
Receiver: an InputEventPollingFetcher
Arguments and temporary variables:
Receiver's instance variables:
eventHandlers: an OrderedCollection(an InputEventSensor an
UserInterruptHandler...etc...
fetcherProcess: a Process in [delaySemaphore wait] in Delay>>wait
inputSemaphore: a Semaphore()
InputEventPollingFetcher class(InputEventFetcher class)>>startUp
Receiver: InputEventPollingFetcher
Arguments and temporary variables:
Receiver's instance variables:
superclass: InputEventFetcher
methodDict: a
MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc...
format: 136
instanceVariables: nil
organization: ('events' waitForInput)
('initialize-release' terminateEventLoop)...etc...
subclasses: nil
name: #InputEventPollingFetcher
classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs
remaining) )...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Kernel-Processes'
traitComposition: {}
localSelectors: nil
InputEventPollingFetcher class(Behavior)>>startUp:
Receiver: InputEventPollingFetcher
Arguments and temporary variables:
resuming: false
Receiver's instance variables:
superclass: InputEventFetcher
methodDict: a
MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc...
format: 136
instanceVariables: nil
organization: ('events' waitForInput)
('initialize-release' terminateEventLoop)...etc...
subclasses: nil
name: #InputEventPollingFetcher
classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs
remaining) )...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Kernel-Processes'
traitComposition: {}
localSelectors: nil
[:name |
| class |
class := self
at: name
ifAbsent: [].
class isNil
ifTrue: [removals add: name]
ifFalse: [class perform: startUpOrShutDown with: argument]] in
SmalltalkImage>>send:toClassesNamedIn:with:
Receiver: Smalltalk
Arguments and temporary variables:
startUpOrShutDown: #InputEventPollingFetcher
argument: #startUp:
removals: false
name: an OrderedCollection()
class: InputEventPollingFetcher
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
OrderedCollection>>do:
Receiver: an OrderedCollection(#Delay #OSPlatform #DisplayScreen
#Cursor #InputEventFetcher #Process...etc...
Arguments and temporary variables:
aBlock: [:name |
| class |
class := self
at: name
ifAbsent: [].
class...etc...
index: 60
Receiver's instance variables:
array: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil ni...etc...
firstIndex: 36
lastIndex: 74
SmalltalkImage>>send:toClassesNamedIn:with:
Receiver: Smalltalk
Arguments and temporary variables:
startUpOrShutDown: #startUp:
startUpOrShutDownList: an OrderedCollection(#Delay #OSPlatform
#DisplayScreen #...etc...
argument: false
removals: an OrderedCollection()
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
SmalltalkImage>>processStartUpList:
Receiver: Smalltalk
Arguments and temporary variables:
resuming: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
[self processStartUpList: resuming.
resuming
ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit:
Receiver: Smalltalk
Arguments and temporary variables:
resuming: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
BlockClosure>>ensure:
Receiver: [self processStartUpList: resuming.
resuming
ifTrue: [self recordStartupStamp]]
Arguments and temporary variables:
aBlock: [Default := self]
complete: nil
returnValue: nil
Receiver's instance variables:
outerContext: SmalltalkImage>>snapshot:andQuit:
startpc: 185
numArgs: 0
MorphicUIManager(UIManager)>>boot:during:
Receiver: a MorphicUIManager
Arguments and temporary variables:
bootingFromDisk: false
aBlock: [self processStartUpList: resuming.
resuming
ifTrue: [self recordSta...etc...
Receiver's instance variables:
interactiveParser: nil
SmalltalkImage>>snapshot:andQuit:
Receiver: Smalltalk
Arguments and temporary variables:
save: true
quit: false
snapshotResult: false
resuming: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
SmalltalkImage>>saveSession
Receiver: Smalltalk
Arguments and temporary variables:
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
[SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot
Receiver: AIDASite
Arguments and temporary variables:
Receiver's instance variables:
superclass: SwazooSite
methodDict: a MethodDictionary(size 203)
format: 156
instanceVariables: #('style' 'settings' 'systemServices'
'userServices' 'timest...etc...
organization: ('private-serving' activityAnnouncers addAllowHeaderTo:
addDontCa...etc...
subclasses: nil
name: #AIDASite
classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo
#HourlySnapshot-...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Aida-Core'
traitComposition: {}
localSelectors: nil
Time class>>millisecondsToRun:
Receiver: Time
Arguments and temporary variables:
timedBlock: [SmalltalkImage current saveSession]
initialMilliseconds: 155447683
Receiver's instance variables:
superclass: Magnitude
methodDict: a MethodDictionary(#<->(Time>>#< "a
CompiledMethod(736624640)") #=-...etc...
format: 134
instanceVariables: #('seconds' 'nanos')
organization: ('ansi protocol' < = duration hash hour hour12 hour24
meridianAbb...etc...
subclasses: nil
name: #Time
classPool: nil
sharedPools: an OrderedCollection(ChronologyConstants)
environment: a SystemDictionary(lots of globals)
category: #'Kernel-Chronology'
traitComposition: nil
localSelectors: nil
AIDASite class>>imageSnapshot
Receiver: AIDASite
Arguments and temporary variables:
elapsed: nil
Receiver's instance variables:
superclass: SwazooSite
methodDict: a MethodDictionary(size 203)
format: 156
instanceVariables: #('style' 'settings' 'systemServices'
'userServices' 'timest...etc...
organization: ('private-serving' activityAnnouncers addAllowHeaderTo:
addDontCa...etc...
subclasses: nil
name: #AIDASite
classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo
#HourlySnapshot-...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Aida-Core'
traitComposition: {}
localSelectors: nil
[AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot
Receiver: an AIDASite
Arguments and temporary variables:
Receiver's instance variables:
enabled: true
uriPattern: an OrderedCollection(a SiteIdentifier)
parent: a ServerRootComposite
children: an OrderedCollection()
name: 'aidademo'
serving: true
style: a WasteStyle
settings: a Dictionary(#afterLogin->#lastPage
#contextProcesses->false #countin...etc...
systemServices: a Dictionary(#Admin->a WebAdmin #Authenticator->a
DefaultAuthen...etc...
userServices: a Dictionary(#Blog->a Blog #Repository->a
WasteRepository #SiteCo...etc...
timestamps: an IdentityDictionary(#Created->3491250844
#LastRequest->3494848717...etc...
counters: an IdentityDictionary(#NewVisitors->a WebCounter
#NotFound->a WebCoun...etc...
other: a Dictionary(#activityAnnouncers->a Dictionary() )
[self block value] in WebScheduledEvent>>run
Receiver: a WebScheduledEvent
Arguments and temporary variables:
Receiver's instance variables:
parent: a WebScheduler
timestamp: a SpTimestamp
period: #hour->0
method: nil
object: nil
block: [AIDASite preImageSnapshot; imageSnapshot]
[self value.
Processor terminateActive] in BlockClosure>>newProcess
Receiver: [self block value]
Arguments and temporary variables:
Receiver's instance variables:
outerContext: WebScheduledEvent>>run
startpc: 78
numArgs: 0
--- The full stack ---
SmalltalkImage(Object)>>error:
SmalltalkImage>>maxExternalSemaphores:
ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo:
ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor:
ExternalSemaphoreTable class>>safelyRegisterExternalObject:
[self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable
class>>registerExternalObject:
[caught := true.
self wait.
blockValue := mutuallyExcludedBlock value] in Semaphore>>critical:
BlockClosure>>ensure:
Semaphore>>critical:
ExternalSemaphoreTable class>>registerExternalObject:
SmalltalkImage>>registerExternalObject:
InputEventPollingFetcher(InputEventFetcher)>>startUp
InputEventPollingFetcher class(InputEventFetcher class)>>startUp
InputEventPollingFetcher class(Behavior)>>startUp:
[:name |
| class |
class := self
at: name
ifAbsent: [].
class isNil
ifTrue: [removals add: name]
ifFalse: [class perform: startUpOrShutDown with: argument]] in
SmalltalkImage>>send:toClassesNamedIn:with:
OrderedCollection>>do:
SmalltalkImage>>send:toClassesNamedIn:with:
SmalltalkImage>>processStartUpList:
[self processStartUpList: resuming.
resuming
ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit:
BlockClosure>>ensure:
MorphicUIManager(UIManager)>>boot:during:
SmalltalkImage>>snapshot:andQuit:
SmalltalkImage>>saveSession
[SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot
Time class>>millisecondsToRun:
AIDASite class>>imageSnapshot
[AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot
[self block value] in WebScheduledEvent>>run
[self value.
Processor terminateActive] in BlockClosure>>newProcess
------------------------------------------------------------
--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
Oct. 4, 2011
Re: [Pharo-project] About Dictionary >> #at:ifAbsentPut:
by Michael Roberts
I find the thread a bit confused in the sense
Dictionary *new* at: x ifAbsentPut: y
does not make sense (is academic), because the new dictionary will
never have x as a key. So why profile it and use that as reasoning?...
whereas
myDict at:x ifAbsentPut: y
is more interesting.
In my experience i am biased by the use of the message in the systems
that already use it heavily...however it always feels that the use of
ifAbsentXX is intentionally deferring some code because it expresses
exceptional cases in the application logic. Especially if the block
makes an object you don't want to be doing that every time and
discarding the result irrespective of the presence of the key. It does
not have to be expensive to make, just not good style near any kind of
loop.
I know some people that actually don't like the ifAbsentPut: []
variant. and prefer to be explicit, of the form
(myDict includesKey: x) ifFalse: [
myDict at: x put: y]
where y is either a simple value or some expression.
here the test on the key has the same effect as expecting a block in
the inline ifAbsentPut: [] . It makes both forms basically the same,
with one being more compact if you prefer that. If ifAbsentPut: did
not expect the block then i think it would be a bit odd because you
would have to unroll the code in order to achieve the deferred case
which i feel is more common.
cheers,
Mike
On Tue, Oct 4, 2011 at 2:44 PM, Henrik Sperre Johansen
<henrik.s.johansen(a)veloxit.no> wrote:
> On 04.10.2011 12:52, Mariano Martinez Peck wrote:
>
> Hi guys. If I tell you the selector is Dictionary >> #at:ifAbsentPut:Â what
> would you expect the second parameter to be? the value.
> So, one would do:
> Dictionary new at: #foo ifAbsentPut: 4
>
> But if you see Dictionary >>
>
> at: key ifAbsentPut: aBlock
> Â Â Â "Return the value at the given key.
> Â Â Â If key is not included in the receiver store the result
> Â Â Â of evaluating aBlock as new value."
>
> Â Â Â ^ self at: key ifAbsent: [self at: key put: aBlock value]
>
> so it expects a Block. Ok, we are in Smalltalk, so implementing #value is
> enough.
>
> Well..the previous example works, but only because we have an ugly Object >>
> value that returns self.
> If I put instances of subclasses from ProtoObjects (proxies), that do not
> work anymore.
>
> So...my question is we do Dictionary at: #foo put: 4, why #at:ifAbsentPut:
> expects a block and not directly the value?
>
> Sven's reasons are correct I think, it's for efficiency, and elegant lazy
> initialization of a cache.
> The same reasons will never hold true when using #at:put:.
>
> in which case I need a block instead of the value object directly ?
>
> In addition to when you want delayed computation, when you have value
> objects who redefine/do not define #value ;)
>
> Cheers,
> Henry
>
Oct. 4, 2011
Re: [Pharo-project] RPackage / Metacello mystery woes
by Damien Pollet
On 4 October 2011 20:43, Stéphane Ducasse <stephane.ducasse(a)inria.fr> wrote:
> I do not see why this would be related to RPackage.
I don't know, that's just where things fail. The debuggers don't help
much because by the time they display, the objects have changed stateâ¦
Camillo had a similar looking problem because of #package: being
defined in just the wrong place by Coral (for the class creation
convenience syntax) but he fixed that and there were working builds
since then.
> On Oct 4, 2011, at 8:10 PM, Damien Pollet wrote:
>
>> Loading Coral is failing, apparently because something calls
>> #addMethod: on a Symbol, when it should have been an instance of
>> RPackageâ¦
>>
>> See for instance https://ci.lille.inria.fr/pharo/job/Coral/191/console
>>
>> I suspect it's coming from me updating ConfigurationOfCoral, which
>> indirectly (via PetitParser) depends on
>> ConfigurationOfRefactoringBrowser. I've seen MC try to load
>> Refactoring-Tests-Core (lr.54) on top of (MarcusDenker.54), and there
>> it complains some definitions are not there. If I proceed there, code
>> seems to load but a bunch of debuggers open at the end, all with a
>> similar error as the trace above.
>>
>> --
>> Damien Pollet
>> type less, do more [ | ] http://people.untyped.org/damien.pollet
>>
>
>
>
--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet
Oct. 4, 2011
Re: [Pharo-project] how to capture pasting in a textmorph
by Tudor Girba
Hi again,
Could anyone point me to how I should go about getting the changes related to changedAction: from Pharo 1.4 to Pharo 1.3?
Cheers,
Doru
On 7 Sep 2011, at 15:21, Tudor Girba wrote:
> How do I find the changes?
>
> Doru
>
>
> On 7 Sep 2011, at 14:56, Camillo Bruni wrote:
>
>> It has been integrated in 1.4 but I guess you can copy out the changes and merge them in 1.3 (though no guarantee that this works)â¦
>>
>> cami
>>
>> On 2011-09-07, at 10:22, Tudor Girba wrote:
>>> Is this available only in 1.4?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 7 Sep 2011, at 10:05, Camillo Bruni wrote:
>>>
>>>> I added a PluggableTextMorph >> #changedAction: which should do exactly that. It's currently used for the new ClassSerach widget which as a live-filtered list.
>>>>
>>>> cami
>>>>
>>>> On 2011-09-07, at 09:57, Tudor Girba wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have a PluggableTextMorph, and I would like to get notified every time the text contents change.
>>>>>
>>>>> Currently, I intercept keystroke:from:, but the problem is that this does not capture pasting of text. Is there a better hook?
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "Value is always contextual."
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "It's not how it is, it is how we see it."
>>>
>>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "Be rather willing to give than demanding to get."
>
>
>
--
www.tudorgirba.com
"Problem solving efficiency grows with the abstractness level of problem understanding."
Oct. 4, 2011
Re: [Pharo-project] Too many semaphores, image blocked
by Henrik Sperre Johansen
On 04.10.2011 20:57, Janko Mivšek wrote:
> Hi guys
>
> I have nonstartable Pharo 1.3 image, is there any way to get it started?
>
> This image was running all the time, being on the net directly (Aida
> based web development image) and snapshoting every hour.
>
> The problem happens at such snapshot, raising Not enough space for
> external objects/too many semaphores error and block. After I killed it,
> snapshoted image is not startable anymore, more exactly: it starts in
> blank window and stays unresponsive.
>
> Is this too many semaphores error related to too many open sockets
> problem we discussed not to long ago?
>
> Any help greatly appreciated. Not to mention finding a bug and removing
> it forever, because Pharo should become stable as a rock, as VW for
> instance is :)
>
> Best regards
> Janko
Yes, it is.
Seems there are so many semaphores open, it cannot register the one used
for event handler (done during startup), thus the image is unresponsive...
Which is rather weird, as it deregisters the current one as part of
shutDown, so there should always be at least one free, and this should
never happen... Unless you have something earlier in the startuplist
which consumes external semaphores without releasing them at shutDown?
... Which it seems to me you might.
HTTPServer when being #stop'ed correctly loses its socket (sets them to
nil so they are finalizable), but connections do not nil their sockets.
While the connections get removed from the HTTPServer instance's
connection list, are they mayhaps still referenced somewhere else?
A good way to debug it might be to open a connection to a Swazoo server,
save the image, then do a garbagecollect, HTTPConnection allInstances,
and follow references to see why the sockets aren't finalizable.
Cheers,
Henry
Oct. 4, 2011
[Pharo-project] [update 1.4] #14187
by Marcus Denker
14187
-----
Issue 4883: Rename ATestHasBeenRun into TestSuiteEnded
http://code.google.com/p/pharo/issues/detail?id=4883
--
Marcus Denker -- http://marcusdenker.de
Oct. 4, 2011
[Pharo-project] Too many semaphores, image blocked
by Janko Mivšek
Hi guys
I have nonstartable Pharo 1.3 image, is there any way to get it started?
This image was running all the time, being on the net directly (Aida
based web development image) and snapshoting every hour.
The problem happens at such snapshot, raising Not enough space for
external objects/too many semaphores error and block. After I killed it,
snapshoted image is not startable anymore, more exactly: it starts in
blank window and stays unresponsive.
Is this too many semaphores error related to too many open sockets
problem we discussed not to long ago?
Any help greatly appreciated. Not to mention finding a bug and removing
it forever, because Pharo should become stable as a rock, as VW for
instance is :)
Best regards
Janko
PharoDebug.log:
THERE_BE_DRAGONS_HERE
Error: Not enough space for external objects, set a larger size at startup!
4 October 2011 4:00:01 am
VM: unix - i686 - linux-gnu - Croquet Closure Cog VM [CoInterpreter
VMMaker-oscog.35]
Image: Pharo1.3 [Latest update: #13299]
SmalltalkImage(Object)>>error:
Receiver: Smalltalk
Arguments and temporary variables:
aString: 'Not enough space for external objects, set a larger size at
startup!'...etc...
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
SmalltalkImage>>maxExternalSemaphores:
Receiver: Smalltalk
Arguments and temporary variables:
aSize: 520
inProduction: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a
Semaphore...etc...
newSize: 520
needToGrow: false
maxSize: 512
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
externalObjects: an Array(a Semaphore() a Semaphore() a Semaphore() a
Semaphore...etc...
anObject: a Semaphore()
newObjects: nil
newSize: 520
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
ExternalSemaphoreTable class>>safelyRegisterExternalObject:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
anObject: a Semaphore()
objects: an Array(a Semaphore() a Semaphore() a Semaphore() a
Semaphore(a Proce...etc...
firstEmptyIndex: nil
obj: nil
sz: nil
newObjects: nil
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
[self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable
class>>registerExternalObject:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
anObject: a Semaphore()
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
[caught := true.
self wait.
blockValue := mutuallyExcludedBlock value] in Semaphore>>critical:
Receiver: a Semaphore()
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
firstLink: nil
lastLink: nil
excessSignals: 0
BlockClosure>>ensure:
Receiver: [caught := true.
self wait.
blockValue := mutuallyExcludedBlock value]
Arguments and temporary variables:
aBlock: [caught
ifTrue: [self signal]]
complete: nil
returnValue: nil
Receiver's instance variables:
outerContext: Semaphore>>critical:
startpc: 42
numArgs: 0
Semaphore>>critical:
Receiver: a Semaphore()
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
firstLink: nil
lastLink: nil
excessSignals: 0
ExternalSemaphoreTable class>>registerExternalObject:
Receiver: ExternalSemaphoreTable
Arguments and temporary variables:
anObject: a Semaphore()
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')
subclasses: nil
name: #ExternalSemaphoreTable
classPool: a Dictionary(#ProtectAdd->a Semaphore() #ProtectRemove->a
Semaphore(...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'System-Support'
traitComposition: {}
localSelectors: nil
SmalltalkImage>>registerExternalObject:
Receiver: Smalltalk
Arguments and temporary variables:
anObject: a Semaphore()
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
InputEventPollingFetcher(InputEventFetcher)>>startUp
Receiver: an InputEventPollingFetcher
Arguments and temporary variables:
Receiver's instance variables:
eventHandlers: an OrderedCollection(an InputEventSensor an
UserInterruptHandler...etc...
fetcherProcess: a Process in [delaySemaphore wait] in Delay>>wait
inputSemaphore: a Semaphore()
InputEventPollingFetcher class(InputEventFetcher class)>>startUp
Receiver: InputEventPollingFetcher
Arguments and temporary variables:
Receiver's instance variables:
superclass: InputEventFetcher
methodDict: a
MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc...
format: 136
instanceVariables: nil
organization: ('events' waitForInput)
('initialize-release' terminateEventLoop)...etc...
subclasses: nil
name: #InputEventPollingFetcher
classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs
remaining) )...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Kernel-Processes'
traitComposition: {}
localSelectors: nil
InputEventPollingFetcher class(Behavior)>>startUp:
Receiver: InputEventPollingFetcher
Arguments and temporary variables:
resuming: false
Receiver's instance variables:
superclass: InputEventFetcher
methodDict: a
MethodDictionary(#terminateEventLoop->(InputEventPollingFetcher>>...etc...
format: 136
instanceVariables: nil
organization: ('events' waitForInput)
('initialize-release' terminateEventLoop)...etc...
subclasses: nil
name: #InputEventPollingFetcher
classPool: a Dictionary(#EventPollDelay->a Delay(10 msecs; 9 msecs
remaining) )...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Kernel-Processes'
traitComposition: {}
localSelectors: nil
[:name |
| class |
class := self
at: name
ifAbsent: [].
class isNil
ifTrue: [removals add: name]
ifFalse: [class perform: startUpOrShutDown with: argument]] in
SmalltalkImage>>send:toClassesNamedIn:with:
Receiver: Smalltalk
Arguments and temporary variables:
startUpOrShutDown: #InputEventPollingFetcher
argument: #startUp:
removals: false
name: an OrderedCollection()
class: InputEventPollingFetcher
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
OrderedCollection>>do:
Receiver: an OrderedCollection(#Delay #OSPlatform #DisplayScreen
#Cursor #InputEventFetcher #Process...etc...
Arguments and temporary variables:
aBlock: [:name |
| class |
class := self
at: name
ifAbsent: [].
class...etc...
index: 60
Receiver's instance variables:
array: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil ni...etc...
firstIndex: 36
lastIndex: 74
SmalltalkImage>>send:toClassesNamedIn:with:
Receiver: Smalltalk
Arguments and temporary variables:
startUpOrShutDown: #startUp:
startUpOrShutDownList: an OrderedCollection(#Delay #OSPlatform
#DisplayScreen #...etc...
argument: false
removals: an OrderedCollection()
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
SmalltalkImage>>processStartUpList:
Receiver: Smalltalk
Arguments and temporary variables:
resuming: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
[self processStartUpList: resuming.
resuming
ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit:
Receiver: Smalltalk
Arguments and temporary variables:
resuming: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
BlockClosure>>ensure:
Receiver: [self processStartUpList: resuming.
resuming
ifTrue: [self recordStartupStamp]]
Arguments and temporary variables:
aBlock: [Default := self]
complete: nil
returnValue: nil
Receiver's instance variables:
outerContext: SmalltalkImage>>snapshot:andQuit:
startpc: 185
numArgs: 0
MorphicUIManager(UIManager)>>boot:during:
Receiver: a MorphicUIManager
Arguments and temporary variables:
bootingFromDisk: false
aBlock: [self processStartUpList: resuming.
resuming
ifTrue: [self recordSta...etc...
Receiver's instance variables:
interactiveParser: nil
SmalltalkImage>>snapshot:andQuit:
Receiver: Smalltalk
Arguments and temporary variables:
save: true
quit: false
snapshotResult: false
resuming: false
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
SmalltalkImage>>saveSession
Receiver: Smalltalk
Arguments and temporary variables:
Receiver's instance variables:
globals: a SystemDictionary(lots of globals)
deferredStartupActions: nil
[SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot
Receiver: AIDASite
Arguments and temporary variables:
Receiver's instance variables:
superclass: SwazooSite
methodDict: a MethodDictionary(size 203)
format: 156
instanceVariables: #('style' 'settings' 'systemServices'
'userServices' 'timest...etc...
organization: ('private-serving' activityAnnouncers addAllowHeaderTo:
addDontCa...etc...
subclasses: nil
name: #AIDASite
classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo
#HourlySnapshot-...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Aida-Core'
traitComposition: {}
localSelectors: nil
Time class>>millisecondsToRun:
Receiver: Time
Arguments and temporary variables:
timedBlock: [SmalltalkImage current saveSession]
initialMilliseconds: 155447683
Receiver's instance variables:
superclass: Magnitude
methodDict: a MethodDictionary(#<->(Time>>#< "a
CompiledMethod(736624640)") #=-...etc...
format: 134
instanceVariables: #('seconds' 'nanos')
organization: ('ansi protocol' < = duration hash hour hour12 hour24
meridianAbb...etc...
subclasses: nil
name: #Time
classPool: nil
sharedPools: an OrderedCollection(ChronologyConstants)
environment: a SystemDictionary(lots of globals)
category: #'Kernel-Chronology'
traitComposition: nil
localSelectors: nil
AIDASite class>>imageSnapshot
Receiver: AIDASite
Arguments and temporary variables:
elapsed: nil
Receiver's instance variables:
superclass: SwazooSite
methodDict: a MethodDictionary(size 203)
format: 156
instanceVariables: #('style' 'settings' 'systemServices'
'userServices' 'timest...etc...
organization: ('private-serving' activityAnnouncers addAllowHeaderTo:
addDontCa...etc...
subclasses: nil
name: #AIDASite
classPool: a Dictionary(#Default->an AIDASite #Dialect->#Pharo
#HourlySnapshot-...etc...
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: #'Aida-Core'
traitComposition: {}
localSelectors: nil
[AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot
Receiver: an AIDASite
Arguments and temporary variables:
Receiver's instance variables:
enabled: true
uriPattern: an OrderedCollection(a SiteIdentifier)
parent: a ServerRootComposite
children: an OrderedCollection()
name: 'aidademo'
serving: true
style: a WasteStyle
settings: a Dictionary(#afterLogin->#lastPage
#contextProcesses->false #countin...etc...
systemServices: a Dictionary(#Admin->a WebAdmin #Authenticator->a
DefaultAuthen...etc...
userServices: a Dictionary(#Blog->a Blog #Repository->a
WasteRepository #SiteCo...etc...
timestamps: an IdentityDictionary(#Created->3491250844
#LastRequest->3494848717...etc...
counters: an IdentityDictionary(#NewVisitors->a WebCounter
#NotFound->a WebCoun...etc...
other: a Dictionary(#activityAnnouncers->a Dictionary() )
[self block value] in WebScheduledEvent>>run
Receiver: a WebScheduledEvent
Arguments and temporary variables:
Receiver's instance variables:
parent: a WebScheduler
timestamp: a SpTimestamp
period: #hour->0
method: nil
object: nil
block: [AIDASite preImageSnapshot; imageSnapshot]
[self value.
Processor terminateActive] in BlockClosure>>newProcess
Receiver: [self block value]
Arguments and temporary variables:
Receiver's instance variables:
outerContext: WebScheduledEvent>>run
startpc: 78
numArgs: 0
--- The full stack ---
SmalltalkImage(Object)>>error:
SmalltalkImage>>maxExternalSemaphores:
ExternalSemaphoreTable class>>freedSlotsIn:ratherThanIncreaseSizeTo:
ExternalSemaphoreTable class>>collectionBasedOn:withRoomFor:
ExternalSemaphoreTable class>>safelyRegisterExternalObject:
[self safelyRegisterExternalObject: anObject] in ExternalSemaphoreTable
class>>registerExternalObject:
[caught := true.
self wait.
blockValue := mutuallyExcludedBlock value] in Semaphore>>critical:
BlockClosure>>ensure:
Semaphore>>critical:
ExternalSemaphoreTable class>>registerExternalObject:
SmalltalkImage>>registerExternalObject:
InputEventPollingFetcher(InputEventFetcher)>>startUp
InputEventPollingFetcher class(InputEventFetcher class)>>startUp
InputEventPollingFetcher class(Behavior)>>startUp:
[:name |
| class |
class := self
at: name
ifAbsent: [].
class isNil
ifTrue: [removals add: name]
ifFalse: [class perform: startUpOrShutDown with: argument]] in
SmalltalkImage>>send:toClassesNamedIn:with:
OrderedCollection>>do:
SmalltalkImage>>send:toClassesNamedIn:with:
SmalltalkImage>>processStartUpList:
[self processStartUpList: resuming.
resuming
ifTrue: [self recordStartupStamp]] in SmalltalkImage>>snapshot:andQuit:
BlockClosure>>ensure:
MorphicUIManager(UIManager)>>boot:during:
SmalltalkImage>>snapshot:andQuit:
SmalltalkImage>>saveSession
[SmalltalkImage current saveSession] in AIDASite class>>imageSnapshot
Time class>>millisecondsToRun:
AIDASite class>>imageSnapshot
[AIDASite preImageSnapshot; imageSnapshot] in AIDASite>>initHourlySnapshot
[self block value] in WebScheduledEvent>>run
[self value.
Processor terminateActive] in BlockClosure>>newProcess
------------------------------------------------------------
--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
Oct. 4, 2011