[Pharo-users] DictionaryValueHolder question

2017-09-11 Thread Rob Rothwell
Hello,

Unlike the CollectionValueHolder, the DictionaryValueHolder only notifies
you that something has changed, rather than tell you what item has been
added or removed.  Does anyone know if this is by design, or just
incomplete?

If incomplete, what do you think about using the
ValueAdded/ValueChanged/ValueRemoved announcements and passing the
association in newValue/oldValue?

Thank you,

Rob


[Pharo-users] Accessor Creation in Nautilus Browser

2017-09-11 Thread Rob Rothwell
Hello,

Is there a way to create accessors for more than one instance variable at a
time with the Nautilus browser?

"Class -> Refactoring -> Inst Var Refactoring -> Accessors" shows available
instance variables, but only one can be selected...

Thank you,

Rob


Re: [Pharo-users] Udo, an issue with the stable version - Re: Validate password with PBKDF2

2017-09-11 Thread Udo Schneider

Hi Francis,

I'll check.

CU,

Udo





Re: [Pharo-users] Who is maintaining of Artefact?

2017-09-11 Thread olivier auverlot
Hi Alejandro,

There are no activities in the Artefact project because it does what we
need. Of course, if you want explore the world of Unicode, you can do it.
We are interested :)

Best regards
Olivier


2017-09-11 21:09 GMT+02:00 Cyril Ferlicot D. :

> Le 11/09/2017 à 21:03, Alejandro Infante a écrit :
> > Hi!
> > I would like to explore having support for Unicode characters. I want to
> help for it.
> >
> > Who is the right person to talk about it?
> >
>
> Hi,
>
> Artefact was originally created by Guillaume Larcheveque and Olivier
> Auverlot. But I don't know if they have time to maintain it.
>
> > Cheers!
> > Alejandro
> >
>
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>
> http://www.synectique.eu
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
>
>


Re: [Pharo-users] Who is maintaining of Artefact?

2017-09-11 Thread Cyril Ferlicot D.
Le 11/09/2017 à 21:03, Alejandro Infante a écrit :
> Hi!
> I would like to explore having support for Unicode characters. I want to help 
> for it.
> 
> Who is the right person to talk about it?
> 

Hi,

Artefact was originally created by Guillaume Larcheveque and Olivier
Auverlot. But I don't know if they have time to maintain it.

> Cheers!
> Alejandro
> 


-- 
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France



signature.asc
Description: OpenPGP digital signature


[Pharo-users] Who is maintaining of Artefact?

2017-09-11 Thread Alejandro Infante
Hi!
I would like to explore having support for Unicode characters. I want to help 
for it.

Who is the right person to talk about it?

Cheers!
Alejandro


Re: [Pharo-users] Standalone HTML Model

2017-09-11 Thread Herby Vojčík

Stephane Ducasse wrote:

Hi Pierce Ng

How different is the API from Seaside?
Because I would like to use it.
I like to think modularly :)

Stef


Maybe porting Silk and let it write to some simulated DOM could be 
interesting as well... :-)


https://lolg.it/herby/silk

Herby


On Mon, Sep 11, 2017 at 12:31 PM, Pierce Ng  wrote:

On Fri, Sep 08, 2017 at 03:15:56PM -0700, Sean P. DeNigris wrote:

I'd like to create HTML via a DSL, like Seaside's canvas builder, but without
loading a whole web framework. Any ideas?

I wrote this but subsequently decided that loading the whole of Seaside into my
image just for this functionality is ok and stopped.

   http://smalltalkhub.com/#!/~PierceNg/WaterMint-HTML

Pierce









[Pharo-users] help needed regarding conversion of hex to binary

2017-09-11 Thread Casimiro de Almeida Barreto
Is there a (easy and ready) way to convert hexa to binary. I mean, 
convert data that was transformed


    x := myData asByteArray hex.

back to binary?




Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread stephan

On 11-09-17 19:20, Stephane Ducasse wrote:

Stefan

(Did you publish the configuration in the PlotMorph repo?)
 ifTrue: [ Stefan isPerfect ]


PlotMorph, MetaRepos for Pharo 5 and 6 :)






Re: [Pharo-users] Object>>#name deprecated in Pharo 6 -- what do I need to do?

2017-09-11 Thread Esteban A. Maringolo
2017-09-11 14:44 GMT-03:00 Norbert Hartl :
>> Am 11.09.2017 um 19:05 schrieb H. Hirzel :

>> Now  488 out of 479 tests pass.
> I would call that superb quality 

It's a 10+taxes as we say :)


Esteban A. Maringolo



Re: [Pharo-users] Object>>#name deprecated in Pharo 6 -- what do I need to do?

2017-09-11 Thread Norbert Hartl


> Am 11.09.2017 um 19:05 schrieb H. Hirzel :
> 
> Hello all
> 
> Thank you for the helpful answers.
> 
> What I updated was
> 
>PPCMNode>>#name
>"protocol: accessing"
>name
>"hackity hack, this should not be used except for tests..."
>^ self printString
> 
> 
> This is the root object of the document model [1] generated by the
> PetitMarkDown parser,
> a common markdown parser by Jan Kurs  [2].
> 
> Now  488 out of 479 tests pass.
> 
I would call that superb quality 

