Re: [Pharo-users] #subStrings: alternative preserving separators

2013-11-21 Thread Camillo Bruni

On 2013-11-21, at 08:18, Stéphane Ducasse stephane.duca...@inria.fr wrote:

 Propose allSubStrings: with a couple of tests and a nice comment.
 so that we improve the lib.

if it forwards to split: this can be easily done (as pointed out by norbert):

$| split: 'foo|bar||foobar|'




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] How to discover which test fails (pharo 2.0)

2013-11-20 Thread Camillo Bruni
The TestRunner is usually a better choice in this case, no?
WorldMenu / TestRunner

On 2013-11-20, at 16:43, Davide Varvello varve...@yahoo.com wrote:

 Hi!
 
 I'm on Pharo 2.0.
 When I run a bunch of tests I usually select a lot of packages from Nautilus
 and click cmd-t to run them, but unfortunately if one test fails, only a
 yellow box in the lower left appears and it's time consuming to look for
 which test fails in which package.
 I'd love to have the good old dialogs with all the failing tests.
 Is there a way, in the configuration, to have them back?
 
 TIA
 Davide
 
 
 
 --
 View this message in context: 
 http://forum.world.st/How-to-discover-which-test-fails-pharo-2-0-tp4723744.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Current 3.0 download is broken

2013-11-10 Thread Camillo Bruni
It did not solve the issue yet :/, I will have to look into it next week.
In any case, I think it would be unrelated to a bootstrap since FileLocator 
is already lazily initialized. There is just the typical problem on how and
when to update a singleton...

I should reopen the issue since the problem persists.

On 2013-11-10, at 12:37, Stéphane Ducasse stephane.duca...@inria.fr wrote:
 Camillo
 
 I read the bug entry and your explanation. 
 Now could not we find a solution that is not based on postscript?
 Why? because I'm thinking that soon (or later) we will bootstrap from sources 
 and I would love to have 
 as much as behavior inside the initialize so that we do not forget a little 
 message and get the system shaky.
 
 Stef
 
 On 09 Nov 2013, at 15:37, Johan Fabry jfa...@dcc.uchile.cl wrote:
 For double completeness ;-) The one-click download Pharo3.0-mac.zip has 
 the same problem. The included source file is in the wrong directory. It 
 should be moved out of Contents/Resources and moved into Contents/MacOS. 
 Then the one-click also runs.
 
 That seems to be a regression from how it once was, so it should be fixed 
 ASAP.
 
 It was fixed and actually extended to take more source locations into 
 account.
 But somehow FileLocator is not properly initialized and thus the additional 
 locations
 are not properly resolved.




Re: [Pharo-users] Current 3.0 download is broken

2013-11-09 Thread Camillo Bruni
seems to be resolved. Could you confirm?

On 2013-11-08, at 20:53, Johan Fabry jfa...@dcc.uchile.cl wrote:

 Hi all,
 
 I wanted to toy around with 3.0 for a moment today, so I downloaded the last 
 image from http://files.pharo.org/image/30/Pharo-Image-3.0-latest.zip It is 
 unresponsive with 100% CPU usage. I thought it was a VM issue of mine, so I 
 downloaded the installer , and this has the same issue. I
 
 This is MacOS, I'm still on 10.8.5, I attach PharoDebug.log below for your 
 perusal 
 
 Greetings,
 
 PharoDebug.log
 
 --- Save our in-boxes! http://emailcharter.org ---
 
 Johan Fabry   -   http://pleiad.cl/~jfabry
 PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
 




Re: [Pharo-users] Current 3.0 download is broken

2013-11-09 Thread Camillo Bruni

On 2013-11-09, at 14:29, Camillo Bruni camillobr...@gmail.com wrote:

 On 2013-11-09, at 14:17, Camillo Bruni camillobr...@gmail.com wrote:
 On 2013-11-09, at 14:00, Marcus Denker marcus.den...@inria.fr wrote:
 On 09 Nov 2013, at 13:55, Johan Fabry jfa...@dcc.uchile.cl wrote:
 Nope, I just unzip the new image and double click it. (+ I never defined 
 any startup script anywhere)
 
 do you have a .sources file?
 
 probably that, since the lookup logic changed the other day. I will try 
 without the .sources
 
 Confirmed, if I open the image without sources it hangs (strangely enough not 
 even with stderr output)
 Saving the image with sources and then opening it again without sources 
 works, producing a proper warning

https://pharo.fogbugz.com/f/cases/12129/FileLocator-is-not-initialized-at-the-right-point-during-startup


[Pharo-users] Pharo VM + Travis Validation

2013-11-09 Thread Camillo Bruni
I finished the new setup for the Pharo VM github repository [1]
- renamed codegen-scripts - scripts
- separate setup scripts for linux (more to come later)
- added scripts/build.sh which builds the VM automatically under linux  
- generating version info
- dowloading fresh 2.0 image
- installing VMMaker from scratch from the repository
- added scripts/test.sh which downloads a test image and runs it with the 
freshly built VM
- complete travis validation [2]

Missing Goodies: 
- OSX travis configuration
- OSX setup scripts (based on homebrew + XCode installation checks)

I would like to follow a pull-request based contribution, now with the 
travis validation in place this is very comfortable! This way it should be
much easier for non-core people to contribute something simple.

Note that with travis you get free validation for your own fork / branch [3]!

[1] https://github.com/pharo-project/pharo-vm/
[2] https://travis-ci.org/pharo-project/pharo-vm/
[3] https://travis-ci.org/camillobruni/pharo-vm/


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Pharo 3.0.0.dmg for Mac OSX - problem loading on OS 10.9

2013-11-08 Thread Camillo Bruni

On 2013-11-08, at 12:59, Camille Teruel camille.ter...@gmail.com wrote:

 
 On 8 nov. 2013, at 11:44, Yuriy Tymchuk yuriy.tymc...@me.com wrote:
 
 Just downloaded last build. Works for me. (I’m on Mavericks of course)
 
 Not for me (on mavericks too)...

Did you enable System Preferences / Security  Privacy = Allow apps downloaded 
from: [Anywhere]?


Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Camillo Bruni
If we open an official one, given the importance of petitparser, it should be 
under PharoExtras.

On 2013-11-07, at 10:10, Norbert Hartl norb...@hartl.name wrote:

 Looking at smalltalkhub there are plenty of PetitParser repos to find but 
 none that looks official. So which is considered official? I still had Lukas’ 
 repo in my config but the server seems to be down so I noticed.
 
 Norbert



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] ImageMorph scaling

2013-11-04 Thread Camillo Bruni
Check what magic Ben applied for the Morph Inspector:
`World inspect` then switch to morph view.


On 2013-11-05, at 05:04, Sean P. DeNigris s...@clipperadams.com wrote:

 How would I get an ImageMorph to automatically resize inside a Spec UI? I put
 it in a PanelMorph with various layout attempts, the latest being:
   image := PanelMorph new
   changeTableLayout;
   hResizing: #spaceFill;
   vResizing: #spaceFill;
   yourself.
 
 Where image above is an accessor referenced in #spec
 
 Then I added:
   imageMorph := ImageMorph new
   image: form;
   hResizing: #spaceFill;
   vResizing: #spaceFill;
   yourself.
 
   image addMorph: imageMorph.
 
 The form shows up as the full original size, but strangely if I bring up the
 halos on the ImageMorph and just wiggle the scaling halo, it resizes to fit
 the PanelMorph. But then if I resize the window again, the image doesn't
 rescale.
 
 Thanks.
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/ImageMorph-scaling-tp4719248.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] I would rather pay for Smalltalkhub than use Github for free.

2013-11-03 Thread Camillo Bruni

On 2013-11-03, at 15:52, Stephan Eggermont step...@stack.nl wrote:

 Kilon wrote
 I take a look at previous experiments like squeaksource and I find little 
 justification to not support Github. But then I am not against Smalltalkhub 
 or other repos being available to Pharo. The more the merrier.  
 
 I see some very strong arguments against depending on github: 
 - it is centralized infrastructure, essentially unsuitable for use with a 
 distributed version control system;
 - it doesn’t support working at the right granularity;
 - the smalltalk community is too small to have any influence on the 
 directions github is taking. 
  It is a commercial organization that can decide to do something we don’t 
 like at any time. 
  It is free, so we are the product. Just take a look at sourceforge;
 - we can do much better than github (but don’t have enough time). We should 
 be using a P2P,
  bittorrent like system for version control. 

github != git and whether we use github or now does not matter at all.
What matters is that we use technology that is robust and that we have a 
versioning
system that works decentralized. All of that is solved by git.

With filetree we have the proper granularity (methods)
With github we have an awesome website, such as we have an aweseome website 
with smalltalkhub, execpt that monticello should be modernized. Sadly the 
community is too small to achieve that, and inventing yet another versioning 
tool/system won't help on the short run. Maybe, yes someday in the future we 
can have our own fancy fully object-oriented versioning system, but IMO that is 
wasted effort, as git/mercurial come very close to something ideal.

