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] Scamper revival
by Eagle Offshore
I wouldn't be so sure.
http://html5demos.com/
http://jqtouch.com/
On Feb 27, 2010, at 4:41 PM, Schwab,Wilhelm K wrote:
> there is no way in hell that HTML+CSS+JavaScript is going to keep up
Feb. 28, 2010
Re: [Pharo-project] Infinite Loop and Ctrl+.
by Mariano Martinez Peck
we should open a ticket
On Sun, Feb 28, 2010 at 2:15 PM, Adrian Lienhard <adi(a)netstyle.ch> wrote:
> 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
>
>
> _______________________________________________
> 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 Schwab,Wilhelm K
Adrian,
Horrible is an understatement :) Your version is a big improvement. I frequently put ending brackets on their own line with indentation to aid in matching, but not always.
I do not (much) care what conventions the benevolent dictators select for Pharo, but I **do** care that it not be forced on my code that I retain for my own use. There should be ways to compile, export and load code and packagets w/o encountering automatic formatting. As long as that is the case, enjoy!!
Bill
-----Original Message-----
From: pharo-project-bounces(a)lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Adrian Lienhard
Sent: Sunday, February 28, 2010 8:11 AM
To: Pharo-project(a)lists.gforge.inria.fr
Subject: Re: [Pharo-project] about code formatting in pharo
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
Feb. 28, 2010
Re: [Pharo-project] SqueakSave on Pharo
by Yanni Chiu
I sent an email last week, and saw no answer, so far. So I've put up
what I have.
Stéphane Ducasse wrote:
> Yanni excellent to have it on squeaksource.
> Now did you contact the maintainer (if any) or the people that developed it (I like it a lot) to mention that?
> Because at least they should know if some changes get introduced that they can cherrypick it.
Feb. 28, 2010
Re: [Pharo-project] about code formatting in pharo
by Levente Uzonyi
On Sun, 28 Feb 2010, James Foster wrote:
>
> On Feb 28, 2010, at 1:58 AM, Stéphane Ducasse wrote:
>
>> Lukas do you have some code samples.
>> Something that I particularly hate is the following
>>
>> self bla ifTrue: [
>> ...
>>
>> ] ifFalse: [
>> ...
>> ]
>
> I'd like to understand what it is about the above you hate.
It's like C code, not like a message send. Do you write code like this?
aCollection do: [ :each |
...
] separatedBy: [
...
]
>
>> That is see in the code.
>>
>> I want
>> self bla
>> ifTrue: [ ...
>> ]
>> ifFalse: [
>> ... ]
>
> Does the code in the ifTrue: block begin on the same line? How about the ifFalse: block? If it begins on the same line, then how many indents for the second line?
>
IMHO, if the code in the first block is short enought, then it's only a
single line, otherwise not, for example:
self bla
ifTrue: [ self bar ]
ifFalse: [
... ]
self bla
ifTrue: [
... ]
ifFalse: [
... ]
This book has great guidelines:
http://stephane.ducasse.free.fr/FreeBooks/WithStyle/SmalltalkWithStyle.pdf
Levente
> _______________________________________________
> 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 James Foster
On Feb 28, 2010, at 1:58 AM, Stéphane Ducasse wrote:
> Lukas do you have some code samples.
> Something that I particularly hate is the following
>
> self bla ifTrue: [
> ...
>
> ] ifFalse: [
> ...
> ]
I'd like to understand what it is about the above you hate.
> That is see in the code.
>
> I want
> self bla
> ifTrue: [ ...
> ]
> ifFalse: [
> ... ]
Does the code in the ifTrue: block begin on the same line? How about the ifFalse: block? If it begins on the same line, then how many indents for the second line?
James
Feb. 28, 2010
[Pharo-project] Smalltalk and Bioinformatics
by Hernán Morales Durand
Hi all,
I'm preparing a presentation and just wondering if anyone out there
is doing bioinformatics with Smalltalk?
Cheers,
Hernán
Feb. 28, 2010
Re: [Pharo-project] about code formatting in pharo
by Schwab,Wilhelm K
Stef,
It pains me to have to be a pain about this. I never use a space after a colon; what other people do is their business, but I much prefer having the space gone. Other formatting concerns are far less trivial to me than a personal preference.
Lukas is correct about using a formatter, but it has to be a separate or optional step because the current state of formatting is hostile to comments. If moving code to Pharo has taught me anything, it is that I have been correct to embed dated (month-year) comments in my code. The RB scatters them to the four corners, which is why I don't use the thing.
I also format code in ways that are analogous to phrasing in music. I tried to capture it in a custom formatter, and quickly realized that I see design, workflow, organizational politics, etc., and the machine sees syntax. It will never "understand" what belongs together and what does not. Anything that forces formatting on me is defective.
If there is a way for me to optionally format my code with a Pharo formatter, I'm happy to do so as I turn it over. Anything that I am actively using will be littered with comments (until I tire of them[*]) and formatted in a way that helps me see the big picture long after the machine smashes it down to a mere sequence of byte codes.
Bill
[*] every so often, I clean out truly obsolete information, but that is more a question of the amount of change that has occurred, not chronological age. In moving to Pharo, I ran across couple of related defects from 2003, and fixed them within an hour thanks to comments in the code. This is one of many such stories that have formed my (somewhat stubborn) thoughts on code formatting.
-----Original Message-----
From: pharo-project-bounces(a)lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Lukas Renggli
Sent: Sunday, February 28, 2010 4:52 AM
To: Pharo-project(a)lists.gforge.inria.fr
Subject: Re: [Pharo-project] about code formatting in pharo
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).
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
Feb. 28, 2010
Re: [Pharo-project] Streams. Status and where to go?
by Igor Stasenko
On 28 February 2010 15:44, Nicolas Cellier
<nicolas.cellier.aka.nice(a)gmail.com> wrote:
> 2010/2/28 Igor Stasenko <siguctua(a)gmail.com>:
>> 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
>>
>>
>
> Yes, and as already suggested a few month ago by Andreas and former by
> me and some others, the Unicode leadingChar should better be = 0
>
big +1
by default , a most straightforward things should be those, which is
universal in our world.
And unicode is hardly can be depicted as a marginal one :)
> Nicolas
>
>>
>>> | 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.
>>
>> _______________________________________________
>> 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] Streams. Status and where to go?
by Nicolas Cellier
2010/2/28 Igor Stasenko <siguctua(a)gmail.com>:
> 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
>
>
Yes, and as already suggested a few month ago by Andreas and former by
me and some others, the Unicode leadingChar should better be = 0
Nicolas
>
>> | 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.
>
> _______________________________________________
> 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