Norbert
> Regards
> Hannes
> 
> 
> 
> 
> 
> [1]
> 
> PPCMNode is the base class of the document node hierarchy of a
> document described by markdown
> 
> ProtoObject #()
>Object #()
>PPCMNode #()
>PPCMDelegateNode #(#children)
>PPCMBlockQuote #(#code #infoString)
>PPCMContainer #()
>PPCMDocument #()
>PPCMEmphasize #()
>PPCMFencedCode #(#infoString)
>PPCMHeader #(#level #title)
>PPCMHtmlBlock #()
>PPCMIndentedCode #()
>PPCMLine #()
>PPCMList #(#type #start)
>PPCMListItem #()
>PPCMParagraph #()
>PPCMStrong #()
>PPCMHardBreak #()
>PPCMHrule #(#rule)
>PPCMHtml #(#text)
>PPCMInlinedCode #(#code)
>PPCMLink #(#label #destination #title)
>PPCMLinkRef #(#label)
>PPCMLinkRefDef #(#label #destination #title)
>PPCMLinkRefDefPlaceholder #()
>PPCMPlainLine #(#text)
>PPCMPlainText #(#text)
>PPCMSoftBreak #()
>PPCMText #(#text)
> 
> 
> 
> 
> [2]
> Name: PetitMarkdown-JanKurs.7
> Author: JanKurs
> Time: 24 August 2016, 12:25:40.146088 pm
> UUID: a2256c36-fc35-48ad-936d-9fd7567488e1
> 
> http://smalltalkhub.com/mc/JanKurs/PetitParser/main
> 
> 
>> On 8/26/17, PBKResearch  wrote:
>> Hannes
>> 
>> 
>> 
>> You are certainly not required to eliminate #name altogether; all you have
>> to do is to ensure that any object that receives the message #name knows how
>> to answer its own name in an appropriate way. To rephrase Ben’s second para
>> in a more long-winded way:
>> 
>> 
>> 
>> a.Run the code that generates the deprecation warning.
>> b.In the warning pop-up, click on ‘Debug’.
>> c.Examine the debug stack in the top pane. It is probable that the first
>> two lines will read:
>> 
>> HannesClass(Object)   deprecated:on:in
>> 
>> HannesClass(Object)   name
>> 
>>   where HannesClass is the name of some class in your domain
>> model.
>> 
>> d.You now know that some code you have written is sending the message 
>> #name
>> to an instance of HannesClass, but the class does not have such a method.
>> The solution is to decide how an instance of that class should answer its
>> name, and implement that as a method on the instance side of that class. If
>> nothing else is obvious, the usual default is ^self printString.
>> e.If the top line of the debug stack does not refer to a class in your
>> model, work your way down the stack until you find a class that is yours.
>> 
>> 
>> 
>> Hope this helps
>> 
>> 
>> 
>> Peter Kenny
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
>> Ben Coman
>> Sent: 26 August 2017 13:08
>> To: Any question about pharo is welcome 
>> Subject: Re: [Pharo-users] Object>>#name deprecated in Pharo 6 -- what do I
>> need to do?
>> 
>> 
>> 
>> Just checking my presumption... is  PPCMNode>>#gtTreeViewIn:
>> 
>> you own application method?   So where it sends #name, instead send
>> #printString (or #asString).
>> 
>> 
>> 
>> Alternatively, #name is being sent to some domain object that doesn't
>> implement #name, so it falls back to the super one from Object.  So
>> implement YourDomainObject>>#name: so the one from Object is not executed.
>> 
>> 
>> 
>> cheers -ben
>> 
>> 
>> 
>> 
>> 
>> On Sat, Aug 26, 2017 at 4:38 PM, H. Hirzel >  > wrote:
>> 
>> OK, so #name should not be used at all [1]
>> 
>> The error message I get is
>> 
>> PPCommonMarkSpecTest class>>DoIt (blockVisitor is Undeclared)
>> The method Object>>#name called from PPCMNode>>#gtTreeViewIn: has been
>> deprecated.
>> Implement your own domain representation of an object, or use
>> #asString or #printString instead.
>> 
>> 
>> I wonder how I can fix this without going to much into details.
>> 
>> --Hannes
>> 
>> 
>> 
>> [1] Pharo 6.1 source code:
>> 
>> Object>>name
>>"Answer a name for the receiver.  This is used generically in the
>> title of certain inspectors, such as the referred-to inspector, and
>> 

Re: [Pharo-users] New chapter for coming book: Messages

2017-09-11 Thread Stephane Ducasse
tx for the feedback!


On Mon, Sep 11, 2017 at 1:18 PM, H. Hirzel  wrote:
> Hello Stephane
>
> I like the emphasis of the chapter that implementing same selector
> several times at the proper place in a couple of classes is more
> important than to rely on inheritance.
>
> In particular the conclusion
>
> 
> What is important to realise is that classes are cheap. It is better
> to write 5 little classes than a huge one. Some (even smart) people
> got confused by measuring complexity of a system using number of
> classes. Having many classes representing good abstractions with a
> single responsibility is much much better than having a single class
> exhibiting multiple responsibilities.
> 
>
> Suggestion: put it into a 'Note' box.
>
>
>
>
>
> And replace
>
> 'got confused'
>
> with:
>
>'get confused'
>
>
>
>
>
>
>
> Replace:
>
> Now the choices can be made over multiple tenth of classes.
>
> 'multiple tenth' is an uncommon expression
>
> Suggestion:
>  Now the choices can be made over dozens of classes.
>
>
>
>
>
>
> However
> 'Sending a message is making a choice!'
> takes the view point of the mechanism which does the late binding.
>
> If I write
>
>  aNode emitHTML: aStream
>
> I do not make the choice. There are different types of nodes and they
> all do the same in the sense that they produce HTML code.
>
> In any case to drive the point home more examples are needed.
>
> The Boolean example is the minimal example and as such is interesting.
> But it is a borderline case which just illustrates that Smalltalk goes
> a long way to implement the object and message pattern consistently.
>
> The Pillar example is fine but too terse.
> For people who already understand the issue just a reference is fine.
> But for people new to the concept of replacing a case statement with a
> class hierarchy it is too short.
>
> Elaborate!
>
>
> E.g. have a diagram for a subset of the hierarchy
>
> PRObject #(''properties'')
> PRDocumentItem #(''counter'')
> PRDocumentGroup #(''children'')
> PRDocument #()
> PRHeader #(''level'')
> PRList #()
> PROrderedList #()
> PRUnorderedList #()
> PRParagraph #()
> PRReference #(''reference'' ''parameters'')
> PRFigure #()
> PRSlide #(''title'' ''label'')
> PRText #(''text'')'
>
> And show all the emitHTML: messages.
>
>
> And go for a third example, e.g. from Morphic or Bloc
>
>
> position:
> extent:
> color:
> owner:
> submorphs:
> drawOn: aCanvas
>
>
> Meaning of last sentence is not clear.
>
> 
> Remember that when we execute a method (and also write it), one key
> information we get is that the receiver from this class or one of its
> subclasses as we will later.
> 
>
>
> Regards
>
> Hannes
>
> On 9/11/17, Ricardo Pacheco  wrote:
>> Looks Great, congratulations!! I just read it and has a couple of mistakes
>> in the first figures. The return value of the false (2.3, 2.4).
>>
>> Regards
>> Ricardo
>>
>> El sept. 11, 2017 12:12 AM, "Stephane Ducasse" 
>> escribió:
>>
>> Hi
>>
>> after this crazy esug I took a long bus and I wrote one missing
>> chapter for the forhtcoming bus.
>> I plan to have a first full version for 1 of October :)
>>
>> I reorganised and massively clean the book contents.
>>
>> Comments are welcome in any form.
>>
>> Stef
>>
>> https://github.com/SquareBracketAssociates/LearningOOPWithPharo
>>
>



Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread Stephane Ducasse
Stefan