I am happy to give more insight into git, because I think you have quite a 
wrong picture about it :)



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] [Pharo-dev] moving moose to pharo 3.0

2013-11-03 Thread Camillo Bruni

On 2013-11-03, at 21:11, Tudor Girba tu...@tudorgirba.com wrote:

 Hi,
 
 We essentially finished moving Moose to Pharo 3.0 (we still have 6 yellow 
 tests but they needed attention anyway). It took about 4 people looking into 
 issues for a total probably around 2 man-days of effort. The largest 
 impediment was actually SmalltalkHub being down for one day :).
 
 What posed problems:
 - RB visitor now has correct visit* methods instead of accept* methods. The 
 deprecation messages helped quite a bit. This meant (1) that we had to rename 
 in our visitors the methods, and (2) that we had to change the old accept* 
 messages.
 - RB nodes do not answer to #isLiteral anymore. Instead, they answer 
 correctly to #isLiteralNode so that to avoid confusion with 
 Object#isLiteral. This is good, and this meant that we had to hunt all 
 #isLiteral usages in Moose.
 - Categories are no longer mapped on RPackages through 1-to-1. This is also 
 good because it is an important step in Pharo. Although originally we said we 
 want to keep 1-to-1, this is probably a better solution now. For Moose, this 
 meant that some of our older tests setup had to be modified a bit to rely on 
 RPackage only.
 - Some Morphs rely now on Announcements, and this had a little impact on the 
 assumptions we make when we suspend announcements (to avoid infinite loops) 
 that are being sent between Morphic and Glamour. We fixed this in Glamour.
 - In FileSystem #ensureDirectory was renamed to #ensureCreateDirectory 
 without a deprecation. For this one, we should add a deprecation for the old 
 method.

opened an issue for that: 
https://pharo.fogbugz.com/f/cases/12062/ensureDirectory-and-ensureFile-should-be-readded-with-a-deprecation-message

 - flatCollect had a conflicting behavior in Pharo. We are now integrating the 
 Moose version so that it returns the same species.
 - The new SpecDebugger expects the registered Inspector to be based on Spec, 
 and this causes problems with the GTInspector. This problem still has to be 
 fixed in Pharo.
 
 All in all, we encountered no significant problems and the problems we faced 
 came from deep into Pharo. So, if your code is not relying directly on RB, 
 RPackage or the Debugger, you are likely to have a smooth transition.
 
 Cheers,
 Doru
 
 
 -- 
 www.tudorgirba.com
 
 Every thing has its own flow



signature.asc
Description: Message signed with OpenPGP using GPGMail


[Pharo-users] Automatic Issue Checker

2013-10-16 Thread Camillo Bruni
After a long debug session on monday I could finally overcome
a tricky race condition for delays during image startup. This
was the last obstacle to make the issue checker work under linux.

The issue validator is now enabled again (the third time ;):

https://ci.inria.fr/pharo/view/3.0-Analysis/job/Pharo-3.0-Issue-Validator/

The results are publish as HTMl on Jenkins and a link is put in
the case description on fogbugz. See the following issue:

https://pharo.fogbugz.com/f/cases/11907
1. Slice failed: 
https://ci.inria.fr/pharo/job/Pharo-3.0-Issue-Validator/334//artifact/validationReport.html
2. Slice succeeded:  
https://ci.inria.fr/pharo/job/Pharo-3.0-Issue-Validator/336//artifact/validationReport.html


In the case you only provide a postscript the checker will
fail with a warning that it didn't find a slice:

https://pharo.fogbugz.com/f/cases/11895

Adding a noMonkey tag on fogbugz will solve that issue.

camillo


signature.asc
Description: Message signed with OpenPGP using GPGMail


[Pharo-users] Spec Tree Shortcuts

2013-10-15 Thread Camillo Bruni
What is the current way to add shortcuts to the a TreeModel?
I am a bit lost, since I thought I just do something like this:

tree
^ tree ifNil: [ 
tree := self instantiate: TreeModel.
tree whenBuiltDo: [ self initializeShortcuts ]].

initializeShortcuts
self shortCuts keysAndValuesDo: [ :key :value |
self tree bindKeyCombination: key toAction: value ]


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Spec Tree Shortcuts

2013-10-15 Thread Camillo Bruni
hmmm I think I confused myself :D, most probably I did not register
the commands on the outer widget, so the shortcuts do not work when 
you don't have the focus on the tree :P


On 2013-10-15, at 18:50, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote:
 it does not work ?
 
 Ben
 
 On Oct 15, 2013, at 6:15 PM, Camillo Bruni camillobr...@gmail.com wrote:
 
 What is the current way to add shortcuts to the a TreeModel?
 I am a bit lost, since I thought I just do something like this:
 
 tree
  ^ tree ifNil: [ 
  tree := self instantiate: TreeModel.
  tree whenBuiltDo: [ self initializeShortcuts ]].
 
 initializeShortcuts
  self shortCuts keysAndValuesDo: [ :key :value |
  self tree bindKeyCombination: key toAction: value ]
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


[Pharo-users] Spec Resize Announcement

2013-10-15 Thread Camillo Bruni
Is there an announcement I can register for resizing?


signature.asc
Description: Message signed with OpenPGP using GPGMail


[Pharo-users] kernelPackageNames

2013-10-15 Thread Camillo Bruni
What happened to SmalltalkImage#kernelPackageNames, it was removed / moved / 
renamed/,
but there is a failing test now:

https://ci.inria.fr/pharo/job/Pharo-3.0-Update-Step-2.1-Validation-A-L/618/label=linux-stable-worker/testReport/Tests.Release/ReleaseTest/testKernelExtensions/

Where shall I readd the method?


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Spec Resize Announcement

2013-10-15 Thread Camillo Bruni
For my morphic inspector, so I can re-render the morph when the inspector is 
resized :)

On 2013-10-15, at 21:37, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote:

 Not I am aware of :)
 Why do you need that for ?
 
 Ben
 
 On Oct 15, 2013, at 8:27 PM, Camillo Bruni camillobr...@gmail.com wrote:
 
 Is there an announcement I can register for resizing?
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Spec Resize Announcement

2013-10-15 Thread Camillo Bruni
ok, maybe easier ;)

On 2013-10-15, at 21:44, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote:
 We should have a look together, because it should happen by itself :)
 
 Ben
 
 On Oct 15, 2013, at 9:40 PM, Camillo Bruni camillobr...@gmail.com wrote:
 
 For my morphic inspector, so I can re-render the morph when the inspector is 
 resized :)
 
 On 2013-10-15, at 21:37, Benjamin benjamin.vanryseghem.ph...@gmail.com 
 wrote:
 
 Not I am aware of :)
 Why do you need that for ?
 
 Ben
 
 On Oct 15, 2013, at 8:27 PM, Camillo Bruni camillobr...@gmail.com wrote:
 
 Is there an announcement I can register for resizing?



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Simple Spec Examples

2013-10-12 Thread Camillo Bruni

On 2013-10-12, at 15:37, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote:

 Actually, you can do (1-2 - 3) if you have multiple levels :)
 
 But clearly I will introduce a real data structure here.
 I just wanted to quickly hack it and have something where 
 I can do  #head and #tail easily, and keep a simple way to write it :)

sounds familiar ;)

http://en.wikipedia.org/wiki/Cons
http://en.wikipedia.org/wiki/Car_and_cdr


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Simple Spec Examples

2013-10-11 Thread Camillo Bruni
Would it be possible to change the name of the selector?

tree selectedItem: (1 - 11)

for me that implies that the tree contains an actual item (1 - 11).
What you want is maybe, #selectedPath: or #selectedItem:1 withParents:{11}

My general rule is: Each time you have to use an association or a point you do 
something wrong..
It is hard to guess what this association should mean, so either make a domain 
object to describe
what you encode in the association or use specific selectors that say what the 
arguments mean.

On 2013-10-11, at 19:52, b...@openinworld.com wrote:

 b...@openinworld.com wrote:
 Benjamin wrote:
  Ben
 
  On Oct 11, 2013, at 9:24 AM, b...@openinworld.com wrote:
 
 b...@openinworld.com wrote:
   I found it hard to find documentation on Spec beyond [1],[2],[3], 
  some of which seem to have changed some syntax since they were written. 
  I've been piecing things together to work out how to set the selected 
  item with the simplest example I could. Even though it turns out pretty 
  simple, I thought I'd share in case it was useful for others that haven't 
  dipped their toes into Spec yet.
 
  ComposableModel subclass: #TestSpec
  instanceVariableNames: 'list text'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'BTCPlay'
 
  TestSpec  initializeWidgets
  self instantiateModels: #( #list #ListModel ).
 
  TestSpec  getList
  ^list
 
  TestSpec class  mySpecLayout
  spec:#default
  ^ SpecLayout composed
  add:#getList ;
  yourself.
 
  Then from Workspace
  x := (TestSpec new openWithSpec ; yourself).
  x getList items: { 1 . 2 . 3 . 4}.
  x getList setSelectedItem: 2.
 
  cheers -ben
 
  [1] hal.inria.fr/hal-00759030/PDF/Spec-IWST12-Final.pdf‎
  [2] 
  https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccessfulBuild/artifact/Spec/Spec.pier.pdf
