Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread Nicolas Cellier
2016-11-04 1:54 GMT+01:00 John Brant :

>
> > On Nov 3, 2016, at 4:03 PM, stepharo  wrote:
> >
> >> But how does this fit with a tree structure. For example, should
> “comment5” be associated with the “b” variable node, or the #foo:bar:
> message, or the sequence node that contains the #foo:bar: message, or the
> block or method node that contains the sequence node. You can choose, but
> only the writer of the comment can tell if you are right.
> > How tokens solves this problem?
> > I think that we do not really care one objective is to be able to
> recreate the code from the tree. I worked on a project in C
> > where the guys want to know if the code is well commented and we built
> heuristics to associate the comments to the closest node.
>
> The nodes have comments and the comments have their source and position so
> you can recreate the code from the tree already. It may not be as easy as
> you want, but all the information is there.
>
>
>  Furthermore, if comments are nodes, how do they affect all of the
> code rewriting and validation that is part of the RB and its rewrite tools
> >>> With comments cannot act as nullobjects for such operation?
> >> Yes, someone could spend time making all of this work with the existing
> code. However, why not fix the real problem in that comments and methods
> should not be a single string, but rather objects.
> >
> >Marcus did that during his phd and he blew up memory. So after we got
> a guy that worked on tree compression but he never finished.
> >Because this is the part that makes all these ideas flying or not.
>
> From what I remember, ASTs are roughly 10x the size of the code string.
> I’m not suggesting holding on to them in the image when they can be
> loaded/built from a file like the method sources currently are. Instead, we
> can associate a comment/annotation to a particular node in the AST without
> having to keep the AST around. For example, we could say that some comment
> is associated to the 4th node visited from the standard AST traversal. We
> don’t need to keep the AST around since we can recreate it and the 4th node
> visited will be the same.
>
>
> John Brant
>

But this vision is a bit static. Code is living. Shall these annotations be
lost on next refactoring? Or are we going to diff the two AST and salvage
as many annotations as we can? Or are we going to keep an history of these
comments in the versioning system?


Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread John Brant

> On Nov 3, 2016, at 4:03 PM, stepharo  wrote:
> 
>> But how does this fit with a tree structure. For example, should “comment5” 
>> be associated with the “b” variable node, or the #foo:bar: message, or the 
>> sequence node that contains the #foo:bar: message, or the block or method 
>> node that contains the sequence node. You can choose, but only the writer of 
>> the comment can tell if you are right.
> How tokens solves this problem?
> I think that we do not really care one objective is to be able to recreate 
> the code from the tree. I worked on a project in C
> where the guys want to know if the code is well commented and we built 
> heuristics to associate the comments to the closest node.

The nodes have comments and the comments have their source and position so you 
can recreate the code from the tree already. It may not be as easy as you want, 
but all the information is there. 


 Furthermore, if comments are nodes, how do they affect all of the code 
 rewriting and validation that is part of the RB and its rewrite tools
>>> With comments cannot act as nullobjects for such operation?
>> Yes, someone could spend time making all of this work with the existing 
>> code. However, why not fix the real problem in that comments and methods 
>> should not be a single string, but rather objects.
> 
>Marcus did that during his phd and he blew up memory. So after we got a 
> guy that worked on tree compression but he never finished.
>Because this is the part that makes all these ideas flying or not.

From what I remember, ASTs are roughly 10x the size of the code string. I’m not 
suggesting holding on to them in the image when they can be loaded/built from a 
file like the method sources currently are. Instead, we can associate a 
comment/annotation to a particular node in the AST without having to keep the 
AST around. For example, we could say that some comment is associated to the 
4th node visited from the standard AST traversal. We don’t need to keep the AST 
around since we can recreate it and the 4th node visited will be the same.


John Brant


Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread John Brant

> On Nov 3, 2016, at 1:25 PM, Esteban Lorenzano  wrote:
> 
> 
>> On 3 Nov 2016, at 19:12, Casimiro de Almeida Barreto 
>>  wrote:
>> 
>> BTW, the threaded version requires to be run as super user because it tries 
>> to do a pthread_setschedparam(). I tried to fiddle with   
>> /etc/security/limits.conf... but it's not something fancy to do…
> 
> no, is not hard. 
> you just need to add this file: 
> 
> pharo.conf 
> * hardrtprio  2
> * softrtprio  2
> 
> to: 
> 
> /etc/security/limits.d

Has anyone tried this in a docker container environment? Someone tried to setup 
a docker container with the VM for me, but the VM wouldn’t start. After a few 
attempts, I decided that we could use the non-heartbeat thread VM.


John Brant


Re: [Pharo-dev] pillar highlight text in code

2016-11-03 Thread Nicolai Hess
2016-11-03 23:50 GMT+01:00 Nicolai Hess :

> Can we highlight a piece of code?
> In the updated PBE (Reflection chapter) there is the text:
> "Change the definition of Integer>>>factorial by inserting the underlined
> expression as shown below"
> But I can not see the "underline" in the code example. Is it even possible
> to add such text properties to a "code-style" formatted text ?
>
> BTW, the method name is wrong (in both places)
> Integer>>#factorial
> not
> Integer>>>factorial
>


actually all code examples in that chapter uses
>>>
instead of
>>#


[Pharo-dev] pillar highlight text in code

2016-11-03 Thread Nicolai Hess
Can we highlight a piece of code?
In the updated PBE (Reflection chapter) there is the text:
"Change the definition of Integer>>>factorial by inserting the underlined
expression as shown below"
But I can not see the "underline" in the code example. Is it even possible
to add such text properties to a "code-style" formatted text ?

BTW, the method name is wrong (in both places)
Integer>>#factorial
not
Integer>>>factorial


Re: [Pharo-dev] some little static analysis with great impact

2016-11-03 Thread Yuriy Tymchuk
> On 3 Nov 2016, at 22:05, Nicolas Cellier  
> wrote:
> 
> Can we have rules about indentation?

Yes, we can. I think that even easier heuristic would be to check if a unary is 
separated from the receiver by a line break.

Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Thierry Goubier

Le 03/11/2016 à 22:17, Casimiro de Almeida Barreto a écrit :

Em 03-11-2016 13:53, Thierry Goubier escreveu:

Hi Esteban,

Another question about Pharo 64 bits.

Why are libgit/libSDL/libssh included in the vm? Ubuntu 16.10 provides
them with the same version numbers, more or less.
(libgit2 is so.0.24.0 on ubuntu instead of so.0.24.2 in the pharo vm,
SDL and ssh are the exact same versions).

Collectively, those three libs are ~ 5M.