(Did you publish the configuration in the PlotMorph repo?)
ifTrue: [ Stefan isPerfect ]



On Mon, Sep 11, 2017 at 7:19 PM, Stephane Ducasse
 wrote:
> Thanks Stefan
>
>
> On Mon, Sep 11, 2017 at 2:00 PM, stephan  wrote:
>> Oops
>>
>> On 11-09-17 12:11, stephan wrote:
>>>
>>> Yep, there is the missing information.
>>> So let's fix the version10. We can do it in place, as this can not have
>>> worked. Otherwise we would have had to add a new version, and updated the
>>> #stable.
>>
>>
>> version10: spec
>> 
>>
>> spec
>> for: #pharo do: [
>> spec blessing: #release.
>> spec package: 'PlotMorph' with:
>> 'PlotMorph-StephaneDucasse.7']
>>
>>
>>
>>



Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread Stephane Ducasse
Thanks Stefan


On Mon, Sep 11, 2017 at 2:00 PM, stephan  wrote:
> Oops
>
> On 11-09-17 12:11, stephan wrote:
>>
>> Yep, there is the missing information.
>> So let's fix the version10. We can do it in place, as this can not have
>> worked. Otherwise we would have had to add a new version, and updated the
>> #stable.
>
>
> version10: spec
> 
>
> spec
> for: #pharo do: [
> spec blessing: #release.
> spec package: 'PlotMorph' with:
> 'PlotMorph-StephaneDucasse.7']
>
>
>
>



Re: [Pharo-users] Object>>#name deprecated in Pharo 6 -- what do I need to do?

2017-09-11 Thread H. Hirzel
Hello all

Thank you for the helpful answers.

What I updated was

PPCMNode>>#name
"protocol: accessing"
name
"hackity hack, this should not be used except for tests..."
^ self printString


This is the root object of the document model [1] generated by the
PetitMarkDown parser,
a common markdown parser by Jan Kurs  [2].

Now  488 out of 479 tests pass.

Regards
Hannes





[1]

PPCMNode is the base class of the document node hierarchy of a
document described by markdown

ProtoObject #()
Object #()
PPCMNode #()
PPCMDelegateNode #(#children)
PPCMBlockQuote #(#code #infoString)
PPCMContainer #()
PPCMDocument #()
PPCMEmphasize #()
PPCMFencedCode #(#infoString)
PPCMHeader #(#level #title)
PPCMHtmlBlock #()
PPCMIndentedCode #()
PPCMLine #()
PPCMList #(#type #start)
PPCMListItem #()
PPCMParagraph #()
PPCMStrong #()
PPCMHardBreak #()
PPCMHrule #(#rule)
PPCMHtml #(#text)
PPCMInlinedCode #(#code)
PPCMLink #(#label #destination #title)
PPCMLinkRef #(#label)
PPCMLinkRefDef #(#label #destination #title)
PPCMLinkRefDefPlaceholder #()
PPCMPlainLine #(#text)
PPCMPlainText #(#text)
PPCMSoftBreak #()
PPCMText #(#text)




[2]
Name: PetitMarkdown-JanKurs.7
Author: JanKurs
Time: 24 August 2016, 12:25:40.146088 pm
UUID: a2256c36-fc35-48ad-936d-9fd7567488e1

http://smalltalkhub.com/mc/JanKurs/PetitParser/main


On 8/26/17, PBKResearch  wrote:
> Hannes
>
>
>
> You are certainly not required to eliminate #name altogether; all you have
> to do is to ensure that any object that receives the message #name knows how
> to answer its own name in an appropriate way. To rephrase Ben’s second para
> in a more long-winded way:
>
>
>
> a.Run the code that generates the deprecation warning.
> b.In the warning pop-up, click on ‘Debug’.
> c.Examine the debug stack in the top pane. It is probable that the first
> two lines will read:
>
> HannesClass(Object)   deprecated:on:in
>
> HannesClass(Object)   name
>
>where HannesClass is the name of some class in your domain
> model.
>
> d.You now know that some code you have written is sending the message 
> #name
> to an instance of HannesClass, but the class does not have such a method.
> The solution is to decide how an instance of that class should answer its
> name, and implement that as a method on the instance side of that class. If
> nothing else is obvious, the usual default is ^self printString.
> e.If the top line of the debug stack does not refer to a class in your
> model, work your way down the stack until you find a class that is yours.
>
>
>
> Hope this helps
>
>
>
> Peter Kenny
>
>
>
>
>
>
>
> From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
> Ben Coman
> Sent: 26 August 2017 13:08
> To: Any question about pharo is welcome 
> Subject: Re: [Pharo-users] Object>>#name deprecated in Pharo 6 -- what do I
> need to do?
>
>
>
> Just checking my presumption... is  PPCMNode>>#gtTreeViewIn:
>
> you own application method?   So where it sends #name, instead send
> #printString (or #asString).
>
>
>
> Alternatively, #name is being sent to some domain object that doesn't
> implement #name, so it falls back to the super one from Object.  So
> implement YourDomainObject>>#name: so the one from Object is not executed.
>
>
>
> cheers -ben
>
>
>
>
>
> On Sat, Aug 26, 2017 at 4:38 PM, H. Hirzel   > wrote:
>
> OK, so #name should not be used at all [1]
>
> The error message I get is
>
> PPCommonMarkSpecTest class>>DoIt (blockVisitor is Undeclared)
> The method Object>>#name called from PPCMNode>>#gtTreeViewIn: has been
> deprecated.
> Implement your own domain representation of an object, or use
> #asString or #printString instead.
>
>
> I wonder how I can fix this without going to much into details.
>
> --Hannes
>
>
> 
> [1] Pharo 6.1 source code:
>
> Object>>name
> "Answer a name for the receiver.  This is used generically in the
> title of certain inspectors, such as the referred-to inspector, and
> 