[3] http://hal.inria.fr/docs/00/70/80/67/PDF/SpecTechReport.pdf
 
 
 
 So here is the same thing with TreeModel.
 
  ComposableModel subclass: #TestSpec2
instanceVariableNames: 'tree'
classVariableNames: ''
poolDictionaries: ''
category: 'BTCPlay'
 
  TestSpec2  initializeWidgets
self instantiateModels: #( #tree #TreeModel ).  tree
childrenBlock: [  :treeItem | self haltOnce. (treeItem isKindOf: 
  Association) ifTrue: [ treeItem value ] ifFalse: [ {} ] ].
 
  TestSpec2  getTree
^tree
 
  TestSpec2 class  mySpecLayout
spec:#default
^ SpecLayout composed
add:#getTree ;
yourself.
 
  Then from Workspace (referring to attached pic)
  x := (TestSpec2 new openWithSpec ; yourself).
  x getTree roots: {  10 - {  11. 12 } . 20 - { 21 . 22 }  } .
  x getTree selectedItem.  Print It -- 21 
  x getTree selectedItem: 
 
  Now how do I select a particular tree item at each level ?
  eg. Select 10 and Select 12 ?
 
  cheers, ben
  
  There was something missing here at the two levels :)
  You can see case 11849[1] fixing the morphic issue
  and case 11850 [2] fixing the Spec problem :)
Thanks. I'll try it.
  Then your example make me think that using association  to describe the 
  path may lead to an ambiguous situation
True. But to clarify things, ListModel suffers the same ambiguity as 
  follows...
 x := (TestSpec new openWithSpec ; yourself).
 x getList items: { 1 . 2 . 3 . 2 . 4}.
 x getList setSelectedItem: 2.
 
 ... ListModel and Treemodel should be consistent in this respect.  
 Musing further about this...
 In the case of a multi-selection ListModel/TreeModel, it is probably 
 reasonable to select all matching.
 For a single-selection, I'm not sure.  Considering ListModel first, maybe 
 defaulting to selecting the first matching is reasonable, perhaps with a 
 backup method to select the Nth match. Then again, if the identical object 
 appears in the list multiple times, then #setSelectedItem: might visually 
 highlight all occurances while still reporting only a single object with 
 #selectedItems.  I think part of a test would go...
 
 x getList items: { 1 . 2 . 3 . 2 . 4}.
 x getList setSelectedItem: 2.
 y := x getList selectedItem.
 x getList setSelectedItem: y.
 z := x getList selectedItem.
 self assert: (y = z)
 
 ...which actually works so ListModel is cool in that regard - except maybe 
 an option to visually highlight both 2s would be useful - but as a visual 
 thing maybe that is a handled outside of ListModel.
 Actually that should work the same with multi-selection.
 
 x getList items: { 1 . 2 . 3 . 2 . 4}.
 x getList setSelectedItems: { 2. 3 }.
 y := x getList selectedItems.
 x getList setSelectedItems: y.
 z := x getList selectedItems.
 self assert: (y = z)
 
 Actually it seems there is no #setSelectedItems:.
 How then do you save and restore a multi-selection.  e.g
 savedSelection := x getList selectedItems.
 other code that clears/modifies the selection - like refresh for additional 
 items
 x getList selectedItems: savedSelection.
 
 cheers -ben
 
  Ben
 
  [1] 

Re: [Pharo-users] Morphic text filed plus autocompetion

2013-09-30 Thread Camillo Bruni
The thing you get in pharo when you press SHIFT+ENTER :)

On 2013-09-30, at 10:29, p...@highoctane.be p...@highoctane.be wrote:

 Spotlight?
 
 
 
 On Monday, September 30, 2013, Norbert Hartl norb...@hartl.name wrote:
 I like to make myself a little command shell inside the image. For this I
 would need a textfield that can popup somewhere on the screen and that has
 enough hooks for text entry events and hooks/support for auto-completion.
 
 What would be the best things to read/the best code to look at in order
 to learn how I can accomplish that.
 
 thanks,
 
 Norbert
 
 
 
 
 
 -- 
 ---
 Philippe Back
 Dramatic Performance Improvements
 Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
 Mail:p...@highoctane.be | Web: http://philippeback.eu
 Blog: http://philippeback.be | Twitter: @philippeback
 Youtube: http://www.youtube.com/user/philippeback/videos
 
 High Octane SPRL
 rue cour Boisacq 101 | 1301 Bierges | Belgium
 
 Pharo Consortium Member - http://consortium.pharo.org/
 Featured on the Software Process and Measurement Cast -
 http://spamcast.libsyn.com
 Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
 Added Reseller



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Morphic text filed plus autocompetion

2013-09-30 Thread Camillo Bruni
On 2013-09-30, at 10:53, Norbert Hartl norb...@hartl.name wrote:
 Am 30.09.2013 um 15:48 schrieb Camillo Bruni camillobr...@gmail.com:
 The thing you get in pharo when you press SHIFT+ENTER :)
 
 Thanks cami! Although it might sound embarrassing I was indeed googling for 
 it to find a video by James Robertson where I get the shift+enter hint :)

I didn't know the shortcut for a long time either :P, good to know that you 
start finding answers about pharo on google these days!


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Scoped Senders

2013-09-26 Thread Camillo Bruni

= create a refactoring scope (I don't know the menu entry, but the shortcut 
is: CMD-B CMD-R CMD-R (browse restricted regular expression)

if you look for senders there you will only see the ones in your current scope.
I am currently working on getting a nice scope/environment selector working 
that we
then can add to all tools like senders / implementors and refactorings.

On 2013-09-26, at 11:39, Sean P. DeNigris s...@clipperadams.com wrote:
 How do I find the senders of a message, but just in a certain set of
 packages?
 
 Thanks.
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Scoped-Senders-tp4710563.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] How to load seaside currently?

2013-09-24 Thread Camillo Bruni
Strange the build is green:

https://ci.inria.fr/pharo-contribution/job/Seaside/

What kind of error do you get?
Does it happen the same way when you download on of the images from Jenkins?

On 2013-09-24, at 19:03, Norbert Hartl norb...@hartl.name wrote:

 When loading seaside3 from the configuration browser it will break the image 
 badly. It isn't even possible to open a system browser after that. What is 
 the best way to load it manually? Or better is there something new so the 
 configuration browser can be directed to a better config?
 
 Norbert



signature.asc
Description: Message signed with OpenPGP using GPGMail


[Pharo-users] Pharo Wiki cleanup

2013-09-23 Thread Camillo Bruni
In my attempt to make the contribution process for Pharo a bit simpler
I cleaned up the fogbugz wikis which where left a bit unmaintained.

There are now 5 important top-level categories:

Welcome Page:https://pharo.fogbugz.com/default.asp?W41
Documentation:   https://pharo.fogbugz.com/default.asp?W69
Changelog:   https://pharo.fogbugz.com/default.asp?W2
Wishlist:https://pharo.fogbugz.com/default.asp?W50
Responsibilities:https://pharo.fogbugz.com/default.asp?W66

I removed old cruft that was documenting long gone features of ancient 
pharo versions ;). I would be more than happy to get some feedback and
improve these websites gradually.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] [Pharo-dev] Seaside Continuous Integration on ci.inria.fr

2013-09-16 Thread Camillo Bruni
Thanks a lot for the update :)

On 2013-09-16, at 06:20, Philippe Marschall kus...@gmx.net wrote:
 Please try to keep the build green, otherwise we'll get spammed with emails.

I like this ;)

 Currently we keep all the build (5GB already). Do we really need this?

We live in 2013, 5GB is the data of single movie file I stream ;), so unless 
the CI
guys start to complain, there is no problem in consuming that much space.


Would it be possible to use the numeric versions in the CI build?
Maybe it is just me, but for seaside I cared more about the numeric version, 
what do you think?

Currently it is 
#stable  = 3.0.X
#development = 3.1.X



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Benchmark

2013-09-14 Thread Camillo Bruni
Short Answer:
-
problemSize is used to calibrate your benchmark, so usually you adapt this 
value for
your machine. And yes you are right, the result is not divided by the 
problemSize.


Long Answer:

The typical use case is like this:

MathBench  benchLoopSinus
1 to: self problemSize to: [ :i | i sin ]

