Re: [Pharo-users] TestAsserter>>assertCollection:hasSameElements:

2015-10-26 Thread jtuc...@objektfabrik.de

Peter,

I see you clearly understand what I wanted to get into and don't give up 
because of my aggressive tone in the first place.


Am 26.10.15 um 23:53 schrieb Peter Uhnák:
On Mon, Oct 26, 2015 at 8:27 AM, jtuc...@objektfabrik.de 
 > wrote:


Am 25.10.15 um 16:33 schrieb Peter Uhnák:


> assert:equals:  it's just more typing than #= with no
additional outcome


I also disagree, but that may be also because maybe we write
tests for different purpse.
If you write tests just to test your code, then whatever... I
don't do that so I can't comment on that.

However if you do TDD, then tests are to provide feedback, and
from that perspective you want to see immediately what is the
difference. If I see that the assertion failed I have to start
digging to find out what is the difference, which is extra work
and bad from feedback perspective. If I instead immediately see
what I need to see it allows me to faster deduce the source of
the problem and resolve it.


I'm sorry, but what you are saying doesn't make any sense. Even if
I "only" want to test code (which is exactly what you do in TDD,
btw.), I need good feedback.


Well, that was a bit of generalization on my part. The point was, that 
many people write tests as an afterthought... which means they have 
different means of getting feedback from the system (e.g. logging, 
running manually the code, etc.). In such situation they often end up 
testing already mostly working code, and thus the feedback from the 
tests is not as important, because you end up less digging up problems 
(since large portion were found and resolved during manual testing).


I don't think there really is a difference between test first and tests 
as an afterthought. You always need good and precise feedback. What you 
say about having learned much more during development of a body of code 
is not necessarily true in teams or when you maintain software that has 
grown for years or decades, Remember, there are Smalltalk systems out 
there whose development started in the late 80s or early 90s. In fact, 
most commercial Smalltalk projects out in the wild are rather old.
If you have to make sure you don't break anything by putting a system 
under test, you need precise feeddback, because errors can happen in 
areas you haven't touched in the last 5 or 10 years or even never before.


There is, btw, another area in which SUnit can be extremely helpful: 
Understanding an existing body of code and proving your theories about 
code to yourself while you dive deeper. Here, feedback is also very 
important.


So let's just assume that feedback of SUnit can never be too specific 
and is one of the very most important aspects of the framework.



We could think about subclassing TestFailure and a way to hand
information to the TestFailure so that a nice String can be
produced. Like a method like cull: that adds arguments'
printString representation into the failure description.


You mean #assert:description: ? Because we already have that.
Well, I actually mean a new generation of #assert:description: that 
concentrates more on the #description: part. Remember: some assertion 
methods have been added as a way to provide "more suitable" feedback, 
like handing in an object or two to be mentioned in the description 
string. So the problem at hand wasn't that the standard assert: method 
was insufficient, just its output.
I clearly understand how this can happen. You want to provide a better 
log output and since you are testing something that even others might 
need, you just add that damn method that writes a nice "expecte $A but 
got $B".
In fact, this solves a problem in the wrong way, because it will result 
in many more or less well-named assertion methods that basically are 
there to provide a better failure String.


So what we have is a way to display a description without parameters. 
But we sometimes want more than that. In case of #assert:equals: we 
wanted a String that says "Expected $A and got $B". Let's not speculate 
whether this String really saves us much time if we are in a TDD 
scenario or on a build server. Let's just assume it is never bad to know 
as much as possible about a problem to do something about it.


Let's also not forget that Kent Beck had this clear idea from the very 
beginning of SUnit that it must be lightweight and easy to understand to 
not shy people away from trying. You must be able to use SUnit within an 
hour and it must be easy and provide instant feedback. If I have to type 
too much, or keep too many things in mind, I won't use it.




Please step back for a second and think again: these are two very
different things. The job of an Assertion is to make a problem
visible. The representation of the problem is something else, even
if these are closely related. This is object thinkin

Re: [Pharo-users] [Pharo-dev] Little Meeting at Pittsburg

2015-10-26 Thread Juan Pablo Sandoval Alcocer
I am attending OOPSLA too, It would be a pleasure to be part of the
meeting.

Juampi

2015-10-25 19:30 GMT-03:00 stepharo :

> Hi
>
> Guillermo, Andrei, Guido and me are attending OOPSLA so we could have a
> small
> Pharo meeting.
> What about wednesday evening?
>
> Stef
>
>


-- 
Saludos,
Juan Pablo


Re: [Pharo-users] Updated Pharo By Example

2015-10-26 Thread stepharo

Thanks we should really use this.



Le 23/10/15 15:19, Stephan Eggermont a écrit :

On 23-10-15 19:15, Thierry Goubier wrote:

Le 23 oct. 2015 7:00 PM, "Dimitris Chloupis"  a
écrit :


I completely agree with Stef, I did actually removed some 
screenshots and

someone put them pack


Maybe I can create a pharo script to auto make them for each version


Wasn't there a way to run Smalltalk code inside pillar? Code that would
open windows, screenshot and return a png.


Well, there is Documentation-Screenshots in 
StephanEggermont/Documentation


You create a DOScreenshotExporter, set its directory and tell it which
forms/morphs/nautilus/world you want stored there under which filename.
I fixed a few remaining bugs today.

I presume you should be able to use it in pillar.

You can use it like

so := DOScreenshotExporter new.
so directory: FileLocator home.
so writeNautilusMethod: DOScreenshotExporter>>#directory: as: 
'directoryMethod.png'


It has methods like
DOScreenshotExporter>>writeNautilusMethod: aMethod as: aFileName
  self writeBlock: [(Nautilus openOnMethod: aMethod) ui window 
imageForm ] as: aFileName


This makes sure to first rename an existing file before overwriting it.

DOScreenshotExporter>>writeBlock: aBlock as: aFileName
  |temp|
  (directory / aFileName) exists ifTrue: [
temp := (directory / aFileName) renameTo: (aFileName,'tmp') ].
  PNGReadWriter putForm: aBlock value onFileNamed: (directory / 
aFileName).

  temp ifNotNil: [ temp ensureDelete ]

Stephan








Re: [Pharo-users] Pharo family update

2015-10-26 Thread Adam
Dne Po 26. října 2015 17:26:55, Esteban A. Maringolo napsal(a):
> Magritte could be categorized as meta-modelling.

OK.

> 
> PostgreSQL, Magma, MongoDB, etc should be Databases.
> Persistency should include Voyage, GLORP, SandstoneDB, etc.

Sounds good. Still I em wondering about "Server" circle (like I wrote in my 
other email). Maybe it will be better to merge it with one of siblings.

Adam.

> Esteban A. Maringolo
> 
> 2015-10-26 17:19 GMT-03:00 stepharo :
> > You can safely remove Marina.
> > It is unmaintained, undocumented and not finished.
> > 
> > I did not see Fuel. Could be close to STON
> > Would be nice to have parsers
> > 
> > Smacc
> > OMeta
> > PetitParser
> > 
> > Le 25/10/15 20:23, Adam a écrit :
> >> Hello,
> >> 
> >> next update. I tried to follow all sugestions - but not all is
> >> implemented
> >> into drawings (maybe because I did not quite understand, or I did not
> >> found
> >> enough information, or something like that).
> >> 
> >> Pharo is mostly development platform, and image shows mostly libraries
> >> and
> >> frameworks for development, but "Development" circle in the image is more
> >> about tools primarly targeted to support process of development. So, if
> >> Gofer
> >> and Metacello is not used for this purpose (maybe it is, I'm not sure),
> >> it
> >> should be in "Working" circle.
> >> 
> >> "Working" circle is mostly about tools and applications for "normal"
> >> people.
> >> Maybe it should be named like: "Desktop"...
> >> 
> >> "Server" circle is meant to show that Pharo itself can offer services to
> >> other
> >> parties.
> >> 
> >> Development/Working/Server are some kinde of trinity around it everyhing
> >> else
> >> is rotating. But Pharo is more about Development so other circles are
> >> main
> >> groups of libraries and frameworks.
> >> 
> >> Adam
> >> 
> >> Dne Pá 23. října 2015 23:58:48, Adam napsal(a):
> >>> Hello,
> >>> 
> >>> I just updated drawing of projects around Pharo.
> >>> 
> >>> Main idea is to guide people (new users of Pharo) through fields of
> >>> interests - something they might be looking for. I choose these 10
> >>> fields
> >>> devided into some specific subjects. Somewhere it is too detailed, while
> >>> elsewhere it is too fuzzy - it is just showing image of Pharo I have in
> >>> my
> >>> mind.
> >>> 
> >>> It should help people to:
> >>> - identify important classes in Pharo,
> >>> - select right project,
> >>> - understand what is application, tool or framework,
> >>> - see what is allready inside main Pharo image.
> >>> 
> >>> I would like to add links pointing to part of books or to videos where
> >>> specific projects are used. And maybe a star symbol for very important
> >>> or
> >>> enterprise ready projects.
> >>> 
> >>> As You can see I left few subjects empty. Maybe someone can help me fill
> >>> this. But I will be happy for any type of correction - changing fields
> >>> of
> >>> interest, subjects, adding/removing projects etc...
> >>> 
> >>> I prepared textual version on github - but right now it is not coherent
> >>> with
> >>> the drawing (I will correct this if needed).
> >>> 
> >>> Adam.




Re: [Pharo-users] Pharo family update

2015-10-26 Thread Adam
Dne Po 26. října 2015 16:19:36, stepharo napsal(a):
> You can safely remove Marina.
> It is unmaintained, undocumented and not finished.
> 

OK

> I did not see Fuel. Could be close to STON
> Would be nice to have parsers
>  Smacc
>  OMeta
>  PetitParser
>

Fuel is under Data - Storing (but I thinking about move it under Import/Export
SmaCC and PetitParser are Import/Export - Parsers
OMeta can be included.

Adam.

> Le 25/10/15 20:23, Adam a écrit :
> > Hello,
> > 
> > next update. I tried to follow all sugestions - but not all is implemented
> > into drawings (maybe because I did not quite understand, or I did not
> > found
> > enough information, or something like that).
> > 
> > Pharo is mostly development platform, and image shows mostly libraries and
> > frameworks for development, but "Development" circle in the image is more
> > about tools primarly targeted to support process of development. So, if
> > Gofer and Metacello is not used for this purpose (maybe it is, I'm not
> > sure), it should be in "Working" circle.
> > 
> > "Working" circle is mostly about tools and applications for "normal"
> > people. Maybe it should be named like: "Desktop"...
> > 
> > "Server" circle is meant to show that Pharo itself can offer services to
> > other parties.
> > 
> > Development/Working/Server are some kinde of trinity around it everyhing
> > else is rotating. But Pharo is more about Development so other circles
> > are main groups of libraries and frameworks.
> > 
> > Adam
> > 
> > Dne Pá 23. října 2015 23:58:48, Adam napsal(a):
> >> Hello,
> >> 
> >> I just updated drawing of projects around Pharo.
> >> 
> >> Main idea is to guide people (new users of Pharo) through fields of
> >> interests - something they might be looking for. I choose these 10 fields
> >> devided into some specific subjects. Somewhere it is too detailed, while
> >> elsewhere it is too fuzzy - it is just showing image of Pharo I have in
> >> my
> >> mind.
> >> 
> >> It should help people to:
> >> - identify important classes in Pharo,
> >> - select right project,
> >> - understand what is application, tool or framework,
> >> - see what is allready inside main Pharo image.
> >> 
> >> I would like to add links pointing to part of books or to videos where
> >> specific projects are used. And maybe a star symbol for very important or
> >> enterprise ready projects.
> >> 
> >> As You can see I left few subjects empty. Maybe someone can help me fill
> >> this. But I will be happy for any type of correction - changing fields of
> >> interest, subjects, adding/removing projects etc...
> >> 
> >> I prepared textual version on github - but right now it is not coherent
> >> with the drawing (I will correct this if needed).
> >> 
> >> Adam.



Re: [Pharo-users] Pharo family update

2015-10-26 Thread Adam
Thanks for all comments.

Dne Po 26. října 2015 12:18:31, Hernán Morales Durand napsal(a):
> 2015-10-26 11:08 GMT-03:00 Ben Coman :
> > Thanks Adam.  This is a great initiative. I really like the
> > internal/external distinction.
> > 
> > A few questions...
> > 
> > Why is "Compilers" outside the circle?

I dont know :) - I dont even know if it should be included. It is part of 
Nautilus from this point 
of view. I em not aware about possiblity to choose different compiler or to 
compile e.g. 
javascript into smalltalk.

> > 
> > What is the "VB" part of "VB-Regex" ?
> 
> Vassili Bykov was the original author of Regex11 and later it was renamed.
> 
> > and a few suggestions...
> > 
> > > About categories I would group in different way but it's personal
> > 
> > choice. Like...
> > 
> > > Reflection
> > 
> > It would be nice to emphasise our reflective capability, but what
> > would be some subparts?
> 
> Reflection is commonly decomposed in two parts: Introspection and
> intercession.

I em not sure if it fits into philosophy of the picture. Reflectivity as well 
as living environmet is 
attribute of Pharo. This picture is more about tools, applications, frameworks 
and libraries for 
Pharo. It can be pointed out in accompanying description (under Pharo logo).

> 
> > > Code Analysis
> > 
> > This could just be "Analysis" and include Moose and SciSmalltalk.

There is Data analysis with Moose included. 

> > 
> > > Persistency
> > 
> > Maybe "Connectors" could be renamed to "Persistence".
> 
> Yes, besides that would avoid confusion with the Connectors package.

Can be. First version contains this, but I change it because connectors to 
external databases 
are used for more then persistency. It may also allow to define model, query 
data, 
authenticate users, allows concurency etc...

So persistency is now under Data/Storing

> 
> > It would be good to promote in-Image persistence solutions since that
> > is a speed advantage for prototyping.  btw, Is SimplePersistance
> > stable enough to be included?
> > http://smalltalkhub.com/#!/~TorstenBergmann/SimplePersistence
> 
> I don't know about SimplePersistence but in-image persistence is a cool
> feature that other technologies lack.

Agreed - this should be somehow in the picture.

> 
> > I don't think Magma and SandstoneDb provide services to other clients
> > (??) and so don't seem related to "Server" and would group better with
> > "Connectors/Persistence". That does then leave "Server" a bit bare.
> > Perhaps "RemoteFrameBuffer" would be a good fit.
> > 

Yes, but they are able to provide service outside of running Pharo (through 
network), aren't 
they? I did not finish reading all books yet :)