Re: [Pharo-users] Standalone HTML Model

2017-09-11 Thread H. Hirzel
Interestingly the Seaside team has realized this as well

https://github.com/SeasideSt/Seaside/issues/976 

On 9/11/17, Stephane Ducasse  wrote:
> Hi Pierce Ng
>
> How different is the API from Seaside?
> Because I would like to use it.
> I like to think modularly :)
>
> Stef
>
> On Mon, Sep 11, 2017 at 12:31 PM, Pierce Ng  wrote:
>> On Fri, Sep 08, 2017 at 03:15:56PM -0700, Sean P. DeNigris wrote:
>>> I'd like to create HTML via a DSL, like Seaside's canvas builder, but
>>> without
>>> loading a whole web framework. Any ideas?
>>
>> I wrote this but subsequently decided that loading the whole of Seaside
>> into my
>> image just for this functionality is ok and stopped.
>>
>>   http://smalltalkhub.com/#!/~PierceNg/WaterMint-HTML
>>
>> Pierce
>>
>>
>
>



Re: [Pharo-users] Standalone HTML Model

2017-09-11 Thread Stephane Ducasse
Hi Pierce Ng

How different is the API from Seaside?
Because I would like to use it.
I like to think modularly :)

Stef

On Mon, Sep 11, 2017 at 12:31 PM, Pierce Ng  wrote:
> On Fri, Sep 08, 2017 at 03:15:56PM -0700, Sean P. DeNigris wrote:
>> I'd like to create HTML via a DSL, like Seaside's canvas builder, but without
>> loading a whole web framework. Any ideas?
>
> I wrote this but subsequently decided that loading the whole of Seaside into 
> my
> image just for this functionality is ok and stopped.
>
>   http://smalltalkhub.com/#!/~PierceNg/WaterMint-HTML
>
> Pierce
>
>



Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread Mark Bestley
stephan  wrote:

> On 10-09-17 23:04, Mark Bestley wrote:
> > I downloaded 64bit Pharo from
> > 
> > 
> > Started it and first thing opend Catalog Browser.
> > I searched for plot
> > Chose pLotMorph and chose Install Stable Version
> > 
> > I got an Information window saying There was an error trying to install
> > PlotMorph. Installation was cancelled.
> 
> To debug this:
> 
> Instead of installing the stable version, load the configuration.
> 
> Type shift-enter to open Spotter.
> Type Plot and enter to find ConfigurationOfPlotMorph and browse it.
> First take a look at method #stable to see what is defined there
> 

> Yep, there is the missing information.
> So let's fix the version10. We can do it in place, as this can not have
> worked. Otherwise we would have had to add a new version, and updated
> the #stable.
> 
> 
> Name: ConfigurationOfPlotMorph-StephanEggermont.4
> Author: StephanEggermont
> Time: 11 September 2017, 12:09:08.46706 pm
> UUID: d297b6da-4815-0d00-8219-91680d9ac81c
> Ancestors: ConfigurationOfPlotMorph-StephaneDucasse.3
> 
> Fixed version10, added pharo 7
> 

Ok thgat now loads but on loading. I get a large spew of code in the
transcript including several

OCStoreIntoReadOnlyVariableError: Cannot store into

-- 
Mark




Re: [Pharo-users] Let's prepare for Google Code-In 2017 with Pharo Consortium

2017-09-11 Thread Guillermo Polito
Yes this is cool. We need to get a decent set of tasks.

On Sat, Sep 9, 2017 at 5:24 PM, Jigyasa Grover 
wrote:

> Thanks Stef for your support.
>
> I have already added you in the private repository "GCI-2017-with-Pharo",
> as
> we need to keep prospective students away from the task list before the
> program begins 
>
> Looking forward to more ideas on the task list.
>
> Thanks a lot.
>
> Best
> Jigyasa Grover
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


-- 



Guille Polito


Research Engineer

French National Center for Scientific Research - *http://www.cnrs.fr*




*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] Usability issues with Calypso

2017-09-11 Thread Denis Kudriashov
2017-09-08 14:37 GMT+02:00 kmo :

> If Tim had not posted this comment - "I love the fact you can move to a new
> method with unsaved changes and no nag prompt".- I would never have known
> that it was possible to do this. Since I always save my methods before
> moving on I had never experienced this behaviour.
>
> I think this is an another instance of Calypso violating "the law of least
> surprise". Just like the appearance/disappearance of the "new object" tab,
> this behaviour was totally unexpected by me.
>
> I think it is wonderful that you can move on to a new method before you
> save
> the one you are editing - but surely the natural way of achieving this is
> to
> make the tabs work more like tabs ina standard text editor. You should be
> able to have as many methods opened in tabs  - saved or unsaved - as you
> want. Why not have a system where if you CTRL or SHIFT click on a method it
> adds that method to the set of tabs in the editing area?
>
> That's what I would have expected all along. When you see a set of tabs in
> a
> row you assume that you can add to them.
>

Manual tabs are in todo.

How you would avoid auto tabs behaviour? Do you want always manually
open/close tabs?
In that case for example switching from one class to another class will
open six tabs if nobody close old ones.

The current behaviour is trying to be close to single source pane behaviour
of old browsers.



>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] Usability issues with Calypso