Now you have two parameters to modifiy:
1. the number of samples you take (aka, how many times you measure the time of 
#benchLoopSinus)
2. the problem size (aka, how many times you run #sin inside #benchLoopSinus)

You increase (1) to get a more stable result:

MathBench run: 1 for debugging.
MathBench run: 100 will take a long time, but results are more accurate

You modify (2) to change the duration of your benchmark, in my silly example 
above, the
method is quite small and the benchmark would finish too quickly. Rule of thumb 
is to 
get the run time of your benchmark (here #benchLoopSinus) in the range of 10ms 
and more.
This way you don't have to worry about the timer resolution used to capture the 
duration
of your method.


Does this answer your question?

On 2013-09-14, at 08:06, Natalia Tymchuk natalia.tymc...@unikernel.net wrote:
 Hello.
 I have a question about problemSize in benchmarking. I got the small times 
 from running benchmarks and that's why I try to use problemSize like in the 
 video http://vimeo.com/68494202. But the benchmark for which I rewrote code 
 and used problemSize has given me very big result. Maybe it looks like there 
 is no division on that problemSize. Am I wrong? What can I do?
 Best regards,
 Natalia
 
 12.09.13 15:20, Stéphane Ducasse написав(ла):
 On Sep 11, 2013, at 9:22 PM, Natalia Tymchuk 
 natalia.moskovc...@unikernel.net wrote:
 
 Hello Stephane.
 Yes, I'm interested in that and it will be an honor for me)).
 Excellent.
 If you have a github account let me know and I will add you as a contributor
 Have a look at
 
  
 https://github.com/SquareBracketAssociates/PharoForTheEnterprise-english/tree/master/Drafts/
 
 But I never wrote the books and my English is not at its best level. 
 However I think that after a couple reviews my English will be better .
 No stress :)
 My english sucks too and we should not care for now.
 
 Best regards,
 Natalia
 
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] [Pharo-dev] What is the replacement for CMD-F to find a class in nautilus? [EOM]

2013-09-08 Thread Camillo Bruni
On 2013-09-08, at 15:49, Stéphane Ducasse stephane.duca...@inria.fr wrote:
 On Sep 8, 2013, at 7:27 PM, Tobias Pape das.li...@gmx.de wrote:
 Am 08.09.2013 um 19:22 schrieb Camillo Bruni camillobr...@gmail.com:
 
 Hi,
 which pharo version are you using?
 
 
 I assume 3.0, 
 
 Yes, but i had hands on a 2.0 image,
 I was also unable to find that :) 
 
 - CMD-F CMD-C ([F]ind [C]lass)
 - similar for [M]ethods, [P]ackages and pro[T]ocols
 - check the triangle on the top right of the Nautilus window and you can 
 see a complete list of all commands.
 
 
 Ah well. Ok that was unexpected for me:)
 
 Yes you should have a setting to get the old shortcuts because they do not 
 work everywhere. So implementor in Nautiluys is B+m
 but in the pane it is cmd m and this is disturbing.


well... first make sure the new ones work everywhere, the old ones are far from 
productive


signature.asc
Description: Message signed with OpenPGP using GPGMail


[Pharo-users] Unstable CI Slaves

2013-09-08 Thread Camillo Bruni
2 linux slaves are down
1 windows slave is down

= I sent reports to ci.inria.fr since I couldn't reach the slaves via ssh nor 
the cloud stack interface


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] The Pharo Advantage: what is it for you?

2013-09-06 Thread Camillo Bruni
It seems like you missed some code, can you try the following?

Gofer new
smalltalkhubUser: 'PharoExtras' project: 'XMLParser';
configuration;
loadStable.

I am not sure if your code ever worked in Pharo 2.0.

On 2013-09-06, at 17:16, S. Garth Holland steve9571...@hotmail.com wrote:

 
 Hello, I'm new to this list.
 
 
 I tried one of the examples in 
 http://www.slideshare.net/pharoproject/pharo-tutorial-at-ecooptutorial 
 
 Slide 70. Gofer new smalltalkhubUser: 'PharoExtras' project: 'XMLParser'; 
 loadStable.
 
 The debugger pops up with the message 'Could not find a valid 
 ConfigurationReference'
 
 Any suggestions on why this happened?
 
 Thank you, Steve
 
 OS: windows 7 64 bit.
 
 Using path: C:\Dev\Smalltalk\Pharo\Pharo2.0-win\Pharo2.0 
 
 =
 
 phil at highoctane.be wrote:  Hello,   As part of the defense of a budget 
 and technology choices, what would you  guys list as a key advantage of 
 using Pharo for creating software solutions?   My current stack is:   
 Pharo 2.0  Seaside 3 (including Seaside-REST)  Magritte 3 Twitter 
 Bootstrap   + a couple of data storage stuff (DBXTalk, Phriak, Voyage)  + 
 STOMP   + Amber if needed   I've been test driving the whole stack for a 
 while and even if there are  some quirks, it looks like good enough for what 
 I want to achieve.   Now, my question: what is the Pharo advantage you 
 would put forward vs  other choices (like LAMP, Java, Rails etc).   I am 
 aware of what those could be but I am more looking for what makes you  tick 
 when using the technology (like: it is fun to work with, no more  Java 
 for me, due to ..., speeds dev time by ..., not NSA-backdoor-enabled)  
  This is the kind of thing we should have in stock for helping the  
 Consortium members get buy in from people giving a yes on budgets.   Thanks 
 in advance for your help! (BTW, I am going to use this on monday  morning 
 for defending our position on a significant project).   Phil   Yesterday 
 I came across this very nice Pharo tutorial [1] by Damien  Camille. Some 
 slides I think that relate are: * 47-49 syntax comparisons to another typical 
 language * 72-75 easy web interaction * 80 serializing continuations / 
 exception context (this is massively impressive!) * 81 powerful breakpoints 
 [1]http://www.slideshare.net/pharoproject/pharo-tutorial-at-ecooptutorialcheers
  -ben



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] [Pharo-dev] Pharo Sprint in Buenos Aires

2013-09-04 Thread Camillo Bruni
So it looks like we are going to do the Pharo sprint in Buenos Aires Saturday, 
the 14th of September.
The question is now where do we meet? 
The original idea was to reserver a room at the UBA, but that is not possible 
the weekend.
Any suggestions?

On 2013-09-03, at 09:05, Mariano Martinez Peck marianop...@gmail.com wrote:

 Cool. I'll be there, of course!
 Keep us informed.
 Cheers,
 
 
 On Mon, Sep 2, 2013 at 10:42 PM, Camillo Bruni camillobr...@gmail.comwrote:
 
 everything is open so far, guido had the idea of reserving a room at the
 UBA,
 we will have more details tomorrow :)
 
 On 2013-09-02, at 21:24, Gisela Decuzzi giseladecu...@gmail.com wrote:
 Great! The idea is to spend the full day? Or do you have any planed time?
 
 
 2013/9/2 Camillo Bruni camillobr...@gmail.com
 
 I spend a month in Buenos Aires working together with Guido Chari @ the
 UBA,
 we take this opportunity to organize a Pharo sprint outside France ;)
 
 We are in early preparation phase and the date nor location isn't fixed
 yet,
 so if you are motivated to join, can mark possible dates on this doodle:
 
 http://doodle.com/qey7iieqm5yr4wwy
 
 cheers,
 camillo
 
 
 
 
 
 -- 
 Mariano
 http://marianopeck.wordpress.com



signature.asc
Description: Message signed with OpenPGP using GPGMail


[Pharo-users] Pharo Sprint in Buenos Aires

2013-09-02 Thread Camillo Bruni
I spend a month in Buenos Aires working together with Guido Chari @ the UBA, 
we take this opportunity to organize a Pharo sprint outside France ;)

We are in early preparation phase and the date nor location isn't fixed yet, 
so if you are motivated to join, can mark possible dates on this doodle:

http://doodle.com/qey7iieqm5yr4wwy

cheers,
camillo


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Benchmark

2013-08-30 Thread Camillo Bruni
That you just need to run it from the command line which is not related to the 
benchmark project.
Currently it seems like the ci has some troubles, so I cannot get to the 
configuration either.


On 2013-08-30, at 17:25, Natalia Moskovchuk natalia.moskovc...@unikernel.net 
wrote:

 Thanks. I already saw this video. I cann't see configuration on
 https://ci.inria.fr/rmod/job/FullTextSearch/configure . Can you share it?



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] How are you doing your jenkins build scripts?

2013-07-25 Thread Camillo Bruni
You use the built-in command line tools and no longer .st files.

Pointers:
=
curl get.pharo.org | bash
./pharo Pharo.image --help
./pharo Pharo.image --list
./pharo Pharo.image test --help
# everything should be pretty self explaining


A typical script looks like this on jenkins:
==
wget --quiet -O - get.pharo.org/20+vm | bash

./pharo Pharo.image save $JOB_NAME --delete-old
./pharo $JOB_NAME.image --version  version.txt