Maybe this is a good question. What kind of services can Pharo provide over the 
network (or 
local sockets or pipes)? Zinc as HTTP for sure (somewhere I see HTTPS 
branch...or TLS 
implementation). WEB, REST and others are covered in Web development.
VNC - through RemoteFrameBuffer. 
Databases (direct connection without using REST)?
Repository and versioning (like Smalltalkhub - but I think it uses HTTP)
CORBA?
What about possibility to share objects (by cloning objects or by sending 
messages or by using 
proxy objects)?
(Now I em not able to think about anything else much usefull :) - SSH, NTP, 
IMAP, nothing 
like this seems to be right job for Pharo - but who knows :))

> > 
> > "Output" is a bit too much like "Export".  Perhaps it could be renamed
> > "Presentation"

Can be.

> > 
> > The legend could be moved to a corner (bottom left?), and "Pharo"
> > could be moved more centrally to its place.  In another shaded corner
> > you might list the major repositories:
> > * smalltalkhub.com
> > * ss3.gemtalksystems.com
> > * squeaksource.com

OK.

Re: [Pharo-users] TestAsserter>>assertCollection:hasSameElements:

2015-10-26 Thread Peter Uhnák
On Mon, Oct 26, 2015 at 8:27 AM, jtuc...@objektfabrik.de <
jtuc...@objektfabrik.de> wrote:

> Am 25.10.15 um 16:33 schrieb Peter Uhnák:
>
> > assert:equals:  it's just more typing than #= with no additional outcome
>>
>
> I also disagree, but that may be also because maybe we write tests for
> different purpse.
> If you write tests just to test your code, then whatever... I don't do
> that so I can't comment on that.
>
> However if you do TDD, then tests are to provide feedback, and from that
> perspective you want to see immediately what is the difference. If I see
> that the assertion failed I have to start digging to find out what is the
> difference, which is extra work and bad from feedback perspective. If I
> instead immediately see what I need to see it allows me to faster deduce
> the source of the problem and resolve it.
>
> I'm sorry, but what you are saying doesn't make any sense. Even if I
> "only" want to test code (which is exactly what you do in TDD, btw.), I
> need good feedback.
>

Well, that was a bit of generalization on my part. The point was, that many
people write tests as an afterthought... which means they have different
means of getting feedback from the system (e.g. logging, running manually
the code, etc.). In such situation they often end up testing already mostly
working code, and thus the feedback from the tests is not as important,
because you end up less digging up problems (since large portion were found
and resolved during manual testing).


> We could think about subclassing TestFailure and a way to hand information
> to the TestFailure so that a nice String can be produced. Like a method
> like cull: that adds arguments' printString representation into the failure
> description.
>

You mean #assert:description: ? Because we already have that.


> Please step back for a second and think again: these are two very
> different things. The job of an Assertion is to make a problem visible. The
> representation of the problem is something else, even if these are closely
> related. This is object thinking lesson #2 or so.
>

Object thinking lesson #3 tells me that I should not care about what is
going on behind the curtains. And while I could explicitly separate the
two, if I do it all the time I don't see what's bad about having a
convenience method. (And by looking at Object or String protocol, Pharo is
a lot about having convenience over engineering rigidness).

But: adding more and more misnamed and misleading assertion methods makes
> the use of SUnit frustrating and will make it obsolete over time. If I have
> to hunt for design problems in SUnit because it assumes something to be
> wrong even though my understanding of waht I tested is different, I lose
> way more time than I am ready to accept. This doesn't happen to me often.
> If finding that I misunderstood an assertion method means I lost a few
> hours, the best thing that may happen is that I never use that method
> again. In the worst case, I decide I think SUnit is useless for me. That
> would be really bad, don't you think?
>

I am not sure if we are talking about the same SUnit. Sure, there are 32
methods in the "asserting" protocol, however most of them are either
opposites of one another "#assert: vs #deny:", or they provide some
customization such has "#assert:description:", "#should:raise:" ... so if I
count only meaningfully different methods the number 7 (not to mention that
some of the methods are not even used). But if you have trouble
understanding the purpose of seven methods, then the problem is on your
end, and don't blame SUnit for it.


>
>
>  > assertCollection:hasSameElements:
>
>> > So, let's start by asking what the question really means. Does it mean
>> that one collection is a subset of the other? What about ordering then?
>> Does it mean both contain the same elements at the same position or just
>> the fact that if they both were Sets contained the exact same elements. The
>> question itself is not exact, so how could an answer possibly be?
>>
>
> There is no question about this method, since this is implemented in code
> there is nothing ambiguous. This method effectively converts both arguments
> to sets and compares them like that.
>
>
> Sorry to say that, but this is ambiguity by design: you define
> hasSameElements: as "both result in the same Set". So the name of this
> assertion method is a great example of bad naming, IMO.
>

Yes, the naming is confusing. My point was, that instead of philosophizing
about the meaning you can look at the code. Of course if you use the method
for the first time (like I did), you will get burned by it (as I did).


> The question is whether such thing is useful for non-sets, and there are
> definitely cases where such assertion is not appropriate (when you want to
> ensure that there are specific items or specific positions), that's why I
> suggested asserts specifically for that.
>
> This is just nonsense. You name a method after a general collection 

Re: [Pharo-users] How to programatically select an item in a Spec TreeModel ?

2015-10-26 Thread stepharo



Le 24/10/15 06:06, Peter Uhnák a écrit :


> Unless Cyril is going to do the rewrite himself.
Wasn't that the plan? I'm confused :)


Oh? I do not remember anyone mentioning on the mailing list that 
someone will change Spec to use FT. Or was this from some internal 
discussion at Inria/Synectique?


It is the plan since FT was introduced. The problem was that NewList API 
and FT were not compatible.
So we should check but no reason to keep NewList (bad design) and also 
if we could kill PluggableListMorph use.


Stef


Peter




Re: [Pharo-users] How to programatically select an item in a Spec TreeModel ?

2015-10-26 Thread stepharo
We should make sure that we can use FT instead of NewList (this is on my 
todo since ages).


Stef

Le 26/10/15 08:27, Edouard KLEIN a écrit :

> FT is FastTable. This is a project begun by Esteban to replace the old
slow list on Pharo.
> Pharo 5 uses FastTable now.

Thanks for the details. Should I update to Pharo5 tu use FT ?

As for my progress in debugging things. I see that the roots and the 
children behave differently (although they are created equal by my 
nodeFromTreeStructure: method), for instance, root nodes are not 
inspectable, when I try to see them in an inspector I get : 
MessageNotUnderstood SpecTreeNodeModel>>gtInspectorMorphIn.


Children nodes can be seen in the inspector without a hitch.

Also, root nodes know their widget (a MorphicTreeNodeAdapter) whereas 
the children return nil.


Any help, even just a reference at someplace to look, would be 
appreciated.


On Mon, 26 Oct 2015 at 11:49 Ferlicot D. Cyril 
mailto:cyril.ferli...@gmail.com>> wrote:


Le 26/10/2015 10:38, Edouard KLEIN a écrit :
> What is FT ?
>

FT is FastTable. This is a project begun by Esteban to replace the old
slow list on Pharo.
Pharo 5 uses FastTable now.

> I did some debugging. When I send the selected:#true message to
a root
> node, it goes down to the Morphic classes, and everything is
fine, when
> I send it to a child node, the dependents array of the
TreeNodeModel is
> nil, so nobody gets the message. I don't know enough about Spec
yet to
> understand what dependents are and why there are none on a child
node.
>
> Because I really need to get this done quickly, I will try to
write a
> quick and dirty fix in a subclass that will directly talk to the
morphic
> objects underneath.
>
> Now, with some guidance from you guys, I would be really happy
to take
> some time and write some useful code that could solve this problem
> correctly, and have it commited for anyone to use. But first, in
order
> to justify to my employer that coding with Pharo was a good
choice, I
> need to make my application work.
>
> I'll update here as I go.
>
>

--

Cyril Ferlicot

http://www.synectique.eu

165 Avenue Bretagne
Lille 59000 France





Re: [Pharo-users] Pharo family update

2015-10-26 Thread Esteban A. Maringolo
Magritte could be categorized as meta-modelling.

PostgreSQL, Magma, MongoDB, etc should be Databases.
Persistency should include Voyage, GLORP, SandstoneDB, etc.
Esteban A. Maringolo