2017-09-11 Thread Denis Kudriashov
Hi Tim.

2017-09-06 12:54 GMT+02:00 Tim Mackinnon :

> Hey Denis - I didn't mean to interrupt your ESUG (I should have mentioned
> it was something to follow up on afterwards). Enjoy it and help lots of
> ideas.
>
> Should I raise a bug for the saving issue in fogbugz?
>

Yes, but on github https://github.com/dionisiydk/Calypso/issues.
Now it is not necessary, I will fix it anyway (it is not a hidden bug). But
explicit ticket will allow you to be notified when it will be done. And
that's the nice thing about issue trackers.


>
> I'll have to look at how you add define shortcuts in Calypso as I'm not
> familiar with that bit - so I'm using both browsers at the moment.
>

I will write blog post about it. Now for example look at
SycRenameMessageCommand class>>sourceCodeShortcutActivator and
SycRenameVariableCommand class>>sourceCodeShortcutActivator.


>
> Tim
>
> Sent from my iPhone
>
> On 6 Sep 2017, at 10:45, Denis Kudriashov  wrote:
>
> Hi Tim.
>
> Sorry for late response. During Esug I am a bit out of mails.
>
> About saving method problem it is definitely a bug. Thank's for the report.
>
> About source code refactoring:
> Supporting source code commands was easy to do with suggestions. In fact
> text editor menu is still working old way. That's why some extra source
> code menus of Nautilus is not supported in Calypso.
> But general Idea is to redo all these commands with Commander. So it is
> todo. It is not complex task. And it will be available soon.
> Now it is already possible to define shortcuts for missing source code
> refactorings. So if you need some concrete command we can add it very fast
> using shortcut .
>
>
>
> 2017-09-06 1:14 GMT+02:00 Tim Mackinnon :
>
>> BTW - Is it intended that when you save a method in a Calypso tab, it
>> shifts focus to the first non saved tab? I find this quite confusing as
>> suddenly I'm not where I thought I was and wonder if I saved my method?
>>
>> This said, I love the fact you can move to a new method with unsaved
>> changes and no nag prompt.
>>
>> Tim
>>
>> Sent from my iPhone
>>
>>
>>
>> Sent from my iPhone
>> On 3 Sep 2017, at 22:25, Tim Mackinnon  wrote:
>>
>> Ah - you are right that rename is in there (I’d never noticed it was in
>> the suggestions menu - which I find a confusingly named sub-menu ) - but I
>> am missing the more appropriately named “Source Code Refactoring” menu,
>> which it also appears along with extract method etc. This menu is not in
>> Calypso right?
>>
>> Tim
>>
>> On 3 Sep 2017, at 17:24, Denis Kudriashov  wrote:
>>
>> Hi Tim.
>>
>> No. It is available by cmd+r and from suggestions menu like in Nautilus.
>> But maybe I do not know other place which you use for this
>>
>> 2017-09-03 17:03 GMT+02:00 Tim Mackinnon :
>>
>>> Hi Denis - I just noticed that the source refactoring menu is missing in
>>> Calypso as well? (So you can’t rename a temp for example).
>>>
>>> Tim
>>>
>>> On 2 Sep 2017, at 10:30, Denis Kudriashov  wrote:
>>>
>>> Hi
>>>
>>> 2017-09-01 14:26 GMT+02:00 kmo :
>>>
 I have been keen to use Calypso (I love the way it shows inherited
 methods)
 as my browser but I am finding some usability issues. It may be just me
 but
 some things I find off-putting.

>>>
>>> Any feedback is very important.
>>>
>>>

 I don't really like the way that adding a new class is done by a new tab
 that appears now and then in the editing area. To my mind the Nautilus
 way
 of launching a dialog to create a class seems more natural - and opens
 the
 way in future for a class creation wizard - something that can't be
 done in
 a code window. If we have to do it in a code tab then it would be
 better if
 the tab remained there all the time - I don't like the way it appears
 and
 disappears. It takes a while to learn what to click to do this.

>>>
>>> In fact current behaviour is not replacement of old context menu
>>> command. It is just rethinking of classic single source code pane of old
>>> browsers.
>>> So we will add missing command to context menu. But I think the command
>>> should open the current "New class" tab instead of old dialog request.
>>> Also old browser behaviour is still working. You can create new class
>>> from the class editor tab. Just type new class name in the definition of
>>> selected class.
>>>
>>>

 Also, all class creation presumes a subclass of Object in Calypso. i
 miss
 the ability in Nautilus to select a class and immediately create a
 subclass
 of it.  Am I missing something here? Is there a way?

>>>
>>> You are right. It is missing command like previous one. We will add it.
>>>
>>>

 On the topic of my ignorance - what is a /project /in Calypso? How do
 you
 create one?

>>>
>>> Now it is more like a stub.
>>> There is 

Re: [Pharo-users] Standalone HTML Model

2017-09-11 Thread Esteban A. Maringolo
I don't know how modular it is, but maybe loading only the 'Seaside-Canvas'
package you can use the WAHtmlCanvas to create the HTML content.

I used it together with Mandrill client by creating the mail body with the
result of `WAHtmlCanvas builder render: [ :html | ... ]`.

HTH.

Regards,



Esteban A. Maringolo

2017-09-11 7:31 GMT-03:00 Pierce Ng :

> On Fri, Sep 08, 2017 at 03:15:56PM -0700, Sean P. DeNigris wrote:
> > I'd like to create HTML via a DSL, like Seaside's canvas builder, but
> without
> > loading a whole web framework. Any ideas?
>
> I wrote this but subsequently decided that loading the whole of Seaside
> into my
> image just for this functionality is ok and stopped.
>
>   http://smalltalkhub.com/#!/~PierceNg/WaterMint-HTML
>
> Pierce
>
>
>


Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread stephan

Oops

On 11-09-17 12:11, stephan wrote:

Yep, there is the missing information.
So let's fix the version10. We can do it in place, as this can not have 
worked. Otherwise we would have had to add a new version, and updated 
the #stable.


version10: spec