REPO=http://www.squeaksource.com/MetacelloRepository
./pharo $JOB_NAME.image config $REPO ConfigurationOf$JOB_NAME 
--install=$VERSION --groups='All OS',Tests
./pharo $JOB_NAME.image test --junit-xml-output $JOB_NAME.*

zip -r $JOB_NAME.zip $JOB_NAME.image $JOB_NAME.changes
==


On 2013-07-25, at 16:36, Norbert Hartl norb...@hartl.name wrote:

 I'm close to having ported all of our projects to pharo 2.0. Now I'm asking 
 myself what would be a proper setup to run my jenkins build scripts. With 
 RPackage there are more packages in the system then before and in the jenkins 
 scripts you need to invoke
 
 HDTestReport forPackages: #( …)
 
 In 1.4 I just added them manually. Using 2.0 makes this too cumbersome to 
 deal with. So I need to figure out the amount of tests programmatically. The 
 first I came up with (and that would solve my common use case) is something 
 like
 
 
 myPrefix := 'Emcee-'
 myPackages := RPackage organizer packages select: [:each| each name 
 beginsWith: myPrefix ].
 packagesWithTests := myPackages select: [ :package| package classes 
 anySatisfy: [ :cls| cls includesBehavior: TestCase  ] ].
 packagesNamedTest := myPackages select: [ :each| each name includesSubstring: 
 '-Tests-' ].
 testPackages := packagesWithTests union: packagesNamedTest.
 packages := myPackages difference: packagesNamedTest.
 
 HDTestReport runPackages: (testPackages collect: #name).
 HDLintReport runPackages: (packages collect: #name)
 
 So I like to ask how you guys are doing it. Thanks in advance for your 
 answers.
 
 Norbert




Re: [Pharo-users] development image memory use: 180MB in Pharo 2 vs. 40MB in Pharo 1.4.....

2013-07-17 Thread Camillo Bruni
Did you check on Dictionaries / Sets (+ their Identity* versions) and Symbols 
as well?
Another possibility would non terminated Processes (process browser)?

The Arrays themselves already look suspicious. 

Usually the way to track such objects down is to find and interesting candidate 
and inspect it, then right click and explore strong pointers.

I hope this helps

On 2013-07-17, at 21:59, Paul DeBruicker pdebr...@gmail.com wrote:
 I've been developing in the same Pharo2 image for a couple weeks and its
 now 180MB.  I use the same development habits as in Pharo 1.4 but there
 the image would only be about 40MB.
 
 Using SpaceTally I can see that I have 40 MB of Arrays. And 10MB of
 Bitmaps. 8MB of Floats, Strings,  OrderedCollections.
 
 My domain objects comprise about 20MB of the image.
 
 
 Is there a way to check for memory leaks over a long period of time?
 
 Thanks
 
 Paul
 




[Pharo-users] 3.0 almost green

2013-07-16 Thread Camillo Bruni
very nice, 3.0 is almost green :)

https://ci.inria.fr/pharo/job/Pharo-3.0-Update-Step-2-Validation/lastCompletedBuild/testReport/

- some strange unknown processes only under mac and win
- 3 Zinc failures under win
- a chunkimport failure under win


Re: [Pharo-users] [DOC] Building and deploying your first web app with Pharo

2013-07-15 Thread Camillo Bruni
very nice!

On 2013-07-15, at 13:12, Sven Van Caekenberghe s...@stfx.eu wrote:
 Hi,
 
 I wrote a new tutorial, Building and deploying your first web app with Pharo 
 - Understanding HTTP fundamentals through Zinc HTTP Components. 
 
 By chronologically following the development process, you will see a small 
 web app growing from something trivial to the final result. Finally, we will 
 save our source code in a repository and deploy for real in the cloud.
 
  http://zn.stfx.eu/zn/build-and-deploy-1st-webapp
 
 Pharo 2.0/3.0 features such as Nautilus, SmalltalkHub, Metacello 
 Configurations, Zeroconf Scripts and of course Zinc HTTP Components are used 
 while highlighting traditional strengths such as incremental, live  
 interactive development in a rich environment.
 
 Enjoy,
 
 Sven
 
 PS: Feedback is welcome, the source document lives here 
 https://github.com/svenvc/zinc/blob/master/build-and-deploy-1st-webapp/build-deploy-1st-webapp.md
  - pull requests appreciated.
 
 --
 Sven Van Caekenberghe
 Proudly supporting Pharo
 http://pharo.org
 http://association.pharo.org
 http://consortium.pharo.org
 
 




Re: [Pharo-users] Problem with saving in repository

2013-07-15 Thread Camillo Bruni
Hi,

To answer your question we need a bit more information :)

Ehich Pharo version are you using?
To which repository are you saving?

thanks

On 2013-07-15, at 14:49, Маркіян Різун mri...@gmail.com wrote:

 Hi guys,
 When I'm trying to save my code in repository it failes and gives me error.
 Am I doing something wrong?
 error.jpg




Re: [Pharo-users] New win32 VM available (was: More than 500MB for windows)

2013-07-15 Thread Camillo Bruni

On 2013-07-15, at 15:35, Damien Cassou damien.cas...@gmail.com wrote:

 On Mon, Jul 15, 2013 at 3:27 PM, Tudor Girba tu...@tudorgirba.com wrote:
 Ok, I admit. I should read emails thoroughly :). Please ignore the second
 issue. Still, why is it called PharoS?
 
 
 may it be because this is a StackVM and not Cog?

StackVM renameAs: #PharoS

And you might interpret it in two ways: Pharo+Stack, Pharo+Slow ;)



Re: [Pharo-users] New win32 VM available (was: More than 500MB for windows)

2013-07-15 Thread Camillo Bruni

On 2013-07-15, at 17:00, Tudor Girba tu...@tudorgirba.com wrote:

 Aha :).
 
 Ok. I tested PharoS with 1GB and I got a 800MB image running well.
 
 Is there really no chance of getting Cog with this feature? :)

should be the same setting for both Pharo and PharoS (note there is no more 
Cog, NBCog and StackVM ;).
There was a tiny bug in the configuration, so Windows will decide to finish the 
build we should have Pharo VM with the same properties.


Re: [Pharo-users] Phexample state keeping

2013-07-11 Thread Camillo Bruni

On 2013-07-11, at 11:50, Norbert Hartl norb...@hartl.name wrote:

 I'm playing with Phexampe because I think that in my current project the 
 setup of test scenarios will be a huge part of the testing. So do it in a 
 structured way reducing doubled initialization procedures should be something 
 good.
 I'm just wondering how the state is kept between dependent test cases. A 
 Phexample test case returns a value so that
 
 value := self given: #shouldHaveCollectedSomeState
 
 transfers the state from the dependent test case into the current. What do 
 you do if the state produced is more complex than a single value? 

I don't remember, but calling multiple times #given:, for each part, doesn't 
solve this problem?

 To be honest I don't understand why in a test case that calls #given: a 
 tearDown/setUp cycle is executed between the first and the second test case. 
 I think while using #given: I make the second test case explicitly dependent 
 on the first. Why should I reset state collected by the first before 
 executing the second?

I think that is one of the possible approximations. Since in general you cannot 
say that a testcase is side-effect free (needs teardown) or has some 
requirements (setup).

On the other hand I would rather expect it not to call the setup, especially in 
the case where the #given is done on the same class/test suite.

I only had a look at phexample a while ago, so I don't remember all the 
details. I think I will do a try this weekend.


Re: [Pharo-users] Regex question

2013-07-05 Thread Camillo Bruni
I think that is highly implementation dependent. I guess in this case the Regex 
matches multilines?

On 2013-07-05, at 07:51, jannik.laval jannik.la...@gmail.com wrote:
 Yes, now in the chapter on Regex, it is written that '.' matches only a 
 single character except cr.
 
 So, the command String cr matchesRegex: '.' should return false in this 
 case.
 But since at least Pharo1.3 (I don't try previous version), it returns true.
 
 Jannik
 
 
 
 On Jul 5, 2013, at 12:33 AM, Camillo Bruni camillobr...@gmail.com wrote:
 
 Yes this is ok, '.' matches only a single character.
 The alternatives you might be looking for are #prefixMatchesRegex: or '.*'
 
 On 2013-07-05, at 00:03, jannik.laval jannik.la...@gmail.com wrote:
 Hi guys,
 
 Just a simple question about regex:
 
 'a' matchesRegex: '.' -- true
 'aa' matchesRegex: '.' -- false
 
 As '.' represents any character, the two previous lines are ok. Now, if I 
 test with a cr, it returns true:
 
 String cr matchesRegex: '.' -- true.
 
 Is it the expected behavior ?
 
 Cheers,
 Jannik
 
 
 
 




Re: [Pharo-users] Tudor Girba joins Pharo Board

2013-07-02 Thread Camillo Bruni
nice to hear! :)