There are some troubles with ssl in Fedora (didn't test it in Ubuntu).
While loading Woden (for instance) there's a crash (exception) because
ZdcPluginSSLSession fails.


Yes, this is the SSL plugin not being compiled in. Github-based projects 
may still be accessed by using gitfiletree (or a command-line wget + 
filetree).


FFI-support isn't complete yet as well so this would probably make Woden 
non-working for the time being.


Thierry



Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Thierry Goubier

Le 03/11/2016 à 22:16, Eliot Miranda a écrit :

Hi Thierry,

On Thu, Nov 3, 2016 at 1:06 PM, Thierry Goubier
mailto:thierry.goub...@gmail.com>> wrote:

Le 03/11/2016 à 19:25, Esteban Lorenzano a écrit :


On 3 Nov 2016, at 19:12, Casimiro de Almeida Barreto
mailto:casimiro.barr...@gmail.com>
>> wrote:

BTW, the threaded version requires to be run as super user
because it
tries to do a pthread_setschedparam(). I tried to fiddle with
/etc/security/limits.conf... but it's not something fancy to do…


no, is not hard.
you just need to add this file:

pharo.conf
*hardrtprio2
*soft rtprio2

to:

/etc/security/limits.d


And reboot for this to be applied.


To be accurate, one only needs to login again.


I'm too accustomed to a single user laptop :)

But that 64bits version working is really great.

Thierry



Re: [Pharo-dev] About setProperty:toValue: vs. valueOfProperty:

2016-11-03 Thread p...@highoctane.be
Ha, I was busy with these yesterday.

Worse bit is not the morphExtension or otherProperties stuffed into them,
but rather the fact that when one puts a value into #paneColor for example,
themes are not respecting that.

The morphExtension rationale is to have lightweight and heavyweight morphs.

It is not easy to balance what should be put into a method or kept into
those extra places.

Now try to make a SystemWindow use the selected window color in the little
downarrow menu.

You'll get into the morphs creating the sides and having a transparent
fillstyle, and override the paneColor thing.

I am glad to have the dark theme. I am sad to not be able to set colors on
my system windows easily (Yeah, I like the Play-Doh UI).

Maybe subclassing those Morphs making up SystemWindows would be a good idea
so that we can start having a theming for the windows borders and title.

I want put the TilingWindowManager icons in the SystemWindow title bar. So,
I need something more focused than just an aligment morph etc.

So we will be able to plugin a couple interesting features in it.

Phil



On Thu, Nov 3, 2016 at 8:47 PM, stepharo  wrote:

> I would like to be able to compare the **arguments** passed to
>
> setProperty:toValue:
>
> and
>
> the ones of valueOfProperty:, valueOfProperty:ifAbsent:,
> valueOfProperty:ifAbsentPut:,
>
> and
>
> hasProperty:
>
> I quite sure that we will discover more deadcode in morphic.
>
> Any ideas?
>
>
>
> PS: I hope (but I cannot read the code of Bloc because it crashes my vm at
> startup) that Bloc and Brick will not use such patterns.
>
> There are plague and lead to shitty and crappy code.
>
>
> Stef
>
>
>


Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Casimiro de Almeida Barreto
Em 03-11-2016 13:53, Thierry Goubier escreveu:
> Hi Esteban,
>
> Another question about Pharo 64 bits.
>
> Why are libgit/libSDL/libssh included in the vm? Ubuntu 16.10 provides
> them with the same version numbers, more or less.
> (libgit2 is so.0.24.0 on ubuntu instead of so.0.24.2 in the pharo vm,
> SDL and ssh are the exact same versions).
>
> Collectively, those three libs are ~ 5M.

There are some troubles with ssl in Fedora (didn't test it in Ubuntu).
While loading Woden (for instance) there's a crash (exception) because
ZdcPluginSSLSession fails.

>
> Thierry
>
> 2016-10-28 11:56 GMT+02:00 Esteban Lorenzano  >:
>
> VM here: http://bintray.com/estebanlm/pharo-vm/build#files/
> 
> Image here: http://files.pharo.org/get-files/60/pharo-64.zip
> 
>
> this is still not official (that’s why is not in official place)
> so there are a couple of known problems: 
>
> - version format is different, and that breaks some things in
> image that depends on it to know what happens
> - command line is different and probably you’ll need to play a bit
> with options (one or two dashes). 
> - UFFI has some failing tests (but most of it works).
>
> I would appreciate some help to report and/or fix the emerging
> problems. 
>
> cheers, 
> Esteban
>
>> On 28 Oct 2016, at 10:39, Thierry Goubier
>> mailto:thierry.goub...@gmail.com>> wrote:
>>
>> Hi all,
>>
>> anybody knows how to get (and test) the 64bits version of the
>> Pharo vm and image?
>>
>> Thanks,
>>
>> Thierry
>
>


-- 
The information contained in this message is confidential and intended
to the recipients specified in the headers. If you received this message
by error, notify the sender immediately. The unauthorized use,
disclosure, copy or alteration of this message are strictly forbidden
and subjected to civil and criminal sanctions.

==

This email may be signed using PGP key *ID: 0x4134A417*


signature.asc
Description: OpenPGP digital signature


Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Eliot Miranda
Hi Thierry,

On Thu, Nov 3, 2016 at 1:06 PM, Thierry Goubier 
wrote:

> Le 03/11/2016 à 19:25, Esteban Lorenzano a écrit :
>
>>
>> On 3 Nov 2016, at 19:12, Casimiro de Almeida Barreto
>>> mailto:casimiro.barr...@gmail.com>> wrote:
>>>
>>> BTW, the threaded version requires to be run as super user because it
>>> tries to do a pthread_setschedparam(). I tried to fiddle with
>>> /etc/security/limits.conf... but it's not something fancy to do…
>>>
>>
>> no, is not hard.
>> you just need to add this file:
>>
>> pharo.conf
>> *hardrtprio2
>> *soft rtprio2
>>
>> to:
>>
>> /etc/security/limits.d
>>
>
> And reboot for this to be applied.
>

To be accurate, one only needs to login again.


>
> Thierry
>
>
>> Esteban
>>
>>
>>> Best regards,
>>>
>>> Casimiro Barreto
>>>
>>> Em 03-11-2016 13:53, Thierry Goubier escreveu:
>>>
 Hi Esteban,

 Another question about Pharo 64 bits.

 Why are libgit/libSDL/libssh included in the vm? Ubuntu 16.10
 provides them with the same version numbers, more or less.
 (libgit2 is so.0.24.0 on ubuntu instead of so.0.24.2 in the pharo vm,
 SDL and ssh are the exact same versions).

 Collectively, those three libs are ~ 5M.

 Thierry

 2016-10-28 11:56 GMT+02:00 Esteban Lorenzano >>> >:

 VM here: http://bintray.com/estebanlm/pharo-vm/build#files/
 
 Image here: http://files.pharo.org/get-files/60/pharo-64.zip
 

 this is still not official (that’s why is not in official place)
 so there are a couple of known problems:

 - version format is different, and that breaks some things in
 image that depends on it to know what happens
 - command line is different and probably you’ll need to play a
 bit with options (one or two dashes).
 - UFFI has some failing tests (but most of it works).

 I would appreciate some help to report and/or fix the emerging
 problems.

 cheers,
 Esteban

 On 28 Oct 2016, at 10:39, Thierry Goubier
> mailto:thierry.goub...@gmail.com>>
> wrote:
>
> Hi all,
>
> anybody knows how to get (and test) the 64bits version of the
> Pharo vm and image?
>
> Thanks,
>
> Thierry
>



>>>
>>> --
>>> The information contained in this message is confidential and intended
>>> to the recipients specified in the headers. If you received this
>>> message by error, notify the sender immediately. The unauthorized use,
>>> disclosure, copy or alteration of this message are strictly forbidden
>>> and subjected to civil and criminal sanctions.
>>>
>>> ==
>>>
>>> This email may be signed using PGP key *ID: 0x4134A417*
>>>
>>
>>
>
>


-- 
_,,,^..^,,,_
best, Eliot


[Pharo-dev] the kind of code I would like to avoid....

2016-11-03 Thread stepharo
I do not get why a property is useful here and why not just a temp is 
not good enough.


Especially since there are no other users of the property.


displayFiltered: evt
| matchStr matches feedbackMorph |

matchStr := self valueOfProperty: #matchString.
matches := self menuItems select: [:m | | isMatch |
isMatch := matchStr isEmpty or: [
m contents includesSubstring: matchStr caseSensitive: false
].
m isEnabled: isMatch.
isMatch
].
feedbackMorph := self valueOfProperty: #feedbackMorph.
feedbackMorph ifNil: [
feedbackMorph :=
TextMorph new
autoFit: true;
color: Color darkGray.
self
addLine;
addMorphBack: feedbackMorph lock.
self setProperty: #feedbackMorph toValue: feedbackMorph.
self fullBounds.  "Lay out for submorph adjacency"].
feedbackMorph contents: '<', matchStr, '>'.
matchStr isEmpty ifTrue: [
feedbackMorph delete.
self lastSubmorph delete.
self removeProperty: #feedbackMorph
].
" This method is invoked with evt = nil from MenuMorph >> 
removeMatchString. The current implementation can't select an item 
without an event. (Yet :D)"

   (evt notNil and: [ matches size >= 1 ])
ifTrue: [self selectItem: matches first event: evt]




Re: [Pharo-dev] some little static analysis with great impact

2016-11-03 Thread Nicolas Cellier
2016-11-03 21:53 GMT+01:00 Yuriy Tymchuk :

> There is already RBUncommonMessageSendRule which checks for #(#self #super
> #thisContext #true #false #nil). I could also extend it to temps and args.
>
> Uko
>

Hi Uko,
I often write things like
| abs |
abs := self abs.
so I would not like the temp/args rule...

What make it obvious to our eyes is indentation in this case.
>From compiler POV it's just a yet unimplemented message.
Can we have rules about indentation?


>
> > On 3 Nov 2016, at 15:17, stepharo  wrote:
> >
> > Hi
> >
> > I often end up forgetting a period.
> >
> > printOn: aStream
> >super printOn: aStream.
> >aStream nextPutAll: ' "'
> >aStream nextPutAll: contents.
> >aStream nextPutAll: '" '.
> >
> >
> > And statically the system could see it with a simple heuristics:
> >
> >if the message as the same name as self, super, a tmp or an argument
> >
> > May be there is a missing period.
> >
> > Could the compiler get this analysis?
> >
> > Stef
> >
> >
>
>
>


Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread stepharo

But how does this fit with a tree structure. For example, should “comment5” be 
associated with the “b” variable node, or the #foo:bar: message, or the 
sequence node that contains the #foo:bar: message, or the block or method node 
that contains the sequence node. You can choose, but only the writer of the 
comment can tell if you are right.

How tokens solves this problem?
I think that we do not really care one objective is to be able to 
recreate the code from the tree. I worked on a project in C
where the guys want to know if the code is well commented and we built 
heuristics to associate the comments to the closest node.



We do not have a structure that is responsible for that order.
We could have two entries in AST node;
one discrete where you can cherrypick what you want receiver arguments 
selector
and one that represent the node placement.

Now when we emit bytecode comment would do nothing.

How having them as token helps? You will visit the receiver and check if it has 
a token and place it.
I found that strange that comments are not part of the code tree as first class 
citizen.

Tokens are essentially what they are now — although they aren’t in the RBToken 
hierarchy. So far, the only advantages that I’ve heard you mention for nodes 
are visiting nodes and having a parent. The example above shows why neither of 
these are valid — you can’t determine what is the correct parent for the 
comment.

Anyway, I think comments should not be in code, but rather on code. When you 
add a comment, you would select a node or nodes that it applied to. When 
viewing a method, the comment could be displayed inline (like we have now), off 
to the side like reviewer comments in word processors, or a highlight that when 
you move the mouse over would show in a popup.

Yes you are right.


Furthermore, there could be different comment types. For example, one could 
have design comments, todo/review comments, example code comments, bug fix 
comments, etc. The code view could be customized to show each one differently. 
Comments could have pictures and other non-string items.

It would be really nice to have that.
I would put optional type declaration (and they should be optional).
Now for the main comment of a method I would not separate it because 
this is too important.

Having comments as objects outside the method’s source string would allow them 
to be easily searched. For example, someone could search for a certain bug fix. 
Currently, if a bug fix id is in a comment, it requires a full text search of 
all method text. This is slow. Therefore, many companies start adding these bug 
fix ids to the code as symbols so that a senders search will work. I’ve seen 
companies that put symbols like #Fix12345 as statements inside of methods. 
However, this doesn’t work for Smalltalk’s that remove unused literals, so in 
those cases they do something like adding a statement like #Fix12345 == 
#Fix12345 which generally isn’t optimized away.

:)

In addition to comments, I believe that annotations (not primitives) should be 
on code instead of in code like they are now. With a good implementation one 
could unify the concepts of comments and annotations.

Yes this is interesting.
Now the problem with annotations is that you have two kinds;
- the ones that decorate
- the ones that change or define the semantics (for those ones I 
would not separate) them

Furthermore, if comments are nodes, how do they affect all of the code 
rewriting and validation that is part of the RB and its rewrite tools

With comments cannot act as nullobjects for such operation?

Yes, someone could spend time making all of this work with the existing code. 
However, why not fix the real problem in that comments and methods should not 
be a single string, but rather objects.


Marcus did that during his phd and he blew up memory. So after we 
got a guy that worked on tree compression but he never finished.

Because this is the part that makes all these ideas flying or not.

Anyway thanks for the discussion. It lets me think and I learn 
something. I improved the class comment.
Because if it would have been good in the first place I would not even 
ask the question.



John Brant






[Pharo-dev] Keyboard list item navigation in Sender browser is strange

2016-11-03 Thread stepharo

Hi guys

If I click on an item in the message browser. The previous item gets 
deselected and the new one selected.


Now if I use arrows, the previous items is greyed out.

Are you seeing the same?


Stef





Re: [Pharo-dev] some little static analysis with great impact

2016-11-03 Thread Yuriy Tymchuk
There is already RBUncommonMessageSendRule which checks for #(#self #super 
#thisContext #true #false #nil). I could also extend it to temps and args.

Uko

> On 3 Nov 2016, at 15:17, stepharo  wrote:
> 
> Hi
> 
> I often end up forgetting a period.
> 
> printOn: aStream
>super printOn: aStream.
>aStream nextPutAll: ' "'
>aStream nextPutAll: contents.
>aStream nextPutAll: '" '.
> 
> 
> And statically the system could see it with a simple heuristics:
> 
>if the message as the same name as self, super, a tmp or an argument
> 
> May be there is a missing period.
> 
> Could the compiler get this analysis?
> 
> Stef
> 
> 




[Pharo-dev] shoreline, GT, renaku dev please listen

2016-11-03 Thread stepharo

Hi guys

Please read the following

https://pharo.fogbugz.com/f/cases/19288/Sending-translated-should-not-be-the-responsibility-of-the-client-of-a-Setting-description-case


There is no need to do description: 'blo' translated in setting def. 
because it is already done internally (how it should be).


I hope that yuriy will harvest this nice rule.

I browsed the 1099 users of description:/translated and fixed the ones 
that needed to be fixed.


Can you pay attention to merge back in your stream?

Stef




Re: [Pharo-dev] About setProperty:toValue: vs. valueOfProperty:

2016-11-03 Thread Henrik Nergaard
| dct arr |

dct := IdentityDictionary new.

arr := #(
#valueOfProperty: 
#valueOfProperty:ifAbsent: 
#valueOfProperty:ifAbsentPut:
#setProperty:toValue:
#hasProperty:
).