spec
for: #pharo do: [
spec blessing: #release.
spec package: 'PlotMorph' with: 
'PlotMorph-StephaneDucasse.7']






Re: [Pharo-users] New chapter for coming book: Messages

2017-09-11 Thread H. Hirzel
Hello Stephane

I like the emphasis of the chapter that implementing same selector
several times at the proper place in a couple of classes is more
important than to rely on inheritance.

In particular the conclusion


What is important to realise is that classes are cheap. It is better
to write 5 little classes than a huge one. Some (even smart) people
got confused by measuring complexity of a system using number of
classes. Having many classes representing good abstractions with a
single responsibility is much much better than having a single class
exhibiting multiple responsibilities.


Suggestion: put it into a 'Note' box.





And replace

'got confused'

with:

   'get confused'







Replace:

Now the choices can be made over multiple tenth of classes.

'multiple tenth' is an uncommon expression

Suggestion:
 Now the choices can be made over dozens of classes.






However
'Sending a message is making a choice!'
takes the view point of the mechanism which does the late binding.

If I write

 aNode emitHTML: aStream

I do not make the choice. There are different types of nodes and they
all do the same in the sense that they produce HTML code.

In any case to drive the point home more examples are needed.

The Boolean example is the minimal example and as such is interesting.
But it is a borderline case which just illustrates that Smalltalk goes
a long way to implement the object and message pattern consistently.

The Pillar example is fine but too terse.
For people who already understand the issue just a reference is fine.
But for people new to the concept of replacing a case statement with a
class hierarchy it is too short.

Elaborate!


E.g. have a diagram for a subset of the hierarchy

PRObject #(''properties'')
PRDocumentItem #(''counter'')
PRDocumentGroup #(''children'')
PRDocument #()
PRHeader #(''level'')
PRList #()
PROrderedList #()
PRUnorderedList #()
PRParagraph #()
PRReference #(''reference'' ''parameters'')
PRFigure #()
PRSlide #(''title'' ''label'')
PRText #(''text'')'

And show all the emitHTML: messages.


And go for a third example, e.g. from Morphic or Bloc


position:
extent:
color:
owner:
submorphs:
drawOn: aCanvas


Meaning of last sentence is not clear.


Remember that when we execute a method (and also write it), one key
information we get is that the receiver from this class or one of its
subclasses as we will later.



Regards

Hannes

On 9/11/17, Ricardo Pacheco  wrote:
> Looks Great, congratulations!! I just read it and has a couple of mistakes
> in the first figures. The return value of the false (2.3, 2.4).
>
> Regards
> Ricardo
>
> El sept. 11, 2017 12:12 AM, "Stephane Ducasse" 
> escribió:
>
> Hi
>
> after this crazy esug I took a long bus and I wrote one missing
> chapter for the forhtcoming bus.
> I plan to have a first full version for 1 of October :)
>
> I reorganised and massively clean the book contents.
>
> Comments are welcome in any form.
>
> Stef
>
> https://github.com/SquareBracketAssociates/LearningOOPWithPharo
>



Re: [Pharo-users] Standalone HTML Model

2017-09-11 Thread Pierce Ng
On Fri, Sep 08, 2017 at 03:15:56PM -0700, Sean P. DeNigris wrote:
> I'd like to create HTML via a DSL, like Seaside's canvas builder, but without
> loading a whole web framework. Any ideas?

I wrote this but subsequently decided that loading the whole of Seaside into my
image just for this functionality is ok and stopped.

  http://smalltalkhub.com/#!/~PierceNg/WaterMint-HTML

Pierce




Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread stephan

AxesMorph>drawGridOn: aCanvas
| gridColor right bottom width height lighter darker baseColor |
baseColor := self baseColor.
lighter := baseColor twiceLighter.
darker := baseColor twiceDarker.
gridColor := (lighter diff: baseColor)
> (darker diff: baseColor) ifTrue: [lighter] 
ifFalse: [darker].
right := self bounds width - margin.
width := self bounds width - (margin * 2).
bottom := self bounds height - margin.
height := self bounds height - (margin * 2).
(margin to: right by: width / 10) do:
[:x |
x := x rounded.
aCanvas
line: x @ margin
to: x @ bottom
color: gridColor].
(margin to: bottom by: height / 10) do:
[:y |
y := y rounded.
aCanvas
line: margin @ y
to: right @ y
color: gridColor]

the assignment to the block parameter

x := x rounded is in red in Pharo 7.

Is that not (/no longer) allowed?


Name: PlotMorph-StephanEggermont.8
Author: StephanEggermont
Time: 11 September 2017, 12:27:45.971839 pm
UUID: f65d521d-4915-0d00-821a-53ce0d9ac81c
Ancestors: PlotMorph-StephaneDucasse.7

Added  pragmas to PlotMorph. Opened examples in a window. 
Replaced #deprecatedExplanation: by #deprecated:

Fixed PlotPoint constructor

Name: ConfigurationOfPlotMorph-StephanEggermont.5
Author: StephanEggermont
Time: 11 September 2017, 12:29:19.779132 pm
UUID: adbfe922-4915-0d00-821b-1f5a0d9ac81c
Ancestors: ConfigurationOfPlotMorph-StephanEggermont.4

New version for Pharo 6 and 7







Re: [Pharo-users] [Pharo-dev] Can Realm (DB) and Pharo play together (or can we have a Pharo Realm Object Server to ROS) ?

2017-09-11 Thread Cédrick Béler

> ​Can you move such discussions on pharo-users mailing-list and not pharo-dev ?

