Re: [Pharo-users] Loading and saving packages to filetree repos

2017-08-19 Thread Dimitris Chloupis
First lets get a basic understanding of git, filetree and metadata.

The process of using both filetree and git are simple and short , the only
problem is Monticello with a GUI that is not well designed.

With filetree you do what you would have done anyway

1) You pick a package
2) You create a filetree repo for it
3) You tell to filetree where to save your files
4) You edit/add code
5) You tell filetree to save your files

In another language you would have done something similar using an IDE

1) Create a project
2) Tell to the IDE where to save your project
3) Create new source files
4) edit code in those source files
5) save those source files

Git is also very simple , git is a version control system which basically
what it does is create a history of changes (= versions) which calls
commits , it also allows you to have versions of your history which calls
branches which are basically variations of the same project and you end up
with a nice history tree

Git has 3 basic actions , push, pull and commit

The first thing is pull which what it does is that it pull from another git
repo, usually this is a github or other online repo used as the main repo
but it can be also local too. In a pull git does again what you would
expect , it takes a look at the history of the other repo and the history
of the repo you want to pull to and first makes sure that the repos do not
contain different histories. If they do then git ask 2 logical questions

1) Are these commits just additional commits that the receiver repo does
not have ? If yes then just bring this commits and add them to the
receiving repo history
2) Are these commits not only additional but also in between , which means
they can be the commits for example no 1, 6 , 23 , 45 and 64 ? if yes then
I do not know what to do , alert the user there are conflicts, which
commits do conflict and exactly which code and which source files

git commit just add commits to your repo history.
git push does the opposite of git pull its sends your commits to the other
repo but again it asks those two questions

There is also git clone which basically creates a repo and git pulls from
another repo

This means that conflicts cannot exist , under usual circumstances, for
single user repos. Because a user cannot create randomly diffirent commits
in his/her own repo unless she works from different computers and forgets
to git pull and thus creates different histories.

Commits appear when you have multiple people with their own repos pushing
to the same repo, in that case its much easier to create conflicts. However
it may surprise people that if you remove the metadata you will not greatly
reduce git conflicts. What greatly reduces conflicts is first to always
remember to git pull BEFORE adding new commits , this way there is less
chance for histories to go out of sync and of course having small teams.
The less people the less chance to create conflicts.

