Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- 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
December 2013
- 87 participants
- 1533 messages
Re: [Pharo-dev] [ANN] traversal-enabled objects with DeepTraverser
by Tudor Girba
Hi,
I looked a bit at the existing hardcoded traversal methods in a Pharo/Moose
image. To detect it, I used a traversal. Perhaps this can also be useful
for people that want to teach what a traversal is, or what an analysis is,
so I wrote a blog post about it:
http://www.humane-assessment.com/blog/looking-for-hardcoded-traversal-metho…
Cheers,
Doru
On Sat, Dec 14, 2013 at 3:44 PM, Mariano Martinez Peck <
marianopeck(a)gmail.com> wrote:
>
>
>
> On Wed, Dec 11, 2013 at 12:21 PM, Tudor Girba <tudor(a)tudorgirba.com>wrote:
>
>> Hi,
>>
>> I put together a little implementation for traversals. It is inspired by
>> an original implementation from Mariano.
>>
>
> Wow... my memory is sooo bad I don't remember ;)
>
>
>
>> Using DeepTraverser, you can traverse arbitrary graphs by describing the
>> traversal and by specifying the actions you want to perform on the nodes
>> and relations.
>>
>>
> Once (or even more times) we thought with Martin 2 things:
>
> 1) Reify the traversal in Fuel so that we could plug a different one.
> 2) Use Fuel only for traversing and allowing user a hook to plug the what
> to do with each node.
> 3) Use the same traversal of 2) for deepCopying
> 4) Use the same traversal of 2) to get an approximate memory consumption
> of the transitive closure of an object
>
> But as always happened we run out of time.
>
> Anyway...I think this is a nice area to explore. There are many uses for a
> nice traverser.
>
> Also, did you see we wrote a Rossal extension to print the fuel traversal?
>
> http://rmod.lille.inria.fr/web/pier/software/Fuel/Version1.9/Documentation/…
>
>
> The code is available in the Moose image as part of the MooseAlgos
>> subproject, but can also be loaded separately in a Pharo image via:
>>
>> Gofer new
>> url: 'http://www.smalltalkhub.com/mc/Moose/DeepTraverser/main';
>> package: âConfigurationOfDeepTraverserâ;
>> load.
>> (Smalltalk globals at: #ConfigurationOfDeepTraverser) loadDevelopment.
>>
>>
>> Just to give you an idea, here are some representative examples:
>>
>> Number
>> deep: #subclasses
>> do: [:each | Transcript show: each; cr].
>>
>> Number deepCollect: #subclasses.
>>
>> Number
>> deep: #subclasses
>> collect: #name.
>>
>> Number
>> deep: #subclasses
>> do: [:each | Transcript show: each; cr]
>> relationDo: [ :from :to | Transcript show: from; show: ' <-- '; show:
>> to; cr ].
>>
>>
>>
>> More details about the usages and a little description of the
>> implementation can be found here:
>> http://www.humane-assessment.com/blog/traversal-enabled-pharo-objects/
>>
>>
>> Cheers,
>> Doru
>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
--
www.tudorgirba.com
"Every thing has its own flow"
Dec. 15, 2013
Re: [Pharo-dev] Similarity Matrix
by Alexandre Bergel
The SimilarityMatrix is meant to work with one set of elements, which is the same in column and horizontal.
Instead of having one class, SimilarityMatrix, we should have a framework to easily build matrixes. In your case, you simply want a matrix with a smart way of coloring.
I am interesting in having such matrix. How do we proceed? Are you ready for a pair programming session these next days?
I am now in Lille by the way, where are you?
Alexandre
On Dec 15, 2013, at 9:29 PM, Hernán Morales Durand <hernan.morales(a)gmail.com> wrote:
> El 15/12/2013 13:30, Alexandre Bergel escribió:
>> Hi Hernan,
>>
>> In that case, I suggest you to define your own builder to build the
>> matrix you need.
>> I have given a try, but I cannot properly parse your data. The problem
>> is about separating column (is it 4 or 5 white spaces?). Having a â,â
>> would help.
>
> That should be a paste problem, matrix elements were delimited by tab.
>
> I was thinking more in terms of re-using the SimilarityMatrix by making it polymorphic with a Matrix, i.e.:
>
> | rawDataMatrix dataMatrix rowArray |
> rawDataMatrix := '1,0.130,0.132,0.130
> ,1,0.195,0.487
> ,,1,0.195
> ,,,1'.
> " Build an Array for joining all rows in raw data matrix "
> rowArray := (NeoCSVReader on: rawDataMatrix readStream) upToEnd gather: [ : c | c ].
> " Then create a Matrix "
> dataMatrix := Matrix new rows: 4 columns: 4 contents: rowArray.
> " Instead of passing a comparison block, let's just take the values in the data matrix "
> SimilarityMatrix new on: dataMatrix; viewMatrix
>
>
>>
>> I gave a try, as you can see with the script below. It produces the
>> following:
>>
>>
>> Each box gives its value when the mouse is above.
>>
>> -=-=-= -=-=-= -=-=-= -=-=-= -=-=-=
>> | view f blockSize shape values el |
>> values := ' a1 a2 a3 a4 a5 a6 a7 a8 a9
>> a10 a11 a12 a13 a14 a15 a16 a17 a18 a19
>> a20 a21
>> a1 1 0.130 0.132 0.130 0.158 0.189 0.130 0.022
>> 1.000 0.062 0.083 0.061 0.080 0.059 0.149 1.000
>> 0.098 0.161 0.109 1.000
>> a2 1 0.195 0.487 0.220 0.220 1.000 0.060
>> 0.130 0.118 0.234 0.234 0.224 0.200 0.622 0.130
>> 0.342 0.235 0.425 0.130 0.000
>> a3 1 0.195 0.464 0.464 0.195 0.073 0.132
>> 0.116 0.114 0.256 0.109 0.085 0.133 0.132 0.105
>> 0.320 0.171 0.132 0.000
>> a4 1 0.220 0.190 0.487 0.060 0.130
>> 0.118 0.160 0.234 0.154 0.132 0.395 0.130 0.342
>> 0.235 0.425 0.130 0.000
>> a5 1 0.500 0.220 0.071 0.158 0.195
>> 0.220 0.389 0.209 0.182 0.156 0.158 0.162 0.417
>> 0.225 0.158 0.000
>> a6 1 0.220 0.071 0.189 0.114
>> 0.136 0.282 0.130 0.106 0.156 0.189 0.132 0.360
>> 0.167 0.189 0.000
>> a7 1 0.060 0.130 0.118
>> 0.234 0.234 0.224 0.200 0.622 0.130 0.342 0.235
>> 0.425 0.130 0.000
>> a8 1 0.022 0.156 0.104
>> 0.082 0.100 0.100 0.019 0.022 0.095 0.088 0.061
>> 0.022 0.028
>> a9 1 0.062 0.083
>> 0.061 0.080 0.059 0.149 1.000 0.098 0.161 0.109
>> 1.000 0.000
>> a10 1 0.541 0.140
>> 0.372 0.283 0.073 0.062 0.111 0.139 0.143 0.062
>> 0.025
>> a11 1 0.160
>> 0.714 0.579 0.176 0.083 0.133 0.200 0.163 0.083
>> 0.024
>> a12 1 0.154
>> 0.132 0.176 0.061 0.308 0.235 0.239 0.061 0.000
>> a13 1
>> 0.676 0.170 0.080 0.128 0.189 0.157 0.080 0.023
>> a14
>> 1 0.148 0.059 0.128 0.158 0.135 0.059 0.023
>> a15
>> 1 0.149 0.262 0.158 0.341 0.149 0.000
>> a16
>> 1 0.098 0.161 0.109 1.000 0.000
>> a17
>> 1 0.207 0.316 0.098 0.000
>> a18
>> 1 0.206 0.161 0.000
>> a19
>> 1 0.109 0.000
>> a20
>> 1 0.000
>> a21
>> 1
>> ' lines collect: [ : line | line trimBoth findTokens: ' ' ].
>>
>>
>> blockSize := 10.
>> view := ROView new.
>> values do: [ :lineOfValues |
>> lineOfValues do: [ :v |
>> shape := ROBox new size: blockSize; color: Color white.
>> f := [Float readFrom: v readStream] ifError: [ -1 ].
>> f >= 0
>> ifTrue: [ shape color: (Color gray: f) ].
>> el := shape elementOn: f.
>> el @ ROPopup.
>> view add: el
>> ].
>>
>> "We fill the remaining of the line with white boxes.
>> We need to have the same amount of boxes for all the lines"
>> (values first size - lineOfValues size)
>> timesRepeat: [ view add: (ROBox new color: Color white) element ].
>>
>> ].
>> ROGridLayout new gapSize: 0; lineItemsCount: (values first size); on:
>> view elements.
>> view open.
>> -=-=-= -=-=-= -=-=-= -=-=-= -=-=-=
>>
>>
>
> Thanks for the script.
> Hernán
>
>
>
>>
>>
>> Cheers,
>> Alexandre
>>
>>
>>
>>
>> On Dec 15, 2013, at 12:56 AM, Hernán Morales Durand
>> <hernan.morales(a)gmail.com <mailto:hernan.morales@gmail.com>> wrote:
>>
>>> Hi Alexandre,
>>>
>>> Just to provide you some feedback. My similarity matrices sometimes
>>> are calculated by other tools. However I want to display them using
>>> Roassal. For example this is a similarity matrix of 21 lines and 21
>>> columns:
>>>
>>> ' a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11
>>> a12 a13 a14 a15 a16 a17 a18 a19 a20 a21
>>> a1 1 0.130 0.132 0.130 0.158 0.189 0.130 0.022
>>> 1.000 0.062 0.083 0.061 0.080 0.059 0.149
>>> 1.000 0.098 0.161 0.109 1.000 0.000
>>> a2 1 0.195 0.487 0.220 0.220 1.000 0.060
>>> 0.130 0.118 0.234 0.234 0.224 0.200 0.622 0.130
>>> 0.342 0.235 0.425 0.130 0.000
>>> a3 1 0.195 0.464 0.464 0.195 0.073
>>> 0.132 0.116 0.114 0.256 0.109 0.085 0.133 0.132
>>> 0.105 0.320 0.171 0.132 0.000
>>> a4 1 0.220 0.190 0.487 0.060 0.130
>>> 0.118 0.160 0.234 0.154 0.132 0.395 0.130 0.342
>>> 0.235 0.425 0.130 0.000
>>> a5 1 0.500 0.220 0.071 0.158
>>> 0.195 0.220 0.389 0.209 0.182 0.156 0.158 0.162
>>> 0.417 0.225 0.158 0.000
>>> a6 1 0.220 0.071 0.189 0.114
>>> 0.136 0.282 0.130 0.106 0.156 0.189 0.132 0.360
>>> 0.167 0.189 0.000
>>> a7 1 0.060 0.130 0.118
>>> 0.234 0.234 0.224 0.200 0.622 0.130 0.342 0.235
>>> 0.425 0.130 0.000
>>> a8 1 0.022 0.156 0.104
>>> 0.082 0.100 0.100 0.019 0.022 0.095 0.088
>>> 0.061 0.022 0.028
>>> a9 1 0.062 0.083
>>> 0.061 0.080 0.059 0.149 1.000 0.098 0.161 0.109
>>> 1.000 0.000
>>> a10 1 0.541
>>> 0.140 0.372 0.283 0.073 0.062 0.111 0.139 0.143
>>> 0.062 0.025
>>> a11 1 0.160
>>> 0.714 0.579 0.176 0.083 0.133 0.200 0.163 0.083
>>> 0.024
>>> a12 1
>>> 0.154 0.132 0.176 0.061 0.308 0.235 0.239 0.061
>>> 0.000
>>> a13 1
>>> 0.676 0.170 0.080 0.128 0.189 0.157 0.080 0.023
>>> a14
>>> 1 0.148 0.059 0.128 0.158 0.135 0.059 0.023
>>> a15
>>> 1 0.149 0.262 0.158 0.341 0.149 0.000
>>> a16
>>> 1 0.098 0.161 0.109 1.000 0.000
>>> a17
>>> 1 0.207 0.316 0.098 0.000
>>> a18
>>> 1 0.206 0.161 0.000
>>> a19
>>> 1 0.109 0.000
>>> a20
>>> 1 0.000
>>> a21
>>> 1
>>> ' lines collect: [ : line | line trimBoth findTokens: Character tab ]
>>>
>>> May be your Comparison class could be tailored to set manually rhs,
>>> lhs and similarity? What do you recommend for raw matrices?
>>>
>>> Cheers,
>>>
>>> Hernán
>>>
>>>
>>>
>>> 2013/11/29 Alexandre Bergel <alexandre.bergel(a)me.com
>>> <mailto:alexandre.bergel@me.com>>
>>> Hi!
>>>
>>> I know some of you are working on DSM-kind of matrix. Oscar has been
>>> working on a similarity matrix for Roassal. I just want to share a
>>> self-explanble screenshot with you guys.
>>>
>>>
>>> On this example, the methods of the subclasses of Set are compared
>>> between themselves.
>>> Black dot is a couple (m1, m2) that are very similar
>>> <Screen Shot 2013-11-29 at 6.12.39 PM.png>
>>>
>>> More
>>> on https://www.facebook.com/media/set/?set=a.550677725018829.1073741833.340543…
>>>
>>> Cheers,
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Dec. 15, 2013
Re: [Pharo-dev] Athens: testing whether a point is within a path?
by Chris Muller
This helped me with a related problem once.
http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
On Sat, Dec 14, 2013 at 1:46 PM, Alexandre Bergel
<alexandre.bergel(a)me.com>wrote:
> Hi!
>
> I have seen that AthensPolygonTester may do the job somehow.
> How can I test whether a point is included in a path?
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
Dec. 15, 2013
Re: [Pharo-dev] Sprint friday :)
by Stéphane Ducasse
super!
On Dec 15, 2013, at 8:40 PM, Erwan Douaille <douailleerwan(a)gmail.com> wrote:
> I will come the whole day, i will bring some "croissants" :)
>
>
> 2013/12/15 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
> Hi Pharoers
>
> we will have an official sprint friday and we have the following visitors
> - andrei chis, jan kurs from Berne
> - alain plantec from Brest
> - serge stinckwich from Caen
> - yuriy timchuk, roberto minelli and tommaso dal sasso from Lugano
> - Pharoers from Douai
>
> So if you plan to attend you are welcomed. Just drop a mail.
>
> Stef
>
>
>
>
> --
> Best regards,
>
> Douaille Erwan <douaille.erwan(a)gmail.com>
Dec. 15, 2013
Re: [Pharo-dev] Similarity Matrix
by Chris Muller
On Sun, Dec 15, 2013 at 2:29 PM, Hernán Morales Durand <
hernan.morales(a)gmail.com> wrote:
> El 15/12/2013 13:30, Alexandre Bergel escribió:
>
> Hi Hernan,
>>
>> In that case, I suggest you to define your own builder to build the
>> matrix you need.
>> I have given a try, but I cannot properly parse your data. The problem
>> is about separating column (is it 4 or 5 white spaces?). Having a â,â
>> would help.
>>
>
> That should be a paste problem, matrix elements were delimited by tab.
>
Mail-server formatting. Should use binary attachment to send data or code
to be filed-in.
Dec. 15, 2013
Re: [Pharo-dev] strange bug when opening the morph menu
by Tudor Girba
Let's do it like this:
- open the window with a long title
- now try to obtain a menu like in this picture (I used
Ctrl+Shift+RightClick, or Ctrl+Shift+Click):
https://www.dropbox.com/s/fsfl8pt2065k6rg/Screenshot%202013-12-15%2021.50.5…
Cheers,
Doru
On Sun, Dec 15, 2013 at 9:47 PM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
> Strange.
>
> Doru
>
>
> On Sun, Dec 15, 2013 at 5:55 PM, Stéphane Ducasse <
> stephane.ducasse(a)inria.fr> wrote:
>
>> Ok tried several times to reproduce it on 30637 but I failed to see any
>> difference between the two browsers.
>>
>>
>> On Dec 15, 2013, at 5:49 PM, Nicolas Cellier <
>> nicolas.cellier.aka.nice(a)gmail.com> wrote:
>>
>> No, you should use a short click, not a long one.
>> A short click normally let the menu appear left or right of the mouse.
>>
>>
>> 2013/12/15 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>
>>>
>>> On Dec 14, 2013, at 10:26 PM, Nicolai Hess <nicolaihess(a)web.de> wrote:
>>>
>>> If you press and hold the mousebutton the menu is visible.
>>> If you just click the mousebutton the menu flashes for a short time
>>> and the window is in "grab" mode.
>>>
>>>
>>> I tried to understand your actions but I could not.
>>> I clicked and press long on different part of the workspace but I could
>>> not see a problem
>>>
>>> Actually the grab-menu item is selected, because the menu
>>> is such wide, that it does not open beneath the mouse pointer,
>>> and so the mouse pointer is always over some menu item.
>>> (at leas with on windows)
>>>
>>> If you have a normal workspace title bar, the menu stays on even if
>>> you just click the mousebutton.
>>>
>>> nicolai
>>>
>>>
>>>
>>> 2013/12/14 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> Try this:
>>>>
>>>> 1. Execute
>>>> Workspace open
>>>> 2. Try to get the menu of the window
>>>> ==> it opens just fine
>>>>
>>>> 1. Execute
>>>> Workspace open label: (1 to: 100) asOrderedCollection asString
>>>> 2. Try to get the menu of the window
>>>> ==> it does not open properly (it opens large and it closes quickly)
>>>> and the mouse remains in dragging mode
>>>>
>>>>
>>>> I do not get this problem.
>>>> When I want to edit the title it just takes the complete screen width.
>>>>
>>>>
>>>> I opened a bug report:
>>>>
>>>> https://pharo.fogbugz.com/f/cases/12426/Morph-menu-has-strange-behavior-whe…
>>>>
>>>> Does anyone have any idea of why it happens?
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Every thing has its own flow."
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
--
www.tudorgirba.com
"Every thing has its own flow"
Dec. 15, 2013
Re: [Pharo-dev] strange bug when opening the morph menu
by Tudor Girba
Strange.
Doru
On Sun, Dec 15, 2013 at 5:55 PM, Stéphane Ducasse <stephane.ducasse(a)inria.fr
> wrote:
> Ok tried several times to reproduce it on 30637 but I failed to see any
> difference between the two browsers.
>
>
> On Dec 15, 2013, at 5:49 PM, Nicolas Cellier <
> nicolas.cellier.aka.nice(a)gmail.com> wrote:
>
> No, you should use a short click, not a long one.
> A short click normally let the menu appear left or right of the mouse.
>
>
> 2013/12/15 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>
>>
>> On Dec 14, 2013, at 10:26 PM, Nicolai Hess <nicolaihess(a)web.de> wrote:
>>
>> If you press and hold the mousebutton the menu is visible.
>> If you just click the mousebutton the menu flashes for a short time
>> and the window is in "grab" mode.
>>
>>
>> I tried to understand your actions but I could not.
>> I clicked and press long on different part of the workspace but I could
>> not see a problem
>>
>> Actually the grab-menu item is selected, because the menu
>> is such wide, that it does not open beneath the mouse pointer,
>> and so the mouse pointer is always over some menu item.
>> (at leas with on windows)
>>
>> If you have a normal workspace title bar, the menu stays on even if
>> you just click the mousebutton.
>>
>> nicolai
>>
>>
>>
>> 2013/12/14 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>
>>>
>>>
>>> Hi,
>>>
>>> Try this:
>>>
>>> 1. Execute
>>> Workspace open
>>> 2. Try to get the menu of the window
>>> ==> it opens just fine
>>>
>>> 1. Execute
>>> Workspace open label: (1 to: 100) asOrderedCollection asString
>>> 2. Try to get the menu of the window
>>> ==> it does not open properly (it opens large and it closes quickly) and
>>> the mouse remains in dragging mode
>>>
>>>
>>> I do not get this problem.
>>> When I want to edit the title it just takes the complete screen width.
>>>
>>>
>>> I opened a bug report:
>>>
>>> https://pharo.fogbugz.com/f/cases/12426/Morph-menu-has-strange-behavior-whe…
>>>
>>> Does anyone have any idea of why it happens?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Every thing has its own flow."
>>>
>>>
>>>
>>
>>
>
>
--
www.tudorgirba.com
"Every thing has its own flow"
Dec. 15, 2013
Re: [Pharo-dev] Similarity Matrix
by Hernán Morales Durand
El 15/12/2013 13:30, Alexandre Bergel escribió:
> Hi Hernan,
>
> In that case, I suggest you to define your own builder to build the
> matrix you need.
> I have given a try, but I cannot properly parse your data. The problem
> is about separating column (is it 4 or 5 white spaces?). Having a â,â
> would help.
That should be a paste problem, matrix elements were delimited by tab.
I was thinking more in terms of re-using the SimilarityMatrix by making
it polymorphic with a Matrix, i.e.:
| rawDataMatrix dataMatrix rowArray |
rawDataMatrix := '1,0.130,0.132,0.130
,1,0.195,0.487
,,1,0.195
,,,1'.
" Build an Array for joining all rows in raw data matrix "
rowArray := (NeoCSVReader on: rawDataMatrix readStream) upToEnd gather:
[ : c | c ].
" Then create a Matrix "
dataMatrix := Matrix new rows: 4 columns: 4 contents: rowArray.
" Instead of passing a comparison block, let's just take the values in
the data matrix "
SimilarityMatrix new on: dataMatrix; viewMatrix
>
> I gave a try, as you can see with the script below. It produces the
> following:
>
>
> Each box gives its value when the mouse is above.
>
> -=-=-= -=-=-= -=-=-= -=-=-= -=-=-=
> | view f blockSize shape values el |
> values := ' a1 a2 a3 a4 a5 a6 a7 a8 a9
> a10 a11 a12 a13 a14 a15 a16 a17 a18 a19
> a20 a21
> a1 1 0.130 0.132 0.130 0.158 0.189 0.130 0.022
> 1.000 0.062 0.083 0.061 0.080 0.059 0.149 1.000
> 0.098 0.161 0.109 1.000
> a2 1 0.195 0.487 0.220 0.220 1.000 0.060
> 0.130 0.118 0.234 0.234 0.224 0.200 0.622 0.130
> 0.342 0.235 0.425 0.130 0.000
> a3 1 0.195 0.464 0.464 0.195 0.073 0.132
> 0.116 0.114 0.256 0.109 0.085 0.133 0.132 0.105
> 0.320 0.171 0.132 0.000
> a4 1 0.220 0.190 0.487 0.060 0.130
> 0.118 0.160 0.234 0.154 0.132 0.395 0.130 0.342
> 0.235 0.425 0.130 0.000
> a5 1 0.500 0.220 0.071 0.158 0.195
> 0.220 0.389 0.209 0.182 0.156 0.158 0.162 0.417
> 0.225 0.158 0.000
> a6 1 0.220 0.071 0.189 0.114
> 0.136 0.282 0.130 0.106 0.156 0.189 0.132 0.360
> 0.167 0.189 0.000
> a7 1 0.060 0.130 0.118
> 0.234 0.234 0.224 0.200 0.622 0.130 0.342 0.235
> 0.425 0.130 0.000
> a8 1 0.022 0.156 0.104
> 0.082 0.100 0.100 0.019 0.022 0.095 0.088 0.061
> 0.022 0.028
> a9 1 0.062 0.083
> 0.061 0.080 0.059 0.149 1.000 0.098 0.161 0.109
> 1.000 0.000
> a10 1 0.541 0.140
> 0.372 0.283 0.073 0.062 0.111 0.139 0.143 0.062
> 0.025
> a11 1 0.160
> 0.714 0.579 0.176 0.083 0.133 0.200 0.163 0.083
> 0.024
> a12 1 0.154
> 0.132 0.176 0.061 0.308 0.235 0.239 0.061 0.000
> a13 1
> 0.676 0.170 0.080 0.128 0.189 0.157 0.080 0.023
> a14
> 1 0.148 0.059 0.128 0.158 0.135 0.059 0.023
> a15
> 1 0.149 0.262 0.158 0.341 0.149 0.000
> a16
> 1 0.098 0.161 0.109 1.000 0.000
> a17
> 1 0.207 0.316 0.098 0.000
> a18
> 1 0.206 0.161 0.000
> a19
> 1 0.109 0.000
> a20
> 1 0.000
> a21
> 1
> ' lines collect: [ : line | line trimBoth findTokens: ' ' ].
>
>
> blockSize := 10.
> view := ROView new.
> values do: [ :lineOfValues |
> lineOfValues do: [ :v |
> shape := ROBox new size: blockSize; color: Color white.
> f := [Float readFrom: v readStream] ifError: [ -1 ].
> f >= 0
> ifTrue: [ shape color: (Color gray: f) ].
> el := shape elementOn: f.
> el @ ROPopup.
> view add: el
> ].
>
> "We fill the remaining of the line with white boxes.
> We need to have the same amount of boxes for all the lines"
> (values first size - lineOfValues size)
> timesRepeat: [ view add: (ROBox new color: Color white) element ].
>
> ].
> ROGridLayout new gapSize: 0; lineItemsCount: (values first size); on:
> view elements.
> view open.
> -=-=-= -=-=-= -=-=-= -=-=-= -=-=-=
>
>
Thanks for the script.
Hernán
>
>
> Cheers,
> Alexandre
>
>
>
>
> On Dec 15, 2013, at 12:56 AM, Hernán Morales Durand
> <hernan.morales(a)gmail.com <mailto:hernan.morales@gmail.com>> wrote:
>
>> Hi Alexandre,
>>
>> Just to provide you some feedback. My similarity matrices sometimes
>> are calculated by other tools. However I want to display them using
>> Roassal. For example this is a similarity matrix of 21 lines and 21
>> columns:
>>
>> ' a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11
>> a12 a13 a14 a15 a16 a17 a18 a19 a20 a21
>> a1 1 0.130 0.132 0.130 0.158 0.189 0.130 0.022
>> 1.000 0.062 0.083 0.061 0.080 0.059 0.149
>> 1.000 0.098 0.161 0.109 1.000 0.000
>> a2 1 0.195 0.487 0.220 0.220 1.000 0.060
>> 0.130 0.118 0.234 0.234 0.224 0.200 0.622 0.130
>> 0.342 0.235 0.425 0.130 0.000
>> a3 1 0.195 0.464 0.464 0.195 0.073
>> 0.132 0.116 0.114 0.256 0.109 0.085 0.133 0.132
>> 0.105 0.320 0.171 0.132 0.000
>> a4 1 0.220 0.190 0.487 0.060 0.130
>> 0.118 0.160 0.234 0.154 0.132 0.395 0.130 0.342
>> 0.235 0.425 0.130 0.000
>> a5 1 0.500 0.220 0.071 0.158
>> 0.195 0.220 0.389 0.209 0.182 0.156 0.158 0.162
>> 0.417 0.225 0.158 0.000
>> a6 1 0.220 0.071 0.189 0.114
>> 0.136 0.282 0.130 0.106 0.156 0.189 0.132 0.360
>> 0.167 0.189 0.000
>> a7 1 0.060 0.130 0.118
>> 0.234 0.234 0.224 0.200 0.622 0.130 0.342 0.235
>> 0.425 0.130 0.000
>> a8 1 0.022 0.156 0.104
>> 0.082 0.100 0.100 0.019 0.022 0.095 0.088
>> 0.061 0.022 0.028
>> a9 1 0.062 0.083
>> 0.061 0.080 0.059 0.149 1.000 0.098 0.161 0.109
>> 1.000 0.000
>> a10 1 0.541
>> 0.140 0.372 0.283 0.073 0.062 0.111 0.139 0.143
>> 0.062 0.025
>> a11 1 0.160
>> 0.714 0.579 0.176 0.083 0.133 0.200 0.163 0.083
>> 0.024
>> a12 1
>> 0.154 0.132 0.176 0.061 0.308 0.235 0.239 0.061
>> 0.000
>> a13 1
>> 0.676 0.170 0.080 0.128 0.189 0.157 0.080 0.023
>> a14
>> 1 0.148 0.059 0.128 0.158 0.135 0.059 0.023
>> a15
>> 1 0.149 0.262 0.158 0.341 0.149 0.000
>> a16
>> 1 0.098 0.161 0.109 1.000 0.000
>> a17
>> 1 0.207 0.316 0.098 0.000
>> a18
>> 1 0.206 0.161 0.000
>> a19
>> 1 0.109 0.000
>> a20
>> 1 0.000
>> a21
>> 1
>> ' lines collect: [ : line | line trimBoth findTokens: Character tab ]
>>
>> May be your Comparison class could be tailored to set manually rhs,
>> lhs and similarity? What do you recommend for raw matrices?
>>
>> Cheers,
>>
>> Hernán
>>
>>
>>
>> 2013/11/29 Alexandre Bergel <alexandre.bergel(a)me.com
>> <mailto:alexandre.bergel@me.com>>
>> Hi!
>>
>> I know some of you are working on DSM-kind of matrix. Oscar has been
>> working on a similarity matrix for Roassal. I just want to share a
>> self-explanble screenshot with you guys.
>>
>>
>> On this example, the methods of the subclasses of Set are compared
>> between themselves.
>> Black dot is a couple (m1, m2) that are very similar
>> <Screen Shot 2013-11-29 at 6.12.39 PM.png>
>>
>> More
>> on https://www.facebook.com/media/set/?set=a.550677725018829.1073741833.340543…
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
Dec. 15, 2013
Re: [Pharo-dev] Sprint friday :)
by Erwan Douaille
I will come the whole day, i will bring some "croissants" :)
2013/12/15 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
> Hi Pharoers
>
> we will have an official sprint friday and we have the following visitors
> - andrei chis, jan kurs from Berne
> - alain plantec from Brest
> - serge stinckwich from Caen
> - yuriy timchuk, roberto minelli and tommaso dal sasso from Lugano
> - Pharoers from Douai
>
> So if you plan to attend you are welcomed. Just drop a mail.
>
> Stef
>
>
--
Best regards,
Douaille Erwan <douaille.erwan(a)gmail.com>
Dec. 15, 2013
News entries wanted for Pharo website
by Marcus Denker
Hi,
We are posting news entries on Pharo.org (and twitter + google plus)⦠often it is easy to transform an
email announcement into a news entry, but sometimes it takes quite an effort.
So if you want your news to be published, please send a short text + a picture or link to youtube for
the pharo news feed. Itâs much easier to post something that needs no brain power than something where
one needs to think how to announce it so it makes senseâ¦
So
-> if you announce something via mail, send me (or to the list, or add an issue tacker entry)(
a version to be put on pharo.org
-> if you have something where you wonder why this was never put there, do the same ;-)
Marcus
Dec. 15, 2013