2015-10-26 17:19 GMT-03:00 stepharo :
> You can safely remove Marina.
> It is unmaintained, undocumented and not finished.
>
> I did not see Fuel. Could be close to STON
> Would be nice to have parsers
> Smacc
> OMeta
> PetitParser
>
>
> Le 25/10/15 20:23, Adam a écrit :
>
>> Hello,
>>
>> next update. I tried to follow all sugestions - but not all is implemented
>> into drawings (maybe because I did not quite understand, or I did not
>> found
>> enough information, or something like that).
>>
>> Pharo is mostly development platform, and image shows mostly libraries and
>> frameworks for development, but "Development" circle in the image is more
>> about tools primarly targeted to support process of development. So, if
>> Gofer
>> and Metacello is not used for this purpose (maybe it is, I'm not sure), it
>> should be in "Working" circle.
>>
>> "Working" circle is mostly about tools and applications for "normal"
>> people.
>> Maybe it should be named like: "Desktop"...
>>
>> "Server" circle is meant to show that Pharo itself can offer services to
>> other
>> parties.
>>
>> Development/Working/Server are some kinde of trinity around it everyhing
>> else
>> is rotating. But Pharo is more about Development so other circles are main
>> groups of libraries and frameworks.
>>
>> Adam
>>
>> Dne Pá 23. října 2015 23:58:48, Adam napsal(a):
>>>
>>> Hello,
>>>
>>> I just updated drawing of projects around Pharo.
>>>
>>> Main idea is to guide people (new users of Pharo) through fields of
>>> interests - something they might be looking for. I choose these 10 fields
>>> devided into some specific subjects. Somewhere it is too detailed, while
>>> elsewhere it is too fuzzy - it is just showing image of Pharo I have in
>>> my
>>> mind.
>>>
>>> It should help people to:
>>> - identify important classes in Pharo,
>>> - select right project,
>>> - understand what is application, tool or framework,
>>> - see what is allready inside main Pharo image.
>>>
>>> I would like to add links pointing to part of books or to videos where
>>> specific projects are used. And maybe a star symbol for very important or
>>> enterprise ready projects.
>>>
>>> As You can see I left few subjects empty. Maybe someone can help me fill
>>> this. But I will be happy for any type of correction - changing fields of
>>> interest, subjects, adding/removing projects etc...
>>>
>>> I prepared textual version on github - but right now it is not coherent
>>> with
>>> the drawing (I will correct this if needed).
>>>
>>> Adam.
>
>
>



Re: [Pharo-users] Pharo family update

2015-10-26 Thread stepharo

You can safely remove Marina.
It is unmaintained, undocumented and not finished.

I did not see Fuel. Could be close to STON
Would be nice to have parsers
Smacc
OMeta
PetitParser


Le 25/10/15 20:23, Adam a écrit :

Hello,

next update. I tried to follow all sugestions - but not all is implemented
into drawings (maybe because I did not quite understand, or I did not found
enough information, or something like that).

Pharo is mostly development platform, and image shows mostly libraries and
frameworks for development, but "Development" circle in the image is more
about tools primarly targeted to support process of development. So, if Gofer
and Metacello is not used for this purpose (maybe it is, I'm not sure), it
should be in "Working" circle.

"Working" circle is mostly about tools and applications for "normal" people.
Maybe it should be named like: "Desktop"...

"Server" circle is meant to show that Pharo itself can offer services to other
parties.

Development/Working/Server are some kinde of trinity around it everyhing else
is rotating. But Pharo is more about Development so other circles are main
groups of libraries and frameworks.

Adam

Dne Pá 23. října 2015 23:58:48, Adam napsal(a):

Hello,

I just updated drawing of projects around Pharo.

Main idea is to guide people (new users of Pharo) through fields of
interests - something they might be looking for. I choose these 10 fields
devided into some specific subjects. Somewhere it is too detailed, while
elsewhere it is too fuzzy - it is just showing image of Pharo I have in my
mind.

It should help people to:
- identify important classes in Pharo,
- select right project,
- understand what is application, tool or framework,
- see what is allready inside main Pharo image.

I would like to add links pointing to part of books or to videos where
specific projects are used. And maybe a star symbol for very important or
enterprise ready projects.

As You can see I left few subjects empty. Maybe someone can help me fill
this. But I will be happy for any type of correction - changing fields of
interest, subjects, adding/removing projects etc...

I prepared textual version on github - but right now it is not coherent with
the drawing (I will correct this if needed).

Adam.





Re: [Pharo-users] Updated Pharo By Example

2015-10-26 Thread Dimitris Chloupis
Hello Mariano, thank you for your kind word of course I am one of the many
contributors and UPBE is a collective effort.

We dont have an image right now for UPBE and I think that the best way to
approach this is to make a package for the Catalog Browser . This means you
will be able to use UPBE examples to any image you have instead of being
isolated to a different image.  When this will happen I cant promise
anything since our first priority is to make the documentation as up to
date as possible.

Currently we support Pharo 4 and 5 , with focus of course on Pharo 5.
Obviously in the future the focus will continuously shift towards the
latest version. So when we put the "Updated" to Pharo by Example, we mean
business.


On Mon, Oct 26, 2015 at 6:04 PM Mariano Martinez Peck 
wrote:

> Hi Dimitris,
>
> Thank you very much for your hard work. It was so much needed. In fact, I
> need it now :)
> I have question... remember the old PBE used to have a VM + image for the
> book, which was the image expected to be used while reading the book. Is
> there a new VM + image prepared for UPBE? If true, where? If not, then at
> least which Pharo version is expected to be used as a reference? 4.0?
>
> Thanks in advance,
>
>
> On Fri, Oct 23, 2015 at 4:19 PM, Stephan Eggermont 
> wrote:
>
>> On 23-10-15 19:15, Thierry Goubier wrote:
>>
>>> Le 23 oct. 2015 7:00 PM, "Dimitris Chloupis"  a
>>> écrit :
>>>

 I completely agree with Stef, I did actually removed some screenshots
 and

>>> someone put them pack
>>>

 Maybe I can create a pharo script to auto make them for each version

>>>
>>> Wasn't there a way to run Smalltalk code inside pillar? Code that would
>>> open windows, screenshot and return a png.
>>>
>>
>> Well, there is Documentation-Screenshots in StephanEggermont/Documentation
>>
>> You create a DOScreenshotExporter, set its directory and tell it which
>> forms/morphs/nautilus/world you want stored there under which filename.
>> I fixed a few remaining bugs today.
>>
>> I presume you should be able to use it in pillar.
>>
>> You can use it like
>>
>> so := DOScreenshotExporter new.
>> so directory: FileLocator home.
>> so writeNautilusMethod: DOScreenshotExporter>>#directory: as:
>> 'directoryMethod.png'
>>
>> It has methods like
>> DOScreenshotExporter>>writeNautilusMethod: aMethod as: aFileName
>>   self writeBlock: [(Nautilus openOnMethod: aMethod) ui window imageForm
>> ] as: aFileName
>>
>> This makes sure to first rename an existing file before overwriting it.
>>
>> DOScreenshotExporter>>writeBlock: aBlock as: aFileName
>>   |temp|
>>   (directory / aFileName) exists ifTrue: [
>> temp := (directory / aFileName) renameTo: (aFileName,'tmp') ].
>>   PNGReadWriter putForm: aBlock value onFileNamed: (directory /
>> aFileName).
>>   temp ifNotNil: [ temp ensureDelete ]
>>
>> Stephan
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>


Re: [Pharo-users] Pharo family update

2015-10-26 Thread Martin Bähr
Excerpts from Adam's message of 2015-10-26 01:23:09 +0100:
> Pharo is mostly development platform, and image shows mostly libraries and 
> frameworks for development, but "Development" circle in the image is more 
> about tools primarly targeted to support process of development. So, if Gofer 
> and Metacello is not used for this purpose (maybe it is, I'm not sure), it 
> should be in "Working" circle.

thanks for clarifying that. now i understand the difference. of course they are
related, but one is used by people who want to install software, while the
other is used by developers managing their cod

i wonder if "development" could have a better name, like "tools" or 
"development tools"

and if most things are about development, then "web development" might be "web
frameworks" or just "web" because otherwise it gives the impression that other
things would not be about development.


one more thing, i find the grey-on-white small text hard to read. i have to
zoom in a lot to make it out. small text like that would be better with higher 
contrast.

svg apparently supports tooltips:
http://stackoverflow.com/questions/102457/how-to-create-an-svg-tooltip-like-box
maybe that can be used here.

greetings, martin.

-- 
eKita   -   the online platform for your entire academic life
-- 
chief engineer   eKita.co
pike programmer  pike.lysator.liu.secaudium.net societyserver.org
secretary  beijinglug.org
mentor   fossasia.org
foresight developer  foresightlinux.orgrealss.com
unix sysadmin
Martin Bähr  working in chinahttp://societyserver.org/mbaehr/



Re: [Pharo-users] Updated Pharo By Example

2015-10-26 Thread Mariano Martinez Peck
Hi Dimitris,

Thank you very much for your hard work. It was so much needed. In fact, I
need it now :)
I have question... remember the old PBE used to have a VM + image for the
book, which was the image expected to be used while reading the book. Is
there a new VM + image prepared for UPBE? If true, where? If not, then at
least which Pharo version is expected to be used as a reference? 4.0?

Thanks in advance,


On Fri, Oct 23, 2015 at 4:19 PM, Stephan Eggermont  wrote:

> On 23-10-15 19:15, Thierry Goubier wrote:
>
>> Le 23 oct. 2015 7:00 PM, "Dimitris Chloupis"  a
>> écrit :
>>
>>>
>>> I completely agree with Stef, I did actually removed some screenshots and
>>>
>> someone put them pack
>>
>>>
>>> Maybe I can create a pharo script to auto make them for each version
>>>
>>
>> Wasn't there a way to run Smalltalk code inside pillar? Code that would
>> open windows, screenshot and return a png.
>>
>
> Well, there is Documentation-Screenshots in StephanEggermont/Documentation
>
> You create a DOScreenshotExporter, set its directory and tell it which
> forms/morphs/nautilus/world you want stored there under which filename.
> I fixed a few remaining bugs today.
>
> I presume you should be able to use it in pillar.
>
> You can use it like
>
> so := DOScreenshotExporter new.
> so directory: FileLocator home.
> so writeNautilusMethod: DOScreenshotExporter>>#directory: as:
> 'directoryMethod.png'
>
> It has methods like
> DOScreenshotExporter>>writeNautilusMethod: aMethod as: aFileName
>   self writeBlock: [(Nautilus openOnMethod: aMethod) ui window imageForm ]
> as: aFileName
>
> This makes sure to first rename an existing file before overwriting it.
>
> DOScreenshotExporter>>writeBlock: aBlock as: aFileName
>   |temp|
>   (directory / aFileName) exists ifTrue: [
> temp := (directory / aFileName) renameTo: (aFileName,'tmp') ].
>   PNGReadWriter putForm: aBlock value onFileNamed: (directory / aFileName).
>   temp ifNotNil: [ temp ensureDelete ]
>
> Stephan
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com


Re: [Pharo-users] [ANN] Working with Pharo on the Raspberry Pi

2015-10-26 Thread Attila Magyar
Hi Torsten,

Have you tried the cogvm on the Pi? It is much faster than the stack vm. If
I remember correctly, I used this one last time:
http://www.mirandabanda.org/files/Cog/VM/VM.r3427/cogspurlinuxhtARM-15.33.3427.tgz

Attila



--
View this message in context: 
http://forum.world.st/ANN-Working-with-Pharo-on-the-Raspberry-Pi-tp4857895p4858039.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Problem to connect Seaside and Pharo

2015-10-26 Thread Justine STIENNE
Thank you for your help. You're right, I'm mixing instance and class side,
I will revise it.
I'm following the standard Pharo book.

Justine

2015-10-26 9:31 GMT+01:00 Sven Van Caekenberghe :

>
> > On 26 Oct 2015, at 09:09, Justine STIENNE 
> wrote:
> >
> > Of course. Sorry to bother you but I'm a beginner.
>
> OK, no problem.
>
> You are mixing instance and class side. All your methods except
> #renderContentOn: should be on the class side. There should also be no
> super initialise on the class side.
>
> What book/tutorial are you following ?
>
> Standard Pharo books are at http://books.pharo.org
>
> You should make sure that you read and experiment with the first one.
>
> There is also the Seaside book.
>
> The learning curve in the beginning can be quite steep, depending on your
> background, nothing to worry about.
>
> > 2015-10-26 9:01 GMT+01:00 Sven Van Caekenberghe :
> > Could you do a File Out of your WAHelloWorld class code and show us ?
> >
> > > On 26 Oct 2015, at 08:58, Justine STIENNE 
> wrote:
> > >
> > > I have just done it. And now, on 'http://localhost:8080/config/hello'
> , I can choose 'a WAHelloWorld', but not 'WAHelloWorld'.
> > > When I go to 'http://localhost:8080/hello', I have :
> > > MessageNotUnderstood: WAHelloWorld>>new
> > >
> > > Your request could not be completed. An exception occurred.
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > > Justine
> > >
> > >
> > >
> > > 2015-10-25 20:03 GMT+01:00 Sven Van Caekenberghe :
> > > You have to do (Do it) the #initialize as well, like
> > >
> > > MyExample initialize.
> > >
> > > Or browse the method and highlight the body and evaluate it (Do it).
> > >
> > > > On 25 Oct 2015, at 20:00, Justine STIENNE 
> wrote:
> > > >
> > > > Oh sorry it was not for this conversation. I tried to do what you
> said, but it doesn't work again.
> > > >
> > > > Justine
> > > >
> > > > 2015-10-25 19:55 GMT+01:00 Justine STIENNE <
> justine.stie...@gmail.com>:
> > > > The installation is ok ! :-) But i cant open the file bak that you
> give me :-/
> > > >
> > > > 2015-10-25 18:53 GMT+01:00 Sven Van Caekenberghe :
> > > > Hi,
> > > >
> > > > > On 25 Oct 2015, at 18:46, Justine STIENNE <
> justine.stie...@gmail.com> wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > > I have a problem to connect Seaside and Pharo. I explain :
> > > > >
> > > > > ZnZincServerAdaptor is running. When I open localhost:8080, it
> works. When I want to configure a new entry, I can't find the class that I
> made on Pharo. I have put the method canBeRoot with true as return value on
> a class but I can't find it. Can you help me ?
> > > > >
> > > > > Thanks in advance,
> > > > > Justine
> > > >
> > > > #canBeRoot is just an indication, it has no real effect on its own.
> > > >
> > > > Traditionally, WAComponent subclasses register themselves explicitly
> using #initialize on the class side, like this:
> > > >
> > > > initialize
> > > >   WAAdmin register: self asApplicationAt: self handlerName
> > > >
> > > > Look for the senders of #register:asApplicationAt: to see what I
> mean.
> > > >
> > > > Sven
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
> > 
>
>
>