On 2013-07-02, at 16:12, Sven Van Caekenberghe s...@stfx.eu wrote:

 Hi,
 
 The Pharo Board is pleased to announce that Tudor Girba has recently joined 
 the Pharo Board. Among others, he will try to contribute on long term issues 
 like the positioning of Pharo.
 
 Stéphane, Marcus  Sven
 
 http://www.pharo-project.org/about/board
 
 --
 http://pharo.org
 http://association.pharo.org
 http://consortium.pharo.org
 
 
 
 
 




[Pharo-users] unstable build

2013-06-29 Thread Camillo Bruni
I am not very happy with the current build it seems to be quite random when it 
comes to test results. I ran the tests multiple times and I get different 
outcomes
each time.

That said, I need somebody to pair program with me on the monkey since there is 
currently a non-deterministic bug present that prevents the tool from running
properly.

anyone in?


Re: [Pharo-users] unstable build

2013-06-29 Thread Camillo Bruni

On 2013-06-29, at 20:14, Igor Stasenko siguc...@gmail.com wrote:

 On 29 June 2013 17:48, Camillo Bruni camillobr...@gmail.com wrote:
 I am not very happy with the current build it seems to be quite random when 
 it
 comes to test results. I ran the tests multiple times and I get different 
 outcomes
 each time.
 
 That said, I need somebody to pair program with me on the monkey since there 
 is
 currently a non-deterministic bug present that prevents the tool from running
 properly.
 
 anyone in?
 
 me

cool :)


Re: [Pharo-users] How to do this in Pharo 2?

2013-06-29 Thread Camillo Bruni
look at String  #format:

On 2013-06-29, at 22:26, Donald dm...@instantiations.com wrote:

 Logs uses a package called Bindings-Core-tbn.1 that has this description:
 /Name: Bindings-Core-tbn.1//
 //Author: tbn//
 //Time: 11 July 2012, 9:46:06.521 am//
 //UUID: 2c28d2f3-610f-a54d-82b1-f421a40394ce//
 //Ancestors: //
 //
 //Initial version from Benoit, see 
 http://lists.gforge.inria.fr/pipermail/pharo-project/2012-July/067412.html/
 
 It allows me to do things like this:
 
 Transcript show: 'Today is %1' bindWith: 'the first day of the rest of your 
 life'.
 
 Is there a better way to do this in Pharo 2?. An hour of poking around and no 
 joy.
 
 Thanks.
 
 -- 
 Donald [|]
 
 A bad day in [] is better than a good day in {}
 




Re: [Pharo-users] trait question

2013-06-29 Thread Camillo Bruni

On 2013-06-29, at 22:32, Igor Stasenko siguc...@gmail.com wrote:

 On 29 June 2013 21:21, Stéphane Ducasse stephane.duca...@inria.fr wrote:
 
 On Jun 29, 2013, at 8:19 PM, Igor Stasenko siguc...@gmail.com wrote:
 
 On 29 June 2013 20:12, Camillo Bruni camillobr...@gmail.com wrote:
 Working on the new class builder I have a hard time figuring out the full 
 trait
 semantics.
 
 If I use a trait on instance side, does that imply that its classTrait on 
 the
 metaclass?
 
 No. I do not think so (I will have to think).
 Normally Trait and ClassTrait are two different classes. NOw I do not 
 remember if a trait is composed
 of a classTrait too.
 
 Trait has 'classTrait'

yes, but the strange part is, that if you use a Trait on the instance-side it
will automatically install the class trait as well.

ClassDescription subclass: #Class
uses: TClass
...

and the users 

TClass users = an IdentitySet(Class) 
TClass classTrait users = an IdentitySet(Class class)

so in this case it implies that when you use a Trait on the instance side it 
will
apply also it's classTrait to the class side. So is it ok then to enforce that 
in
the new class builder?

Currently you can do the following in the new class builder:

PharoClassInstaller make: [:builder|
builder
superclass: Object;
name: 'Foo';
traitComposition: TClass ]

which will explicitely NOT install `TClass classTrait` in `Foo class`.
Does this behavior make sense?


Re: [Pharo-users] trait question

2013-06-29 Thread Camillo Bruni
so let's discuss that on monday with the trait specialists Damien et Sebastian 
:)

On 2013-06-29, at 23:34, Igor Stasenko siguc...@gmail.com wrote:
 yes, i don't know if it good or bad, but i'd rather prefer that traits
 applied to Behavior,
 but not to Class (which has two entangled behaviors). But maybe for
 human comprehension it is better..
 but not for implementing, because it certainly makes model more complex.
 
 On 29 June 2013 22:52, Camillo Bruni camillobr...@gmail.com wrote:
 
 On 2013-06-29, at 22:32, Igor Stasenko siguc...@gmail.com wrote:
 
 On 29 June 2013 21:21, Stéphane Ducasse stephane.duca...@inria.fr wrote:
 
 On Jun 29, 2013, at 8:19 PM, Igor Stasenko siguc...@gmail.com wrote:
 
 On 29 June 2013 20:12, Camillo Bruni camillobr...@gmail.com wrote:
 Working on the new class builder I have a hard time figuring out the 
 full trait
 semantics.
 
 If I use a trait on instance side, does that imply that its classTrait 
 on the
 metaclass?
 
 No. I do not think so (I will have to think).
 Normally Trait and ClassTrait are two different classes. NOw I do not 
 remember if a trait is composed
 of a classTrait too.
 
 Trait has 'classTrait'
 
 yes, but the strange part is, that if you use a Trait on the instance-side it
 will automatically install the class trait as well.
 
ClassDescription subclass: #Class
uses: TClass
...
 
 and the users
 
TClass users = an IdentitySet(Class)
TClass classTrait users = an IdentitySet(Class class)
 
 so in this case it implies that when you use a Trait on the instance side it 
 will
 apply also it's classTrait to the class side. So is it ok then to enforce 
 that in
 the new class builder?
 
 Currently you can do the following in the new class builder:
 
PharoClassInstaller make: [:builder|
builder
superclass: Object;
name: 'Foo';
traitComposition: TClass ]
 
 which will explicitely NOT install `TClass classTrait` in `Foo class`.
 Does this behavior make sense?
 
 
 
 -- 
 Best regards,
 Igor Stasenko.
 




Re: [Pharo-users] Remove a dependency (was Re: How to do this in Pharo 2?)

2013-06-29 Thread Camillo Bruni

On 2013-06-30, at 00:56, Camillo Bruni camillobr...@gmail.com wrote:

 
 On 2013-06-30, at 00:47, Donald dm...@instantiations.com wrote:
 
 On 6/29/2013 4:42 PM, Camillo Bruni wrote:
 look at String  #format:
 ok, got that fixed.
 
 how do I remove the log4s dependency on
 
 Bindings-Core-tbn.1?
 
 I don't seen anything in the Monticello browser that lets me 
 unload/unlink/remove etc.

ok I finally understood...

- Right click on the package in the Monticello Browser (use the search bar on 
top)
- Remove required Package 
- Recommit Log4s

that should remove the dependency from the MC package. 

FYI: please state clearly what you try to do next time with instructions to 
reproduce ;)


Re: [Pharo-users] implementing #release in a domain object

2013-06-28 Thread Camillo Bruni

On 2013-06-28, at 13:59, Milan Mimica milan.mim...@gmail.com wrote:

 On 27 June 2013 21:07, Igor Stasenko siguc...@gmail.com wrote:
 
 
 yes, but in opposite direction.
 consider yourself a painter which start painting nodes , starting from
 root ones,
 then paint ones which they pointing to, then paint ones which those
 was pointing to (unless they already painted)
 and so on.. continue until you have nothing to paint left.
 Then the nodes which remain unpainted is garbage.
 
 
 How is this implemented? There is a flag on each object to mark it as
 'painted'?

Exactly, there is a Header for each Object which contains such information
only visible to the VM. You will some more information here:
http://rmod.lille.inria.fr/archives/talks/2011-DIS-Stasenko-JourneyInTheVM.pdf


Re: [Pharo-users] implementing #release in a domain object

2013-06-27 Thread Camillo Bruni

On 2013-06-27, at 01:08, Paul DeBruicker pdebr...@gmail.com wrote:

 Sven  Camillo,
 
 Ok thanks.  And using the PointerFinder is there a way to know which of
 the pointers points to the SystemDictionary or Object someObject or
 whereever the GC begins so one would not have to check every pointer for
 every stubborn object.
 
 E.g. Lets say I've nil'ed the reference between the Navy and the ship so
 its ready to go but a few of the soldiers on the ship have references to
 other ships because their transfer papers weren't processed properly.
 Running #pointersTo on those soldiers gives a large collection of
 pointers.
 
 
 How can I use the computer to filter that list to just those references
 back to the root object?

What do you mean by root object?

In any case, if I'm not mistaken, this isn't that easy. Usually you have
to manually track down and follow the objects in the PointerExplorer

= Inspect an Object, right click, Explore Strong Pointers





Re: [Pharo-users] implementing #release in a domain object

2013-06-26 Thread Camillo Bruni

