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
February 2010
- 92 participants
- 1270 messages
Re: [Pharo-project] Streams. Status and where to go?
by Igor Stasenko
On 28 February 2010 14:33, Nicolas Cellier
<nicolas.cellier.aka.nice(a)gmail.com> wrote:
> 2010/2/28 Igor Stasenko <siguctua(a)gmail.com>:
>> On 28 February 2010 12:45, Nicolas Cellier
......
>
> Anyway, main contributor of UTF8Decoder inefficiency is
> Unicode>>value: and leadingChar handling:
>
btw, why its using #value: , not more efficient charFromUnicode: ?
value: code
| l |
code < 256 ifTrue: [^ Character value: code].
l := Locale currentPlatform languageEnvironment leadingChar.
l = 0 ifTrue: [l := 255].
^ Character leadingChar: l code: code.
for unicode leadingChar is always 255 (see Unicode>>leadingChar)
So, i'm not sure what this code with Locale doing here?
Btw, converter could use a 'leadingChar' ivar, which can be initialized to
Locale currentPlatform languageEnvironment leadingChar. (if this correct),
or Unicode>>leadingChar , which i feel more correct.
And then just build chars by own, without using Unicode global:
Character leadingChar: leadingChar code: uniCode
> | str |
> str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream binary.
> MessageTally spyOn:
> [ (UTF8Decoder new source: str readXtream buffered)
> buffered upToEnd ]
>
>
> Â - 133 tallies, 133 msec.
>
> **Tree**
> --------------------------------
> Process: (40) 37486: nil
> --------------------------------
> 99.2% {132ms} BufferedReadXtream>>checkAvailableDataInBuffer
> Â 99.2% {132ms} BufferedReadXtream>>readNextBuffer
> Â Â 99.2% {132ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
> Â Â Â 50.4% {67ms} UTF8Decoder>>next
> Â Â Â Â |45.1% {60ms} Unicode class>>value:
> Â Â Â Â | Â |30.1% {40ms} Locale>>languageEnvironment
> Â Â Â Â | Â | Â |29.3% {39ms} LanguageEnvironment class>>localeID:
> Â Â Â Â | Â | Â | Â 29.3% {39ms} Dictionary>>at:ifAbsent:
> Â Â Â Â | Â | Â | Â Â 27.1% {36ms} Dictionary>>scanFor:
> Â Â Â Â | Â | Â | Â Â Â |15.0% {20ms} LocaleID>>=
> Â Â Â Â | Â | Â | Â Â Â | Â |6.0% {8ms} UndefinedObject(Object)>>=
> Â Â Â Â | Â | Â | Â Â Â | Â |6.0% {8ms} primitives
> Â Â Â Â | Â | Â | Â Â Â | Â |3.0% {4ms} ByteString(String)>>=
> Â Â Â Â | Â | Â | Â Â Â | Â | Â 2.3% {3ms} primitives
> Â Â Â Â | Â | Â | Â Â Â |9.8% {13ms} LocaleID>>hash
> Â Â Â Â | Â | Â | Â Â Â | Â |6.8% {9ms} ByteString(String)>>hash
> Â Â Â Â | Â | Â | Â Â Â | Â |2.3% {3ms} UndefinedObject(Object)>>hash
> Â Â Â Â | Â | Â | Â Â Â | Â | Â 1.5% {2ms} primitives
> Â Â Â Â | Â | Â | Â Â Â |2.3% {3ms} primitives
> Â Â Â Â | Â | Â | Â Â 2.3% {3ms} primitives
> Â Â Â Â | Â |9.8% {13ms} Character class>>leadingChar:code:
> Â Â Â Â | Â | Â |5.3% {7ms} Character class>>value:
> Â Â Â Â | Â | Â | Â |3.0% {4ms} primitives
> Â Â Â Â | Â | Â | Â |2.3% {3ms} Character>>setValue:
> Â Â Â Â | Â | Â |4.5% {6ms} primitives
> Â Â Â Â | Â |2.3% {3ms} primitives
> Â Â Â Â | Â |1.5% {2ms} Latin1Environment(LanguageEnvironment)>>leadingChar
> Â Â Â Â | Â |1.5% {2ms} Locale class>>currentPlatform
> Â Â Â Â |3.0% {4ms} CollectionReadXtream>>next
> Â Â Â Â |2.3% {3ms} primitives
> Â Â Â 18.8% {25ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
> Â Â Â Â |9.8% {13ms} UTF8Decoder>>next
> Â Â Â Â | Â |9.0% {12ms} Unicode class>>value:
> Â Â Â Â | Â | Â 6.0% {8ms} Locale>>languageEnvironment
> Â Â Â Â | Â | Â Â |5.3% {7ms} LanguageEnvironment class>>localeID:
> Â Â Â Â | Â | Â Â | Â 5.3% {7ms} Dictionary>>at:ifAbsent:
> Â Â Â Â | Â | Â Â | Â Â 5.3% {7ms} Dictionary>>scanFor:
> Â Â Â Â | Â | Â Â | Â Â Â 3.0% {4ms} LocaleID>>=
> Â Â Â Â | Â | Â Â | Â Â Â Â |1.5% {2ms} UndefinedObject(Object)>>=
> Â Â Â Â | Â | Â Â | Â Â Â Â |1.5% {2ms} ByteString(String)>>=
> Â Â Â Â | Â | Â Â | Â Â Â Â | Â 1.5% {2ms}
> ByteString(String)>>compare:with:collated:
> Â Â Â Â | Â | Â Â | Â Â Â 2.3% {3ms} LocaleID>>hash
> Â Â Â Â | Â | Â Â | Â Â Â Â 1.5% {2ms} UndefinedObject(Object)>>hash
> Â Â Â Â | Â | Â 2.3% {3ms} Latin1Environment(LanguageEnvironment)>>leadingChar
> Â Â Â Â |5.3% {7ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
> Â Â Â Â | Â |3.0% {4ms} UTF8Decoder>>next
> Â Â Â Â | Â | Â |3.0% {4ms} Unicode class>>value:
> Â Â Â Â | Â | Â | Â 2.3% {3ms} Locale>>languageEnvironment
> Â Â Â Â | Â | Â | Â Â 2.3% {3ms} LanguageEnvironment class>>localeID:
> Â Â Â Â | Â | Â | Â Â Â 2.3% {3ms} Dictionary>>at:ifAbsent:
> Â Â Â Â | Â | Â | Â Â Â Â 2.3% {3ms} Dictionary>>scanFor:
> Â Â Â Â | Â |1.5% {2ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
> Â Â Â Â |2.3% {3ms} ByteArray(SequenceableCollection)>>readXtreamFrom:to:
> Â Â Â Â | Â 1.5% {2ms} CollectionReadXtream class>>read:from:to:
> Â Â Â Â | Â Â 1.5% {2ms} CollectionReadXtream>>read:from:to:
> Â Â Â 13.5% {18ms} ByteArray(SequenceableCollection)>>readXtreamFrom:to:
> Â Â Â Â |10.5% {14ms} CollectionReadXtream class>>read:from:to:
> Â Â Â Â | Â |6.8% {9ms} CollectionReadXtream>>read:from:to:
> Â Â Â Â | Â | Â |3.0% {4ms} primitives
> Â Â Â Â | Â | Â |2.3% {3ms} SmallInteger(Magnitude)>>max:
> Â Â Â Â | Â | Â |1.5% {2ms} SmallInteger(Magnitude)>>min:
> Â Â Â Â | Â |2.3% {3ms} CollectionReadXtream class(Behavior)>>new
> Â Â Â Â | Â |1.5% {2ms} primitives
> Â Â Â Â |3.0% {4ms} primitives
> Â Â Â 3.8% {5ms} Unicode class>>value:
> Â Â Â Â |3.0% {4ms} primitives
> Â Â Â 2.3% {3ms} CollectionReadXtream>>position
> Â Â Â 2.3% {3ms} CollectionReadXtream(ReadXtream)>>endOfStreamAction:
> Â Â Â 2.3% {3ms} primitives
> Â Â Â 1.5% {2ms} ByteString>>at:put:
> Â Â Â 1.5% {2ms} WideString class(Behavior)>>isBytes
> Â Â Â 1.5% {2ms} UTF8Decoder(ReadXtream)>>source:
> Â Â Â 1.5% {2ms} WideString>>at:put:
>
> **Leaves**
> 7.5% {10ms} UndefinedObject(Object)>>=
> 6.8% {9ms} LocaleID>>=
> 6.8% {9ms} ByteString(String)>>hash
> 6.0% {8ms} Unicode class>>value:
> 4.5% {6ms} Character class>>leadingChar:code:
> 3.8% {5ms} CollectionReadXtream>>position
> 3.8% {5ms} CollectionReadXtream>>read:from:to:
> 3.8% {5ms} ByteArray(SequenceableCollection)>>readXtreamFrom:to:
> 3.8% {5ms} CollectionReadXtream>>next
> 3.8% {5ms} Latin1Environment(LanguageEnvironment)>>leadingChar
> 3.8% {5ms} Character class>>value:
> 3.0% {4ms} UndefinedObject(Object)>>hash
> 3.0% {4ms} WideString>>at:put:
> 3.0% {4ms} Dictionary>>scanFor:
> 3.0% {4ms} SmallInteger(Magnitude)>>max:
> 3.0% {4ms} Character>>setValue:
> 3.0% {4ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
> 2.3% {3ms} CollectionReadXtream(ReadXtream)>>endOfStreamAction:
> 2.3% {3ms} UndefinedObject(ProtoObject)>>scaledIdentityHash
> 2.3% {3ms} UTF8Decoder>>next
> 2.3% {3ms} ByteString(String)>>compare:with:collated:
> 2.3% {3ms} Dictionary>>at:ifAbsent:
> 2.3% {3ms} CollectionReadXtream class(Behavior)>>new
> 2.3% {3ms} ByteString(String)>>=
> 1.5% {2ms} Locale class>>currentPlatform
> 1.5% {2ms} LocaleID>>hash
> 1.5% {2ms} Locale>>languageEnvironment
> 1.5% {2ms} UTF8Decoder(ReadXtream)>>source:
> 1.5% {2ms} CollectionReadXtream class>>read:from:to:
> 1.5% {2ms} SmallInteger(Magnitude)>>min:
>
> **Memory**
>     old           +0 bytes
>     young      -454,224 bytes
>     used       -454,224 bytes
>     free       +454,224 bytes
>
> **GCs**
>     full           0 totalling 0ms (0.0% uptime)
>     incr       15 totalling 14ms (11.0% uptime), avg 1.0ms
>     tenures     0
>     root table    0 overflows
>
>
>>>>> Nicolas
>>>>>
>>>>>> --
>>>>>> Best regards,
>>>>>> Igor Stasenko AKA sig.
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Igor Stasenko AKA sig.
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
--
Best regards,
Igor Stasenko AKA sig.
Feb. 28, 2010
Re: [Pharo-project] Infinite Loop and Ctrl+.
by Adrian Lienhard
Sure, no worries. In any case it would be nice if it always worked...
Adrian
On Feb 28, 2010, at 13:52 , Lukas Renggli wrote:
> I wasn't implying that this was the fault of Pharo. I just noticed it
> suddenly and I somehow thought that this worked at some point in the
> past, but I might be wrong.
>
> Lukas
>
> On 28 February 2010 13:29, Adrian Lienhard <adi(a)netstyle.ch> wrote:
>> It worked for me the first time I tried, but not the second time (the VM eventually crashed).
>>
>> Already in Squeak 3.9 it was sometimes impossible to break endless recursions. So I'm not sure if this related to changes in Pharo 1.0.
>>
>> Adrian
>>
>> On Feb 26, 2010, at 16:50 , Lukas Renggli wrote:
>>
>>>>> Is this just me that suddenly cannot break out of an infinite loop
>>>>> with Ctrl+. in Pharo 1.0 anymore?
>>>>
>>>> Works here. [true] whileTrue: []
>>>
>>> Yes, that works for me too, but try:
>>>
>>> UndefinedObject compile: 'foo self foo'.
>>> nil foo
>>>
>>>> Which vm are you using? Squeak 4.2.2beta1U here right now...
>>>
>>> Yes, I am using this one too.
>>>
>>> Lukas
>>>
>>> --
>>> Lukas Renggli
>>> http://www.lukas-renggli.ch
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Feb. 28, 2010
Re: [Pharo-project] about code formatting in pharo
by Adrian Lienhard
I've attached the coding conventions that we use at Cmsbox and netstyle.ch. They closely follow the suggestions of Kent Beck's "Smalltalk Best Practice Patterns".
According to these rules I would format the following example:
---------------
1 to: (mine size min: his size) do:
[ :ind |
(mine at: ind) = (his at: ind)
ifTrue: [ self instVarAt: ind put: (anotherObject instVarAt: ind) ] ].
---------------
as:
---------------
1
to: (mine size min: his size)
do: [ :index |
(mine at: index) = (his at: index) ifTrue: [
self
instVarAt: index
put: (anotherObject instVarAt: index) ] ].
---------------
Putting "[ :ind |" on a new line and using multiple tab indentation looks horrible to me.
Cheers,
Adrian
On Feb 28, 2010, at 12:47 , Igor Stasenko wrote:
> On 28 February 2010 12:44, Stéphane Ducasse <stephane.ducasse(a)inria.fr> wrote:
>> But, if there is only single block, i usually typing:
>>
>> self bla ifTrue: [
>> code.
>> code.
>> ]
>>
>> Yes I see
>> I would prefer
>>
>> self bla ifTrue: [
>> code.
>> code. ]
>>
>>
>> for me I try
>>
>>> self bla ifTrue: [ code ].
>>
> yes, one-liner is ok, but only if its short.
>
> The most disguising thing in formatting an exception handling code:
>
> runTest: aSelector
>
> | actualResult expectedResult |
> [ self
> logTest: aSelector;
> clearLog;
> perform: aSelector ]
> on: MyTestError do:
> [ :ex | self log: 'Unhandled Exception'.
> ex return: nil ].
>
> as you can see, its a bit hard to quickly determine, where ends one
> block and starts another one.
> That's why i'm always putting ' ] ' at the next line, and align its
> indentation to be the same as in opening brace:
>
> [ self
> logTest: aSelector;
> clearLog;
> perform: aSelector
> ]
> on: MyTestError do:
> [ :ex | self log: 'Unhandled Exception'.
> ex return: nil
> ].
>
> do you agree that this one is much more readable?
>
>>
>> or
>> self bla
>> ifTrue: [ code.
>> code.]
>>
>> but I'm not happy because tabbing does not work to align the last line.
>> So any ideas. I have to reread the kent book.
>>
>> Stef
>>
>>> also i'm usually putting closing ' ] ' at new line, but indented
>>> relatively to receiver, not like:
>>>
>>>
>>> self bla ifTrue: [
>>> code.
>>> code. ]
>>>
>>>
>>> Also, if statement ends with ']' , i adding a blank like at the end:
>>>
>>>
>>> self bla ifTrue: [
>>> code.
>>> ].
>>>
>>> self bla ifTrue: [
>>> code.
>>> ].
>>>
>>>
>>>>
>>>>> I would use a formatter, like this you can make it really consistent.
>>>>> The RBConfigurableFormatter is pretty good in that, the only thing I
>>>>> don't like is the placing of the square brackets. I should look into
>>>>> fixing that, otherwise it formats exactly the way I would format
>>>>> myself (and in the way you propose).
>>>>
>>>> I would really like to play with the idea of automatic formatting
>>>> to see how it goes.
>>>>
>>>> Stef
>>>>
>>>>>
>>>>> Lukas
>>>>>
>>>>> On 28 February 2010 10:36, stephane ducasse <stephane.ducasse(a)free.fr> wrote:
>>>>>> Hi guys
>>>>>>
>>>>>> I would like to build a set of canonical code formatting convention for Pharo.
>>>>>> I need your help. Now take time before replying :)
>>>>>> I would like to structure the discussion and proceed step by step. So at max I would like to discuss one or two formatting approach per mail.
>>>>>> Once we agree I would like to define a wiki page.
>>>>>>
>>>>>>
>>>>>> **Space after : rule
>>>>>> =============
>>>>>> for example I would like to always have a space after a :
>>>>>>
>>>>>> classes := Smalltalk allClasses select:[:aClass|
>>>>>> (aClass class includesSelector: #cleanUp)
>>>>>> or:[aClass class includesSelector: #cleanUp:]
>>>>>> ].
>>>>>>
>>>>>> ->
>>>>>>
>>>>>>
>>>>>> classes := Smalltalk allClasses select: [:aClass|
>>>>>> (aClass class includesSelector: #cleanUp)
>>>>>> or: [aClass class includesSelector: #cleanUp:]
>>>>>> ].
>>>>>>
>>>>>>
>>>>>> **Block arg rule
>>>>>> =============
>>>>>> Do we want a space before and after block arg
>>>>>>
>>>>>> Smalltalk allClasses select: [:aClass :method|
>>>>>>
>>>>>> -> Smalltalk allClasses select: [ :aClass :method |
>>>>>>
>>>>>>
>>>>>> ** selector or block indented compared to receiver
>>>>>> =======================================
>>>>>>
>>>>>> Finally do we follow kent block ideas?
>>>>>>
>>>>>> classes := Smalltalk allClasses select: [:aClass|
>>>>>> (aClass class includesSelector: #cleanUp)
>>>>>> or: [aClass class includesSelector: #cleanUp:]
>>>>>> ].
>>>>>>
>>>>>> ->
>>>>>> classes := Smalltalk allClasses
>>>>>> select: [:aClass| (aClass class includesSelector: #cleanUp)
>>>>>> or: [aClass class includesSelector: #cleanUp:]].
>>>>>>
>>>>>> Stef
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Lukas Renggli
>>>>> http://www.lukas-renggli.ch
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Feb. 28, 2010
Re: [Pharo-project] Infinite Loop and Ctrl+.
by Lukas Renggli
I wasn't implying that this was the fault of Pharo. I just noticed it
suddenly and I somehow thought that this worked at some point in the
past, but I might be wrong.
Lukas
On 28 February 2010 13:29, Adrian Lienhard <adi(a)netstyle.ch> wrote:
> It worked for me the first time I tried, but not the second time (the VM eventually crashed).
>
> Already in Squeak 3.9 it was sometimes impossible to break endless recursions. So I'm not sure if this related to changes in Pharo 1.0.
>
> Adrian
>
> On Feb 26, 2010, at 16:50 , Lukas Renggli wrote:
>
>>>> Is this just me that suddenly cannot break out of an infinite loop
>>>> with Ctrl+. in Pharo 1.0 anymore?
>>>
>>> Works here. [true] whileTrue: []
>>
>> Yes, that works for me too, but try:
>>
>> Â UndefinedObject compile: 'foo self foo'.
>> Â nil foo
>>
>>> Which vm are you using? Squeak 4.2.2beta1U here right now...
>>
>> Yes, I am using this one too.
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
--
Lukas Renggli
http://www.lukas-renggli.ch
Feb. 28, 2010
Re: [Pharo-project] Simple (but effective) Optimization of PackageOrganizer
by Serge Stinckwich
Good to now that you are going fine ;-) I'm currently in Paris. I'm
leaving to Ha Noi this afternoon but there is a big tempest in Europe
right now, a lot of flights have been canceled ...
On Sun, Feb 28, 2010 at 12:56 PM, Alexandre Bergel <alexandre(a)bergel.eu> wrote:
> Johan and Romain are fine too. This morning a new shake woke me up...
> It should be like this for the next weeks.
>
> Alexandre
>
>
> On 28 Feb 2010, at 06:44, Stéphane Ducasse wrote:
>
>> Let us know. Seems to be a really big earthquake.
>> Probably at santiago some old houses suffered but not the new ones.
>>
>> Stef
>>
>> On Feb 28, 2010, at 1:39 AM, Alexandre Bergel wrote:
>>
>>> Fortunately yes. I am currently on the seaside, these has been some
>>> tsunami alert, but I haven't more than a very strong tide.
>>> Wondering how I will find my flat in Santiago.
>>>
>>> Thanks for asking,
>>> Alexandre
>>>
>>>
>>> On 27 Feb 2010, at 08:17, Serge Stinckwich wrote:
>>>
>>>> I see that a big earthquake hit Chile :
>>>> http://www.alertnet.org/thenews/newsdesk/LDE61Q02O.htm
>>>> I hope everything is ok with you.
>>>>
>>>> On Fri, Feb 26, 2010 at 6:58 PM, Alexandre Bergel
>>>> <alexandre(a)bergel.eu> wrote:
>>>>> issue #2085
>>>>>
>>>>> Replace the method PackageOrganizer>>packageOfClass: aClass ifNone:
>>>>> errorBlock by
>>>>> -=-=-=-=-=
>>>>> packageOfClass: aClass ifNone: errorBlock
>>>>> Â Â Â | classCategory |
>>>>> Â Â Â classCategory := aClass category.
>>>>> Â Â Â packages at: classCategory ifPresent: [:v | ^ v].
>>>>>
>>>>> Â Â Â (classCategory includes: $-)
>>>>> Â Â Â Â Â Â Â ifTrue: [ packages at: (classCategory copyUpTo: $-)
>>>>> ifPresent: [:v |
>>>>> ^ v] ].
>>>>>
>>>>> Â Â Â ^ self packages detect: [:ea | ea includesClass: aClass]
>>>>> ifNone:
>>>>> errorBlock
>>>>> -=-=-=-=-=
>>>>>
>>>>> Before this enhancement:
>>>>> [100 timesRepeat: [Object package]] timeToRun
>>>>> => 141
>>>>>
>>>>> After the fix:
>>>>> => 2
>>>>>
>>>>> Easy thing to do.
>>>>>
>>>>> Cheers,
>>>>> Alexandre
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Serge Stinckwich
>>>> UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
>>>> Smalltalkers do: [:it | All with: Class, (And love: it)]
>>>> http://doesnotunderstand.org/
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Smalltalkers do: [:it | All with: Class, (And love: it)]
http://doesnotunderstand.org/
Feb. 28, 2010
Re: [Pharo-project] Streams. Status and where to go?
by Nicolas Cellier
2010/2/28 Igor Stasenko <siguctua(a)gmail.com>:
> On 28 February 2010 12:45, Nicolas Cellier
> <nicolas.cellier.aka.nice(a)gmail.com> wrote:
>> 2010/2/28 Igor Stasenko <siguctua(a)gmail.com>:
>>> On 28 February 2010 12:00, Nicolas Cellier
>>> <nicolas.cellier.aka.nice(a)gmail.com> wrote:
>>>> 2010/2/28 Igor Stasenko <siguctua(a)gmail.com>:
>>>>> Hi, i'm also did some hacking. I uploaded XTream-Wrappers-sig.1 into SqS/XTream.
>>>>>
>>>>> There is a basic XtreamWrapper class, which should work transparently
>>>>> for any stream (hopefully ;).
>>>>> Next, in subclass i created converter. Sure thing i could also add a
>>>>> buffered wrapper, but maybe later :)
>>>>>
>>>>> Here some benchmarks. The file i used to test is utf-8 russian doc
>>>>> text - in attachment..
>>>>>
>>>>> | str |
>>>>> str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream.
>>>>> {
>>>>> [ str reset. (XtreamUTF8Converter on: str readXtream) upToEnd ] bench.
>>>>> [ str reset. (UTF8Decoder new source: str readXtream) upToEnd ] bench.
>>>>> }
>>>>> #('21.71314741035857 per second.' '14.0371688414393 per second.')
>>>>> Â #('22.16896345116836 per second.' '14.5186953062848 per second.')
>>>>>
>>>>> Next, buffered
>>>>>
>>>>> | str |
>>>>> str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream.
>>>>> {
>>>>> [ str reset. (XtreamUTF8Converter on: str readXtream buffered) upToEnd ] bench.
>>>>> [ str reset. (UTF8Decoder new source: str readXtream buffered) upToEnd ] bench.
>>>>> }
>>>>> #('58.52976428286057 per second.' '25.44225800039754 per second.')
>>>>> #('58.90575079872205 per second.' '25.87064676616916 per second.')
>>>>>
>>>>>
>>>>> I'm also tried double-buffering, but neither my class nor yours
>>>>> currently works with it:
>>>>>
>>>>> | str |
>>>>> str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream.
>>>>> {
>>>>> [ str reset. (XtreamUTF8Converter on: str readXtream buffered)
>>>>> buffered upToEnd ] bench.
>>>>> [ str reset. (UTF8Decoder new source: str readXtream buffered)
>>>>> buffered upToEnd ] bench.
>>>>> }
>>>>>
>>>>> Please , take a look. There are some quirks which not because i
>>>>> cleaned up decoding/encoding code.
>>>>> See XtreamWrapper>>upToEnd implementation.
>>>>>
>>>>>
>>>>
>>>> Yes I published a bit soon and messed up because one temp from text
>>>> converter method (source) had same name as CharacterDecoder inst var
>>>> :(
>>>> Find a second attempt:
>>>>
>>>> | str |
>>>> str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream binary.
>>>> {
>>>> [ str reset. (XtreamUTF8Converter on: str readXtream buffered)
>>>> buffered upToEnd ] bench.
>>>> [ str reset. (UTF8Decoder new source: str readXtream buffered)
>>>> buffered upToEnd ] bench.
>>>> }
>>>> #('118.0347513481126 per second.' '31.38117129722167 per second.')
>>>>
>>>>
>>>> As you can see, the optimistic ASCII version is pessimistic in case of
>>>> non ASCII...
>>>> It creates a composite stream and perform a lot of copys...
>>>> This is known and waiting better algorithm :)
>>>>
>>>
>>> whoops.. you got more than 3x speedup, while mine was around 2x.
>>> But please, try on ascii files.
>>>
>>> Â | str |
>>> Â str := (String new: 1000 withAll: $a) asByteArray.
>>> Â {
>>> Â [ (XtreamUTF8Converter on: str readXtream binary) Â upToEnd ] bench.
>>> Â [ (UTF8Decoder new source: str readXtream binary) Â upToEnd ] bench.
>>> Â [ str readXtream binary upToEnd ] bench.
>>> Â }
>>> Â #('2039.392121575685 per second.' '1158.568286342731 per second.'
>>> '92143.1713657269 per second.')
>>>
>>> so, conversion is 90..45 times slower than just copying data :)
>>> We need to tighten up this gap.
>>> One would be to optimize #readInto:startingAt:count: using batch-mode
>>> conversion.
>>>
>>
>> Igor, you also got a problem:
>>
>> | str |
>> str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream binary.
>> (XtreamUTF8Converter on: str readXtream) upToEnd = (StandardFileStream
>> readOnlyFileNamed: 'unitext.txt') contents utf8ToSqueak
>> -> false
>>
>> unless it's utf8ToSqueak and leadingChar stuff...
>>
> yes, this is because of wrong quirk in XtreamWrapper>>upToEnd
> i also tried to replace #next: by #nextAvailable:
> but it still not working right - returns 8192 characters (4 fully read
> buffers), but missing the tail, when buffer is underflow due to
> meeting end of file.
> By reverting this method back to same as in ReadXtream it works
> correctly, but apparently will be slower:
>
> (XtreamUTF8Converter on: Â (StandardFileStream readOnlyFileNamed:
> 'unitext.txt') readXtream binary) contents size 10153
> (StandardFileStream readOnlyFileNamed: 'unitext.txt') contents
> utf8ToSqueak size  10153
>
> Please see what can be done in this regard.
>
> P.S. tried to bench it without my quirk.. Â heh, not so slower....
> Â | str |
> str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream binary.
> {
> [ str reset. (XtreamUTF8Converter on: str readXtream buffered) upToEnd ] bench.
> [ str reset. (UTF8Decoder new source: str readXtream buffered) upToEnd ] bench.
> Â }
> Â #('66.653362602275 per second.' '27.16197323746755 per second.')
>
Anyway, main contributor of UTF8Decoder inefficiency is
Unicode>>value: and leadingChar handling:
| str |
str := (StandardFileStream readOnlyFileNamed: 'unitext.txt') readXtream binary.
MessageTally spyOn:
[ (UTF8Decoder new source: str readXtream buffered)
buffered upToEnd ]
- 133 tallies, 133 msec.
**Tree**
--------------------------------
Process: (40) 37486: nil
--------------------------------
99.2% {132ms} BufferedReadXtream>>checkAvailableDataInBuffer
99.2% {132ms} BufferedReadXtream>>readNextBuffer
99.2% {132ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
50.4% {67ms} UTF8Decoder>>next
|45.1% {60ms} Unicode class>>value:
| |30.1% {40ms} Locale>>languageEnvironment
| | |29.3% {39ms} LanguageEnvironment class>>localeID:
| | | 29.3% {39ms} Dictionary>>at:ifAbsent:
| | | 27.1% {36ms} Dictionary>>scanFor:
| | | |15.0% {20ms} LocaleID>>=
| | | | |6.0% {8ms} UndefinedObject(Object)>>=
| | | | |6.0% {8ms} primitives
| | | | |3.0% {4ms} ByteString(String)>>=
| | | | | 2.3% {3ms} primitives
| | | |9.8% {13ms} LocaleID>>hash
| | | | |6.8% {9ms} ByteString(String)>>hash
| | | | |2.3% {3ms} UndefinedObject(Object)>>hash
| | | | | 1.5% {2ms} primitives
| | | |2.3% {3ms} primitives
| | | 2.3% {3ms} primitives
| |9.8% {13ms} Character class>>leadingChar:code:
| | |5.3% {7ms} Character class>>value:
| | | |3.0% {4ms} primitives
| | | |2.3% {3ms} Character>>setValue:
| | |4.5% {6ms} primitives
| |2.3% {3ms} primitives
| |1.5% {2ms} Latin1Environment(LanguageEnvironment)>>leadingChar
| |1.5% {2ms} Locale class>>currentPlatform
|3.0% {4ms} CollectionReadXtream>>next
|2.3% {3ms} primitives
18.8% {25ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
|9.8% {13ms} UTF8Decoder>>next
| |9.0% {12ms} Unicode class>>value:
| | 6.0% {8ms} Locale>>languageEnvironment
| | |5.3% {7ms} LanguageEnvironment class>>localeID:
| | | 5.3% {7ms} Dictionary>>at:ifAbsent:
| | | 5.3% {7ms} Dictionary>>scanFor:
| | | 3.0% {4ms} LocaleID>>=
| | | |1.5% {2ms} UndefinedObject(Object)>>=
| | | |1.5% {2ms} ByteString(String)>>=
| | | | 1.5% {2ms}
ByteString(String)>>compare:with:collated:
| | | 2.3% {3ms} LocaleID>>hash
| | | 1.5% {2ms} UndefinedObject(Object)>>hash
| | 2.3% {3ms} Latin1Environment(LanguageEnvironment)>>leadingChar
|5.3% {7ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
| |3.0% {4ms} UTF8Decoder>>next
| | |3.0% {4ms} Unicode class>>value:
| | | 2.3% {3ms} Locale>>languageEnvironment
| | | 2.3% {3ms} LanguageEnvironment class>>localeID:
| | | 2.3% {3ms} Dictionary>>at:ifAbsent:
| | | 2.3% {3ms} Dictionary>>scanFor:
| |1.5% {2ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
|2.3% {3ms} ByteArray(SequenceableCollection)>>readXtreamFrom:to:
| 1.5% {2ms} CollectionReadXtream class>>read:from:to:
| 1.5% {2ms} CollectionReadXtream>>read:from:to:
13.5% {18ms} ByteArray(SequenceableCollection)>>readXtreamFrom:to:
|10.5% {14ms} CollectionReadXtream class>>read:from:to:
| |6.8% {9ms} CollectionReadXtream>>read:from:to:
| | |3.0% {4ms} primitives
| | |2.3% {3ms} SmallInteger(Magnitude)>>max:
| | |1.5% {2ms} SmallInteger(Magnitude)>>min:
| |2.3% {3ms} CollectionReadXtream class(Behavior)>>new
| |1.5% {2ms} primitives
|3.0% {4ms} primitives
3.8% {5ms} Unicode class>>value:
|3.0% {4ms} primitives
2.3% {3ms} CollectionReadXtream>>position
2.3% {3ms} CollectionReadXtream(ReadXtream)>>endOfStreamAction:
2.3% {3ms} primitives
1.5% {2ms} ByteString>>at:put:
1.5% {2ms} WideString class(Behavior)>>isBytes
1.5% {2ms} UTF8Decoder(ReadXtream)>>source:
1.5% {2ms} WideString>>at:put:
**Leaves**
7.5% {10ms} UndefinedObject(Object)>>=
6.8% {9ms} LocaleID>>=
6.8% {9ms} ByteString(String)>>hash
6.0% {8ms} Unicode class>>value:
4.5% {6ms} Character class>>leadingChar:code:
3.8% {5ms} CollectionReadXtream>>position
3.8% {5ms} CollectionReadXtream>>read:from:to:
3.8% {5ms} ByteArray(SequenceableCollection)>>readXtreamFrom:to:
3.8% {5ms} CollectionReadXtream>>next
3.8% {5ms} Latin1Environment(LanguageEnvironment)>>leadingChar
3.8% {5ms} Character class>>value:
3.0% {4ms} UndefinedObject(Object)>>hash
3.0% {4ms} WideString>>at:put:
3.0% {4ms} Dictionary>>scanFor:
3.0% {4ms} SmallInteger(Magnitude)>>max:
3.0% {4ms} Character>>setValue:
3.0% {4ms} UTF8Decoder(CharacterDecoder)>>readInto:startingAt:count:
2.3% {3ms} CollectionReadXtream(ReadXtream)>>endOfStreamAction:
2.3% {3ms} UndefinedObject(ProtoObject)>>scaledIdentityHash
2.3% {3ms} UTF8Decoder>>next
2.3% {3ms} ByteString(String)>>compare:with:collated:
2.3% {3ms} Dictionary>>at:ifAbsent:
2.3% {3ms} CollectionReadXtream class(Behavior)>>new
2.3% {3ms} ByteString(String)>>=
1.5% {2ms} Locale class>>currentPlatform
1.5% {2ms} LocaleID>>hash
1.5% {2ms} Locale>>languageEnvironment
1.5% {2ms} UTF8Decoder(ReadXtream)>>source:
1.5% {2ms} CollectionReadXtream class>>read:from:to:
1.5% {2ms} SmallInteger(Magnitude)>>min:
**Memory**
old +0 bytes
young -454,224 bytes
used -454,224 bytes
free +454,224 bytes
**GCs**
full 0 totalling 0ms (0.0% uptime)
incr 15 totalling 14ms (11.0% uptime), avg 1.0ms
tenures 0
root table 0 overflows
>>>> Nicolas
>>>>
>>>>> --
>>>>> Best regards,
>>>>> Igor Stasenko AKA sig.
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Feb. 28, 2010
Re: [Pharo-project] Infinite Loop and Ctrl+.
by Adrian Lienhard
It worked for me the first time I tried, but not the second time (the VM eventually crashed).
Already in Squeak 3.9 it was sometimes impossible to break endless recursions. So I'm not sure if this related to changes in Pharo 1.0.
Adrian
On Feb 26, 2010, at 16:50 , Lukas Renggli wrote:
>>> Is this just me that suddenly cannot break out of an infinite loop
>>> with Ctrl+. in Pharo 1.0 anymore?
>>
>> Works here. [true] whileTrue: []
>
> Yes, that works for me too, but try:
>
> UndefinedObject compile: 'foo self foo'.
> nil foo
>
>> Which vm are you using? Squeak 4.2.2beta1U here right now...
>
> Yes, I am using this one too.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Feb. 28, 2010
Re: [Pharo-project] Delay startTimerInterruptWatcher in ScriptLoader >> cleanUpMethods -> DNU
by Adrian Lienhard
I would remove cleanUpMethods and move what is worth and working to cleanUpForRelease.
Cheers,
Adrian
On Feb 25, 2010, at 13:49 , Mariano Martinez Peck wrote:
> Try to evaluate ScriptLoader new cleanUpMethods
>
> and you will see that in ScriptLoader >> cleanUpMethods
>
> you do:
>
> Delay startTimerInterruptWatcher.
>
> and there is the DNU as startTimerInterruptWatcher is never implemented.
>
> Solutions ?
>
> 1) Remove Delay startTimerInterruptWatcher. from cleanUpMethods
>
> 2) Maybe the message should be stopTimerEventLoop ?? I have no idea
>
>
> The only thing I found in the issues was this:
>
> http://code.google.com/p/pharo/issues/detail?id=1424
>
>
> In squeak 3.9 the method is implemented, and like this:
>
> startTimerInterruptWatcher
> "Reset the class variables that keep track of active Delays and re-start
> the timer interrupt watcher process. Any currently scheduled delays are
> forgotten."
> "Delay startTimerInterruptWatcher"
>
> | p |
> self primSignal: nil atMilliseconds: 0.
> TimingSemaphore == nil
> ifFalse: [TimingSemaphore terminateProcess].
> TimingSemaphore _ Semaphore new.
> AccessProtect _ Semaphore forMutualExclusion.
> SuspendedDelays _
> SortedCollection sortBlock:
> [:d1 :d2 | d1 resumptionTime <= d2 resumptionTime].
> ActiveDelay _ nil.
> p _ [self timerInterruptWatcher] newProcess.
> p priority: Processor timingPriority.
> p resume.
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Feb. 28, 2010
Re: [Pharo-project] Simple (but effective) Optimization of PackageOrganizer
by Alexandre Bergel
Johan and Romain are fine too. This morning a new shake woke me up...
It should be like this for the next weeks.
Alexandre
On 28 Feb 2010, at 06:44, Stéphane Ducasse wrote:
> Let us know. Seems to be a really big earthquake.
> Probably at santiago some old houses suffered but not the new ones.
>
> Stef
>
> On Feb 28, 2010, at 1:39 AM, Alexandre Bergel wrote:
>
>> Fortunately yes. I am currently on the seaside, these has been some
>> tsunami alert, but I haven't more than a very strong tide.
>> Wondering how I will find my flat in Santiago.
>>
>> Thanks for asking,
>> Alexandre
>>
>>
>> On 27 Feb 2010, at 08:17, Serge Stinckwich wrote:
>>
>>> I see that a big earthquake hit Chile :
>>> http://www.alertnet.org/thenews/newsdesk/LDE61Q02O.htm
>>> I hope everything is ok with you.
>>>
>>> On Fri, Feb 26, 2010 at 6:58 PM, Alexandre Bergel
>>> <alexandre(a)bergel.eu> wrote:
>>>> issue #2085
>>>>
>>>> Replace the method PackageOrganizer>>packageOfClass: aClass ifNone:
>>>> errorBlock by
>>>> -=-=-=-=-=
>>>> packageOfClass: aClass ifNone: errorBlock
>>>> | classCategory |
>>>> classCategory := aClass category.
>>>> packages at: classCategory ifPresent: [:v | ^ v].
>>>>
>>>> (classCategory includes: $-)
>>>> ifTrue: [ packages at: (classCategory copyUpTo: $-)
>>>> ifPresent: [:v |
>>>> ^ v] ].
>>>>
>>>> ^ self packages detect: [:ea | ea includesClass: aClass]
>>>> ifNone:
>>>> errorBlock
>>>> -=-=-=-=-=
>>>>
>>>> Before this enhancement:
>>>> [100 timesRepeat: [Object package]] timeToRun
>>>> => 141
>>>>
>>>> After the fix:
>>>> => 2
>>>>
>>>> Easy thing to do.
>>>>
>>>> Cheers,
>>>> Alexandre
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>>
>>> --
>>> Serge Stinckwich
>>> UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
>>> Smalltalkers do: [:it | All with: Class, (And love: it)]
>>> http://doesnotunderstand.org/
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Feb. 28, 2010