Re: [Pharo-users] Pharo family update

2015-10-26 Thread Hernán Morales Durand
2015-10-26 11:08 GMT-03:00 Ben Coman :

> Thanks Adam.  This is a great initiative. I really like the
> internal/external distinction.
>
> A few questions...
>
> Why is "Compilers" outside the circle?
>
> What is the "VB" part of "VB-Regex" ?
>
>
Vassili Bykov was the original author of Regex11 and later it was renamed.


> and a few suggestions...
>
> > About categories I would group in different way but it's personal
> choice. Like...
> > Reflection
>
> It would be nice to emphasise our reflective capability, but what
> would be some subparts?
>
>
Reflection is commonly decomposed in two parts: Introspection and
intercession.


> > Code Analysis
>
> This could just be "Analysis" and include Moose and SciSmalltalk.
>
> > Persistency
>
> Maybe "Connectors" could be renamed to "Persistence".
>
>
Yes, besides that would avoid confusion with the Connectors package.


> It would be good to promote in-Image persistence solutions since that
> is a speed advantage for prototyping.  btw, Is SimplePersistance
> stable enough to be included?
> http://smalltalkhub.com/#!/~TorstenBergmann/SimplePersistence
>
>
I don't know about SimplePersistence but in-image persistence is a cool
feature that other technologies lack.



> I don't think Magma and SandstoneDb provide services to other clients
> (??) and so don't seem related to "Server" and would group better with
> "Connectors/Persistence". That does then leave "Server" a bit bare.
> Perhaps "RemoteFrameBuffer" would be a good fit.
>
>
> "Output" is a bit too much like "Export".  Perhaps it could be renamed
> "Presentation"
>
> The legend could be moved to a corner (bottom left?), and "Pharo"
> could be moved more centrally to its place.  In another shaded corner
> you might list the major repositories:
> * smalltalkhub.com
> * ss3.gemtalksystems.com
> * squeaksource.com
> Anyone with further ideas for the other two corners?
>
> I'm not sure that "Define" is the right tag for "Magritte".  I think
> its an implementation of the "Momento" pattern, so maybe that would be
> better (or maybe that is too exotic?).  Would it be reasonable to tag
> it s "Forms" (??)
>
>
That would require multi-class multi-label classification, because Magritte
(and other packages) cover many areas.


> "Fuel" would seem to go better near STON/JSON on "Import/Export".
>
> As well as "SUnit" as a framework, "Testing" should have "TestRunner"
> and a tool.
>
>
Agree, the TestRunner is important.



> "Searching > Spotter" would go well up next to "Finder"
>
> "Monticello" should go closer to "Metacello" and is perhaps a good fit
> to move it down to "Working", and also Versioneer is closely related
> to "Metacello"."Metacello" and "CatalogBrowser" would do well to
> be tagged together as "Deployment"
>
> I like that you've got "Computations" with SciSmalltalk and
> BioSmalltalk, but actually it might be good to repurpose this
> "Downstream Distributions".  I think such a section demostrates a
> level of maturity of a system, which is important to show.  This might
> then also include Moose, Phratch, Dr.Geo and PharoROS(?).  Chalten and
> Aconcagua might be re-homed under "Data."
>
>
Yes, I suspect it could be solved with multi-class multi-label tags.



> "Spec" and "Athens" are internal to Pharo.
>
>
I don't see why internal?
Does that mean it wouldn''t be ported to other ST flavors?



> whoops. thats a lot. Some parts I'm not sure on - wait and see what
> others think.
> cheers -ben
>
>
Really nice diagram, but it needs more promoting outside the Smalltalk
circle.

Hernán






>
> On Sat, Oct 24, 2015 at 7:30 PM, Ferlicot D. Cyril
>  wrote:
> > Le 24/10/2015 09:27, stepharo a écrit :
> >> Superb! Really nice
> >> Margritte -> Magritte
> >> Mondorian -> Mondrian
> >>
> >> to add
> >>
> >> Never heard about PharoLink but you should have Garage (a database
> >> generic API)
> >>
> >> You could add MongoTalk close to Voyage
> >>
> >> GLORP
> >> Relational
> >> Mapper
> >>
> >> Woden 3D
> >> Roassal3D
> >>
> >> Omnibrowser is deprecated
> >>
> >> I would put STON close to Fuel
> >> May be you should move closer the two spots: import/export and data
> >>
> >> Tide is not developed anymore so I would remove it
> >> Add Reef instead (Javascript-enabled Web components)
> >>
> >> About Graphics
> >>
> >> you should have
> >> Athens (Vector graphics API)
> >> Bloc (new generation Morphic)
> >> Brick (new generation widgets)
> >>
> >>
> >
> > Hi,
> >
> > I do not agree to add Reef, Bloc and Brick now if this map is for
> beginners.
> > If this map is for beginners that need a framework we should wait to
> > have a usable version with documentation.
> > I think Bloc and Brick are not finish yet (I think) and reef lack
> > documentation/tutorial.
> >
> > If a beginner see it on the map and test it he will have  a bad first
> > impression. And first impression count.
> >
> > This project should be on a waiting list the time there are stable and
> > documented I think. But t

Re: [Pharo-users] Pharo family update

2015-10-26 Thread Ben Coman
Thanks Adam.  This is a great initiative. I really like the
internal/external distinction.

A few questions...

Why is "Compilers" outside the circle?

What is the "VB" part of "VB-Regex" ?

and a few suggestions...

> About categories I would group in different way but it's personal choice. 
> Like...
> Reflection

It would be nice to emphasise our reflective capability, but what
would be some subparts?

> Code Analysis

This could just be "Analysis" and include Moose and SciSmalltalk.

> Persistency

Maybe "Connectors" could be renamed to "Persistence".

It would be good to promote in-Image persistence solutions since that
is a speed advantage for prototyping.  btw, Is SimplePersistance
stable enough to be included?
http://smalltalkhub.com/#!/~TorstenBergmann/SimplePersistence

I don't think Magma and SandstoneDb provide services to other clients
(??) and so don't seem related to "Server" and would group better with
"Connectors/Persistence". That does then leave "Server" a bit bare.
Perhaps "RemoteFrameBuffer" would be a good fit.


"Output" is a bit too much like "Export".  Perhaps it could be renamed
"Presentation"

The legend could be moved to a corner (bottom left?), and "Pharo"
could be moved more centrally to its place.  In another shaded corner
you might list the major repositories:
* smalltalkhub.com
* ss3.gemtalksystems.com
* squeaksource.com
Anyone with further ideas for the other two corners?

I'm not sure that "Define" is the right tag for "Magritte".  I think
its an implementation of the "Momento" pattern, so maybe that would be
better (or maybe that is too exotic?).  Would it be reasonable to tag
it s "Forms" (??)

"Fuel" would seem to go better near STON/JSON on "Import/Export".

As well as "SUnit" as a framework, "Testing" should have "TestRunner"
and a tool.

"Searching > Spotter" would go well up next to "Finder"

"Monticello" should go closer to "Metacello" and is perhaps a good fit
to move it down to "Working", and also Versioneer is closely related
to "Metacello"."Metacello" and "CatalogBrowser" would do well to
be tagged together as "Deployment"

I like that you've got "Computations" with SciSmalltalk and
BioSmalltalk, but actually it might be good to repurpose this
"Downstream Distributions".  I think such a section demostrates a
level of maturity of a system, which is important to show.  This might
then also include Moose, Phratch, Dr.Geo and PharoROS(?).  Chalten and
Aconcagua might be re-homed under "Data."

"Spec" and "Athens" are internal to Pharo.

whoops. thats a lot. Some parts I'm not sure on - wait and see what
others think.
cheers -ben


On Sat, Oct 24, 2015 at 7:30 PM, Ferlicot D. Cyril
 wrote:
> Le 24/10/2015 09:27, stepharo a écrit :
>> Superb! Really nice
>> Margritte -> Magritte
>> Mondorian -> Mondrian
>>
>> to add
>>
>> Never heard about PharoLink but you should have Garage (a database
>> generic API)
>>
>> You could add MongoTalk close to Voyage
>>
>> GLORP
>> Relational
>> Mapper
>>
>> Woden 3D
>> Roassal3D
>>
>> Omnibrowser is deprecated
>>
>> I would put STON close to Fuel
>> May be you should move closer the two spots: import/export and data
>>
>> Tide is not developed anymore so I would remove it
>> Add Reef instead (Javascript-enabled Web components)
>>
>> About Graphics
>>
>> you should have
>> Athens (Vector graphics API)
>> Bloc (new generation Morphic)
>> Brick (new generation widgets)
>>
>>
>
> Hi,
>
> I do not agree to add Reef, Bloc and Brick now if this map is for beginners.
> If this map is for beginners that need a framework we should wait to
> have a usable version with documentation.
> I think Bloc and Brick are not finish yet (I think) and reef lack
> documentation/tutorial.
>
> If a beginner see it on the map and test it he will have  a bad first
> impression. And first impression count.
>
> This project should be on a waiting list the time there are stable and
> documented I think. But this is just my opinion.
>
> --
> Cyril Ferlicot
>
> http://www.synectique.eu
>
> 165 Avenue Bretagne
> Lille 59000 France
>



Re: [Pharo-users] VM crash on Ubuntu 14.04

2015-10-26 Thread Johan Fabry
Hi Nicolai,

thanks for following up on this.

I am in the process of determining what causes the crash. I fear that to 
reproduce the problem you will need to have ROS installed, I have not yet been 
able to reproduce it without ROS running. I do not want to inflict the 
installation of ROS on you without being 100% sure.