Morph withAllSubclasses do: [ :class | 
class methods do: [ :each |
each ast allChildren 
select: [ :c |  c isMessage and: [ arr includes: c 
selector ] ]
thenDo: [ :c | 
dct 
at: c selector 
ifPresent: [ :col | col add: c ] 
ifAbsentPut: [ OrderedCollection with: 
c ]
]
]
].

dct

--

Best regards,
Henrik

-Original Message-
From: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] On Behalf Of stepharo
Sent: Thursday, November 3, 2016 8:48 PM
To: Pharo Development List 
Subject: [Pharo-dev] About setProperty:toValue: vs. valueOfProperty:

I would like to be able to compare the **arguments** passed to

setProperty:toValue:

and

the ones of valueOfProperty:, valueOfProperty:ifAbsent:, 
valueOfProperty:ifAbsentPut:,

and

hasProperty:

I quite sure that we will discover more deadcode in morphic.

Any ideas?



PS: I hope (but I cannot read the code of Bloc because it crashes my vm at 
startup) that Bloc and Brick will not use such patterns.

There are plague and lead to shitty and crappy code.


Stef




Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Thierry Goubier

Le 03/11/2016 à 19:25, Esteban Lorenzano a écrit :



On 3 Nov 2016, at 19:12, Casimiro de Almeida Barreto
mailto:casimiro.barr...@gmail.com>> wrote:

BTW, the threaded version requires to be run as super user because it
tries to do a pthread_setschedparam(). I tried to fiddle with
/etc/security/limits.conf... but it's not something fancy to do…


no, is not hard.
you just need to add this file:

pharo.conf
*hardrtprio2
*soft rtprio2

to:

/etc/security/limits.d


And reboot for this to be applied.

Thierry



Esteban



Best regards,

Casimiro Barreto

Em 03-11-2016 13:53, Thierry Goubier escreveu:

Hi Esteban,

Another question about Pharo 64 bits.

Why are libgit/libSDL/libssh included in the vm? Ubuntu 16.10
provides them with the same version numbers, more or less.
(libgit2 is so.0.24.0 on ubuntu instead of so.0.24.2 in the pharo vm,
SDL and ssh are the exact same versions).

Collectively, those three libs are ~ 5M.

Thierry

2016-10-28 11:56 GMT+02:00 Esteban Lorenzano mailto:esteba...@gmail.com>>:

VM here: http://bintray.com/estebanlm/pharo-vm/build#files/

Image here: http://files.pharo.org/get-files/60/pharo-64.zip


this is still not official (that’s why is not in official place)
so there are a couple of known problems:

- version format is different, and that breaks some things in
image that depends on it to know what happens
- command line is different and probably you’ll need to play a
bit with options (one or two dashes).
- UFFI has some failing tests (but most of it works).

I would appreciate some help to report and/or fix the emerging
problems.

cheers,
Esteban


On 28 Oct 2016, at 10:39, Thierry Goubier
mailto:thierry.goub...@gmail.com>>
wrote:

Hi all,

anybody knows how to get (and test) the 64bits version of the
Pharo vm and image?

Thanks,

Thierry






--
The information contained in this message is confidential and intended
to the recipients specified in the headers. If you received this
message by error, notify the sender immediately. The unauthorized use,
disclosure, copy or alteration of this message are strictly forbidden
and subjected to civil and criminal sanctions.

==

This email may be signed using PGP key *ID: 0x4134A417*







[Pharo-dev] About setProperty:toValue: vs. valueOfProperty:

2016-11-03 Thread stepharo

I would like to be able to compare the **arguments** passed to

setProperty:toValue:

and

the ones of valueOfProperty:, valueOfProperty:ifAbsent:, 
valueOfProperty:ifAbsentPut:,


and

hasProperty:

I quite sure that we will discover more deadcode in morphic.

Any ideas?



PS: I hope (but I cannot read the code of Bloc because it crashes my vm 
at startup) that Bloc and Brick will not use such patterns.


There are plague and lead to shitty and crappy code.


Stef




Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread John Brant

> On Nov 3, 2016, at 11:46 AM, stepharo  wrote:
> 
> 
>> A comment isn’t code. The nodes are for code. A comment is more like a token 
>> — RBComment basically has the same two instance variables as RBToken. Should 
>> tokens also be nodes? For example, should a left paren token be represented 
>> as a node?
>> 
>> If a comment is a node, how is it visited?
>> For example, if you have (“comment1” self “comment2” foo: “comment3” a bar: 
>> “comment4” b “comment5”), what is the traversal order for the nodes?
> To reproduce the code as it was typed why the representation a message is not 
> a sequence. because you need to encode that you
> have comment1 and self and comment2

But how does this fit with a tree structure. For example, should “comment5” be 
associated with the “b” variable node, or the #foo:bar: message, or the 
sequence node that contains the #foo:bar: message, or the block or method node 
that contains the sequence node. You can choose, but only the writer of the 
comment can tell if you are right.

> We do not have a structure that is responsible for that order.
> We could have two entries in AST node;
>one discrete where you can cherrypick what you want receiver arguments 
> selector
>and one that represent the node placement.
> 
> Now when we emit bytecode comment would do nothing.
> 
> How having them as token helps? You will visit the receiver and check if it 
> has a token and place it.
> I found that strange that comments are not part of the code tree as first 
> class citizen.

Tokens are essentially what they are now — although they aren’t in the RBToken 
hierarchy. So far, the only advantages that I’ve heard you mention for nodes 
are visiting nodes and having a parent. The example above shows why neither of 
these are valid — you can’t determine what is the correct parent for the 
comment.