A way around this is to make branches or forks, it does not actually solve
the problem. A branch as we said is a version of the history of a repo and
it evolves separately. A fork is basically another repo that has its own
history and also of course its own branches. Both branches and forks can
merge with another history at any point along the way, still they will have
conflicts. The big diffirence here is that you deal with those conflicts
only when you do that merge (in the case of a fork we call it "pull
request" because you request from another repo to pull your commits). So
basically what you do is delay the inevitable.

If you work alone you don't need to worry about conflicts and thus not need
to worry about metadata.  There is very little chance to cause conflicts ,
close to zero.

if you work as a team, conflicts will be more and more frequent , the less
properly your teammates use git, aka forget to git pull and push often,
thus metadata will end up being the lest of your concerns. Basically
because metadata are just information about your code and your project,
there is nothing really complex about it and thus a conflict with metadata
will be a minor concern.

A conflict on the code on the other hand is a big deal, if your teammate
forgets to git push and pull often , there is also a big chance he does an
even bigger mistakes and commits less often. This is a huge deal because
that means his commits will contain huge chunks of code which in return
will make conflict resolution a nightmare.

Again the problem does not originate from git or filetree , the problem is
understanding the code and making sure that what you merge which basically
means you decide which code is rejected and which is accepted inside the
history is code that works, is reliable and does not create a stream of
bugs and mostly does not take your project backward instead of forward.

So complexity is multiplied much more by the human factor and much less
from the technology factor.

A work around this is to use powerful git tools that make som

Re: [Pharo-users] YAML parser (2017)

2017-08-19 Thread Peter Uhnak
All my tests are green, so maybe you need to update PetitParser too to the 
latest (PetitParser-JanKurs.290)

It is probable that Pillar loaded older version of PetitParser.

Peter


On Fri, Aug 18, 2017 at 10:56:30PM +0200, H. Hirzel wrote:
> Hello again
> 
> On 8/18/17, Peter Uhnak  wrote:
> [...]
> >> I assume that can directly load the PetitYAML from the repository
> >> instead.
> >> Where do I find it?
> >
> > Open Monticello Browser, find PetitParser repository and open it, select
> > PetitYAML package, select the latest version, right click and load.
> >
> > Peter
> >
> Thank you for the instructions.
> Loading PetitYAML-PhilippeBack.11.mcz went fine.
> 
> But out of 76 tests I get 57 errors. This are so many error that that
> it is quite possible that they have a single cause. I did not start
> debugging.
> 
> Something similar happens if I go back to
> PetitYAML-JanKurs.8
> Author: JanKurs
> Time: 15 June 2016
> 
> What I aiming at is
> 
> - to have Pillar loaded (was successful, see other thread)
> - get a working PetitYAML version
> 
> --Hannes
> 
> P.S. Note that the screen shot shows a Pharo 6.0 version. But it
> actually is 6.1 (see other thread).





Re: [Pharo-users] How to find where pharo is killing processor power?

2017-08-19 Thread Ben Coman
On Thu, Aug 17, 2017 at 7:53 PM, Dimitris Chloupis 
wrote:

> Are you aware of the profile tools inside Pharo ? They capture execution
> and offer detailed analysis of how much time is spent on each task. One of
> it can be found in World Menu -> Tools -> Time Profiler
>

Thats good for a normal behaving process, but I'm not sure it helps
identify a currently-misbehaving process.
A (virtual)CPU % could be useful addition to Process Browser.

cheers -ben


>
> Generally speaking a while loop that runs all the time without any kind of
> delays is a very popular way to consume 100%. Even if the while loop does
> nothing it will still consume %100 because even executing an empty loops
> has costs. Two solution is inserting a delay in the loop so the loop have
> to wait for 1 millisecond or less depending your demands or just make sure
> the loop has a very specific condition so it executes only when you need
> to.
>
> On Wed, Aug 16, 2017 at 10:04 PM sergio ruiz  wrote:
>
>>
>> hey all.. my current pharo implementation is running super serious
>> processor power, but it shouldn’t be doing much.
>>
>> [image: Activity_Monitor__All_Processes__and_Pharo_image.jpg]
>>
>> how would I go about tracking this inside the pharo image?
>>
>> Thanks!
>>
>>
>> 
>> peace,
>> sergio
>> photographer, journalist, visionary
>>
>> Public Key: http://bit.ly/29z9fG0
>> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
>> http://www.Village-Buzz.com 
>> http://www.ThoseOptimizeGuys.com 
>> http://www.coffee-black.com
>> http://www.painlessfrugality.com
>> http://www.twitter.com/sergio_101
>> http://www.facebook.com/sergio101
>>
>


Re: [Pharo-users] YAML parser (2017)

2017-08-19 Thread H. Hirzel
Peter, thanks for the confirmation that in your installation of the
PetitYAML grammar all tests are green.

I wonder how you did it.

This is what I did:

1. I put Pillar on the back burner for the moment and

2. I went for a pristine Pharo 6.0 Latest update: #60510 image (a.k.a. 6.1).

3. Then I installed PetitParser only through the catalog --
the entry is still tagged for Pharo 5.0

4. Then I added PetitYAML

Name: PetitYAML-PhilippeBack.11
Author: PhilippeBack
Time: 29 May 2017, 12:53:55.994195 pm
UUID: d7658233-112c-754c-81a7-d60139bb9549

taken from

MCSmalltalkhubRepository
owner: 'Moose'
project: 'PetitParser'
user: ''
password: ''


5. Running the tests gave me

76 run -- 76 errors


What am I missing here?

Is there an easy workaround to get PetitParser with PetitYAML into
6.0-#60510 (a.k.a. 6.1) ?

--Hannes



[Pharo-users] Tealight (similar to Teapot) installs fine in Pharo 6.1

2017-08-19 Thread H. Hirzel
Hello Torsten

Tealight installs very fine into the latest Pharo release (6.0 / 6.1).

It is easy to use and the documentation is great!

--Hannes

On 8/15/17, Torsten Bergmann  wrote:
> Hi sergio,
>
> why not use my existing "Tealight" project which is (similar to Teapot) also
> available from Pharo catalog.
> It is still lightweight as it is just a few extensions to Teapot.
>
> You will find it here:
>
>   https://github.com/astares/Tealight
>
> the page includes the full documentation and after reading it you should be
> able to see:
>
>  - that you can even start the server quickly from the world menu after
> loading
>  - how easy it is to tinker and experiment with dynamic routes and Teapot in
> an interactive way
>  - how easy it is to provide a REST interface by having methods annotated
> with REST specific pragmas
>  - to even provide a versioned REST interface (also defined using pragmas)
>
> The document should easily explain all this, esepcially read "Defining a
> REST based interface".
>
> This project is around since last october now (see
> http://forum.world.st/ANN-Tealight-td4918431.html)
>
>
> Lately I even added the possibility to remove one or all the dynamic routes
> in a teapot inspector
> (see attached screenshot). That makes it even easier to experiment lively
> with a teapot instance
> and different URLs one wants to catch.
>
> Have fun
> Torsten



Re: [Pharo-users] YAML parser (2017)

2017-08-19 Thread H. Hirzel
P.S. I assume I need to get a developer version. How do I do that?

On 8/19/17, H. Hirzel  wrote:
> Peter, thanks for the confirmation that in your installation of the
> PetitYAML grammar all tests are green.
>
> I wonder how you did it.
>
> This is what I did:
>
> 1. I put Pillar on the back burner for the moment and
>
> 2. I went for a pristine Pharo 6.0 Latest update: #60510 image (a.k.a.
> 6.1).
>
> 3. Then I installed PetitParser only through the catalog --
> the entry is still tagged for Pharo 5.0
>
> 4. Then I added PetitYAML
>
> Name: PetitYAML-PhilippeBack.11
> Author: PhilippeBack
> Time: 29 May 2017, 12:53:55.994195 pm
> UUID: d7658233-112c-754c-81a7-d60139bb9549
>
> taken from
>
> MCSmalltalkhubRepository
>   owner: 'Moose'
>   project: 'PetitParser'
>   user: ''
>   password: ''
>
>
> 5. Running the tests gave me
>
> 76 run -- 76 errors
>
>
> What am I missing here?
>
> Is there an easy workaround to get PetitParser with PetitYAML into
> 6.0-#60510 (a.k.a. 6.1) ?
>
> --Hannes
>



Re: [Pharo-users] YAML parser (2017)

2017-08-19 Thread Peter Uhnak
On Sat, Aug 19, 2017 at 02:45:28PM +0200, H. Hirzel wrote:
> Peter, thanks for the confirmation that in your installation of the
> PetitYAML grammar all tests are green.
> 
> I wonder how you did it.

As I've said, you need to update PetitParser; if there's no appropriate catalog 
entry, then ConfigurationOfPetitParser loadBleeding edge, or manually via 
Monticello Browser (the same way you loaded PetitYAML).

Peter

> 
> This is what I did:
> 
> 1. I put Pillar on the back burner for the moment and
> 
> 2. I went for a pristine Pharo 6.0 Latest update: #60510 image (a.k.a. 6.1).
> 
> 3. Then I installed PetitParser only through the catalog --
> the entry is still tagged for Pharo 5.0
> 
> 4. Then I added PetitYAML
> 
> Name: PetitYAML-PhilippeBack.11
> Author: PhilippeBack
> Time: 29 May 2017, 12:53:55.994195 pm
> UUID: d7658233-112c-754c-81a7-d60139bb9549
> 
> taken from
> 
> MCSmalltalkhubRepository
>   owner: 'Moose'
>   project: 'PetitParser'
>   user: ''
>   password: ''
> 
> 
> 5. Running the tests gave me
> 
> 76 run -- 76 errors
> 
> 
> What am I missing here?
> 
> Is there an easy workaround to get PetitParser with PetitYAML into
> 6.0-#60510 (a.k.a. 6.1) ?
> 
> --Hannes



Re: [Pharo-users] Playground doesn't respect LF endings

2017-08-19 Thread Henrik Nergaard
>> Right now I have to execute `Clipboard clipboardText withSqueakLineEndings 
>> asString` and then copy&paste the result.

Why not fix the issue instead?

  *   Browse senders of #cr
  *   Filter "rub"
  *   Find  the method that navigates the cursor to line end
 *   change #indexOf::: to use #indexOfAnyOf::: with lf as well.
 *   move 1 more step if pos is cr and next is lf
  *   do something similar for home navigation

Best regards,
Henrik


Fra: Pharo-users  på vegne av Peter Uhnak 

Sendt: 8. august 2017 07:41:46
Til: pharo-users@lists.pharo.org
Emne: [Pharo-users] Playground doesn't respect LF endings

Hi,

when I paste a text into the playground with line endings containing just LF 
(unix-style), then navigation to beginning/end of a line instead jumps to the 
beginning/end of the text. (I guess it is hardcoded to CR only).

Right now I have to execute `Clipboard clipboardText withSqueakLineEndings 
asString` and then copy&paste the result.

Peter



Re: [Pharo-users] How to find where pharo is killing processor power?

2017-08-19 Thread Dimitris Chloupis
it depends what you mean

if you talk about Pharo code then those tools should be enough , unless it
freezes Pharo (a 100% consumption does not necessarily imply a freeze)

if you talk about the Pharo VM itself then you will need to use one of the
countless profilers that exist for C/C++ . Some OSes come included with
them. MacOS which what I am using can sample a running process and tell you
exactly which function/method consumes how much CPU.

Obviously more specialised tools can be even more of an assistance like
Valgrind

http://valgrind.org/

But then it will require knowledge of the Pharo VM internals.

if it freezes pharo and you know its pharo code then its a matter of taking
a look at changes file and testing on a new image one change at the time
until you identify the code that causes the slow down.

At least that is what I have done one time I really messed up Morphic draw
loop and froze my image.

On Sat, Aug 19, 2017 at 2:27 PM Ben Coman  wrote:

> On Thu, Aug 17, 2017 at 7:53 PM, Dimitris Chloupis 
> wrote:
>
>> Are you aware of the profile tools inside Pharo ? They capture execution
>> and offer detailed analysis of how much time is spent on each task. One of
>> it can be found in World Menu -> Tools -> Time Profiler
>>
>
> Thats good for a normal behaving process, but I'm not sure it helps
> identify a currently-misbehaving process.
> A (virtual)CPU % could be useful addition to Process Browser.
>
> cheers -ben
>
>
>>
>> Generally speaking a while loop that runs all the time without any kind
>> of delays is a very popular way to consume 100%. Even if the while loop
>> does nothing it will still consume %100 because even executing an empty
>> loops has costs. Two solution is inserting a delay in the loop so the loop
>> have to wait for 1 millisecond or less depending your demands or just make
>> sure the loop has a very specific condition so it executes only when you
>> need to.
>>
>> On Wed, Aug 16, 2017 at 10:04 PM sergio ruiz 
>> wrote:
>>
>>>
>>> hey all.. my current pharo implementation is running super serious
>>> processor power, but it shouldn’t be doing much.
>>>
>>> [image: Activity_Monitor__All_Processes__and_Pharo_image.jpg]
>>>
>>> how would I go about tracking this inside the pharo image?
>>>
>>> Thanks!
>>>
>>>
>>> 
>>> peace,
>>> sergio
>>> photographer, journalist, visionary
>>>
>>> Public Key: http://bit.ly/29z9fG0
>>> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
>>> http://www.Village-Buzz.com 
>>> http://www.ThoseOptimizeGuys.com 
>>> http://www.coffee-black.com
>>> http://www.painlessfrugality.com
>>> http://www.twitter.com/sergio_101
>>> http://www.facebook.com/sergio101
>>>
>>


Re: [Pharo-users] [Ann] Blog entry about using Pharo / Smalltalk to build a bot

2017-08-19 Thread Sean P. DeNigris
kilon.alios wrote
> This sneaky tactic can be a great way to promote pharo to your coworkers.
> No need to convert your entire project to PHP. Just start using Pharo for
> minor tasks, maybe clean up the code, analyse and visualise the code base
> with Roassal , parse some text files etc.

I love this idea! Take a task no one is particularly invested in and show
off Pharo's advantages by adding real value to the team. Very sneaky... I
mean effective... indeed!



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Ann-Blog-entry-about-using-Pharo-Smalltalk-to-build-a-bot-tp4961423p4962534.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] YAML parser (2017)