I am using Roassal because this is for Live Robot Programming 
(http://pleiad.cl/LRP ) which uses a dynamic 
visualization of the running code. To reproduce the bug (until now) I need to 
develop code in LRP when using ROS, and then it happens randomly. I realize 
that this is too much to ask for an outsider to reproduce the bug (I did not 
expect anybody to download and install PhaROS to try to reproduce, thanks for 
that!!).

Can you inform me how I can get you more useful debug info to you? I will keep 
trying to find minimal steps to reproduce in the mean time.

> On Oct 24, 2015, at 19:45, Nicolai Hess  wrote:
> 
> Can you provide the image file. 
> What exactly runs in the image (does it depend on ROS or
> does it crash even without it). For what do you
> use Roassal in this environment.
> Can you reproduce the crash with a clean image (and maybe loading
> some package - without all of the ROS-stuff?
> (I just followed the installation guide for PhaROS, but I have no idea
> how to go from here to do anything to reproduce the crash).
> 
> 
> 
> 2015-10-24 21:32 GMT+02:00 Johan Fabry  >:
> 
> Ben, thanks for replying but since no VM guys are following up on this, 
> apparently, it does not make much sense for me to go this way.
> 
> Guys, am I to assume there is not help for me on this topic?
> 
> > On Oct 23, 2015, at 11:03, Ben Coman  wrote:
> >
> > On Thu, Oct 22, 2015 at 2:25 AM, Johan Fabry  > > wrote:
> >> Hi all,
> >>
> >> I am having some unpleasant experiences on Ubuntu 14.04 (experimenting 
> >> with Live Robot Programming on PhaROS). The VM crashes after a random 
> >> amount of time (< 25 minutes), with no clear sequence of steps on how to 
> >> reproduce the crash. I am using Pharo 4 (Pharo 40622 as installed by 
> >> PhaROS) + Roassal which required an install of libcairo2:i386 . VM version 
> >> details below.
> >>
> >> There is no printout on stdout, and the debug.log does not contain recent 
> >> entries (timestamp is always some minutes before the actual crash happens).
> >>
> >> Is this a known problem? If so, how can I fix it, and if not how can I 
> >> provide more debugging info?
> >>
> >> Thanks in advance!
> >
> > I'm not much help since I haven't done these myself, but just some
> > ideas (maybe someone can add more details)
> > * compile and run a debug vm
> > * trace all function calls, http://tinyurl.com/gdb-trace-all 
> > 
> >
> 
> 
> 
> ---> Save our in-boxes! http://emailcharter.org  
> <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry 
> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
> Chile
> 
> 
> 



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
Chile



Re: [Pharo-users] VM crash on Ubuntu 14.04

2015-10-26 Thread Johan Fabry
Hi Robert, 

thanks for the hints. Unfortunately running in Pharo 5 is not feasible. PhaROS 
does not do any low-level calls as far as I am aware (I did not implement it, 
I’m just using it).

I will try to run it in gdb as soon as I can find a reliable way to reproduce 
the crash.

> On Oct 24, 2015, at 16:52, Robert Withers  wrote:
> 
> Posting to Pharos-dev or Vm Dev may find you more assistance.
> 
> My suggestions would be: a) upgrade to Pharo 5 and b) run in gdb so we all 
> can be better informed about the issue you are seeing. Is PhaROS doing low 
> level calls?
> 
> ---
> robert
> 
>> On Oct 24, 2015, at 3:32 PM, Johan Fabry  wrote:
>> 
>> 
>> Ben, thanks for replying but since no VM guys are following up on this, 
>> apparently, it does not make much sense for me to go this way.
>> 
>> Guys, am I to assume there is not help for me on this topic?
>> 
>>> On Oct 23, 2015, at 11:03, Ben Coman  wrote:
>>> 
>>> On Thu, Oct 22, 2015 at 2:25 AM, Johan Fabry  wrote:
 Hi all,
 
 I am having some unpleasant experiences on Ubuntu 14.04 (experimenting 
 with Live Robot Programming on PhaROS). The VM crashes after a random 
 amount of time (< 25 minutes), with no clear sequence of steps on how to 
 reproduce the crash. I am using Pharo 4 (Pharo 40622 as installed by 
 PhaROS) + Roassal which required an install of libcairo2:i386 . VM version 
 details below.
 
 There is no printout on stdout, and the debug.log does not contain recent 
 entries (timestamp is always some minutes before the actual crash happens).
 
 Is this a known problem? If so, how can I fix it, and if not how can I 
 provide more debugging info?
 
 Thanks in advance!
>>> 
>>> I'm not much help since I haven't done these myself, but just some
>>> ideas (maybe someone can add more details)
>>> * compile and run a debug vm
>>> * trace all function calls, http://tinyurl.com/gdb-trace-all
>> 
>> 
>> 
>> ---> Save our in-boxes! http://emailcharter.org <---
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
>> Chile
>> 
>> 
> 
> 



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
Chile




Re: [Pharo-users] How to store an image file as a method source

2015-10-26 Thread Dimitris Chloupis
thanks Peter it  works like a charm :) I will your tools , very useful.

On Mon, Oct 26, 2015 at 1:30 PM Peter Uhnák  wrote:

> I use IconFactory (which I wrote for this purpose) (
> http://smalltalkhub.com/#!/~peteruhnak/IconFactory or Catalog Browser ),
> it works in the same way as Pharo icons (base64 representation of the image
> which is then converted to a Form object).
>
> Catalog browser offers also ExternalIconFamily but I have no knowledge of
> that. But I remember that someone was working on referencing external
> files, so maybe this is it.
>
> Peter
>
> On Mon, Oct 26, 2015 at 11:28 AM, Dimitris Chloupis  > wrote:
>
>> So how you guys covert image files to strings to be stored as method
>> sources ?
>>
>> I want to make a custom GUI that will contain a lot of images and I am a
>> bit on a dilema whether I should put the images as method source as we do
>> already with pharo icons OR just link to external files and find how I can
>> download those files from Pharo.
>>
>> No idea whats the best course of action . Any suggestions ?
>>
>>
>


Re: [Pharo-users] Is GitFileTree broken on Pharo 5 ?

2015-10-26 Thread Dimitris Chloupis
I have a slight suspicion that my macos may have done something weird, all
this happened as soon as I installed the new command line XCODE tools
update. I will give the debug a try when I get home and be back to you.
>From the time being I reverted back to using just filetree and it works ok,
at least git is not complaining.

On Mon, Oct 26, 2015 at 2:54 PM Thierry Goubier 
wrote:

> Le 26/10/2015 09:58, Dimitris Chloupis a écrit :
> > tried with another repo, same issue, looks like I will be reverting back
> > to filetree, not a big problem
>
> Strange. I tried from a fresh Pharo5 rebuild, and I have no error
> whatsoever.
>
> Could you do a bit of debug on the error? It looks like the code is not
> finding the '* master' in the git branch output.
>
> Thierry
>
> >
> > On Mon, Oct 26, 2015 at 1:09 AM Dimitris Chloupis  > > wrote:
> >
> > the output is
> >
> > * master
> >
> > nothing confidential all i did was create a new repo in github and
> > just git clone it to my hard disk as I have done with all my other
> > gitfiletree projects.
> >
> > On Sun, Oct 25, 2015 at 11:29 PM Thierry Goubier
> > mailto:thierry.goub...@gmail.com>>
> wrote:
> >
> > Le 25/10/2015 22:04, Dimitris Chloupis a écrit :
> >  > because I just downloaded a fresh pharo 5 image and installed
> >  > gitfiletree from catalog browser and i try to add a newly
> > initialised
> >  > git repo and i am getting this
> >
> > Well, normally no since I'm using it on Pharo5. But I may have
> > missed
> > the last round of updates (haven't rebuilt since two or three
> > days ago).
> >
> > Can you give me the output of
> >
> > $ git branch
> >
> > in your repository, if there is nothing confidential? The error
> > indicates that GitFileTree doesn't find a current/active branch.
> >
> > Thierry
> >
> >
> >  > Array(Object)>>errorSubscriptBounds: Array(Object)>>at:
> >  > MCFileTreeGitRepository>>currentBranch
> > MCFileTreeGitRepository>>branch
> >  > MCFileTreeGitRepository>>description [ :ea | ea description ]
> in
> >  > MCWorkingCopyBrowser>>repositoryList in Block: [ :ea | ea
> > description ]
> >  > Array(SequenceableCollection)>>collect:
> >  > MCWorkingCopyBrowser>>repositoryList
> > PluggableIconListMorph>>getList
> >  > PluggableIconListMorph(PluggableListMorph)>>getListSize
> >  > LazyMorphListMorph(LazyListMorph)>>getListSize
> >  > LazyMorphListMorph>>listChanged
> >  > PluggableIconListMorph(PluggableListMorph)>>updateList
> >  > PluggableIconListMorph(PluggableListMorph)>>update: [
> > :aDependent |
> >  > aDependent update: aParameter ] in
> >  > MCWorkingCopyBrowser(Object)>>changed: in Block: [
> :aDependent |
> >  > aDependent update: aParameter ] DependentsArray>>do:
> >  > MCWorkingCopyBrowser(Object)>>changed:
> >  > MCWorkingCopyBrowser>>repositoryListChanged
> >  > MCWorkingCopyBrowser>>editRepository
> >  > MCWorkingCopyBrowser(Object)>>perform:orSendTo: [ |
> > selArgCount | "show
> >  > cursor in case item opens a new MVC window" (selArgCount :=
> > selector
> >  > numArgs) = 0 ifTrue: [ target perform: selector ] ifFalse: [
> > selArgCount
> >  > = arguments size ifTrue: [ target perform: selector
> > withArguments:
> >  > arguments ] ifFalse: [ target perform: selector withArguments:
> >  > (arguments copyWith: evt) ] ]. self changed ] in
> >  > ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in
> > Block: [ |
> >  > selArgCount |... BlockClosure>>ensure:
> >  > CursorWithMask(Cursor)>>showWhile:
> >  > ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
> >  > ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
> >  > ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
> >  > MouseButtonEvent>>sentTo:
> > ToggleMenuItemMorph(Morph)>>handleEvent:
> >  > MorphicEventDispatcher>>dispatchDefault:with:
> >  > MorphicEventDispatcher>>handleMouseUp:
> >
> >
>
>
>


Re: [Pharo-users] [ANN] Mathex 0.3 is out! How hard would it be to give the possibility to use it with Pillar?

2015-10-26 Thread Damien Cassou

Julien Delplanque  writes:

> On 22/10/15 17:56, Damien Cassou wrote:
>> Julien Delplanque  writes:
>>
>>> I wonder how hard it would be to give the possibility to write Mathex
>>> directly inside Pillar? Mathex provide pdf/png generation under Linux,
>>> so it is possible to create images for non-LaTeX Pillar's exportation.
>>
>> what about
>>
>> ${mathex:value=2 asMathex sqrt}$
> Looks good but does the right part supports multi lines?

the right part ends with '}$'. If there are line breaks before, so be
it :-).

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Re: [Pharo-users] Is GitFileTree broken on Pharo 5 ?

2015-10-26 Thread Thierry Goubier

Le 26/10/2015 09:58, Dimitris Chloupis a écrit :

tried with another repo, same issue, looks like I will be reverting back
to filetree, not a big problem


Strange. I tried from a fresh Pharo5 rebuild, and I have no error 
whatsoever.


Could you do a bit of debug on the error? It looks like the code is not 
finding the '* master' in the git branch output.


Thierry



On Mon, Oct 26, 2015 at 1:09 AM Dimitris Chloupis mailto:kilon.al...@gmail.com>> wrote:

the output is

* master

nothing confidential all i did was create a new repo in github and
just git clone it to my hard disk as I have done with all my other
gitfiletree projects.

On Sun, Oct 25, 2015 at 11:29 PM Thierry Goubier
mailto:thierry.goub...@gmail.com>> wrote:

Le 25/10/2015 22:04, Dimitris Chloupis a écrit :
 > because I just downloaded a fresh pharo 5 image and installed
 > gitfiletree from catalog browser and i try to add a newly
initialised
 > git repo and i am getting this

Well, normally no since I'm using it on Pharo5. But I may have
missed
the last round of updates (haven't rebuilt since two or three
days ago).

Can you give me the output of

$ git branch

