Re: [Pharo-project] Issue 3210 in pharo: SimpleMorphic Integration

2010-11-19 Thread Stéphane Ducasse

On Nov 18, 2010, at 11:29 PM, Fernando Olivero wrote:

> This is really cool! Nice to have it already in the image.
> 
> I like particulary like the UIManager integration, to easily "plug"
> diferent morphics and tools.
> For example UIManager default openInspector: self asMorphOn: anObject
> withLabel: aLabel! .
> 
> Stef and Juan:
> 
> 1)how did the UIManager impact on the current facilities in
> SystemNavigation for browsing senders, references and others?
> Did the UI related parts got decoupled from SystemNavigation into UIManager?

I do not think so.
There is still a lot of things to clean in SystemNavigation 

> For example SystemNavigation returns the list of method references,
> but the UIManager opens the proper Morph/tool to present it.
> Currently SystemNavigation also does the Morph part.
> 
> 2) What are the plans for the Simple morphic changeset?

Package it in a separate package.
Create a Squeaksource project
Add it as a package in pharo-dev so that people can have a look at it.

Stef

> 
> Fernando
> 
> 
> 
> 
> On Thu, Nov 18, 2010 at 9:47 PM, ph...@googlecode.com
>  wrote:
>> 
>> Comment #3 on issue 3210 by stephane.ducasse: SimpleMorphic Integration
>> http://code.google.com/p/pharo/issues/detail?id=3210
>> 
>> part one two and three are integrated
>> 
>> 
>> 
> 




Re: [Pharo-project] Issue 3266 in pharo: Clean TextEditor

2010-11-19 Thread Stéphane Ducasse
Yes! we were discussing with alain about that.
Please sync with alain.
Fernando here is also what I would like to have :)

A classVar Binding and an instance var binding.
**All** the methods only access binding
binding get initialized with the default table defined in Binding
=> we can have table binding sharing 
=> we can have instance based customization.

Does it make sense to you?

Stef


On Nov 19, 2010, at 8:21 AM, Fernando Olivero wrote:

> Hi Alain, i took a better look at the changes and have to say...once
> again..excellent!
> 
> I think the next step is to improve the keybindings hardcoding in
> TextEditor>>initialize
>   self initializeCmdKeyShortcuts.
>   self initializeShiftCmdKeyShortcuts.
> 
> I have a keybindings/command model in Gaucho, for applying a
> keybinding to any morph.
> I will work on decoupling it from GauchoMorph into Morph.
> And later rewrite the Morphs for textediting to use this.
> 
> So for example, if you want to delete any GauchoMorph from the system
> by pressing cmd-w, you have to:
> 
> binding := GMKeyBinding
>   actingOn: $w asciiValue
>   modifiedBy: #(#command)
>   satisfying: ( GMCondition compositeWith: #(
> #understandsKeyBindingCommandCondition #uneditedCondition ) )
>   applying: #close.
> m := NewTextMorph new.
> m addKeyBinding: binding .
> 
> 
> If people agree, i will create an issue and start working on it.
> 
> Fernando
> 
> On Thu, Nov 18, 2010 at 9:23 AM, Alain Plantec  wrote:
>> Due to a change in PragmaMenuBuilder, the world menu is not well updated
>> anymore.
>> Simply evaluating
>> World resetWorldMenu
>> fixes that.
>> So it should be done before the next release is published.
>> Cheers
>> Alain
>> 
>> 
>> 
> 




Re: [Pharo-project] Not happy with the issues feed from Google

2010-11-19 Thread Adrian Lienhard
On Nov 18, 2010, at 22:58 , Stéphane Ducasse wrote:

> Thanks for sharing that with us.
> We will create a separated mailing-list to see how it works.

We can try but I don't think it will work particularly well. Our infrastructure 
should best support the people that actively work on Pharo so I don't see any 
problem sending tons of mails to pharo-proj...@... mailing list if this helps. 
For users who don't want to see all these details there already is a separate 
list (pharo-us...@...).

An additional list has similar drawbacks as an RSS feed. One is less likely to 
read it. One cannot reply directly to start a discussion (well, we can reply in 
this new list, but then it gets messy because we start discussing in two 
separate lists).

just my 2 cents...

Adrian


[Pharo-project] Not happy with the issues feed from Google

2010-11-19 Thread Torsten Bergmann
>We can try but I don't think it will work particularly well. Our 
>>infrastructure should best support the people that actively work on Pharo so 
>>I don't see any problem sending tons of mails to pharo-project at ... 
>>mailing list if this helps. For users who don't want to see all these 
>>details there already is a separate list (pharo-users at ...).

+1

Bye
T.
-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail



[Pharo-project] Issue 3272 in pharo: SelectorChooserMorph improving

2010-11-19 Thread pharo

Status: Accepted
Owner: aplantec
Labels: Milestone-1.2

New issue 3272 by aplantec: SelectorChooserMorph improving
http://code.google.com/p/pharo/issues/detail?id=3272

New version with a highlighted current prefix  (see screenshot).
In case of error or if the requestor textMorph is closed, then the  
SelectorChooser is staying openned behind. The new version fixes this  
issues.


Attachments:
selectorChooserImprovement.png  36.0 KB




[Pharo-project] Revisiting Issue 1718

2010-11-19 Thread Stephan Eggermont
I would be interested in improvements. This is just a straight translation
of the java code.

Yaroslavskiy's Dual-Pivot Quicksort seems to perform better for large 
collections:

A straightforward
defaultSort: i to: j
self dualPivotQuicksort: i to: j split: 3

dualPivotQuicksort: left to: right split: div
|len third m1 m2 pivot1 pivot2 less great dist newDiv|
len := right - left.
newDiv := div.
len < 27 ifTrue: [
left+1 to: right do: [ :i | | j |
j := i.
[(j>left) and: [(array at:j) < (array at: (j-1))]] 
whileTrue: [ 
array swap: j with: j-1.
j := j-1]]] 
ifFalse: [
third := len // div.
m1 := left+third.
m2 := right-third.
m1 <= left ifTrue: [m1 := left+1].
m2 >= right ifTrue: [m2 := right-1].
(array at: m1) < (array at: m2) ifTrue: [
array swap: m1 with: left.
array swap: m2 with: right]
ifFalse: [
array swap: m1 with: right.
array swap: m2 with: left].
pivot1 := array at: left.
pivot2 := array at: right.
less := left+1.
great := right-1.
less to: great do: [ :k |
(array at: k) < pivot1 ifTrue: [
array swap: k with: less.
less := less+1.]
ifFalse: [
(array at: k ) > pivot2 ifTrue: [
[(k < great and: [(array at: great) > 
pivot2])] whileTrue: [
great := great -1].
array swap: k with: great.
great := great-1.
(array at: k) < pivot1 ifTrue: [
array swap: k with: less.
less := less+1]
]
]].
dist := great-less.
dist < 13 ifTrue: [ newDiv := div+1].
array swap: (less-1) with: left.
array swap: (great+1) with: right.
self dualPivotQuicksort: left to: (less-2) split: newDiv.
self dualPivotQuicksort: (great+2) to: right split: newDiv.
(dist > (len -13) and: [ pivot1 ~= pivot2]) ifTrue:[
less to: great do: [ :k |
(array at: k) = pivot1 ifTrue: [
array swap: k with: less.
less := less+1]
ifFalse: [
(array at: k) = pivot2 ifTrue: [
array swap: k with: great.
great := great - 1.
(array at: k) = pivot1 ifTrue: [
array swap: k with: 
less.
less := less+1]
]
]
]
].
pivot1 < pivot2 ifTrue: [
self dualPivotQuicksort: less to: great split: newDiv]
]

Do we have a performance test set   for sorting?


Re: [Pharo-project] Issue 3272 in pharo: SelectorChooserMorph improving

2010-11-19 Thread pharo

Updates:
Status: Fixed

Comment #1 on issue 3272 by aplantec: SelectorChooserMorph improving
http://code.google.com/p/pharo/issues/detail?id=3272

SLICE-Issue-3272-SelectorChooserMorph-improving




Re: [Pharo-project] Issue 3266 in pharo: Clean TextEditor

2010-11-19 Thread Alain Plantec

Le 19/11/2010 08:21, Fernando Olivero a écrit :

Hi Alain, i took a better look at the changes and have to say...once
again..excellent!

Thanks Fernando!

I think the next step is to improve the keybindings hardcoding in
  TextEditor>>initialize
self initializeCmdKeyShortcuts.
self initializeShiftCmdKeyShortcuts.

yes yes!

I have a keybindings/command model in Gaucho, for applying a
keybinding to any morph.
I will work on decoupling it from GauchoMorph into Morph.
And later rewrite the Morphs for textediting to use this.

I was thinking of something like your KeyBinding..
so, very good.
What I would like is to be able to control all alt-ctrl-cmd-shift  etc 
possible combinations for any morph.

It implies to review the way events are handled by Morph/HandMorph and
to remove the ugly "control and alt key" setting (Full matching, partial 
matching, Swapped).


Cheers
Alain




Re: [Pharo-project] Issue 3266 in pharo: Clean TextEditor

2010-11-19 Thread Alain Plantec


What I would like is to be able to control all alt-ctrl-cmd-shift  etc 
possible combinations for any morph.

It implies to review the way events are handled by Morph/HandMorph and
to remove the ugly "control and alt key" setting (Full matching, 
partial matching, Swapped).


For example, it is currently impossible to map ctrl-space or ctrl-tab 
for #querySymbol:



Cheers
Alain







Re: [Pharo-project] Infinite recursion

2010-11-19 Thread Guillermo Polito
I will insist here :P.

What is the desired behavior for this situation?  So if it is an Issue, I
may open an entry in the tracker...

On Wed, Nov 17, 2010 at 1:46 PM, Schwab,Wilhelm K wrote:

> I asked this some time back.  One dark side of doing this is that it *can*
> result in unwanted/inappropriate failures.  In practice though, Dolphin's
> limits on the stack has been a good thing.
>
>
>
>
> 
> From: pharo-project-boun...@lists.gforge.inria.fr [
> pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of Guillermo Polito
> [guillermopol...@gmail.com]
> Sent: Wednesday, November 17, 2010 11:44 AM
> To: Pharo-project@lists.gforge.inria.fr
> Subject: [Pharo-project] Infinite recursion
>
> Hi,
>
> Yesterday I got into an infinite recursion, because of adding an ordered
> collection into itself.  And #hash is defined in terms of its containees,
> hehe.
>
> Why I did that? It doesn't really matters. I was testing a little project
> I'm doing for the University.
>
> So I came into an infinite recursion, which didn't stop until the VM run
> out of memory...  And the question is.. Shouldn't it throw an error like a
> stack overflow when we run into those cases?
>
> Cheers,
> Guille
>
>


Re: [Pharo-project] Revisiting Issue 1718

2010-11-19 Thread Levente Uzonyi

For 1718:
- don't use #asSortedCollection for sorting.
- SortedCollection uses quicksort, not merge sort as stated in a comment. 
That's why #asSortedCollection is slow when there are only a few different 
values. Quicksort performance degrades to O(n^2) in this case, but that's 
totally valid. However merge sort has guaranteed O(n*log(n)) runtime.


On Fri, 19 Nov 2010, Stephan Eggermont wrote:


I would be interested in improvements. This is just a straight translation
of the java code.


It has some errors. If you define this method in Array, replace 'array' 
with 'self' and evaluate this code, it'll raise an error:


a := (1 to: 50) asArray.
[ a dualPivotQuicksort: 1 to: a size split: 3 ] bench

It's also not general. #sort: #sorted: and #asSortedCollection: use 
a single block for comparison, while this method uses #<, #>, #= and #~= 
in a mixed way.




Yaroslavskiy's Dual-Pivot Quicksort seems to perform better for large 
collections:

A straightforward
defaultSort: i to: j
self dualPivotQuicksort: i to: j split: 3

dualPivotQuicksort: left to: right split: div
|len third m1 m2 pivot1 pivot2 less great dist newDiv|
len := right - left.
newDiv := div.
len < 27 ifTrue: [
left+1 to: right do: [ :i | | j |
j := i.
[(j>left) and: [(array at:j) < (array at: (j-1))]] 
whileTrue: [
array swap: j with: j-1.
j := j-1]]]


That looks like an optimized bubble sort, ouch.


Levente


ifFalse: [
third := len // div.
m1 := left+third.
m2 := right-third.
m1 <= left ifTrue: [m1 := left+1].
m2 >= right ifTrue: [m2 := right-1].
(array at: m1) < (array at: m2) ifTrue: [
array swap: m1 with: left.
array swap: m2 with: right]
ifFalse: [
array swap: m1 with: right.
array swap: m2 with: left].
pivot1 := array at: left.
pivot2 := array at: right.
less := left+1.
great := right-1.
less to: great do: [ :k |
(array at: k) < pivot1 ifTrue: [
array swap: k with: less.
less := less+1.]
ifFalse: [
(array at: k ) > pivot2 ifTrue: [
[(k < great and: [(array at: great) > 
pivot2])] whileTrue: [
great := great -1].
array swap: k with: great.
great := great-1.
(array at: k) < pivot1 ifTrue: [
array swap: k with: less.
less := less+1]
]
]].
dist := great-less.
dist < 13 ifTrue: [ newDiv := div+1].
array swap: (less-1) with: left.
array swap: (great+1) with: right.
self dualPivotQuicksort: left to: (less-2) split: newDiv.
self dualPivotQuicksort: (great+2) to: right split: newDiv.
(dist > (len -13) and: [ pivot1 ~= pivot2]) ifTrue:[
less to: great do: [ :k |
(array at: k) = pivot1 ifTrue: [
array swap: k with: less.
less := less+1]
ifFalse: [
(array at: k) = pivot2 ifTrue: [
array swap: k with: great.
great := great - 1.
(array at: k) = pivot1 ifTrue: [
array swap: k with: 
less.
less := less+1]
]
]
]
].
pivot1 < pivot2 ifTrue: [
self dualPivotQuicksort: less to: great split: newDiv]
]

Do we have a performance test set   for sorting?





Re: [Pharo-project] Issue 3225 in pharo: Fade image examples/methods give DNU

2010-11-19 Thread pharo

Updates:
Status: Started

Comment #1 on issue 3225 by jbaptiste.arnaud: Fade image examples/methods  
give DNU

http://code.google.com/p/pharo/issues/detail?id=3225

(No comment was entered for this change.)




Re: [Pharo-project] Issue 3225 in pharo: Fade image examples/methods give DNU

2010-11-19 Thread pharo


Comment #2 on issue 3225 by jbaptiste.arnaud: Fade image examples/methods  
give DNU

http://code.google.com/p/pharo/issues/detail?id=3225

it 's a closure problem in previous version one block execute several time  
keep some var value. It 's not the case now. we should change :


fadeImage: otherImage at: topLeft
indexAndMaskDo: indexAndMaskBlock

and update:
fadeImageCoarse: otherImage at: topLeft
fadeImageFine: otherImage at: topLeft
fadeImageHor: otherImage at: topLeft
fadeImageHorFine: otherImage at: topLeft
fadeImageSquares: otherImage at: topLeft
fadeImageVert: otherImage at: topLeft




Re: [Pharo-project] Loading Alien on Pharo 1.1.1

2010-11-19 Thread Luc Fabresse
Hi All,

 To load  Alien I use:

  Gofer new
squeaksource: 'Alien';
package: 'ConfigurationOfAlien';
load.
(Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1') load


 Cheers,

#Luc


2010/11/18 Esteban Lorenzano 

> Hi,
> Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
> With ConfigurationOfAlien, I'm getting the "invalid array size" prereq
> violated.
>
> Cheers,
> Esteban
>
>
>
>


Re: [Pharo-project] Issue 3225 in pharo: Fade image examples/methods give DNU

2010-11-19 Thread pharo

Updates:
Status: Fixed

Comment #3 on issue 3225 by jbaptiste.arnaud: Fade image examples/methods  
give DNU

http://code.google.com/p/pharo/issues/detail?id=3225

Graphics-Display Objects-Jb.43 in Inbox

Attachments:
Graphics-Display Objects-Jb.43.mcz  111 KB




[Pharo-project] Issue 3273 in pharo: Wrongly defined MenuMorph>>embeddable

2010-11-19 Thread pharo

Status: Accepted
Owner: hilaire.fernandes
Labels: Type-ReportDefect Milestone-1.2 Difficulty-Easy Importance-High

New issue 3273 by hilaire.fernandes: Wrongly defined MenuMorph>>embeddable
http://code.google.com/p/pharo/issues/detail?id=3273

In Pharo 1.1, MenuMorph>>embeddable is wrongly defined (typo error I guess).

Use included changeset.



Attachments:
MenuMorph-embeddable.st  240 bytes




Re: [Pharo-project] OSProcess

2010-11-19 Thread David T. Lewis
On Tue, Nov 16, 2010 at 10:48:41AM -0300, Facundo Vozzi wrote:
> What is the OSProcess lastest version?

The latest version is OSProcess 4.3.16, which is on SqueakSource at
  http://www.squeaksource.com/OSProcess/OSProcess-dtl.57.mcz

And the tests are at
 http://www.squeaksource.com/OSProcess/Tests-OSProcess-dtl.21.mcz

Note, the SqueakSource OSProcess project also contains the OSProcess
package broken out into sub-packages. In hindsight I think this was
a mistake (it's just more confusing now). So the best thing is to
load the two packages "OSProcess" and "Tests-OSProcess".

Dave

> 
> Yes, I'm using cog so I think that is my problem. I'll test with the
> standard VM.
> 
> Thanks,
> Facu
> 
> On Tue, Nov 16, 2010 at 9:25 AM, David T. Lewis  wrote:
> 
> > On Tue, Nov 16, 2010 at 12:22:43AM -0300, Facundo Vozzi wrote:
> > > Hi,
> > > I loaded OSProcess 4.3.11 on Pharo-1.1.1-dev10.09.1.image but its tests
> > are
> > > almost all red.
> > >
> > > Do you know if 4.3.11 if the right version for Pharo 1.1.1?
> > >
> > > Thanks you,
> > > Facundo
> >
> > In general, it is best to use the latest version of OSProcess, although
> > the older version 4.3.11 should still work fine.
> >
> > The Cog VM and the OSProcessAccessor plugin have some incompatibilities.
> > The #forkSqueak methods will not work, and these are used throughout
> > the OSProcess tests.
> >
> > Dave
> >
> >
> >



Re: [Pharo-project] Loading Alien on Pharo 1.1.1

2010-11-19 Thread Esteban Lorenzano

still the same error...
I can press "proceed", but I'm scared to do that :)

Cheers,
Esteban

On 2010-11-19 11:12:17 -0300, Luc Fabresse 
 said:




Hi All,

 To load  Alien I use:

  Gofer new
squeaksource: 'Alien';
package: 'ConfigurationOfAlien';
load.
(Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1') load


 Cheers,

#Luc


2010/11/18 Esteban Lorenzano 




Hi,
Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
With ConfigurationOfAlien, I'm getting the "invalid array size" prereq
violated.

Cheers,
Esteban







Hi All,=A0=
To load =A0Alien I use:=A0=A0Gofer new=
squeaksource: 
'Alien=
9;;
 package: 'Configur=
ationOfAlien';   load.   

(Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1') =
load=A0=A0Cheers,#Luc
2010/11/18 Esteban Lorenzano =3D"ltr">esteba...@gmail.com=
>

class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">
Hi,
Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
With ConfigurationOfAlien, I'm getting the "invalid array size&quo=
t; prereq violated.

Cheers,
Esteban











Re: [Pharo-project] [Pharo-users] could not search contents at http://book.pharo-project.org

2010-11-19 Thread Mariano Martinez Peck
hello? I think this is important. We should be able to search.

Cheers

mariano

On Wed, Oct 13, 2010 at 12:39 AM, Mariano Martinez Peck <
marianop...@gmail.com> wrote:

> Can someone take a look?  how can we get the pier image?
>
>
> On Sun, Oct 10, 2010 at 12:46 PM, Tudor Girba wrote:
>
>> Hi,
>>
>> Unfortunately, I cannot help much at this moment. The problem is due to a
>> bug in Pier that crashes when there is a strange character in one of the
>> pages. I believe this was fixed at some point, but I am not sure. Someone
>> would have to update the Pier image.
>>
>> Cheers,
>> Doru
>>
>>
>> On 10 Oct 2010, at 11:53, Mariano Martinez Peck wrote:
>>
>> > Thanks! I can reproduce.
>> >
>> > Doru can you help us?
>> >
>> > Thanks
>> >
>> > Mariano
>> >
>> > On Thu, Oct 7, 2010 at 10:40 PM, Bernardo Ezequiel Contreras <
>> vonbecm...@gmail.com> wrote:
>> > Hi All,
>> >
>> > Description:
>> > Could not search contents at http://book.pharo-project.org.
>> > I would like to search some expression in the contents of the book.
>> >
>> > Steps to reproduce:
>> > * goto to http://book.pharo-project.org
>> > * click on main image
>> > * add any string on search contents and press Enter
>> > Actual Result:
>> > Seaside Walkback
>> >
>> > Error: subscript is out of bounds: 8218
>> >
>> > Expected Result:
>> > a list of results that matches your input string
>> >
>> >
>> > Thanks,
>> >
>> >
>> > ___
>> > Pharo-users mailing list
>> > pharo-us...@lists.gforge.inria.fr
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>> >
>> >
>> > ___
>> > Pharo-project mailing list
>> > Pharo-project@lists.gforge.inria.fr
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> --
>> www.tudorgirba.com
>>
>> "In a world where everything is moving ever faster,
>> one might have better chances to win by moving slower."
>>
>>
>>
>>
>> ___
>> Pharo-users mailing list
>> pharo-us...@lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>>
>
>


Re: [Pharo-project] Not happy with the issues feed from Google

2010-11-19 Thread Miguel Cobá
El jue, 18-11-2010 a las 22:58 +0100, Stéphane Ducasse escribió:
> We will create a separated mailing-list to see how it works.

-1

I am in favor of having the messages to the pharo-project list, and
don't want to subscribe to other new list. Here is where everyone is by
default. More chances that the issue is watched by someone that can
help.

I just want either:
- to only show the creation and closing of a ticket or
- to show all interaction but with better formatting, like the squeak
diffs.


-- 
Miguel Cobá
http://twitter.com/MiguelCobaMtz
http://miguel.leugim.com.mx






Re: [Pharo-project] Not happy with the issues feed from Google

2010-11-19 Thread laurent laffont
+1

I like having issues on mailing-list as I can see what are the current
activities.

I would like the status in the subject (new / accepted / fixed /...)

Cheers,

Laurent

On Thu, Nov 18, 2010 at 7:30 PM, Igor Stasenko  wrote:

> +1
> i don't read all mails, but at least by seeing in subject, i have an
> idea that there are some activity around some issue.
>
> Also, in case if something attracts my attention, where i feel i can
> be helpful, i can easy click on message and read it.
>
> In contrast, when all tracker activity is hidden inside issue tracker,
> i have no chances to be aware who doing what and
> what problem is attacked by people, unless i cc-ed to this issue as well.
> 'Tracking' tracker by manually inspecting every single issue is time sink.
> So, i think couple of extra lines in mails list worth it, because it
> helps to people to be aware of what others do.
> Of course i'm not happy with it as well.
> Most messages are not quite informative , but its up to those who
> posting them: make posts more elaborate , so others could understand
> what is it about, where the problem etc etc.
>
> On 18 November 2010 19:33, Stéphane Ducasse 
> wrote:
> > +1
> >
> > Sorry guys this is not optimal but after been against when I see it in
> squeak, I'm in favor because it
> > helps understanding what is happening.
> >
> > Sorry to be blunt but
> > YOU yes you guys do not look at the bug or bug fixes in general.
> >
> > So often ME myself and I, have to send email about point from the archive
> to the mailing-list.
> > Often I do not even see that a bug has been posted and YES I have 5 rss
> feed and I read them all.
> >
> > What is the last time you read the bug archives to see what is happening
> there?
> > So if you do not read the archive then how can you help? how can we make
> sure that people are aware?
> >
> > What is the last time you look at the code of the fixes that got
> integrated? Because if you do not read
> > it how can we do quality control? So if I could I would send the diff of
> all the package in the mailing-lits as this is done in squeak.
> >
> > Now what we can do to please some of you so far 4, we could create a
> mailing-list where such mails would be sent.
> > But let us see so far who is really against.
> >
> > Stef
> >
> >
> >> Remember that most email client support filters. You can easily create
> one.
> >>
> >> Cheers
> >>
> >> Mariano
> >
> >
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>


[Pharo-project] Ideas for CompiledMethod proxies?

2010-11-19 Thread Mariano Martinez Peck
Hi. I am developing kind of proxies for unused compiled methods. I want to
detect them, put a proxy instead of them, and swap them to disk. Then, in
case they are used, I put back the original ones. With this, I want to
realease memory. This is why I need the proxy objects to be as small as
possibles.

Right now, I do something like this:

aProxy := CompiledMethodProxyReferenceStreamWithFileName installOn:
ClassWith1Var selector: #foo.

this will instantiate the proxy, do the ClassWith1Var methodAt: #foo put:
proxy, write the original compiledMethod that was in #foo into a file,
etc

and then if I do "ClassWith1Var new foo", then using the #run:with:in  I
load the file from disk and I put back the original method. To know WHICH
file I have to load, I have to store the fileName in the proxy object.

In addition, if I DON'T execute the compiled method, but instead I send a
message, for example:

(ClassWith1Var >> #foo) literals

this has to do the same: load and put back the original compiled method. To
do this, I use the doesNotUnderstand:.

This is easy to do if I store the fileName in the proxy instance. Right now,
I am using as fileName this:  CLASS >> SELECTOR. For example, in this case,
the file would be named "ClassWith1Var >> #foo"

Now.with this solution, I need create an proxy instance for each
compiled method, and these instances have also another instance for the
filename. If I could use the same proxy instance for everybody, the amount
of memory released would be mch more. So I thought that maybe from the
context I can "guess" the filename if I use conventions.

For example, if you do "ClassWith1Var new foo" then in the #run:with:in I
receive all the information to KNOW that the fileName should be
"ClassWith1Var >> #foo". So, no problem here.

But for the second case, suppose "(ClassWith1Var >> #foo) literals", I don't
see a way to know this.  In this case, #literals is intercepted by the
doesNotUnderstand: of my proxy, and here I should load back the original
compiled method from disk. The problem is that I cannot know in which CLASS
and SELECTOR this proxy was put. The only way I know to do this, is to store
the class + selector in the proxy instancebut it is the same...I will
need an instance per compiled method. In such case is even easier to
directly store the fileName.

Anyway, if someone has a solution or advice on this, I would be appreciated
that. I tried with thisContext, but it didn't help me.

Thanks

Mariano


Re: [Pharo-project] Issue 3272 in pharo: SelectorChooserMorph improving

2010-11-19 Thread pharo


Comment #2 on issue 3272 by stephane.ducasse: SelectorChooserMorph improving
http://code.google.com/p/pharo/issues/detail?id=3272

you are a machine :)
Tx alain. I will integrate it soon.




Re: [Pharo-project] Ideas for CompiledMethod proxies?

2010-11-19 Thread Eliot Miranda
Hi Mariano,

it strikes me that the class and selector are implicit in method
dictionaries.  So if you use a zero-sized object to replace a method (one
word in memory if you make it an instance of a compact class) you can find
its class and selector by searching all method dictionaries in the class
hierarchy.  In an image with approximately 90,000 methods on a 2.66GHz Core
i7 it takes Cog 15 milliseconds on average to locate a method in the
hierarchy:

| cms |
cms := CompiledMethod allInstances.
cms := (1 to: cms size by: 100) collect: [:i| cms at: i].
{ Time millisecondsToRun:
[cms do:
[:cm|
[:exit|
ProtoObject withAllSubclasses do:
[:c|
c selectorsAndMethodsDo: [:s :m| m == cm ifTrue: [exit value
valueWithExit]].
 cms size } #(13371 917)
13371 / 917.0 14.58124318429662
CompiledMethod instanceCount 91696

So one thing might be to use a zero-sized object.

Of course you could use a one instance variable object whose instance
variable was the class and then things would be /much/ faster, with only one
method dictionary to search.

Or perhaps you could use a 4-byte byte array and keep the identity hash of
the class and the identity hash of the selector in two 16-bit values in the
4-byte array, but this wouldn't get you anything over and above the one
instance variable object pointing to the class.  However, if you are talking
abut optimizing a closed world then this does hold water.  One thing you can
do if you *really* want to save space is eliminate symbols, replacing them
by integers.  The lookup machinery should be able to deal with a
SmallInteger selector, and if it doesn't it has a bug.  This is a space
saving technique I first heard about in the ActiveBook which used my
BrouHaHa VM and ParcPlace's Smalltalk-80 v2.3 back in the 80's to produce an
early tablet computer.  So the idea is to number classes and selectors and
use the selector numbers to replace symbols.  Now the byte array makes sense
because if you have < 64k symbols and < 64k classes you have the class and
the selector directly. If you were clever you could put the selector
numbering in the compiler and keep the symbol table externally in a file,
mapping selector number to symbol there-in.  Obviously the tricky thing is
in eliminating or implementing asSymbol in perform: usage.  Sometimes you
see horror show code like
self perform: (self opPrefix, self opSuffix) asSymbol
which makes it /really/ hard to find implementors and senders (and IMO
people who write this kind of thing should be shot, and IIRC there is stuff
like this in the change notification code, ARGH!!!).

HTH
Eliot

On Fri, Nov 19, 2010 at 12:47 PM, Mariano Martinez Peck <
marianop...@gmail.com> wrote:

> Hi. I am developing kind of proxies for unused compiled methods. I want to
> detect them, put a proxy instead of them, and swap them to disk. Then, in
> case they are used, I put back the original ones. With this, I want to
> realease memory. This is why I need the proxy objects to be as small as
> possibles.
>
> Right now, I do something like this:
>
> aProxy := CompiledMethodProxyReferenceStreamWithFileName installOn:
> ClassWith1Var selector: #foo.
>
> this will instantiate the proxy, do the ClassWith1Var methodAt: #foo put:
> proxy, write the original compiledMethod that was in #foo into a file,
> etc
>
> and then if I do "ClassWith1Var new foo", then using the #run:with:in  I
> load the file from disk and I put back the original method. To know WHICH
> file I have to load, I have to store the fileName in the proxy object.
>
> In addition, if I DON'T execute the compiled method, but instead I send a
> message, for example:
>
> (ClassWith1Var >> #foo) literals
>
> this has to do the same: load and put back the original compiled method. To
> do this, I use the doesNotUnderstand:.
>
> This is easy to do if I store the fileName in the proxy instance. Right
> now, I am using as fileName this:  CLASS >> SELECTOR. For example, in this
> case, the file would be named "ClassWith1Var >> #foo"
>
> Now.with this solution, I need create an proxy instance for each
> compiled method, and these instances have also another instance for the
> filename. If I could use the same proxy instance for everybody, the amount
> of memory released would be mch more. So I thought that maybe from the
> context I can "guess" the filename if I use conventions.
>
> For example, if you do "ClassWith1Var new foo" then in the #run:with:in I
> receive all the information to KNOW that the fileName should be
> "ClassWith1Var >> #foo". So, no problem here.
>
> But for the second case, suppose "(ClassWith1Var >> #foo) literals", I
> don't see a way to know this.  In this case, #literals is intercepted by the
> doesNotUnderstand: of my proxy, and here I should load back the original
> compiled method from disk. The problem is that I cannot know in which CLASS
> and SELECTOR this proxy was put. The only way I know to do this, is to store
> the class + selector in the proxy instancebut it

Re: [Pharo-project] Loading Alien on Pharo 1.1.1

2010-11-19 Thread Eliot Miranda
Hi Esteban,

On Fri, Nov 19, 2010 at 10:23 AM, Esteban Lorenzano wrote:

> still the same error...
> I can press "proceed", but I'm scared to do that :)
>

as long as you don't shorten the specialObjectsArray you should be OK.


>
> Cheers,
> Esteban
>
> On 2010-11-19 11:12:17 -0300, Luc Fabresse  said:
>
>
>> Hi All,
>>
>>  To load  Alien I use:
>>
>>  Gofer new
>> squeaksource: 'Alien';
>> package: 'ConfigurationOfAlien';
>> load.
>> (Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1') load
>>
>>
>>  Cheers,
>>
>> #Luc
>>
>>
>> 2010/11/18 Esteban Lorenzano 
>>
>>  Hi,
>>> Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
>>> With ConfigurationOfAlien, I'm getting the "invalid array size" prereq
>>> violated.
>>>
>>> Cheers,
>>> Esteban
>>>
>>>
>>>
>>>
>>>
>>
>> > f=
>> ont-size: 14px; border-collapse: collapse; ">Hi
>> All,=A0=
>> To load =A0Alien I use:=A0=A0Gofer
>> new=
>> squeaksource:
>> 'Alien=
>> 9;;
>>package:
>> 'Configur=
>> ationOfAlien';
>> > n>load.
>>  > v>
>> (Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1')
>> =
>> load=A0=A0Cheers,> clear=
>> =3D"all">#Luc
>> 2010/11/18 Esteban Lorenzano > =3D"ltr">esteba...@gmail.com
>> =
>>
> >
>>
>> class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
>> ;border-left:1px #ccc solid;padding-left:1ex;">
>> Hi,
>> Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
>> With ConfigurationOfAlien, I'm getting the "invalid array
>> size&quo=
>> t; prereq violated.
>> 
>> Cheers,
>> Esteban
>> 
>> 
>> 
>> 
>>
>
>
>
>
>


Re: [Pharo-project] Ideas for CompiledMethod proxies?

2010-11-19 Thread Igor Stasenko
On 19 November 2010 22:47, Mariano Martinez Peck  wrote:
> Hi. I am developing kind of proxies for unused compiled methods. I want to
> detect them, put a proxy instead of them, and swap them to disk. Then, in
> case they are used, I put back the original ones. With this, I want to
> realease memory. This is why I need the proxy objects to be as small as
> possibles.
>
> Right now, I do something like this:
>
> aProxy := CompiledMethodProxyReferenceStreamWithFileName installOn:
> ClassWith1Var selector: #foo.
>
> this will instantiate the proxy, do the ClassWith1Var methodAt: #foo put:
> proxy, write the original compiledMethod that was in #foo into a file,
> etc
>
> and then if I do "ClassWith1Var new foo", then using the #run:with:in  I
> load the file from disk and I put back the original method. To know WHICH
> file I have to load, I have to store the fileName in the proxy object.
>
> In addition, if I DON'T execute the compiled method, but instead I send a
> message, for example:
>
> (ClassWith1Var >> #foo) literals
>
> this has to do the same: load and put back the original compiled method. To
> do this, I use the doesNotUnderstand:.
>
> This is easy to do if I store the fileName in the proxy instance. Right now,
> I am using as fileName this:  CLASS >> SELECTOR. For example, in this case,
> the file would be named "ClassWith1Var >> #foo"
>
> Now.with this solution, I need create an proxy instance for each
> compiled method, and these instances have also another instance for the
> filename. If I could use the same proxy instance for everybody, the amount
> of memory released would be mch more. So I thought that maybe from the
> context I can "guess" the filename if I use conventions.
>
> For example, if you do "ClassWith1Var new foo" then in the #run:with:in I
> receive all the information to KNOW that the fileName should be
> "ClassWith1Var >> #foo". So, no problem here.
>
> But for the second case, suppose "(ClassWith1Var >> #foo) literals", I don't
> see a way to know this.  In this case, #literals is intercepted by the
> doesNotUnderstand: of my proxy, and here I should load back the original
> compiled method from disk. The problem is that I cannot know in which CLASS
> and SELECTOR this proxy was put. The only way I know to do this, is to store
> the class + selector in the proxy instancebut it is the same...I will
> need an instance per compiled method. In such case is even easier to
> directly store the fileName.
>
> Anyway, if someone has a solution or advice on this, I would be appreciated
> that. I tried with thisContext, but it didn't help me.
>

A proxy actually should hold only some unique value (id), or as Eliot
suggested be a unique by itself.
This is enough to find a correspondence between any proxy and its
original method.
You can simply delegate loading the method to some object, which
'knows' how to load a method and where it is stored:

" id based lookup:  "
Proxy>>literals
  | method |
  method := MethodsProxyManager methodFor: id.
  ^ method literals

"or identity based lookup: "

Proxy>>literals
  | method |
  method := MethodsProxyManager methodFor: self.
  ^ method literals

> Thanks
>
> Mariano
>



-- 
Best regards,
Igor Stasenko AKA sig.



Re: [Pharo-project] Loading Alien on Pharo 1.1.1

2010-11-19 Thread Esteban Lorenzano

Ok, it loads :)
but now I have a problem with this primitive call:



what I'm missing? I'm using pharo 1.1.1 and no-cog vm (but latest sources)

Cheers,
Esteban

On 2010-11-19 19:05:29 -0300, Eliot Miranda 
 said:




Hi Esteban,

On Fri, Nov 19, 2010 at 10:23 AM, Esteban Lorenzano 
wrote:



still the same error...
I can press "proceed", but I'm scared to do that :)



as long as you don't shorten the specialObjectsArray you should be OK.




Cheers,
Esteban

On 2010-11-19 11:12:17 -0300, Luc Fabresse 
 said:




Hi All,

To load  Alien I use:

Gofer new
squeaksource: 'Alien';
package: 'ConfigurationOfAlien';
load.
(Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1') load


Cheers,

#Luc


2010/11/18 Esteban Lorenzano 



Hi,

Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
With ConfigurationOfAlien, I'm getting the "invalid array size" prereq
violated.

Cheers,
Esteban







Hi
All,=A0=
To load =A0Alien I use:=A0=A0Gofer
new=
squeaksource:
'Alien=
9;;
   package:
'Configur=
ationOfAlien';
load.

(Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1')
=
load=A0=A0Cheers,#Luc
2010/11/18 Esteban Lorenzano =3D"ltr">esteba...@gmail.com

=

>class=3D"gmail_quote" 


style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">
Hi,
Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
With ConfigurationOfAlien, I'm getting the "invalid array
size&quo=
t; prereq violated.

Cheers,
Esteban














Hi=A0Esteban,On Fri, Nov 19, 2010 at 10:=
23 AM, Esteban Lorenzano esteba...@gmail.com> 
wrote:
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex;">
still the same error...
I can press "proceed", but I'm scared to do that :)as long as you don't shorten the specialObje=
ctsArray you should be OK.=A0


Cheers,
Esteban

On 2010-11-19 11:12:17 -0300, Luc Fabresse luc.fabre...@gmail.com> 
said:




Hi All,

=A0To load =A0Alien I use:

 =A0Gofer new
squeaksource: 'Alien';
package: 'ConfigurationOfAlien';
load.
(Smalltalk at: #ConfigurationOfAlien project version: 'Pharo 1.1') =
load


=A0Cheers,

#Luc


2010/11/18 Esteban Lorenzano esteba...@gmail.com>


Hi,
Does anybody knows if Alien should work with pharo 1.1.1 (non cog vm)?
With ConfigurationOfAlien, I'm getting the "invalid array size&quo=
t; prereq
violated.

Cheers,
Esteban







Hi All,
<= br>
=3DA0=3D To load =3DA0Alien I use:

=3DA0=3DA0Gofer new