Anyway, I think comments should not be in code, but rather on code. When you 
add a comment, you would select a node or nodes that it applied to. When 
viewing a method, the comment could be displayed inline (like we have now), off 
to the side like reviewer comments in word processors, or a highlight that when 
you move the mouse over would show in a popup. Furthermore, there could be 
different comment types. For example, one could have design comments, 
todo/review comments, example code comments, bug fix comments, etc. The code 
view could be customized to show each one differently. Comments could have 
pictures and other non-string items.

Having comments as objects outside the method’s source string would allow them 
to be easily searched. For example, someone could search for a certain bug fix. 
Currently, if a bug fix id is in a comment, it requires a full text search of 
all method text. This is slow. Therefore, many companies start adding these bug 
fix ids to the code as symbols so that a senders search will work. I’ve seen 
companies that put symbols like #Fix12345 as statements inside of methods. 
However, this doesn’t work for Smalltalk’s that remove unused literals, so in 
those cases they do something like adding a statement like #Fix12345 == 
#Fix12345 which generally isn’t optimized away. 

In addition to comments, I believe that annotations (not primitives) should be 
on code instead of in code like they are now. With a good implementation one 
could unify the concepts of comments and annotations.

>> Furthermore, if comments are nodes, how do they affect all of the code 
>> rewriting and validation that is part of the RB and its rewrite tools
> With comments cannot act as nullobjects for such operation?

Yes, someone could spend time making all of this work with the existing code. 
However, why not fix the real problem in that comments and methods should not 
be a single string, but rather objects.


John Brant


Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Esteban Lorenzano

> On 3 Nov 2016, at 19:12, Casimiro de Almeida Barreto 
>  wrote:
> 
> BTW, the threaded version requires to be run as super user because it tries 
> to do a pthread_setschedparam(). I tried to fiddle with 
> /etc/security/limits.conf... but it's not something fancy to do…

no, is not hard. 
you just need to add this file: 

pharo.conf 
*   hardrtprio  2
*   softrtprio  2

to: 

/etc/security/limits.d

Esteban

> 
> Best regards,
> 
> Casimiro Barreto
> 
> Em 03-11-2016 13:53, Thierry Goubier escreveu:
>> Hi Esteban,
>> 
>> Another question about Pharo 64 bits.
>> 
>> Why are libgit/libSDL/libssh included in the vm? Ubuntu 16.10 provides them 
>> with the same version numbers, more or less.
>> (libgit2 is so.0.24.0 on ubuntu instead of so.0.24.2 in the pharo vm, SDL 
>> and ssh are the exact same versions).
>> 
>> Collectively, those three libs are ~ 5M.
>> 
>> Thierry
>> 
>> 2016-10-28 11:56 GMT+02:00 Esteban Lorenzano > >:
>> VM here: http://bintray.com/estebanlm/pharo-vm/build#files/ 
>> 
>> Image here: http://files.pharo.org/get-files/60/pharo-64.zip 
>> 
>> 
>> this is still not official (that’s why is not in official place) so there 
>> are a couple of known problems: 
>> 
>> - version format is different, and that breaks some things in image that 
>> depends on it to know what happens
>> - command line is different and probably you’ll need to play a bit with 
>> options (one or two dashes). 
>> - UFFI has some failing tests (but most of it works).
>> 
>> I would appreciate some help to report and/or fix the emerging problems. 
>> 
>> cheers, 
>> Esteban
>> 
>>> On 28 Oct 2016, at 10:39, Thierry Goubier >> > wrote:
>>> 
>>> Hi all,
>>> 
>>> anybody knows how to get (and test) the 64bits version of the Pharo vm and 
>>> image?
>>> 
>>> Thanks,
>>> 
>>> Thierry
>> 
>> 
> 
> 
> -- 
> The information contained in this message is confidential and intended to the 
> recipients specified in the headers. If you received this message by error, 
> notify the sender immediately. The unauthorized use, disclosure, copy or 
> alteration of this message are strictly forbidden and subjected to civil and 
> criminal sanctions.
> 
> ==
> 
> This email may be signed using PGP key ID: 0x4134A417



Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Casimiro de Almeida Barreto
BTW, the threaded version requires to be run as super user because it
tries to do a pthread_setschedparam(). I tried to fiddle with
/etc/security/limits.conf... but it's not something fancy to do...

Best regards,

Casimiro Barreto

Em 03-11-2016 13:53, Thierry Goubier escreveu:
> Hi Esteban,
>
> Another question about Pharo 64 bits.
>
> Why are libgit/libSDL/libssh included in the vm? Ubuntu 16.10 provides
> them with the same version numbers, more or less.
> (libgit2 is so.0.24.0 on ubuntu instead of so.0.24.2 in the pharo vm,
> SDL and ssh are the exact same versions).
>
> Collectively, those three libs are ~ 5M.
>
> Thierry
>
> 2016-10-28 11:56 GMT+02:00 Esteban Lorenzano  >:
>
> VM here: http://bintray.com/estebanlm/pharo-vm/build#files/
> 
> Image here: http://files.pharo.org/get-files/60/pharo-64.zip
> 
>
> this is still not official (that’s why is not in official place)
> so there are a couple of known problems: 
>
> - version format is different, and that breaks some things in
> image that depends on it to know what happens
> - command line is different and probably you’ll need to play a bit
> with options (one or two dashes). 
> - UFFI has some failing tests (but most of it works).
>
> I would appreciate some help to report and/or fix the emerging
> problems. 
>
> cheers, 
> Esteban
>
>> On 28 Oct 2016, at 10:39, Thierry Goubier
>> mailto:thierry.goub...@gmail.com>> wrote:
>>
>> Hi all,
>>
>> anybody knows how to get (and test) the 64bits version of the
>> Pharo vm and image?
>>
>> Thanks,
>>
>> Thierry
>
>


-- 
The information contained in this message is confidential and intended
to the recipients specified in the headers. If you received this message
by error, notify the sender immediately. The unauthorized use,
disclosure, copy or alteration of this message are strictly forbidden
and subjected to civil and criminal sanctions.

==

This email may be signed using PGP key *ID: 0x4134A417*


signature.asc
Description: OpenPGP digital signature


[Pharo-dev] TheManifestBuilder>>#packageNameOf:

2016-11-03 Thread stepharo

Still a name around

https://pharo.fogbugz.com/f/cases/19282/Still-name-used

The method Object>>#name called from TheManifestBuilder>>#packageNameOf: 
has been deprecated.
Implement your own domain representation of an object, or use #asString 
or #printString instead.


Select Proceed to continue, or close this window to cancel the operation.


Stef




Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread stepharo

https://pharo.fogbugz.com/f/cases/19281/We-should-improve-the-class-comment-of-RBComment

If we would have better comments a kind of a dream.

Stef



Re: [Pharo-dev] [Seaside-dev] Build failures

2016-11-03 Thread Sven Van Caekenberghe

> On 3 Nov 2016, at 15:43, Sven Van Caekenberghe  wrote:
> 
>> I decided to shut down the slave for now.
> 
> OK, Thanks.