in your repository, if there is nothing confidential? The error
indicates that GitFileTree doesn't find a current/active branch.

Thierry


 > Array(Object)>>errorSubscriptBounds: Array(Object)>>at:
 > MCFileTreeGitRepository>>currentBranch
MCFileTreeGitRepository>>branch
 > MCFileTreeGitRepository>>description [ :ea | ea description ] in
 > MCWorkingCopyBrowser>>repositoryList in Block: [ :ea | ea
description ]
 > Array(SequenceableCollection)>>collect:
 > MCWorkingCopyBrowser>>repositoryList
PluggableIconListMorph>>getList
 > PluggableIconListMorph(PluggableListMorph)>>getListSize
 > LazyMorphListMorph(LazyListMorph)>>getListSize
 > LazyMorphListMorph>>listChanged
 > PluggableIconListMorph(PluggableListMorph)>>updateList
 > PluggableIconListMorph(PluggableListMorph)>>update: [
:aDependent |
 > aDependent update: aParameter ] in
 > MCWorkingCopyBrowser(Object)>>changed: in Block: [ :aDependent |
 > aDependent update: aParameter ] DependentsArray>>do:
 > MCWorkingCopyBrowser(Object)>>changed:
 > MCWorkingCopyBrowser>>repositoryListChanged
 > MCWorkingCopyBrowser>>editRepository
 > MCWorkingCopyBrowser(Object)>>perform:orSendTo: [ |
selArgCount | "show
 > cursor in case item opens a new MVC window" (selArgCount :=
selector
 > numArgs) = 0 ifTrue: [ target perform: selector ] ifFalse: [
selArgCount
 > = arguments size ifTrue: [ target perform: selector
withArguments:
 > arguments ] ifFalse: [ target perform: selector withArguments:
 > (arguments copyWith: evt) ] ]. self changed ] in
 > ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in
Block: [ |
 > selArgCount |... BlockClosure>>ensure:
 > CursorWithMask(Cursor)>>showWhile:
 > ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
 > ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
 > ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
 > MouseButtonEvent>>sentTo:
ToggleMenuItemMorph(Morph)>>handleEvent:
 > MorphicEventDispatcher>>dispatchDefault:with:
 > MorphicEventDispatcher>>handleMouseUp:







Re: [Pharo-users] How to programatically select an item in a Spec TreeModel ?

2015-10-26 Thread Edouard KLEIN
> FT is FastTable. This is a project begun by Esteban to replace the old
slow list on Pharo.
> Pharo 5 uses FastTable now.

Thanks for the details. Should I update to Pharo5 tu use FT ?

As for my progress in debugging things. I see that the roots and the
children behave differently (although they are created equal by my
nodeFromTreeStructure: method), for instance, root nodes are not
inspectable, when I try to see them in an inspector I get :
MessageNotUnderstood SpecTreeNodeModel>>gtInspectorMorphIn.

Children nodes can be seen in the inspector without a hitch.

Also, root nodes know their widget (a MorphicTreeNodeAdapter) whereas the
children return nil.

Any help, even just a reference at someplace to look, would be appreciated.

On Mon, 26 Oct 2015 at 11:49 Ferlicot D. Cyril 
wrote:

> Le 26/10/2015 10:38, Edouard KLEIN a écrit :
> > What is FT ?
> >
>
> FT is FastTable. This is a project begun by Esteban to replace the old
> slow list on Pharo.
> Pharo 5 uses FastTable now.
>
> > I did some debugging. When I send the selected:#true message to a root
> > node, it goes down to the Morphic classes, and everything is fine, when
> > I send it to a child node, the dependents array of the TreeNodeModel is
> > nil, so nobody gets the message. I don't know enough about Spec yet to
> > understand what dependents are and why there are none on a child node.
> >
> > Because I really need to get this done quickly, I will try to write a
> > quick and dirty fix in a subclass that will directly talk to the morphic
> > objects underneath.
> >
> > Now, with some guidance from you guys, I would be really happy to take
> > some time and write some useful code that could solve this problem
> > correctly, and have it commited for anyone to use. But first, in order
> > to justify to my employer that coding with Pharo was a good choice, I
> > need to make my application work.
> >
> > I'll update here as I go.
> >
> >
>
> --
>
> Cyril Ferlicot
>
> http://www.synectique.eu
>
> 165 Avenue Bretagne
> Lille 59000 France
>
>


Re: [Pharo-users] fast subclassing/class creation in tests

2015-10-26 Thread Peter Uhnák
Thanks Nicolai, the suspension seems to have quite a significant
performance impact.

Out of curiosity I did some benchmarking. Although the numbers seems to
vary a lot based on something (the size of the image jumped from 25 to 40MB
after I was done... and there seems to be some correlation with the
performance). Repeatedly running a benchmark seems also detrimental as the
performance can drop by over 30%... so probably it would be best to run
each benchmark in a completely new image...
However the fact that the performance decreases over time is problematic,
because that means that running the test suite will get worse over time.

I find it also peculiar to see that unlogged anonymous classes are faster
when the announcer is NOT suspended.

And while for classes the improvement was ~40x, for methods it was over
200x faster... so I guess the best way is to modify performTest behavior to
something like

~~
MyTestClass>>performTest
SystemAnnouncer uniqueInstance suspendAllWhile: [ super performTest ]
~~


Benchmarks (I've removed decimal parts and thousand separators because they
are always confusing me):

Class creation with announcer:

~~
[ |cls|
cls := Object subclass: #Something.
cls removeFromSystem.
] bench. "'9 per second'"

[ |cls|
cls := Object subclass: #Something.
cls removeFromSystemUnlogged.
] bench. "'173 per second'"

[ |cls|
cls := Object newAnonymousSubclass.
cls removeFromSystem.
] bench. "'4 per second'"

[ |cls|
cls := Object newAnonymousSubclass.
cls removeFromSystemUnlogged.
] bench. "'512 per second'"
~~

Class creation without announcer:

~~
[ SystemAnnouncer uniqueInstance suspendAllWhile: [ |cls|
cls := Object subclass: #Something.
cls removeFromSystem.
] ] bench. "'371 per second'"

[ SystemAnnouncer uniqueInstance suspendAllWhile: [ |cls|
cls := Object subclass: #Something.
cls removeFromSystemUnlogged.
] ] bench. "'351 per second'"

[ SystemAnnouncer uniqueInstance suspendAllWhile: [ |cls|
cls := Object newAnonymousSubclass.
cls removeFromSystem.
] ] bench. "'368 per second'"

[ SystemAnnouncer uniqueInstance suspendAllWhile: [ |cls|
cls := Object newAnonymousSubclass.
cls removeFromSystemUnlogged.
] ] bench. "'430 per second'"
~~

Methods with announcer:

~~
cls := Object subclass: #Something.
[
cls compile: 'method ^ 1'.
] bench. "'9 per second'"

anon := Object newAnonymousSubclass.
[
anon compile: 'method ^ 1'.
] bench. "'9 per second'"
~~

Methods without announcer
~~
cls := Object subclass: #Something.
[ SystemAnnouncer uniqueInstance suspendAllWhile: [
cls compile: 'method ^ 1'.
] ] bench. "'1814 per second'"

anon := Object newAnonymousSubclass.
[ SystemAnnouncer uniqueInstance suspendAllWhile: [
anon compile: 'method ^ 1'.
] ] bench. "'2063 per second'"
~~

Peter

On Sun, Oct 25, 2015 at 12:29 AM, Robert Withers  wrote:

> Extend Pharo byte codes to support Newspeak namespaces. #justsayin
>
> ---
> robert
>
> On Oct 24, 2015, at 6:22 PM, Nicolai Hess  wrote:
>
> You can wrap the subclassing and the \removeFromSystem with
> SystemAnnouncer uniqueInstance  suspendAllWhile: [ ]
>
> 2015-10-24 20:43 GMT+02:00 Peter Uhnák :
>
>> Hi,
>>
>> is it possible to do fast, non-system wide class subclassing in tests?
>>
>> Currently I would do something like
>>
>> ~
>> MyTest>>testSomething
>> cls := SomeParent subclass: #Something.
>> "... do some tests ..."
>> cls removeFromSystem
>> ~
>>
>> This is for example what ClassTest is doing.
>>
>> However this is very slow, and even for small tests suite --- just ten
>> (so far) test methods it takes over ten seconds to test it all, which is
>> quite bad for TDD.
>>
>> My guess is that since it has to write to class to the environment and
>> disk and then remove it it takes a while:
>>
>> ~
>> [ Object subclass: #Something ] timeToRun. "0:00:00:00.021"
>> [ #Something asClass removeFromSystem ] timeToRun. "0:00:00:00.526"
>> ~
>>
>> is it possible to speed it up? Create classes that are fast to remove?
>>
>> Thanks,
>> Peter
>>
>
>


Re: [Pharo-users] How to store an image file as a method source

2015-10-26 Thread Peter Uhnák
I use IconFactory (which I wrote for this purpose) (
http://smalltalkhub.com/#!/~peteruhnak/IconFactory or Catalog Browser ), it
works in the same way as Pharo icons (base64 representation of the image
which is then converted to a Form object).

Catalog browser offers also ExternalIconFamily but I have no knowledge of
that. But I remember that someone was working on referencing external
files, so maybe this is it.

Peter

On Mon, Oct 26, 2015 at 11:28 AM, Dimitris Chloupis 
wrote:

> So how you guys covert image files to strings to be stored as method
> sources ?
>
> I want to make a custom GUI that will contain a lot of images and I am a
> bit on a dilema whether I should put the images as method source as we do
> already with pharo icons OR just link to external files and find how I can
> download those files from Pharo.
>
> No idea whats the best course of action . Any suggestions ?
>
>


Re: [Pharo-users] How to programatically select an item in a Spec TreeModel ?

2015-10-26 Thread Ferlicot D. Cyril
Le 26/10/2015 10:38, Edouard KLEIN a écrit :
> What is FT ?
> 

FT is FastTable. This is a project begun by Esteban to replace the old
slow list on Pharo.
Pharo 5 uses FastTable now.

> I did some debugging. When I send the selected:#true message to a root
> node, it goes down to the Morphic classes, and everything is fine, when
> I send it to a child node, the dependents array of the TreeNodeModel is
> nil, so nobody gets the message. I don't know enough about Spec yet to
> understand what dependents are and why there are none on a child node.
> 
> Because I really need to get this done quickly, I will try to write a
> quick and dirty fix in a subclass that will directly talk to the morphic
> objects underneath.
> 
> Now, with some guidance from you guys, I would be really happy to take
> some time and write some useful code that could solve this problem
> correctly, and have it commited for anyone to use. But first, in order
> to justify to my employer that coding with Pharo was a good choice, I
> need to make my application work.
> 
> I'll update here as I go.
> 
> 

-- 

Cyril Ferlicot

http://www.synectique.eu

165 Avenue Bretagne
Lille 59000 France



signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] How to programatically select an item in a Spec TreeModel ?

2015-10-26 Thread Edouard KLEIN
What is FT ?

I did some debugging. When I send the selected:#true message to a root
node, it goes down to the Morphic classes, and everything is fine, when I
send it to a child node, the dependents array of the TreeNodeModel is nil,
so nobody gets the message. I don't know enough about Spec yet to
understand what dependents are and why there are none on a child node.

Because I really need to get this done quickly, I will try to write a quick
and dirty fix in a subclass that will directly talk to the morphic objects
underneath.

Now, with some guidance from you guys, I would be really happy to take some
time and write some useful code that could solve this problem correctly,
and have it commited for anyone to use. But first, in order to justify to
my employer that coding with Pharo was a good choice, I need to make my
application work.

I'll update here as I go.

On Sun, 25 Oct 2015 at 09:10 Thierry Goubier 
wrote:

> Le 24/10/2015 13:20, Ferlicot D. Cyril a écrit :
> > Le 24/10/2015 08:11, Peter Uhnák a écrit :
> >>  Waiting for the FT-based rewrite is the thing to do.
> >>
> >>
> >> If by waiting you mean doing FT-based rewrite, then sure. :)
> >>
> >> Unless Cyril is going to do the rewrite himself.
> >>
> >> P
> >>
> > Hi,
> >
> > Create a FTTree should be my next work :)
> > I already begun a FTTree with one sublevel but this is only a first
> > shot. I think it's possible to do cleaner and faster.
>
> With the FT core code, I'm having success mapping the tree to an array
> (i.e. providing an #at: anIndex) for the tree. But then, need to
> optimise #at: (or the FT code iterating over the tree with #at:).
>
> Note that the widget should not have a knowledge of the tree depth (or
> the depth of an item of the tree). Otherwise the code becomes very
> complex (i.e. PluggableTreeMorph and MorphTreeMorph), for no good reason
> at all.
>
> Enjoy your design ;)
>
> Thierry
>
>


[Pharo-users] How to store an image file as a method source

2015-10-26 Thread Dimitris Chloupis
So how you guys covert image files to strings to be stored as method
sources ?

I want to make a custom GUI that will contain a lot of images and I am a
bit on a dilema whether I should put the images as method source as we do
already with pharo icons OR just link to external files and find how I can
download those files from Pharo.

No idea whats the best course of action . Any suggestions ?


Re: [Pharo-users] Is GitFileTree broken on Pharo 5 ?

2015-10-26 Thread Dimitris Chloupis
tried with another repo, same issue, looks like I will be reverting back to
filetree, not a big problem


On Mon, Oct 26, 2015 at 1:09 AM Dimitris Chloupis 
wrote:

> the output is
>
> * master
>
> nothing confidential all i did was create a new repo in github and just
> git clone it to my hard disk as I have done with all my other gitfiletree
> projects.
>
> On Sun, Oct 25, 2015 at 11:29 PM Thierry Goubier <
> thierry.goub...@gmail.com> wrote:
>
>> Le 25/10/2015 22:04, Dimitris Chloupis a écrit :
>> > because I just downloaded a fresh pharo 5 image and installed
>> > gitfiletree from catalog browser and i try to add a newly initialised
>> > git repo and i am getting this
>>
>> Well, normally no since I'm using it on Pharo5. But I may have missed
>> the last round of updates (haven't rebuilt since two or three days ago).
>>
>> Can you give me the output of
>>
>> $ git branch
>>
>> in your repository, if there is nothing confidential? The error
>> indicates that GitFileTree doesn't find a current/active branch.
>>
>> Thierry
>>
>>
>> > Array(Object)>>errorSubscriptBounds: Array(Object)>>at:
>> > MCFileTreeGitRepository>>currentBranch MCFileTreeGitRepository>>branch
>> > MCFileTreeGitRepository>>description [ :ea | ea description ] in
>> > MCWorkingCopyBrowser>>repositoryList in Block: [ :ea | ea description ]
>> > Array(SequenceableCollection)>>collect:
>> > MCWorkingCopyBrowser>>repositoryList PluggableIconListMorph>>getList
>> > PluggableIconListMorph(PluggableListMorph)>>getListSize
>> > LazyMorphListMorph(LazyListMorph)>>getListSize
>> > LazyMorphListMorph>>listChanged
>> > PluggableIconListMorph(PluggableListMorph)>>updateList
>> > PluggableIconListMorph(PluggableListMorph)>>update: [ :aDependent |
>> > aDependent update: aParameter ] in
>> > MCWorkingCopyBrowser(Object)>>changed: in Block: [ :aDependent |
>> > aDependent update: aParameter ] DependentsArray>>do:
>> > MCWorkingCopyBrowser(Object)>>changed:
>> > MCWorkingCopyBrowser>>repositoryListChanged
>> > MCWorkingCopyBrowser>>editRepository
>> > MCWorkingCopyBrowser(Object)>>perform:orSendTo: [ | selArgCount | "show
>> > cursor in case item opens a new MVC window" (selArgCount := selector
>> > numArgs) = 0 ifTrue: [ target perform: selector ] ifFalse: [ selArgCount
>> > = arguments size ifTrue: [ target perform: selector withArguments:
>> > arguments ] ifFalse: [ target perform: selector withArguments:
>> > (arguments copyWith: evt) ] ]. self changed ] in
>> > ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in Block: [ |
>> > selArgCount |... BlockClosure>>ensure:
>> > CursorWithMask(Cursor)>>showWhile:
>> > ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
>> > ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
>> > ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
>> > MouseButtonEvent>>sentTo: ToggleMenuItemMorph(Morph)>>handleEvent:
>> > MorphicEventDispatcher>>dispatchDefault:with:
>> > MorphicEventDispatcher>>handleMouseUp:
>>
>>
>>


Re: [Pharo-users] TestAsserter>>assertCollection:hasSameElements:

2015-10-26 Thread jtuc...@objektfabrik.de

Hi Peter,

I just realize it is probably best to return to your initial post in 
order to not drift into D) ;-)