ok I was not sure of how much you were aware of how the GC works :)
second try:

In your example it would be enough to cut the connection the ship,
everything aboard will be GC'ed as well. 

Once you cut the connection to a subgraph of objects, and they are no
longer reachable from the outside (root objects) the whole subgraph get's 
garbage collected.

In your example: as soon as nobody references a ship anymore it gets garbage 
collected,
as well as all objects that were only reachable via that ship.

clearer? If not I suggest you quickly make your own little example. 
Note that with #allInstances you can see which objects are still around of a 
certain
class, for instance: Dictionary allInstances


On 2013-06-27, at 00:13, Paul DeBruicker pdebr...@gmail.com wrote:
 In Pharo2 Object (and many other classes) implement #release and
 #release has many senders.  So I don't understand how 'there is no such
 thing as #release in Pharo'.  I understand that the GC is a VM thing and
 it does not send #release to the objects in the image.
 
 
 IF in my hypothetical question the Navy object contains an ordered
 collection of ships, and each ship is referenced in that collection and
 also by all of its soldiers and jobs, to have my ship GC'd do I only
 need to remove the reference to the ship in the Navy object (at which
 point the ship becomes detached and self contained amalgamation of
 soldiers and jobs) or do I have to have each soldier and job dereference
 the ship too?
 
 
 
 
 On 06/26/2013 03:05 PM, Camillo Bruni wrote:
 There is no such thing as #release in Pharo. If you want your objects
 to be garbage collected just make sure to remove all references to it.
 You simply assign nil to instance variables which previously held such
 and object.
 
 Does that answer your question?
 
 On 2013-06-26, at 23:47, Paul DeBruicker pdebr...@gmail.com wrote:
 Lets say I'm modeling a navy that is comprised of many ships each with
 their own soldiers and jobs.  If I want one of the ships to be GC'd do I
 need to implement #release in the soldier and job objects and send it to
 each of those soldiers and jobs that live and work on the ship I want
 GC'd or is removing the references between the ship and the navy enough
 to have the whole ship (including its soldiers and jobs)  GC'd?
 
 
 




Re: [Pharo-users] smalltalkhub project as a repository

2013-06-25 Thread Camillo Bruni

On 2013-06-25, at 06:51, Bahman Movaqar bah...@bahmanm.com wrote:

 On Mon, 2013-06-24 at 22:15 +0200, Camillo Bruni wrote:
 On 2013-06-24, at 21:49, Bahman Movaqar bah...@bahmanm.com wrote:
 I just noticed it: when adding a new repository, there's an option for
 projects on 'smalltalkhub.com'.  Is this something new or I was just
 ignorant about this?  Anyway, congratulations on the design choice.
 
 I do not understand your question? An option for what? :)
 
 An option for projects on 'smalltalkhub.com' :-)  Please take a look at
 the screenshot I've attached.

ok, now I understand :), that is just a specific repository type for
smalltalkhub. THe default http one will still work of course.




Re: [Pharo-users] where is appendStream?

2013-06-25 Thread Camillo Bruni
you can use 

fileReference writeStream setToEnd

instead of just writeStream, that should be the same behavior as appendStream...

On 2013-06-24, at 14:20, Hayatou Oumarou hayat...@yahoo.fr wrote:
 Hello, 
 I use in Pharo 2.0  the class FileSystem to write in a text file(csv format). 
  I find only two options writeStream and readStream.  I would not like each 
 time to overwrite the contents of my file and I do not find the option 
 appendStream. How can I do? 
 
 
 
 working := FileSystem disk workingDirectory.
 stream := (working / 'test.csv') writeStream
 stream nextPutAll: 'something'.
 stream nextPutAll: ';' .
 stream nextPutAll: 'other'.
 stream close.
 
 
 Hayatou  




Re: [Pharo-users] ui slowness on newly installed ubuntu 13.04 64bit

2013-06-16 Thread Camillo Bruni

On 2013-06-15, at 18:09, Stéphane Ducasse stephane.duca...@inria.fr wrote:

 
 On Jun 15, 2013, at 3:54 PM, Camillo Bruni camillobr...@gmail.com wrote:
 
 
 On 2013-06-15, at 13:16, Stéphane Ducasse stephane.duca...@inria.fr wrote:
 
 
 actually https://ci.inria.fr/pharo/view/VM/job/PharoVM-tests/ succesfully 
 detected the degeneration and thus failed.
 And yes, we will add real benchmarks at some point. But for that we first 
 need dedicated machines, as running them on a virtualized environment 
 doesn't make much sense :/.
 
 What do we need to start?
 
 some machines :) as long as they are ours it doesn't really matter what size 
 as long as they only run benchmarks.
 the current mac slave is not the best choice as it will be under load from 
 jenkins…
 
 Is a another mac ok?

sure :) whatever dedicated machine will do, I think the only requirement is, 
that at least OSX 10.6 runs on it. (or we can always install a linux on top :P)

 Anne told me that there is sort of a service from inria where they provide 
 certain machines for benchmarking
 
 I do not know but we can ask.

I will check on monday...




Re: [Pharo-users] ui slowness on newly installed ubuntu 13.04 64bit

2013-06-15 Thread Camillo Bruni
yes I discovered the same behavior yesterday with esteban.

thanks very much for the details!

On 2013-06-14, at 23:53, Sven Van Caekenberghe s...@stfx.eu wrote:
 On 07 Jun 2013, at 17:15, Camillo Bruni camillobr...@gmail.com wrote:
 
 Can you try on the command line only?
 
 This is getting _very_ weird:
 
 This is on Ubuntu 12.10 x64 running on a non-virtualised Intel(R) Core(TM) 
 i5-3470 CPU @ 3.20GHz, 8GB RAM.
 
 $ ./pharo Pharo.image printVersion
 [version] 3.0 #30199
 
 -1-
 
 $ curl get.pharo.org/vm| bash
 
 $ ./pharo -version
 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3
 NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: 
 a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
 NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: 
 a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
 git://gitorious.org/cogvm/blessed.git Commit: 
 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: 
 Esteban Lorenzano esteba...@gmail.com Jenkins build #14535
 Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 
 2012 x86_64 GNU/Linux
 plugin path: /home/bt/pharo/pharo-vm/ [default: /home/bt/pharo/pharo-vm/]
 
 $ ./pharo Pharo.image eval '1 tinyBenchmarks'
 '1276807980 bytecodes/sec; 172715872 sends/sec'
 
 $ ./pharo Pharo.image eval '[ SystemNavigation new allCallsOn: #ifTrue: ] 
 timeToRun'
 59
 
 $ ./pharo Pharo.image eval '[ SystemNavigation new allCallsOn: #ifTrue: ] 
 timeToRun'
 59
 
 -2-
 
 $ curl get.pharo.org/vmLatest | bash
 
 $ ./pharo --version
 3.9-7 #1 Fri May 31 13:43:31 CEST 2013 gcc 4.6.3
 NBCoInterpreter NativeBoost-CogPlugin-GuillermoPolito.19 uuid: 
 acc98e51-2fba-4841-a965-2975997bba66 May 31 2013
 NBCogit NativeBoost-CogPlugin-GuillermoPolito.19 uuid: 
 acc98e51-2fba-4841-a965-2975997bba66 May 31 2013
 git://gitorious.org/cogvm/blessed.git Commit: 
 0f562e0afe14e533470278943b5d65d42ea133c2 Date: 2013-05-30 16:38:08 +0200 By: 
 Igor Stasenko siguc...@gmail.com Jenkins build #14595
 Linux pharo-linux 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC 
 2012 i686 i686 i386 GNU/Linux
 plugin path: /home/bt/pharo/pharo-vm/ [default: /home/bt/pharo/pharo-vm/]
 
 $ ./pharo Pharo.image printVersion
 [version] 3.0 #30199
 
 $ ./pharo Pharo.image eval '1 tinyBenchmarks'
 '1335071707 bytecodes/sec; 179533604 sends/sec'
 
 $ ./pharo Pharo.image eval '[ SystemNavigation new allCallsOn: #ifTrue: ] 
 timeToRun'
 705
 
 $ ./pharo Pharo.image eval '[ SystemNavigation new allCallsOn: #ifTrue: ] 
 timeToRun'
 697
 
 
 So #tinyBenchmarks reports approx. the same result, but #allCallsOn: differs 
 by a factor 10. Why ?
 
 Sven
 
 PS: We really need to start tracking benchmarks across platforms and versions 
 - so much to do.

actually https://ci.inria.fr/pharo/view/VM/job/PharoVM-tests/ succesfully 
detected the degeneration and thus failed.
And yes, we will add real benchmarks at some point. But for that we first need 
dedicated machines, as running them on a virtualized environment doesn't make 
much sense :/.




Re: [Pharo-users] ui slowness on newly installed ubuntu 13.04 64bit

2013-06-15 Thread Camillo Bruni