My builds are started to return to normal, so this seems to be working.



Re: [Pharo-dev] some little static analysis with great impact

2016-11-03 Thread stepharo



Le 3/11/16 à 15:52, Esteban Lorenzano a écrit :

wouldn’t this be better to solve this with QA?

but QA needs the analysis first.



On 3 Nov 2016, at 15:17, stepharo  wrote:

Hi

I often end up forgetting a period.

printOn: aStream
super printOn: aStream.
aStream nextPutAll: ' "'
aStream nextPutAll: contents.
aStream nextPutAll: '" '.


And statically the system could see it with a simple heuristics:

if the message as the same name as self, super, a tmp or an argument

May be there is a missing period.

Could the compiler get this analysis?

Stef










Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread stepharo



A comment isn’t code. The nodes are for code. A comment is more like a token — 
RBComment basically has the same two instance variables as RBToken. Should 
tokens also be nodes? For example, should a left paren token be represented as 
a node?

If a comment is a node, how is it visited?
For example, if you have (“comment1” self “comment2” foo: “comment3” a bar: 
“comment4” b “comment5”), what is the traversal order for the nodes?
To reproduce the code as it was typed why the representation a message 
is not a sequence. because you need to encode that you

have comment1 and self and comment2
We do not have a structure that is responsible for that order.
We could have two entries in AST node;
one discrete where you can cherrypick what you want receiver 
arguments selector

and one that represent the node placement.

Now when we emit bytecode comment would do nothing.

How having them as token helps? You will visit the receiver and check if 
it has a token and place it.
I found that strange that comments are not part of the code tree as 
first class citizen.



Furthermore, if comments are nodes, how do they affect all of the code 
rewriting and validation that is part of the RB and its rewrite tools

With comments cannot act as nullobjects for such operation?

Stef



Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread Nicolai Hess
Am 03.11.2016 17:15 schrieb "John Brant" :
>
> > On Nov 3, 2016, at 9:00 AM, stepharo  wrote:
> >
> > Because like that
> >
> >we have a correct and nice hierarchy and
> >
> >all the nodes inherits from it and
> >
> >we can have a nice visitor and make assumption about the root.
> >
> > Regularity is nice and it helps controlling complexity.
> >
> > Why a comment could not have a parent?
>
> A comment isn’t code. The nodes are for code. A comment is more like a
token — RBComment basically has the same two instance variables as RBToken.
Should tokens also be nodes? For example, should a left paren token be
represented as a node?
>
> If a comment is a node, how is it visited? For example, if you have
(“comment1” self “comment2” foo: “comment3” a bar: “comment4” b
“comment5”), what is the traversal order for the nodes? Furthermore, if
comments are nodes, how do they affect all of the code rewriting and
validation that is part of the RB and its rewrite tools?
>
>
> John Brant

OK,  I think I am conceived.
Otherwise, it may be easier for the AST-based  formatter.


Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread John Brant
> On Nov 3, 2016, at 9:00 AM, stepharo  wrote:
> 
> Because like that
> 
>we have a correct and nice hierarchy and
> 
>all the nodes inherits from it and
> 
>we can have a nice visitor and make assumption about the root.
> 
> Regularity is nice and it helps controlling complexity.
> 
> Why a comment could not have a parent?

A comment isn’t code. The nodes are for code. A comment is more like a token — 
RBComment basically has the same two instance variables as RBToken. Should 
tokens also be nodes? For example, should a left paren token be represented as 
a node? 

If a comment is a node, how is it visited? For example, if you have (“comment1” 
self “comment2” foo: “comment3” a bar: “comment4” b “comment5”), what is the 
traversal order for the nodes? Furthermore, if comments are nodes, how do they 
affect all of the code rewriting and validation that is part of the RB and its 
rewrite tools?


John Brant


Re: [Pharo-dev] Instructions for Pharo 6 64bits

2016-11-03 Thread Thierry Goubier
Hi Esteban,

Another question about Pharo 64 bits.

Why are libgit/libSDL/libssh included in the vm? Ubuntu 16.10 provides them
with the same version numbers, more or less.
(libgit2 is so.0.24.0 on ubuntu instead of so.0.24.2 in the pharo vm, SDL
and ssh are the exact same versions).

Collectively, those three libs are ~ 5M.

Thierry

2016-10-28 11:56 GMT+02:00 Esteban Lorenzano :

> VM here: http://bintray.com/estebanlm/pharo-vm/build#files/
> Image here: http://files.pharo.org/get-files/60/pharo-64.zip
>
> this is still not official (that’s why is not in official place) so there
> are a couple of known problems:
>
> - version format is different, and that breaks some things in image that
> depends on it to know what happens
> - command line is different and probably you’ll need to play a bit with
> options (one or two dashes).
> - UFFI has some failing tests (but most of it works).
>
> I would appreciate some help to report and/or fix the emerging problems.
>
> cheers,
> Esteban
>
> On 28 Oct 2016, at 10:39, Thierry Goubier 
> wrote:
>
> Hi all,
>
> anybody knows how to get (and test) the 64bits version of the Pharo vm and
> image?
>
> Thanks,
>
> Thierry
>
>
>


Re: [Pharo-dev] [Seaside-dev] Build failures

2016-11-03 Thread Marcus Denker

> On 3 Nov 2016, at 15:43, Sven Van Caekenberghe  wrote:
> 
> 
>> On 3 Nov 2016, at 15:37, Marcus Denker  wrote:
>> 
>> Hello,
>> 
>> it seems that a 64bit slave was installed without 32bit support. As 
>> 
>> sudo aptitude install ia32-libs
>> 
>> did not work (no aptitude), and “apt-get” did not know  ia32-libs,
> 
> This is how I normally do it
> 
> https://github.com/svenvc/pharo-server-tools/blob/master/ubuntu-32bit-support-on-64bit.sh
> 

I will check tomorrow on the sprint

Marcus




[Pharo-dev] doing a backend change in pharo.org. It will be down for 1h.

2016-11-03 Thread Esteban Lorenzano
subj



Re: [Pharo-dev] some little static analysis with great impact

2016-11-03 Thread Nicolai Hess
2016-11-03 15:17 GMT+01:00 stepharo :