Sorry for that ! 
I transfered...
> 
> I’ve spent some time in the summer in what I call my quest to the ultimate 
> and easy and fun architecture to prototype some personal administration apps 
> and have fun :-)
> I’ll share some experience and wonder if there are alternative in Pharo.
> 
> I want app that are mobile firsts, then manageable with a computer (for more 
> complex administrative tasks).
> I want them reactive (I especially like reactive data driven application like 
> meteor.js), ubiquitous around my devices and not always connected 
> (offline-first - this is very important if not the first objective).
> 
> Ok, so I was lurking around looking for server and mobile distributed 
> databases and I finally found Realm 
> (https://realm.io/products/realm-mobile-platform/ 
> ) which is a cool 
> architecture plenty of promises, well documented, lots of tutorials... The 
> architecture is composed of 2 products: 
> - Realm DB [1] that runs on mobile device - multiplatform - fully open-source 
> - performant - an object DB with some limitation though
> - Realm Object Server (ROS) [2] - provide two-way data sync simple and easy - 
> BUT proprietary even if free for developers … the entry point for serious 
> developments (in particular access programmatically to the server) is very 
> expensive ! 1500$mo !
> 
> The developer edition with is free is already quite outstanding to me. Looks 
> at this demo page on GitHub [3] ! 
> 
> But… without any control to the ROS, I find ROS quite limited finally. I may 
> then use the DB part, ROS free for what really need sync reactivity between 
> devices or between group of people (like a black board), but store all less 
> transient information to WhateverNoSQLDB probably in REST.  
> 
> Anyway I want to share that with you because it rings a smalltalk bell in my 
> head… it’s about object data, live feeling, and I want to use Pharo on the 
> server :) 
> 
> Maybe some people here have thought of an alternative ROS in Pharo or 
> Gemstone ? Any ideas or remarks ?
> I was aware of sebastian Flow living full-stack framework attempt but don’t 
> know more.
> 
> TIA
> Cédrick
> 
> NB: Pharo looks more and more great ! Congratulations guys for you job ! I 
> hope ESUG was nice. 
> I’ve just tried Telepharo on Pharo 6 (64 bit). Really great work too... It 
> works like a charm, out of the box on low cost dedicated ubuntu servers [4] 
> => 10€mo
> Pharo 64 tinyBenchmarks is 2,75 times slower than on my Mac mini Core i5 
> 2,5GHz from 2012 with SSD (I guess it’s not that bad and usable for personal 
> applications servers). I think it’ about 3 times faster than on a raspberry 
> Pi.
> Mac mini (32 bit version):  '1329870129 bytecodes/sec; 108576799 sends/sec’
> Dedibox Low Cost server (64 bit version)’  '595695171 bytecodes/sec;   
> 39441333 sends/sec'
> 
> NB2: to download/install Pharo from command line, on the web site 
> instructions, it seems it lacks the trailing slash. I had to add it.
> curl get.pharo.org/64 / | bash
> 
> [1] https://realm.io/products/realm-mobile-database/ 
>  
> [2] https://realm.io/products/realm-mobile-platform/ 
>  
> [3] https://github.com/realm-demos  
> [4] https://www.online.net/fr/serveur-dedie/dedibox-sc 
>  
> 
>  
> 
> 
> 
> -- 
> Serge Stinckwich
> UCN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/ 


Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread stephan

On 10-09-17 23:04, Mark Bestley wrote:

I downloaded 64bit Pharo from


Started it and first thing opend Catalog Browser.
I searched for plot
Chose pLotMorph and chose Install Stable Version

I got an Information window saying There was an error trying to install
PlotMorph. Installation was cancelled.


To debug this:

Instead of installing the stable version, load the configuration.

Type shift-enter to open Spotter.
Type Plot and enter to find ConfigurationOfPlotMorph and browse it.
First take a look at method #stable to see what is defined there

stable: spec


spec for: #'pharo3.x' version: '1.0'.
spec for: #'pharo5.x' version: '1.0'.
spec for: #'pharo6.x' version: '1.0'.

That looks good, a stable version is defined for Pharo 6.
A stable version is missing for Pharo 7

Take a look at #version10:

version10: spec


spec package: 'PlotMorph' with: 'PlotMorph-StephaneDucasse.7'.

Hmm, that doesn't look good. That is not a complete Metacello spec.
It looks like the reference to the baseline is missing.

baseline10: spec

spec
for: #pharo
do: [
spec blessing: #baseline.
spec description: 'First Full Configuration'.
spec author: 'StephaneDucasse'.
spec timestamp: '29/12/2013 12:29'.
			spec repository: 
'http://www.smalltalkhub.com/PharoExtras/PlotMorph/main'.

spec package: 'PlotMorph' ].

Yep, there is the missing information.
So let's fix the version10. We can do it in place, as this can not have 
worked. Otherwise we would have had to add a new version, and updated 
the #stable.



Name: ConfigurationOfPlotMorph-StephanEggermont.4
Author: StephanEggermont
Time: 11 September 2017, 12:09:08.46706 pm
UUID: d297b6da-4815-0d00-8219-91680d9ac81c
Ancestors: ConfigurationOfPlotMorph-StephaneDucasse.3

Fixed version10, added pharo 7

Stephan





Re: [Pharo-users] New chapter for coming book: Messages

2017-09-11 Thread Ricardo Pacheco
Looks Great, congratulations!! I just read it and has a couple of mistakes
in the first figures. The return value of the false (2.3, 2.4).

Regards
Ricardo

El sept. 11, 2017 12:12 AM, "Stephane Ducasse" 
escribió:

Hi

after this crazy esug I took a long bus and I wrote one missing
chapter for the forhtcoming bus.
I plan to have a first full version for 1 of October :)

I reorganised and massively clean the book contents.

Comments are welcome in any form.

Stef

https://github.com/SquareBracketAssociates/LearningOOPWithPharo


Re: [Pharo-users] PlotMorph on Pharo 6.1

2017-09-11 Thread H. Hirzel
The message after loading on the Transcript is

Loaded -> Magritte-GT-SeanDeNigris.6 ---
http://smalltalkhub.com/mc/Magritte/Magritte3/main/ --- cache
...finished 3.5.1
Fetched -> ConfigurationOfPlotMorph-StephaneDucasse.3 ---
http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main/ ---
http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main/
Loaded -> ConfigurationOfPlotMorph-StephaneDucasse.3 ---
http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main/ ---
http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main/The version
'1.0' is not defined in ConfigurationOfPlotMorph for the current
platform, because an exception occurred while creating the version:.
MessageNotUnderstood: receiver of "package:with:constructor:" is nil.
Evaluate the following to see the error: '[ConfigurationOfPlotMorph
project ]
on: MetacelloErrorInProjectConstructionNotification
do: [:ex | ex resume: true ].'
Possible versions include: #(#bleedingEdge #development #stable '1.0-baseline')