2017-08-19 Thread H. Hirzel
On 8/19/17, Peter Uhnak  wrote:
> On Sat, Aug 19, 2017 at 02:45:28PM +0200, H. Hirzel wrote:
>> Peter, thanks for the confirmation that in your installation of the
>> PetitYAML grammar all tests are green.
>>
>> I wonder how you did it.
>
> As I've said, you need to update PetitParser; if there's no appropriate
> catalog entry, then ConfigurationOfPetitParser loadBleeding edge, or
> manually via Monticello Browser (the same way you loaded PetitYAML).
>
> Peter

Thanks, loading ConfigurationOfPetitParser-TudorGirba.80 through the
Monticello Browser (not the catalog) into Pharo 6 and then

   ConfigurationOfPetitParser load

did the job. Now all PetitYAML grammar tests are grenen.

--Hannes


[Pharo-users] [ANN] Pharo wiki , is here

2017-08-19 Thread Dimitris Chloupis
Many seemed to like the idea of a Pharo wiki , I like it too. I created
one, can be found here and super easy to contribute to.

https://github.com/SquareBracketAssociates/PharoWiki

Will keep this thread for alerting for important updates to wiki. Have fun
:)


Re: [Pharo-users] [ANN] Pharo wiki , is here

2017-08-19 Thread Dimitris Chloupis
I also turned it to be published as a webpage, its can be viewed from this
link

https://squarebracketassociates.github.io/PharoWiki/

On Sat, Aug 19, 2017 at 11:54 PM Dimitris Chloupis 
wrote:

> Many seemed to like the idea of a Pharo wiki , I like it too. I created
> one, can be found here and super easy to contribute to.
>
> https://github.com/SquareBracketAssociates/PharoWiki
>
> Will keep this thread for alerting for important updates to wiki. Have fun
> :)
>


Re: [Pharo-users] Pharo on the SqueakJS virtual machine

2017-08-19 Thread Sean P. DeNigris
Craig Latta wrote
> For more details, see https://tinyurl.com/y727fz4a

Cool!

A few things:
- There is a very noticable lag (e.g. ~5 seconds to open an "About" window).
Any idea what it would take to deliver performance levels that feel more
native?
- I wonder how Tether compares to Denis' Seamless
- I was going to ask the same question for Naiad vs Epicea, but after
reading on your blog, it seems Naiad is much more ambitious than simply
tracking changes
- I got a few errors off the bat
  - UnixResolver>>#cantFindOriginError from #getEnvViaFFI
  - "The primitiveFetchMourner is missing. Please upgrade your virtual
machine..." 



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Re-PharoJS-tp4952267p4962614.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.