On 2013-06-15, at 13:16, Stéphane Ducasse stephane.duca...@inria.fr wrote:

 
 actually https://ci.inria.fr/pharo/view/VM/job/PharoVM-tests/ succesfully 
 detected the degeneration and thus failed.
 And yes, we will add real benchmarks at some point. But for that we first 
 need dedicated machines, as running them on a virtualized environment 
 doesn't make much sense :/.
 
 What do we need to start?

some machines :) as long as they are ours it doesn't really matter what size as 
long as they only run benchmarks.
the current mac slave is not the best choice as it will be under load from 
jenkins...

Anne told me that there is sort of a service from inria where they provide 
certain machines for benchmarking


Re: [Pharo-users] SVN client and latex parser, are any there?

2013-06-12 Thread Camillo Bruni
I use git over svn, so I sleep properly at night at least :P

what's the real problem you're dealing with?

On 2013-06-12, at 09:38, Guillermo Polito guillermopol...@gmail.com wrote:

 Buon giorno!
 
 I got pissed off when committing latex and figures and stuff into svn by
 command line...
 
 So, for playing the weekend, does somebody know if there is any package
 implementing an svn client (maybe using osprocess, i do not care ;) and a
 latex parser?
 
 Tx!
 Guille




Re: [Pharo-users] ui slowness on newly installed ubuntu 13.04 64bit

2013-06-10 Thread Camillo Bruni
thanks for the insight. I opened an issue: 
https://pharo.fogbugz.com/default.asp?10879


can you try get.pharo.org/30+vmLatest to try out the unstable VM?

On 2013-06-09, at 19:04, Sven Van Caekenberghe s...@stfx.eu wrote:

 I think that we do have a problem, and I think it is VM related.
 
 This is what I see on my Ubuntu 13.04 64-bit machine (AMD Athlon(tm) II X4
 640, 4GB, AMD Radeon HD 7750) using a  Pharo 3.0 #30189 image.
 
 Using the vm from get.pharo.org/30+vm
 
 [ SystemNavigation new allCallsOn: #ifTrue: ] timeToRun. 99 101
 
 [ SystemNavigation new browseAllCallsOn: #ifTrue: ] timeToRun. 1455 1420
 
 Using the vm from ppa:pharo/stable
 
 [ SystemNavigation new allCallsOn: #ifTrue: ] timeToRun. 1495 1518
 
 [ SystemNavigation new browseAllCallsOn: #ifTrue: ] timeToRun. 11535 11156
 
 That is a 10x slowdown !
 
 Here are the VM details:
 
 $ ./pharo-ui -version
 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3
 NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
 a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
 NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
 a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
 git://gitorious.org/cogvm/blessed.git Commit:
 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100
 By: Esteban Lorenzano esteba...@gmail.com Jenkins build #14535
 Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59
 UTC 2012 x86_64 GNU/Linux
 plugin path: /home/sven/Pharo/pharo-vm/ [default:
 /home/sven/Pharo/pharo-vm/]
 
 $ pharo-vm-x --version
 3.9-7 #1 Thu Jun  6 11:05:55 UTC 2013 gcc 4.7.3
 NBCoInterpreter NativeBoost-CogPlugin-GuillermoPolito.19 uuid:
 acc98e51-2fba-4841-a965-2975997bba66 Jun  6 2013
 NBCogit NativeBoost-CogPlugin-GuillermoPolito.19 uuid:
 acc98e51-2fba-4841-a965-2975997bba66 Jun  6 2013
 git://gitorious.org/cogvm/blessed.git Commit:
 0f562e0afe14e533470278943b5d65d42ea133c2 Date: 2013-05-30 16:38:08 +0200
 By: Igor Stasenko siguc...@gmail.com Jenkins build #14595
 Linux samarium 2.6.24-32-xen #1 SMP Thu Jul 12 14:30:40 UTC 2012 i686
 athlon i686 GNU/Linux
 plugin path: /usr/lib/pharo-vm/ [default: /usr/lib/pharo-vm/]
 
 One version seems older, but I don't know what changed inbetween them
 
 Sven
 
 On Fri, Jun 7, 2013 at 6:49 PM, Paul DeBruicker pdebr...@gmail.com wrote:
 
 And the pharo2 linux all-in-one runs in 116ms on my hardware on Ubuntu
 13.04 64bit.
 
 
 
 
 
 On 06/07/2013 09:35 AM, Markus Fritsche wrote:
 On 07.06.2013 17:55, Paul DeBruicker wrote:
 From the below it seems to be something with running on linux 64bits
 with a UI slows it down by a factor of 10x.
 
 
 Command line per Camillo below on ubuntu 13.04 64bit on the hardware
 was: 134ms
 
 Using Pharo-2 windows all in one on a windows xp virtualbox VM was:
 163ms
 
 Using Pharo-2 linux all in one on a ubuntu 12,04 64bit virtualbox VM
 was: 1918ms
 
 
 Using Pharo-2 linux all in one on a debian 6 32bit virtualbox VM was:
 152 ms
 Further research:
 Pharo PPA VM, Ubuntu 13.04 64Bit:
 [SystemNavigation new allCallsOn: #ifTrue: ] timeToRun 2230
 CogVM from Eliot directly (
 http://www.mirandabanda.org/files/Cog/VM/VM.r2732/):
 [SystemNavigation new allCallsOn: #ifTrue: ] timeToRun 164
 
 Kind regards,
   Markus
 
 
 




[Pharo-users] account search

2013-06-07 Thread Camillo Bruni
who is rem...@me.com  on fogbugz?



Re: [Pharo-users] ui slowness on newly installed ubuntu 13.04 64bit

2013-06-07 Thread Camillo Bruni
Can you try on the command line only?

curl get.pharo.org/30+vm | bash
./pharo Pharo.image eval [SystemNavigation new allCallsOn: #ifTrue: ] 
timeToRun



On 2013-06-07, at 17:12, Marcus Denker marcus.den...@inria.fr wrote:

 
 On Jun 7, 2013, at 5:04 PM, Paul DeBruicker pdebr...@gmail.com wrote:
 
 My laptop is:
 
 [SystemNavigation new allCallsOn: #ifTrue: ] timeToRun 1518
 
 
 (3.0):
 [SystemNavigation new allCallsOn: #ifTrue: ] timeToRun 117
 
 I have a slow machine: 1.8Ghz Core i5 in a MacBook Air.
 It auto-overclocks to 2.8 Ghz when not using two cores.
 
 It's supposed to be not a fast system, as far as I understood. 
 
   Marcus
 
 




Re: [Pharo-users] DateAndTimeasTime

2013-06-06 Thread Camillo Bruni
can you save an image with the inspector opened on both x and y, x asTime and y 
asTime
and provide a link to it? like that I can inspect it in all detail...

On 2013-06-06, at 17:51, dmacq dm...@instantiations.com wrote:

 I tried it again this morning and still had the problem.
 
 This is interesting.
 
 | x y |
 x := DateAndTime year: 1991 day: 196 hour: 20 minute: 5 second: 7.
 y := DateAndTime year: 1991 month: 7 day: 15 hour: 20 minute: 5 second: 7.
 x = y  -- True
 
 But 
 | x y |
 x := DateAndTime year: 1991 day: 196 hour: 20 minute: 5 second: 7.
 y := DateAndTime year: 1991 month: 7 day: 15 hour: 20 minute: 5 second: 7.
 x asTime = y asTime - False
 
 
 
 --
 View this message in context: 
 http://forum.world.st/DateAndTime-asTime-tp4691870p4691988.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 




Re: [Pharo-users] DateAndTimeasTime

2013-06-05 Thread Camillo Bruni

On 2013-06-06, at 00:41, dmacq dm...@instantiations.com wrote:

 In Pharo V2, if I execute this snippet:
 
 | x |
 x := DateAndTime year: 1991 day: 196 hour: 20 minute: 5 second: 7.
 x asTime inspect
 
 I get '12:0-54:0-53 am' which is not what I expect.

- where did you get this string from? that looks very strange.
If I do what you describe in a fresh 2.0 Image I get '8:05:07 pm' as expected.
- Just to be sure, which exact Pharo version are you using (print SystemVersion 
current)?

 DateAndTimeasTime changed from 1.4 to 2.0.

yes, the internals of DateAndTime are now in UTC and no longer local time.

 Any ideas? 



Re: [Pharo-users] DateAndTimeasTime

2013-06-05 Thread Camillo Bruni
it keeps on being strange ;), another try, what is your time zone?

TimeZone local inspect
TimeZone local offset inspect


On 2013-06-06, at 01:14, dmacq dm...@instantiations.com wrote:
 SystemVersion current --- Pharo2.0 of 7 March 2013 update 20596
 
 The string is from the inspector window.
 
 I get the same thing in a fresh image.
 
 
 
 --
 View this message in context: 
 http://forum.world.st/DateAndTime-asTime-tp4691870p4691873.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.