On 9/11/17, Stephane Ducasse  wrote:
> Thanks for the report since I need PlotMorph too for a project.
> What you see is the consequence of lack of validation of published
> packages. This is years that I'm saying that I need someone to work on
> that.
> We got money from inria for Pavel to work on it but the bootstrap was
> more important :).
>
> Stef
>
> On Mon, Sep 11, 2017 at 5:05 AM, H. Hirzel  wrote:
>> Mark,
>>
>> Open a Transcript window before loading PlotMorph.
>> Which error message do you get there?
>>
>> --Hannes
>>
>> On 9/10/17, Mark Bestley  wrote:
>>>
>>> I downloaded 64bit Pharo from
>>> 
>>>
>>> Started it and first thing opend Catalog Browser.
>>> I searched for plot
>>> Chose pLotMorph and chose Install Stable Version
>>>
>>> I got an Information window saying There was an error trying to install
>>> PlotMorph. Installation was cancelled.
>>>
>>> So
>>> 1) Does PlotMorph work as it is in the SystemCatalog I assume so. So how
>>> shoulkd I load it?
>>> 2) How can I see what the error actuially was
>>> 3) How can I actually capure the popup window to cut and paste the
>>> error.
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Mark
>>>
>>>
>>>
>>
>
>



Re: [Pharo-users] #parseMethod:onError: isn't as obvious as expected - is it me?

2017-09-11 Thread Marcus Denker

> On 11 Sep 2017, at 02:30, Tim Mackinnon  wrote:
> 
> Hey Marcus - I've kept noodling on this as a little sub interesting thing I 
> can play with in spare moments.
> 
> I think I'm getting close to an interesting solution using #parseFaulty 
> (although I wasn't sure how to distinguish between a method and playground 
> without asking the editor for its edittingMode - which maybe is ok?)
> 
> I've had to add a new visitor to run through parseErrorNodes (I'm surprised 
> there isn't a visitor for this already) (I also added one for comments too) - 
> as #findBestNode doesn't try hard enough - and I've also had a crack at 
> reparsing an error if it seems simple enough (like when you are working on 
> statement in the middle of code and have just broken that one line).
> 
Great!

> I'll try it for a few days and then maybe you might be interested in having a 
> look?
> 

Yes! 


> Tim
> 
> Sent from my iPhone
> 
> On 9 Sep 2017, at 12:53, Tim Mackinnon  > wrote:
> 
>> Thanks for the pointer Marcus, I'll have a look - it's a fascinating area 
>> that I didn't know much about until now ;)
>> 
>> All I wanted was to not have to select specific code to do senders (& 
>> refactoring), as well as have better statement selection so I can more 
>> easily put brackets around things...
>> 
>> But now it dawns on me I'd like better code completion after I've already 
>> completed but maybe want the fuller keyword method 
>> 
>> Even the refactoring of local method changes shouldn't need you to save your 
>> method to rename a local variable or extract a statement to a variable. And 
>> I hate having to declare local variables painfully one by one - and I miss 
>> the option to detect a simple typo and correct it.
>> 
>> These are all things that I love in IntelliJ - and I think we have fantastic 
>> infrastructure to do these things too. So I'll keep plugging away at lunch 
>> times to see what I can do.
>> 
>> I've rewritten it about 3 times already ;)
>> 
>> Tim
>> 
>> Sent from my iPhone
>> 
>> On 9 Sep 2017, at 08:42, Marcus Denker > > wrote:
>> 
>>> there is #parseFaultyMethod:, too. We use RBParser for syntax highlighting.
>>> 
>>> We do already have “senders” and “implementors working in the AST when 
>>> using Suggestions.
>>> 
>>> See SugsMenuBuilder>>#findBestNodeFor: 
>>> 
>>> in the case of non-accepted code, it uses the compiler chain with 
>>> #optionParseErrors (which uses parseFaultyMethod: to parse).
>>> 
>>> context hasUnacceptedEdits
>>> ifTrue: [ 
>>> root := Smalltalk compiler
>>> source: context code;
>>> options: #(+ optionParseErrors);
>>> parse.
>>> context selectedClass ifNotNil: [ :theClass | root 
>>> methodNode methodClass: theClass ].
>>> root doSemanticAnalysis ]
>>> 
>>> This works well but fails when you actually are in an error node.. for the 
>>> same code the “dumb” way we use
>>> with standard “senders of” just takes line, looks for spaces and feeds that 
>>> word into the “senders of”..
>>> 
>>> So to make this work better we need to combine both approaches and deal 
>>> better with the Error Node content.
>>> (e.g. trying to fix it and re-parse or just use the dumb “get the work 
>>> under the cursor” way as a first step).
>>> 
>>> Marcus
>>> 
 On 8 Sep 2017, at 03:43, Tim Mackinnon > wrote:
 
 Damn you smalltalk… you suck me in to little side problems….
 
 RBParser is actually a lot more flexible than I had realised - and not so 
 difficult to understand for a mere mortal…
 
 It naively seems that (what I still consider a confusingly named method) 
 is quite simple to extend to handle at least medium sized errors just by 
 doing something like:
 
 ast := [RBParser parseMethod: source onError: [ :msg :pos :parser | 
 |seqNode errorNode|

errorNode := RBParseErrorNode
errorMessage: msg value: parser currentToken value 
 printString at: pos. 

seqNode := parser sequenceNodeClass new.
parser 
step; 
parseStatements: true into: seqNode.

seqNode 
addNodeFirst: errorNode;
yourself

]] onDNU: #body: do: [ nil “Handle non method source 
 fragments"].
 
 
 NOTE: I did have to add >>#currentToken as a method to RBParser as it 
 doesn’t expose very much for the onError blocks, which I think it should 
 to make them a bit more useful.
 
 Tim
 
> On 7 Sep 2017, at 14:39, Tim