> Hi
>
> I often end up forgetting a period.
>
> printOn: aStream
> super printOn: aStream.
> aStream nextPutAll: ' "'
> aStream nextPutAll: contents.
> aStream nextPutAll: '" '.
>
>
> And statically the system could see it with a simple heuristics:
>
> if the message as the same name as self, super, a tmp or an argument
>
> May be there is a missing period.
>
> Could the compiler get this analysis?
>
> Stef
>
>
>
The highlighter gives some hints ( as in this example, message
nextPutAll:nextPutAll: isn't known).
And we have the RBUncommonMessageSendRule, but this rule only checks for
messagenames like "self" or "true". It does not check the variables or
argument names.


Re: [Pharo-dev] some little static analysis with great impact

2016-11-03 Thread Esteban Lorenzano
wouldn’t this be better to solve this with QA?

> On 3 Nov 2016, at 15:17, stepharo  wrote:
> 
> Hi
> 
> I often end up forgetting a period.
> 
> printOn: aStream
>super printOn: aStream.
>aStream nextPutAll: ' "'
>aStream nextPutAll: contents.
>aStream nextPutAll: '" '.
> 
> 
> And statically the system could see it with a simple heuristics:
> 
>if the message as the same name as self, super, a tmp or an argument
> 
> May be there is a missing period.
> 
> Could the compiler get this analysis?
> 
> Stef
> 
> 




[Pharo-dev] [pharo-project/pharo-core] e97de9: 60277

2016-11-03 Thread GitHub
  Branch: refs/heads/6.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: e97de983f91dea72a015b86642d072910ee5915d
  
https://github.com/pharo-project/pharo-core/commit/e97de983f91dea72a015b86642d072910ee5915d
  Author: Jenkins Build Server 
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
A AST-Core.package/RBComment.class/instance/printing/printOn_.st
R 
Athens-Morphic.package/extension/Tab/instance/createClosedPolygonPathFrom_on_.st
R Athens-Morphic.package/extension/Tab/instance/createLinesPathFrom_on_.st
R Athens-Morphic.package/extension/Tab/instance/drawOnAthensCanvas_.st
R 
Athens-Morphic.package/extension/TabBar/instance/drawLinesOnAthensCanvas_.st
R 
Athens-Morphic.package/extension/TabBar/instance/drawLinesWithSelection_.st
R 
Athens-Morphic.package/extension/TabBar/instance/drawSubmorphsOnAthensCanvas_.st
A 
Kernel-Tests.package/ProcessTest.class/instance/testing/testTerminationShouldProceedAllEnsureBlocksIfSomeWasFailed.st
A 
Kernel-Tests.package/ProcessTest.class/instance/testing/testTerminationShouldProceedEnsureBlocks.st
M Kernel.package/Process.class/instance/changing process state/terminate.st
A Kernel.package/UnwindError.class/README.md
A Kernel.package/UnwindError.class/definition.st
M Morphic-Examples.package/TabExample.class/instance/tabs 
creation/blueMorphTab.st
M Morphic-Examples.package/TabExample.class/instance/tabs 
creation/freshListTab.st
M Morphic-Examples.package/TabExample.class/instance/tabs 
creation/redMorphTab.st
M Morphic-Examples.package/TabExample.class/instance/tabs 
creation/storedListTab.st
R Morphic-Widgets-Tabs.package/LockableTab.class/README.md
R 
Morphic-Widgets-Tabs.package/LockableTab.class/class/icons-contents/lockedIconContents.st
R Morphic-Widgets-Tabs.package/LockableTab.class/class/icons/lockedIcon.st
R Morphic-Widgets-Tabs.package/LockableTab.class/definition.st
R 
Morphic-Widgets-Tabs.package/LockableTab.class/instance/accessing/closeable_.st
R 
Morphic-Widgets-Tabs.package/LockableTab.class/instance/private/setLockedIcon.st
R 
Morphic-Widgets-Tabs.package/LockableTab.class/instance/private/setUnlockedIcon.st
R 
Morphic-Widgets-Tabs.package/LockableTab.class/instance/protocol/showCloseIcon.st
A Morphic-Widgets-Tabs.package/LockableTabMorph.class/README.md
A 
Morphic-Widgets-Tabs.package/LockableTabMorph.class/class/icons-contents/lockedIconContents.st
A 
Morphic-Widgets-Tabs.package/LockableTabMorph.class/class/icons/lockedIcon.st
A Morphic-Widgets-Tabs.package/LockableTabMorph.class/definition.st
A 
Morphic-Widgets-Tabs.package/LockableTabMorph.class/instance/accessing/closeable_.st
A 
Morphic-Widgets-Tabs.package/LockableTabMorph.class/instance/private/setLockedIcon.st
A 
Morphic-Widgets-Tabs.package/LockableTabMorph.class/instance/private/setUnlockedIcon.st
A 
Morphic-Widgets-Tabs.package/LockableTabMorph.class/instance/protocol/showCloseIcon.st
R Morphic-Widgets-Tabs.package/Tab.class/README.md
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/closeHalfOverIconContents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/closeIconContents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/closeOverIconContents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon10Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon1Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon2Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon3Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon4Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon5Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon6Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon7Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon8Contents.st
R 
Morphic-Widgets-Tabs.package/Tab.class/class/icons-contents/refreshIcon9Contents.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/closeHalfOverIcon.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/closeIcon.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/closeOverIcon.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/menuIcon.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/refreshIcon1.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/refreshIcon10.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/refreshIcon2.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/refreshIcon3.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/refreshIcon4.st
R Morphic-Widgets-Tabs.package/Tab.class/class/icons/refreshIcon5.st
R Morphic-W

[Pharo-dev] [pharo-project/pharo-core]

2016-11-03 Thread GitHub
  Branch: refs/tags/60277
  Home:   https://github.com/pharo-project/pharo-core


[Pharo-dev] some little static analysis with great impact

2016-11-03 Thread stepharo

Hi

I often end up forgetting a period.

printOn: aStream
super printOn: aStream.
aStream nextPutAll: ' "'
aStream nextPutAll: contents.
aStream nextPutAll: '" '.


And statically the system could see it with a simple heuristics:

if the message as the same name as self, super, a tmp or an argument

May be there is a missing period.

Could the compiler get this analysis?

Stef




[Pharo-dev] AST-Nodes API

2016-11-03 Thread stepharo

Hi


I would love to get a more regular API for the AST Nodes.

Point 1

For example

I would love to have


leftBar -> leftBarToken to make sure that we see 
immediately the fact that we do not get a node.



for example

RBValueNode subclass: #RBArrayNode
instanceVariableNames: 'left right statements periods'
classVariableNames: ''
package: 'AST-Core-Nodes'

is not really good since I have to remember "oh yes left = {


Point 2

Apparently it is implied that we always get nodes so

now when I get a methodNode


messageNode receiver

-> node


to get the text

messageNode receiver

I have no idea.

While working on pharodoc (it is just great) I faced the problem that I 
really like to know what I'm manipulating and there is a

difference between an expression (text) and an expression node.
So what is the convention?

I would prefer to have xxxNode each time I want to get a node.



Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread stepharo

Because like that

we have a correct and nice hierarchy and

all the nodes inherits from it and

we can have a nice visitor and make assumption about the root.

Regularity is nice and it helps controlling complexity.

Why a comment could not have a parent?

Stef


Le 3/11/16 à 14:53, John Brant a écrit :

Why convert it to a node? It has no affect on the running code.


John Brant


On Nov 3, 2016, at 8:23 AM, Nicolai Hess  wrote:



2016-11-03 13:41 GMT+01:00 stepharo :
Hi marcus et al

why RBComment is not called RBCommentNode and why it is not a subclass of 
RBNode?

Stef



RBComment wasn't part of the original RefactoringBrowser, it only had a 
"comments" instance variable on its nodes.
This was refactored out to its own RBComment class (I think). But no "real" 
AST-Node class.

+1 for converting this into a real AST node.









Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread John Brant
Why convert it to a node? It has no affect on the running code.


John Brant

> On Nov 3, 2016, at 8:23 AM, Nicolai Hess  wrote:
> 
> 
> 
> 2016-11-03 13:41 GMT+01:00 stepharo :
> Hi marcus et al
> 
> why RBComment is not called RBCommentNode and why it is not a subclass of 
> RBNode?
> 
> Stef
> 
> 
> 
> RBComment wasn't part of the original RefactoringBrowser, it only had a 
> "comments" instance variable on its nodes.
> This was refactored out to its own RBComment class (I think). But no "real" 
> AST-Node class.
> 
> +1 for converting this into a real AST node. 
> 




Re: [Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread Nicolai Hess
2016-11-03 13:41 GMT+01:00 stepharo :

> Hi marcus et al
>
> why RBComment is not called RBCommentNode and why it is not a subclass of
> RBNode?
>
> Stef
>
>
>
RBComment wasn't part of the original RefactoringBrowser, it only had a
"comments" instance variable on its nodes.
This was refactored out to its own RBComment class (I think). But no "real"
AST-Node class.

+1 for converting this into a real AST node.


Re: [Pharo-dev] roundTo: strange behavior

2016-11-03 Thread stepharo
Ok at least we should change the comment to point to 
printShowingDecimalPlaces:


1.19 printShowingDecimalPlaces: 1

STf


Le 2/11/16 à 17:31, Nicolas Cellier a écrit :

Last thing, I'm not sure it's a good idea to deprecate round:
round: has been added to overcome the rounding problems of roundTo:
If we deprecate round:, then users will fallback to roundTo: and won't 
get correctly rounded Floats...


Thus my original question: why is there a round in python, ruby etc...
There must be other applications than just printing (we said financial 
is one).


2016-11-02 14:40 GMT+01:00 werner kassens >:


yes Martin, i get that point and i already reacted to it, i
occasionally want to calculate something with a rounded float, not
print it: apart from my harley i normally use _metric screws which
come in decimal steps.  let's end that discussion,
we are going around in circles.
werner


On 11/02/2016 02:48 AM, Martin McClure wrote:

Hi Werner,
Thanks for your comments. I posted the analysis because I did the
analysis (and thought some others might want to see it), and I
did the
analysis because I wanted to find out whether that answer was
right.
Some Smalltalks are pretty bad in similar areas of Float handling.


But aside from all the fine points, if you want a
floating-point number
to "look" nice and human-readable,
(x asFraction roundTo:(1/10))asFloat
will work, but I still recommend not rounding the number
itself, but
rounding the printing of the number. This is not a Pharo
thing, it's an
any-language-with-floats thing. In C you have printf, etc. In
Pharo, you
can use for instance:

   1.19 printShowingDecimalPlaces: 1 ==> '1.2'

This makes it easier for someone reading the code to see the
intent.

Regards,

-Martin









[Pharo-dev] why RBComment is not called RBCommentNode

2016-11-03 Thread stepharo

Hi marcus et al

why RBComment is not called RBCommentNode and why it is not a subclass 
of RBNode?


Stef




Re: [Pharo-dev] Help needed with case 19236

2016-11-03 Thread stepharo

Super cool.


Stef


Le 3/11/16 à 13:26, Denis Kudriashov a écrit :


2016-11-02 20:03 GMT+01:00 stepharo >:



But it leads to incompatibility for old images.

If people use Spec and we update spec = no problem :)


Yes Spec is updated by this.
And now it is fix to include




Re: [Pharo-dev] Help needed with case 19236

2016-11-03 Thread Denis Kudriashov
2016-11-02 20:03 GMT+01:00 stepharo :

> But it leads to incompatibility for old images.
>
> If people use Spec and we update spec = no problem :)