Am 24.10.15 um 20:36 schrieb Peter Uhnák:

bump? :)

On Tue, Sep 29, 2015 at 12:57 AM, Peter Uhnák > wrote:


How practical it is to do set-based comparison
in TestAsserter>>assertCollection:hasSameElements: ?

For example #(1 1 2) has same elements as #(1 2) which may make
sense for sets, but not for bags.

The main reason I was using it is that in tests the expected
collection may be created by hand,
which means it is very often an array #(...), { ... }, while
models very often return OrderedCollections (at least in my case).

So my question is --- how to compare collections irrespective of
type, and possibly of order?

A) always convert the actual collection toanArray

I don't think it is a good idea to provide tests fro general Collections 
that first convert it to some specialized Collection class. There may be 
nothing wrong with doing so, but it always depends on what exactly you 
want to test for. If converting to an Array is part of that test, the 
test is specialized and not for Collections in general.
Seems to be an indication that your test is not a general Test on 
Collections...



B) change difference: behavior for non-sets (ton of work with
catastrophic consequences)


You name it ;-)


C) extend TAssertable with new methods like

#assertElementsOf: actualCollection equals: expectedCollection
#assertUnorderedElementsOf: actualCollection equals:
expectedCollection

These names (I know, they are just examples, so I don't pick on them 
specifically) are always open for interpretation.



C.a) directly in Pharo/SUnit


No. For several reasons:
* The whole discussione we're having on this
* SUnit is a framework that is cross-platform. You can never be 
completely sure that a certain method on a Collection class which is not 
in the ANSI standard gives you the same results on another Smalltalk



C.b) in independend SUnit-Extensions repository/project

A much better approach. But then we have a portability problem if things 
like extensions and method overrides come into play. So this requires 
architectural changes in SUnit to enable a plugin mechanism. That, btw, 
would be a great thing!



C.c) just in my project

This should surely be a starting point to stabilize things. If we had 
plugins, it would be easy to publish your stuf as plugin at any time.




D) stop discussing non-problems

If you mean others think you should just shut up and you should just do 
it for yourself, then I think it is not a good option. I am quite sure 
your question shows that there is a problem with SUnit. Be it with 
Collections or any other area. SUnit started as something quick and 
dirty and thus is not perfect for many situations. We should look for 
patterns and solutions. I would definitely disagree if you suggest 
people might think your questions are a non-problem!



Joachim

--
---
Objektfabrik Joachim Tuchel  mailto:jtuc...@objektfabrik.de
Fliederweg 1 http://www.objektfabrik.de
D-71640 Ludwigsburg  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1



Re: [Pharo-users] Problem to connect Seaside and Pharo

2015-10-26 Thread Sven Van Caekenberghe

> On 26 Oct 2015, at 09:09, Justine STIENNE  wrote:
> 
> Of course. Sorry to bother you but I'm a beginner.

OK, no problem.

You are mixing instance and class side. All your methods except 
#renderContentOn: should be on the class side. There should also be no super 
initialise on the class side.

What book/tutorial are you following ?

Standard Pharo books are at http://books.pharo.org

You should make sure that you read and experiment with the first one.

There is also the Seaside book.

The learning curve in the beginning can be quite steep, depending on your 
background, nothing to worry about.

> 2015-10-26 9:01 GMT+01:00 Sven Van Caekenberghe :
> Could you do a File Out of your WAHelloWorld class code and show us ?
> 
> > On 26 Oct 2015, at 08:58, Justine STIENNE  wrote:
> >
> > I have just done it. And now, on 'http://localhost:8080/config/hello' , I 
> > can choose 'a WAHelloWorld', but not 'WAHelloWorld'.
> > When I go to 'http://localhost:8080/hello', I have :
> > MessageNotUnderstood: WAHelloWorld>>new
> >
> > Your request could not be completed. An exception occurred.
> >
> >
> >
> > Thanks in advance,
> >
> > Justine
> >
> >
> >
> > 2015-10-25 20:03 GMT+01:00 Sven Van Caekenberghe :
> > You have to do (Do it) the #initialize as well, like
> >
> > MyExample initialize.
> >
> > Or browse the method and highlight the body and evaluate it (Do it).
> >
> > > On 25 Oct 2015, at 20:00, Justine STIENNE  
> > > wrote:
> > >
> > > Oh sorry it was not for this conversation. I tried to do what you said, 
> > > but it doesn't work again.
> > >
> > > Justine
> > >
> > > 2015-10-25 19:55 GMT+01:00 Justine STIENNE :
> > > The installation is ok ! :-) But i cant open the file bak that you give 
> > > me :-/
> > >
> > > 2015-10-25 18:53 GMT+01:00 Sven Van Caekenberghe :
> > > Hi,
> > >
> > > > On 25 Oct 2015, at 18:46, Justine STIENNE  
> > > > wrote:
> > > >
> > > > Hello,
> > > >
> > > > I have a problem to connect Seaside and Pharo. I explain :
> > > >
> > > > ZnZincServerAdaptor is running. When I open localhost:8080, it works. 
> > > > When I want to configure a new entry, I can't find the class that I 
> > > > made on Pharo. I have put the method canBeRoot with true as return 
> > > > value on a class but I can't find it. Can you help me ?
> > > >
> > > > Thanks in advance,
> > > > Justine
> > >
> > > #canBeRoot is just an indication, it has no real effect on its own.
> > >
> > > Traditionally, WAComponent subclasses register themselves explicitly 
> > > using #initialize on the class side, like this:
> > >
> > > initialize
> > >   WAAdmin register: self asApplicationAt: self handlerName
> > >
> > > Look for the senders of #register:asApplicationAt: to see what I mean.
> > >
> > > Sven
> > >
> > >
> > >
> >
> >
> >
> 
> 
> 
> 




Re: [Pharo-users] Problem to connect Seaside and Pharo

2015-10-26 Thread Justine STIENNE
Of course. Sorry to bother you but I'm a beginner.

2015-10-26 9:01 GMT+01:00 Sven Van Caekenberghe :