Yes Spec is updated by this.
And now it is fix to include


[Pharo-dev] [pharo-project/pharo-core] ee46f2: 60276

2016-11-03 Thread GitHub
  Branch: refs/heads/6.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: ee46f25acb523db0d525ba3c4385725428b227ee
  
https://github.com/pharo-project/pharo-core/commit/ee46f25acb523db0d525ba3c4385725428b227ee
  Author: Jenkins Build Server 
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
M 
ConfigurationOfGlamourCore.package/ConfigurationOfGlamourCore.class/instance/symbolic
 versions/stable_.st
A 
ConfigurationOfGlamourCore.package/ConfigurationOfGlamourCore.class/instance/versions/version425_.st
A 
ConfigurationOfGlamourCore.package/ConfigurationOfGlamourCore.class/instance/versions/version426_.st
A Glamour-Morphic-Widgets.package/GLMSystemWindow.class/instance/as yet 
unclassified/handleKeyStroke_.st
R Glamour-Morphic-Widgets.package/GLMSystemWindow.class/instance/event 
handling/handlesKeyStroke_.st
R Glamour-Morphic-Widgets.package/GLMSystemWindow.class/instance/event 
handling/keyStroke_.st
M 
Glamour-Morphic-Widgets.package/GLMSystemWindow.class/instance/initialization/initialize.st
A Kernel-Tests.package/BehaviorTest.class/instance/as yet 
unclassified/testIsRootInEnvironment.st
R ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
scripts/script60275.st
A ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
scripts/script60276.st
R ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
updates/update60275.st
A ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
updates/update60276.st
M 
ScriptLoader60.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
A Tests.package/TraitTest.class/instance/testing/testIsRootInEnvironment.st
M Tool-Catalog.package/CatalogBrowser.class/instance/Nautilus groups 
support/installAndCreateGroupButton_.st
M 
Tool-Catalog.package/CatalogBrowser.class/instance/building/refreshButton_.st
M 
Tool-Catalog.package/CatalogBrowser.class/instance/menu/defineAllRepositoriesInMCBrowserButton_.st
M 
Tool-Catalog.package/CatalogBrowser.class/instance/menu/defineCurrentVersionRepositoryButton_.st
M 
Tool-Catalog.package/CatalogBrowser.class/instance/menu/installStableVersionButton_.st
M 
Tool-Catalog.package/CatalogBrowser.class/instance/menu/loadConfigurationButton_.st
M Tool-Catalog.package/CatalogBrowser.class/instance/private - 
utilities/buildMenuOn_.st
A Traits.package/TBehavior.class/instance/testing class 
hierarchy/isRootInEnvironment.st

  Log Message:
  ---
  60276
19273 Icons of Catalog are not sorted by function
https://pharo.fogbugz.com/f/cases/19273

19270 Fix broken keyboard navigation
https://pharo.fogbugz.com/f/cases/19270

19246 New method to detect if class is root in own environment
https://pharo.fogbugz.com/f/cases/19246

http://files.pharo.org/image/60/60276.zip




[Pharo-dev] [pharo-project/pharo-core]

2016-11-03 Thread GitHub
  Branch: refs/tags/60276
  Home:   https://github.com/pharo-project/pharo-core