> Could you do a File Out of your WAHelloWorld class code and show us ?
>
> > On 26 Oct 2015, at 08:58, Justine STIENNE 
> wrote:
> >
> > I have just done it. And now, on 'http://localhost:8080/config/hello' ,
> I can choose 'a WAHelloWorld', but not 'WAHelloWorld'.
> > When I go to 'http://localhost:8080/hello', I have :
> > MessageNotUnderstood: WAHelloWorld>>new
> >
> > Your request could not be completed. An exception occurred.
> >
> >
> >
> > Thanks in advance,
> >
> > Justine
> >
> >
> >
> > 2015-10-25 20:03 GMT+01:00 Sven Van Caekenberghe :
> > You have to do (Do it) the #initialize as well, like
> >
> > MyExample initialize.
> >
> > Or browse the method and highlight the body and evaluate it (Do it).
> >
> > > On 25 Oct 2015, at 20:00, Justine STIENNE 
> wrote:
> > >
> > > Oh sorry it was not for this conversation. I tried to do what you
> said, but it doesn't work again.
> > >
> > > Justine
> > >
> > > 2015-10-25 19:55 GMT+01:00 Justine STIENNE  >:
> > > The installation is ok ! :-) But i cant open the file bak that you
> give me :-/
> > >
> > > 2015-10-25 18:53 GMT+01:00 Sven Van Caekenberghe :
> > > Hi,
> > >
> > > > On 25 Oct 2015, at 18:46, Justine STIENNE 
> wrote:
> > > >
> > > > Hello,
> > > >
> > > > I have a problem to connect Seaside and Pharo. I explain :
> > > >
> > > > ZnZincServerAdaptor is running. When I open localhost:8080, it
> works. When I want to configure a new entry, I can't find the class that I
> made on Pharo. I have put the method canBeRoot with true as return value on
> a class but I can't find it. Can you help me ?
> > > >
> > > > Thanks in advance,
> > > > Justine
> > >
> > > #canBeRoot is just an indication, it has no real effect on its own.
> > >
> > > Traditionally, WAComponent subclasses register themselves explicitly
> using #initialize on the class side, like this:
> > >
> > > initialize
> > >   WAAdmin register: self asApplicationAt: self handlerName
> > >
> > > Look for the senders of #register:asApplicationAt: to see what I mean.
> > >
> > > Sven
> > >
> > >
> > >
> >
> >
> >
>
>
>


WAHelloWorld.st
Description: Binary data


Re: [Pharo-users] Problem to connect Seaside and Pharo

2015-10-26 Thread Sven Van Caekenberghe
Could you do a File Out of your WAHelloWorld class code and show us ?

> On 26 Oct 2015, at 08:58, Justine STIENNE  wrote:
> 
> I have just done it. And now, on 'http://localhost:8080/config/hello' , I can 
> choose 'a WAHelloWorld', but not 'WAHelloWorld'.
> When I go to 'http://localhost:8080/hello', I have : 
> MessageNotUnderstood: WAHelloWorld>>new
> 
> Your request could not be completed. An exception occurred.
> 
> 
> 
> Thanks in advance,
> 
> Justine
> 
> 
> 
> 2015-10-25 20:03 GMT+01:00 Sven Van Caekenberghe :
> You have to do (Do it) the #initialize as well, like
> 
> MyExample initialize.
> 
> Or browse the method and highlight the body and evaluate it (Do it).
> 
> > On 25 Oct 2015, at 20:00, Justine STIENNE  wrote:
> >
> > Oh sorry it was not for this conversation. I tried to do what you said, but 
> > it doesn't work again.
> >
> > Justine
> >
> > 2015-10-25 19:55 GMT+01:00 Justine STIENNE :
> > The installation is ok ! :-) But i cant open the file bak that you give me 
> > :-/
> >
> > 2015-10-25 18:53 GMT+01:00 Sven Van Caekenberghe :
> > Hi,
> >
> > > On 25 Oct 2015, at 18:46, Justine STIENNE  
> > > wrote:
> > >
> > > Hello,
> > >
> > > I have a problem to connect Seaside and Pharo. I explain :
> > >
> > > ZnZincServerAdaptor is running. When I open localhost:8080, it works. 
> > > When I want to configure a new entry, I can't find the class that I made 
> > > on Pharo. I have put the method canBeRoot with true as return value on a 
> > > class but I can't find it. Can you help me ?
> > >
> > > Thanks in advance,
> > > Justine
> >
> > #canBeRoot is just an indication, it has no real effect on its own.
> >
> > Traditionally, WAComponent subclasses register themselves explicitly using 
> > #initialize on the class side, like this:
> >
> > initialize
> >   WAAdmin register: self asApplicationAt: self handlerName
> >
> > Look for the senders of #register:asApplicationAt: to see what I mean.
> >
> > Sven
> >
> >
> >
> 
> 
> 




Re: [Pharo-users] Problem to connect Seaside and Pharo

2015-10-26 Thread Justine STIENNE
I have just done it. And now, on 'http://localhost:8080/config/hello' , I
can choose 'a WAHelloWorld', but not 'WAHelloWorld'.
When I go to 'http://localhost:8080/hello', I have :
MessageNotUnderstood: WAHelloWorld>>new

Your request could not be completed. An exception occurred.


Thanks in advance,

Justine


2015-10-25 20:03 GMT+01:00 Sven Van Caekenberghe :

> You have to do (Do it) the #initialize as well, like
>
> MyExample initialize.
>
> Or browse the method and highlight the body and evaluate it (Do it).
>
> > On 25 Oct 2015, at 20:00, Justine STIENNE 
> wrote:
> >
> > Oh sorry it was not for this conversation. I tried to do what you said,
> but it doesn't work again.
> >
> > Justine
> >
> > 2015-10-25 19:55 GMT+01:00 Justine STIENNE :
> > The installation is ok ! :-) But i cant open the file bak that you give
> me :-/
> >
> > 2015-10-25 18:53 GMT+01:00 Sven Van Caekenberghe :
> > Hi,
> >
> > > On 25 Oct 2015, at 18:46, Justine STIENNE 
> wrote:
> > >
> > > Hello,
> > >
> > > I have a problem to connect Seaside and Pharo. I explain :
> > >
> > > ZnZincServerAdaptor is running. When I open localhost:8080, it works.
> When I want to configure a new entry, I can't find the class that I made on
> Pharo. I have put the method canBeRoot with true as return value on a class
> but I can't find it. Can you help me ?
> > >
> > > Thanks in advance,
> > > Justine
> >
> > #canBeRoot is just an indication, it has no real effect on its own.
> >
> > Traditionally, WAComponent subclasses register themselves explicitly
> using #initialize on the class side, like this:
> >
> > initialize
> >   WAAdmin register: self asApplicationAt: self handlerName
> >
> > Look for the senders of #register:asApplicationAt: to see what I mean.
> >
> > Sven
> >
> >
> >
>
>
>


Re: [Pharo-users] Pharo family update

2015-10-26 Thread Serge Stinckwich
Great job ! This could be a great poster ;-)

Maybe you have to put Pharo Logo in the middle and enhance the fonts
of different topics in blue circle (Server, Data, etc ...) so the
people can read them more easily.

Regards,

On Mon, Oct 26, 2015 at 1:23 AM, Adam  wrote:
> Hello,
>
> next update. I tried to follow all sugestions - but not all is implemented
> into drawings (maybe because I did not quite understand, or I did not found
> enough information, or something like that).
>
> Pharo is mostly development platform, and image shows mostly libraries and
> frameworks for development, but "Development" circle in the image is more
> about tools primarly targeted to support process of development. So, if Gofer
> and Metacello is not used for this purpose (maybe it is, I'm not sure), it
> should be in "Working" circle.
>
> "Working" circle is mostly about tools and applications for "normal" people.
> Maybe it should be named like: "Desktop"...
>
> "Server" circle is meant to show that Pharo itself can offer services to other
> parties.
>
> Development/Working/Server are some kinde of trinity around it everyhing else
> is rotating. But Pharo is more about Development so other circles are main
> groups of libraries and frameworks.
>
> Adam
>
> Dne Pá 23. října 2015 23:58:48, Adam napsal(a):
>> Hello,
>>
>> I just updated drawing of projects around Pharo.
>>
>> Main idea is to guide people (new users of Pharo) through fields of
>> interests - something they might be looking for. I choose these 10 fields
>> devided into some specific subjects. Somewhere it is too detailed, while
>> elsewhere it is too fuzzy - it is just showing image of Pharo I have in my
>> mind.
>>
>> It should help people to:
>> - identify important classes in Pharo,
>> - select right project,
>> - understand what is application, tool or framework,
>> - see what is allready inside main Pharo image.
>>
>> I would like to add links pointing to part of books or to videos where
>> specific projects are used. And maybe a star symbol for very important or
>> enterprise ready projects.
>>
>> As You can see I left few subjects empty. Maybe someone can help me fill
>> this. But I will be happy for any type of correction - changing fields of
>> interest, subjects, adding/removing projects etc...
>>
>> I prepared textual version on github - but right now it is not coherent with
>> the drawing (I will correct this if needed).
>>
>> Adam.



-- 
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/



Re: [Pharo-users] [Pharo-dev] TestAsserter>>assertCollection:hasSameElements:

2015-10-26 Thread jtuc...@objektfabrik.de

Am 25.10.15 um 16:33 schrieb Peter Uhnák:


> assert:equals:  it's just more typing than #= with no additional outcome


I also disagree, but that may be also because maybe we write tests for 
different purpse.
If you write tests just to test your code, then whatever... I don't do 
that so I can't comment on that.


However if you do TDD, then tests are to provide feedback, and from 
that perspective you want to see immediately what is the difference. 
If I see that the assertion failed I have to start digging to find out 
what is the difference, which is extra work and bad from feedback 
perspective. If I instead immediately see what I need to see it allows 
me to faster deduce the source of the problem and resolve it.


I'm sorry, but what you are saying doesn't make any sense. Even if I 
"only" want to test code (which is exactly what you do in TDD, btw.), I 
need good feedback.
That is, btw., the reason why I suggested an extension to SUnit a few 
years ago that would help keep test results in a collection for use in 
CI environments.


So I agree there is the problem of short and precise ways of giving 
precise and helpful feedback in SUnit. But solving this by adding more 
and more variants of assert: to the framework, just to give nicer error 
strings is like healing a headache by decapitating the patient.


What is needed is some way to make providing feedback easier and 
friendlier, and we should think about ways to achieve that. Adding lots 
of sloppily-defined assertion methods is just the wrong solution.


We could think about subclassing TestFailure and a way to hand 
information to the TestFailure so that a nice String can be produced. 
Like a method like cull: that adds arguments' printString representation 
into the failure description.


And this is actually quite generic idea... imagine that you are 
filling a web form and when you click "submit" the website tells you 
"the form is invalid" and nothing else; that is not helpful at all.
If it instead tells you "The date must be in format MM/DD/" and 
highlights the incriminating field that I immediately can see the 
problem and can fix it quickly.


So the different #assert:whatever: provide context for the assertion 
to be able to get more valuable feedback.
Please step back for a second and think again: these are two very 
different things. The job of an Assertion is to make a problem visible. 
The representation of the problem is something else, even if these are 
closely related. This is object thinking lesson #2 or so.




It is a world of difference.


I agree. Good and exact feedback is at least as important as finding a 
problem. Because knowing there is a problem without understanding the 
problem is not enough. But that does not support the theory of "more 
assertion variants make our life so much easier". It only says we need a 
way to provide good feedback that is short and precise enough to not be 
ignored to our laziness.


But: adding more and more misnamed and misleading assertion methods 
makes the use of SUnit frustrating and will make it obsolete over time. 
If I have to hunt for design problems in SUnit because it assumes 
something to be wrong even though my understanding of waht I tested is 
different, I lose way more time than I am ready to accept. This doesn't 
happen to me often. If finding that I misunderstood an assertion method 
means I lost a few hours, the best thing that may happen is that I never 
use that method again. In the worst case, I decide I think SUnit is 
useless for me. That would be really bad, don't you think?


 > assertCollection:hasSameElements:

> So, let's start by asking what the question really means. Does
it mean that one collection is a subset of the other? What about
ordering then? Does it mean both contain the same elements at the
same position or just the fact that if they both were Sets
contained the exact same elements. The question itself is not
exact, so how could an answer possibly be?


There is no question about this method, since this is implemented in 
code there is nothing ambiguous. This method effectively converts both 
arguments to sets and compares them like that.


Sorry to say that, but this is ambiguity by design: you define 
hasSameElements: as "both result in the same Set". So the name of this 
assertion method is a great example of bad naming, IMO.


The question is whether such thing is useful for non-sets, and there 
are definitely cases where such assertion is not appropriate (when you 
want to ensure that there are specific items or specific positions), 
that's why I suggested asserts specifically for that.
This is just nonsense. You name a method after a general collection 
class and try to tell me that it doesn't matter that it is only suitable 
for Sets and that is okay?



self assert: result asOrderedCollection asSortedCollection equals:
(1 to: 10) asOrderedCollection


This is what I usually do now (although I con