Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread tbrunz
If you do, send me a message about what you're considering, and I can help
you choose.  I'm much more knowledgeable about CBs that the average person
-- especially about programming on them & using Linux on them.

Another nice thing about Chromebooks is that they're inexpensive.  Meaning,
you get a lot for the price.

They used to all be fairly low-performance "budget" devices, but they've
been catching on, and now pretty much all the manufacturers make a variety
of models.

What's really interesting are the "power user" models.  Google started the
trend by selling the "Pixel" model to attendees of their "Google I/O"
conferences, starting in 2013.  They did it again in 2015.  Both have
touchscreens -- they were the only ones at the time with T/S.

The 2015 model was available as an i5/8GB/32GB (cpu/ram/ssd -- they don't
have a lot of disk space because you're encouraged to save things in "the
cloud"; you get a lot of free Google Drive space as part of buying a CB). 
Then there was the "LS" (Ludicrous Speed) model that's an i7/16GB/64GB. 
(The CPU is a dual-core Broadwell mobile with HT enabled -- it's no slouch.)

The hardware, for the time, was second-to-none.  It was Google's way of
showing the world, "Look what you can do!" as well as a perk for power
users.  Now many of the mfgrs have high-end models, many of which are really
nice systems.

And for "content consumption", they're just as much an "appliance" as iPads. 
Turn them on & go...  You can't break them.  Perfect for "the parents" or
anyone who's not tech-savvy.  But unlike iPad devices, you can conveniently
create content, such as emails, etc.

So the 2015 Pixel was too much for me to pass up...  I didn't go to Google
I/O, but you can always count on a percentage of recipients to flip them on
eBay.   Which they did, so I bought one.  It's been a good value, and the
hardware really is top-notch.

Of course I wasted no time in learning how to run Linux apps on them.  First
was "Crouton", a side project of a Google engineer.  That gave way to
"Crostini", an official Google project to add Linux, but in a container --
and a supported feature.  (Like many things Google, it's "in beta", but it
works well, so 'who cares?')

My wife got the 2015 Pixel LS when I got the base model of the Pixelbook
(i7/8GB/128GB) when it came out a couple of years ago -- Google gave them
more SSD so you can add your Linux development environments.  

So I added all my Ubuntu tools, and Pharo Launcher, and my images... 
Everything works, including file & network access.  (Linux containers share
a directory with the ChromeOS file system that's visible from the Chrome
environment.)

The only thing I needed to do was write a bash script that will enlarge the
cursor (because the Pixel/Pixelbook screens are hi-dpi, like my 7710) and
set the font size in my images to "Large".

That script is here:  https://github.com/tbrunz/pharo-support

-t



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



Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread Russ Whaley
Wow! Nice to know there are success stories like yours. When we were having
issues and trying to determine which way we should go to, we just couldn’t
find good answers on the CB side. Perhaps we should give it another go!

On Sun, Aug 2, 2020 at 5:34 PM tbrunz  wrote:

> Of course, ask a half-dozen people about this subject and you'll get 6
> different responses...
>
> Between myself, my wife, my daughter, family, friends, we've had at least 8
> CBs.  None have failed.  My wife is still using (and loving) the 2015 Pixel
> LS CB I got 5 years ago.  Not even the battery has degraded.
>
> My daughter used one CB for her entire undergrad program.  (I offered to
> get
> her a "real laptop" before she started as a Freshman, but she insisted she
> wanted a CB).  The only thing I needed to do was add Eclipse and the Java
> JDK to it for one of her classes.  (The programming nerds in her class were
> impressed that she was developing Java on a CB.)
>
> For graduation, I upgraded her to a Pixelbook CB.  I rebuilt her original
> CB
> with GalliumOS -- a Linux distro optimized to run CB hardware.  It's still
> running...
>
> Chromebooks run Android, Linux, Chrome apps, Windows apps...  All except
> Mac
> apps.
>
> First-world problems indeed...  And mostly a religious issue.  I'm fine if
> you use Apple products.  But I haven't a solution to suggest in that case!
>
> For the record, I have a Pixelbook (the photo), but I also have a DIY tower
> and a Dell 7710.  The CB gives me portability + Pharo.
>
> (If you do go back to a CB, just be sure you check the specs: Intel CPU
> only, and be sure it can run "Crostini" so you get Linux containers.)
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
> --
Russ Whaley
whaley.r...@gmail.com


Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Stéphane Ducasse
Hi 

Thanks I was planning to implement it. 
I asked Esteban to take the time to integrate my PR. 
Now can you send some PRs to the version of esteban like that we will get a 
better version. 
And you can open issues on his repo
We will fix them. 
S


> On 2 Aug 2020, at 20:22, Russ Whaley  wrote:
> 
> Here are a couple of items with my first 5 minutes with the TODO tutorial...
> TODOListPresenter >> initializePresenters
> 
>   todoListPresenter := self newTable
>   addColumn: ((SpCheckBoxTableColumn evaluated: [:task | task 
> isDone]) width: 20);
>   addColumn: (SpStringTableColumn title: 'Title' evaluated: 
> [:task | task title]);
>   yourself.
> 
>   self layout: (SpBoxLayout newVertical 
>   add: todoListPresenter;
>   yourself) 
> 
> In this portion (Showing Tasks) - it does not define todoListPresenter is 
> it a local or a missed instVar.  I tried it first as a local to enable save, 
> but then...
> TODOListPresenter >> updatePresenter
> 
>   todoListPresenter items: TODOTask selectAll asOrderedCollection
> 
> todoListPresenter isn't available for updatePresenter... so I'm assuming it 
> must be an instvar?  I created accessors, then changed all the 
> todoListPresenter references to use the accessors (below).
> TODOListPresenter >> initializePresenters
> 
>   self todoListPresenter: (self newTable
>   addColumn: ((SpCheckBoxTableColumn evaluated: [:task | task 
> isDone]) width: 20);
>   addColumn: (SpStringTableColumn title: 'Title' evaluated: 
> [:task | task title]);
>   yourself).
> 
>   self layout: (SpBoxLayout newVertical 
>   add: self todoListPresenter;
>   yourself) 
> and...
> TODOListPresenter >> updatePresenter
> 
>   self todoListPresenter items: TODOTask selectAll asOrderedCollection
> 
> Also, in the first example - task isDone needs to be defined (and might be 
> defined later in the tutorial) - I'm assuming 
> SpCheckBoxTableColumn>>evaluated: is expecting a boolean, or do I need to 
> convert this somehow?  I can check all these things out - but just curious if 
> I'm missing something?
> TODOTask >> done
> 
>   ^ done
> TODOTask >> isDone
> 
>   ^ self done
> 
> I'll go through a bit more and update you on my progress.  Ted, I also hope 
> to get to take a look at Zebra today :)
> 
> 
> 
> 
> On Sun, Aug 2, 2020 at 2:07 PM Stéphane Ducasse  > wrote:
> 
> 
>> On 2 Aug 2020, at 19:51, tbrunz > > wrote:
>> 
 I've been thinking lately that it would be nice to expand the number of
 Pharo tutorials we have available.  But rather than (or along with)
 creating
 more "beginner" level tutorials, I'd like to see some good "intermediate"
 level Pharo tutorials.
>>> 
>>> Me too :)
>> 
>> Let's do it, then.  I'll volunteer to do most of the work.  :^)
> 
> I will review anything you write :)
>> 
>> My hope is that participating in this will make me capable of creating
>> advanced tutorials all by myself.
> 
> I usually like to write to learn and dump what I learned.
>> 
 I think that programmers who already know the Pharo
 syntax and messaging semantics could benefit from more advanced tutorials
 that demonstrate how to develop "real world" Pharo code for "real world"
 processing needs.
>>> 
>>> Yes yes I would love that.
>> 
>> That was part of my motivation for creating a Pharo app to solve the Zebra
>> Puzzle.  First, of course, I wanted to solve it.  ;^)
> 
> I will send you some feeedback and PR.
>> 
 What I'm talking about is something that assumes you know the language,
 the
 basics of the IDE (but not necessarily how to leverage its capabilities
 to
 aid development), and the basics of the foundation classes (but not its
 details).  I'd like a tutorial for intermediate Pharo programmers who
 want
 to become experts with Pharo.  Something that can show you how to apply
 the
 tools of the IDE and the features of the language and base classes to
 create
 solutions that solve complex problems.
>>> 
>>> do you have ideas?
>> 
>> I do!
>> 
>> As I started building the Logic Puzzle app, it occurred to me that I could
>> probably find several different, common structures in OOP (specifically,
>> Pharo) to add to the solution.  And then each would be its own example of
>> "what real Pharo code looks like".  I.e., be good examples.
>> 
>> But first, I needed to explore "how to do it in Pharo" for myself, which
>> naturally would have me working the IDE strongly.
>> 
>> Then I thought, the entire application can/should be an example, so it
>> should be a tutorial.
>> 
>> That means that I need more than just a completed application (that's "just
>> an example").  To be a *tutorial*, it means starting from scratch, showing
>> how to approach the solution, how to start a Pharo app, how to use the 

Re: [Pharo-users] A warning under PharoLauncher 1.8-2019.03.27

2020-08-02 Thread Rene Paul Mages (ramix)



Le 02/08/2020 à 22:44, tbrunz a écrit :
> Hi Rene,
> 
> Are you running Pharo Launcher 2.0?
> 
> I saw these under 2.0, then upgraded to 2.2 and I haven't seen it since.
> 
> -Ted

Thanks a lot Ted.

  After your recommended upgrade the issue is gone.

-- 
All the best
Rene Paul Mages (ramix) GnuPG key 0x9840A6F7
http://www.pharo.fr
http://www.linux-azur.org/ramix
http://twitter.com/RenePaulMages



Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread tbrunz
Of course, ask a half-dozen people about this subject and you'll get 6
different responses...

Between myself, my wife, my daughter, family, friends, we've had at least 8
CBs.  None have failed.  My wife is still using (and loving) the 2015 Pixel
LS CB I got 5 years ago.  Not even the battery has degraded.

My daughter used one CB for her entire undergrad program.  (I offered to get
her a "real laptop" before she started as a Freshman, but she insisted she
wanted a CB).  The only thing I needed to do was add Eclipse and the Java
JDK to it for one of her classes.  (The programming nerds in her class were
impressed that she was developing Java on a CB.)

For graduation, I upgraded her to a Pixelbook CB.  I rebuilt her original CB
with GalliumOS -- a Linux distro optimized to run CB hardware.  It's still
running...

Chromebooks run Android, Linux, Chrome apps, Windows apps...  All except Mac
apps.

First-world problems indeed...  And mostly a religious issue.  I'm fine if
you use Apple products.  But I haven't a solution to suggest in that case!

For the record, I have a Pixelbook (the photo), but I also have a DIY tower
and a Dell 7710.  The CB gives me portability + Pharo.

(If you do go back to a CB, just be sure you check the specs: Intel CPU
only, and be sure it can run "Crostini" so you get Linux containers.)



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



Re: [Pharo-users] A warning under PharoLauncher 1.8-2019.03.27

2020-08-02 Thread tbrunz
Hi Rene,

Are you running Pharo Launcher 2.0?

I saw these under 2.0, then upgraded to 2.2 and I haven't seen it since.

-Ted



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



[Pharo-users] A warning under PharoLauncher 1.8-2019.03.27

2020-08-02 Thread Rene Paul Mages (ramix)
Hello,

When the following command is launched :

 ./pharolauncher/pharo-launcher

we can see this warning :

http://ramix.org/pharo/version-8.0/InstanceVariableNotFound.png

Nota Bene : my laptop in running under Linux Mint 18.3 _Sylvia_ -
Release amd64 20171124]/ xenial contrib main non-free

-- 
Thanks for your help.
Rene Paul Mages ( GnuPG_key 0x9840A6F7 )
http://www.pharo.fr
http://www.linux-azur.org/ramix
http://twitter.com/RenePaulMages



Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread Russ Whaley
:)  indeed it is

On Sun, Aug 2, 2020 at 4:27 PM tbrunz  wrote:

> Look at the keyboard -- that's a Chromebook, not a WinTel or Linux laptop.
>
> 
>
> That was about a year & a half ago.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

-- 
Russ Whaley
whaley.r...@gmail.com


Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread Russ Whaley
Yes, I played with my daughter's chromebook - was considering doing just
what you're suggesting - a few weeks later it died - well not completely -
but is finicky enough that she can't use it for her masters work any longer
(too unreliable) - so she went back to a 2013 MacBookPro... (they just
work).

I recently bought a new iPad Pro - so after that investment, I'd really
like to stick with it :)  I do some drone piloting, guitar playing through
my new Spark amp by positiveGrid... and the iPad is the right tool for me.
I could have gone android - but I tired of the constant - which app /
device supports which candy-of-the-month... hehe, I digress.

Mostly, I just want one device that does it all... I could buy a MacBookPro
or Air or whatever, but that doesn't work with my drone...  I know, I
know... first world problems.

Thanks for the reminder on the Chromebook.  Who knows, I may be back to
that in a few months.

On Sun, Aug 2, 2020 at 4:20 PM tbrunz  wrote:

> Not exactly the answer you're looking for, but...
>
> Take a look at the latest Chromebooks.  They are *awesome*.  Beats iPads &
> iOS!
>
> There are "tablet" Chromebooks (the keyboard folds all the way underneath
> the touchscreen, and is de-activated), as well as keyboard-detachable
> models, as well as "clamshell" ultrabook models.
>
> Otherwise, you have a tablet with a sensible way to type on; many models
> have touchscreens anyway.  (Mine does, and I variously use the touchscreen,
> the touchpad, and the arrow keys to scroll content.)
>
> Here's the home run:  You can enable "Linux containers" on newer
> Chromebooks, and then you can install *any* Linux app in the container.
> Yes, including Pharo Launcher.
>
> So you can run Pharo images on Chromebooks, and of course program on your
> Chromebook tablets in Pharo.
>
> Save your iPads for watching YouTube..  (Watch your YouTube Pharo tutorials
> while you program Pharo on your Chromebook.  :^)
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

-- 
Russ Whaley
whaley.r...@gmail.com


Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread tbrunz
Look at the keyboard -- that's a Chromebook, not a WinTel or Linux laptop.

 

That was about a year & a half ago.  



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



Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread tbrunz
Not exactly the answer you're looking for, but...

Take a look at the latest Chromebooks.  They are *awesome*.  Beats iPads &
iOS!

There are "tablet" Chromebooks (the keyboard folds all the way underneath
the touchscreen, and is de-activated), as well as keyboard-detachable
models, as well as "clamshell" ultrabook models.

Otherwise, you have a tablet with a sensible way to type on; many models
have touchscreens anyway.  (Mine does, and I variously use the touchscreen,
the touchpad, and the arrow keys to scroll content.)

Here's the home run:  You can enable "Linux containers" on newer
Chromebooks, and then you can install *any* Linux app in the container. 
Yes, including Pharo Launcher.

So you can run Pharo images on Chromebooks, and of course program on your
Chromebook tablets in Pharo.

Save your iPads for watching YouTube..  (Watch your YouTube Pharo tutorials
while you program Pharo on your Chromebook.  :^)



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



Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread Russ Whaley
+1 - platform specific defaults.

Also, is there any document anyone can point me to on why Pharo is not
viable for iOS?  I have an iPad Pro and I'd LOVE to be able to code/test
and run my apps when I travel... my old MacBookPro is getting
long-in-the-tooth.

On Sun, Aug 2, 2020 at 1:01 PM tbrunz  wrote:

> It might be best to have this be configurable/customizable for each user
> (which is what I think you're getting at).
>
> The question is what should the default "out of the box" behavior be?
> There
> are conventions, although they're not exactly "standardized" (as they
> should
> be).
>
> Most of us have "muscle memory" for many of these operations: Go forward
> one
> word, select a paragraph, expectations of where the cursor will be when you
> go forward/backward word-by-word, etc. and I don't think anyone enjoys
> having to learn a different way for every tool they use.
>
> So the default probably should follow the most common conventions, while
> still allowing a fairly easy way to change it to suit each user.
>
> The best approach might be to have the default adapt itself automatically
> to
> the platform the VM is running on, so that Windows users get Windows
> conventions, Mac users get Mac conventions, Linux users get Linux
> conventions.
>
> -t
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

-- 
Russ Whaley
whaley.r...@gmail.com


Re: [Pharo-users] Extract-method refactoring erratic behavior in Pharo 8

2020-08-02 Thread Tim Mackinnon
I think these ones should be testable quite easily - I wrote (when prompted by 
Stef) a series of tests for the text selection expansion commands which use a 
similar ast/node based inferencing - so  the refactorings should be written 
with an ast passed to them along with cursor and text selection positioning and 
that is all testable. (if its not this way, we should change it so it is unit 
testable like this).

If I can get some time (hopefully my newish job starts to lighten up a bit), I 
will try and have a look if no-one else has stepped in. I'm quite passionate in 
making pharo more "intellij fluid-like" so we can have an enjoyable keyboard 
centric, and fast modern refactoring experience as we have all the right 
tooling to do this really well.

Tim

On Sun, 2 Aug 2020, at 3:45 PM, tbrunz wrote:
> I found the same problem only yesterday when I tried "Extract method" in
> Pharo 8 (for the first time).
> 
> Comprehensive UI tests would be a great thing.  But complicated to create. 
> Like writing tutorials for GUI-based applications.  ;^)
> 
> Is there a way to emulate a GUI user and the actions of mouse moves & clicks
> (as well as keypresses)?  And to capture the results of pointing, clicking,
> right-click menu selections, etc?
> 
> Is there a UI testing framework for Pharo that includes this?  If not,
> should we start building one?
> 
> How much of the above is tied directly to Spec2 and how much is part of the
> core elements of Pharo?
> 
> -t
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
>



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Russ Whaley
Well, the very next step in the tutorial says:
How does this look?

Now we can open our task list manager as follows:

TODOApplication new run.

However, TODOApplication has not yet been connected to anything...
displaying the UI that is depicted in the tutorial is not achievable at
this point...
[image: image.png]
So, at this point I have to stop.  I've had similar issues with IMDB and
other tutorials where very important steps have been left out and I cannot
achieve the results depicted.  Some I'm able to figure out, many others I'm
just not experienced enough to know how best to proceed... sorry.

Another item I noticed - as I was interested in the onActivation /
onDeactivation...  there appears to be a misspelling in the instvar in the
SpCheckBoxTableColumn class - it says onDesactivation instead of
onDeactivation - there is an added 's'.  For now, I can change the tutorial
to match the class - however, if you attempt to save the code in the
tutorial, it would error.

I'm really looking forward to completing this tutorial - there looks to be
some great things I want to learn... but I can't get past the first few
issues :(

Russ





On Sun, Aug 2, 2020 at 2:22 PM Russ Whaley  wrote:

> Here are a couple of items with my first 5 minutes with the TODO
> tutorial...
>
> TODOListPresenter >> initializePresenters
>
>   todoListPresenter := self newTable
>   addColumn: ((SpCheckBoxTableColumn evaluated: [:task | task 
> isDone]) width: 20);
>   addColumn: (SpStringTableColumn title: 'Title' evaluated: 
> [:task | task title]);
>   yourself.
>
>   self layout: (SpBoxLayout newVertical
>   add: todoListPresenter;
>   yourself)
>
>
> In this portion (Showing Tasks) - it does not define todoListPresenter
> is it a local or a missed instVar.  I tried it first as a local to enable
> save, but then...
>
> TODOListPresenter >> updatePresenter
>
>   todoListPresenter items: TODOTask selectAll asOrderedCollection
>
>
> todoListPresenter isn't available for updatePresenter... so I'm assuming
> it must be an instvar?  I created accessors, then changed all the
> todoListPresenter references to use the accessors (below).
>
> TODOListPresenter >> initializePresenters
>
>   self todoListPresenter: (self newTable
>   addColumn: ((SpCheckBoxTableColumn evaluated: [:task | task 
> isDone]) width: 20);
>   addColumn: (SpStringTableColumn title: 'Title' evaluated: 
> [:task | task title]);
>   yourself).
>
>   self layout: (SpBoxLayout newVertical
>   add: self todoListPresenter;
>   yourself)
>
> and...
>
> TODOListPresenter >> updatePresenter
>
>   self todoListPresenter items: TODOTask selectAll asOrderedCollection
>
>
> Also, in the first example - task isDone needs to be defined (and might be
> defined later in the tutorial) - I'm assuming
> SpCheckBoxTableColumn>>evaluated: is expecting a boolean, or do I need to
> convert this somehow?  I can check all these things out - but just curious
> if I'm missing something?
>
> TODOTask >> done
>
>   ^ done
>
> TODOTask >> isDone
>
>   ^ self done
>
>
> I'll go through a bit more and update you on my progress.  Ted, I also
> hope to get to take a look at Zebra today :)
>
>
>
>
> On Sun, Aug 2, 2020 at 2:07 PM Stéphane Ducasse 
> wrote:
>
>>
>>
>> On 2 Aug 2020, at 19:51, tbrunz  wrote:
>>
>> I've been thinking lately that it would be nice to expand the number of
>> Pharo tutorials we have available.  But rather than (or along with)
>> creating
>> more "beginner" level tutorials, I'd like to see some good "intermediate"
>> level Pharo tutorials.
>>
>>
>> Me too :)
>>
>>
>> Let's do it, then.  I'll volunteer to do most of the work.  :^)
>>
>>
>> I will review anything you write :)
>>
>>
>> My hope is that participating in this will make me capable of creating
>> advanced tutorials all by myself.
>>
>>
>> I usually like to write to learn and dump what I learned.
>>
>>
>> I think that programmers who already know the Pharo
>> syntax and messaging semantics could benefit from more advanced tutorials
>> that demonstrate how to develop "real world" Pharo code for "real world"
>> processing needs.
>>
>>
>> Yes yes I would love that.
>>
>>
>> That was part of my motivation for creating a Pharo app to solve the Zebra
>> Puzzle.  First, of course, I wanted to solve it.  ;^)
>>
>>
>> I will send you some feeedback and PR.
>>
>>
>> What I'm talking about is something that assumes you know the language,
>> the
>> basics of the IDE (but not necessarily how to leverage its capabilities
>> to
>> aid development), and the basics of the foundation classes (but not its
>> details).  I'd like a tutorial for intermediate Pharo programmers who
>> want
>> to become experts with Pharo.  Something that can show you how to apply
>> the
>> tools of the IDE and the features of the language and base classes to
>> create
>> solutions that solve complex probl

Re: [Pharo-users] Working directory and image directory

2020-08-02 Thread tbrunz
You might like these, too (for newbies):

https://gist.github.com/tbrunz/f1d74353bdff7d40031b10d4220daaa9

https://gist.github.com/tbrunz/02d9a2f62053f8dfa4c229e5075d6796



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



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread tbrunz
Maybe more to the point: You do not want to *code a dependency on* what the
implementing class may do as far as the returned result.  :^)

"Brittle code" will eventually break.  Murphy's Law says that it will break
at the worst possible time for you to have to deal with it.  :^D



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



Re: [Pharo-users] Working directory and image directory

2020-08-02 Thread tbrunz
Hi Russ,

No, I haven't submitted it.  I figured it would be good practice for you to
do so!

-Ted



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



Re: [Pharo-users] Working directory and image directory

2020-08-02 Thread Russ Whaley
Ted,
Thank you very much for these detailed instructions! I have copied them out
for future use.  I can see I'm going to very much enjoy your tutorials :)

I hope to have time today to submit a couple issues I've run across.  Did I
see you submitted the workingDirectory/root bug?

Thanks,
Russ

On Sun, Aug 2, 2020 at 11:50 AM tbrunz  wrote:

> Russ,
>
> Here's a link; I created a GitHub gist in your honor:
>
> https://gist.github.com/tbrunz/4209026fabc44c5baf0a502f677b708c
>
> Please provide comments, improvements, corrections, or anything that will
> make it clearer for others who are in the same boat.
>
> Thanks!
> -Ted
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

-- 
Russ Whaley
whaley.r...@gmail.com


Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Russ Whaley
Here are a couple of items with my first 5 minutes with the TODO tutorial...

TODOListPresenter >> initializePresenters

todoListPresenter := self newTable
addColumn: ((SpCheckBoxTableColumn evaluated: [:task | task 
isDone])
width: 20);
addColumn: (SpStringTableColumn title: 'Title' evaluated: 
[:task |
task title]);
yourself.

self layout: (SpBoxLayout newVertical
add: todoListPresenter;
yourself)


In this portion (Showing Tasks) - it does not define todoListPresenter
is it a local or a missed instVar.  I tried it first as a local to enable
save, but then...

TODOListPresenter >> updatePresenter

todoListPresenter items: TODOTask selectAll asOrderedCollection


todoListPresenter isn't available for updatePresenter... so I'm assuming it
must be an instvar?  I created accessors, then changed all the
todoListPresenter references to use the accessors (below).

TODOListPresenter >> initializePresenters

self todoListPresenter: (self newTable
addColumn: ((SpCheckBoxTableColumn evaluated: [:task | task 
isDone])
width: 20);
addColumn: (SpStringTableColumn title: 'Title' evaluated: 
[:task |
task title]);
yourself).

self layout: (SpBoxLayout newVertical
add: self todoListPresenter;
yourself)

and...

TODOListPresenter >> updatePresenter

self todoListPresenter items: TODOTask selectAll asOrderedCollection


Also, in the first example - task isDone needs to be defined (and might be
defined later in the tutorial) - I'm assuming
SpCheckBoxTableColumn>>evaluated: is expecting a boolean, or do I need to
convert this somehow?  I can check all these things out - but just curious
if I'm missing something?

TODOTask >> done

^ done

TODOTask >> isDone

^ self done


I'll go through a bit more and update you on my progress.  Ted, I also hope
to get to take a look at Zebra today :)




On Sun, Aug 2, 2020 at 2:07 PM Stéphane Ducasse 
wrote:

>
>
> On 2 Aug 2020, at 19:51, tbrunz  wrote:
>
> I've been thinking lately that it would be nice to expand the number of
> Pharo tutorials we have available.  But rather than (or along with)
> creating
> more "beginner" level tutorials, I'd like to see some good "intermediate"
> level Pharo tutorials.
>
>
> Me too :)
>
>
> Let's do it, then.  I'll volunteer to do most of the work.  :^)
>
>
> I will review anything you write :)
>
>
> My hope is that participating in this will make me capable of creating
> advanced tutorials all by myself.
>
>
> I usually like to write to learn and dump what I learned.
>
>
> I think that programmers who already know the Pharo
> syntax and messaging semantics could benefit from more advanced tutorials
> that demonstrate how to develop "real world" Pharo code for "real world"
> processing needs.
>
>
> Yes yes I would love that.
>
>
> That was part of my motivation for creating a Pharo app to solve the Zebra
> Puzzle.  First, of course, I wanted to solve it.  ;^)
>
>
> I will send you some feeedback and PR.
>
>
> What I'm talking about is something that assumes you know the language,
> the
> basics of the IDE (but not necessarily how to leverage its capabilities
> to
> aid development), and the basics of the foundation classes (but not its
> details).  I'd like a tutorial for intermediate Pharo programmers who
> want
> to become experts with Pharo.  Something that can show you how to apply
> the
> tools of the IDE and the features of the language and base classes to
> create
> solutions that solve complex problems.
>
>
> do you have ideas?
>
>
> I do!
>
> As I started building the Logic Puzzle app, it occurred to me that I could
> probably find several different, common structures in OOP (specifically,
> Pharo) to add to the solution.  And then each would be its own example of
> "what real Pharo code looks like".  I.e., be good examples.
>
> But first, I needed to explore "how to do it in Pharo" for myself, which
> naturally would have me working the IDE strongly.
>
> Then I thought, the entire application can/should be an example, so it
> should be a tutorial.
>
> That means that I need more than just a completed application (that's "just
> an example").  To be a *tutorial*, it means starting from scratch, showing
> how to approach the solution, how to start a Pharo app, how to use the IDE,
> how to write tests, how to refactor code, etc.
>
> Then I thought, this needs a GUI.  Either a Spec2 UI or a web app UI (with
> Seaside or Teapot).  But I would need help with that!  So I'll start by
> creating a message-based solution, and maybe get help to add a UI later.
>
> I did some prototyping, then got what I think might be a good code
> structure
> (by version 4; it took a while to "think pure OOP"; old habits are hard to
> fight against).  It runs, it works.
>
> But.. Is it "good Pharo code"?  I'm not experienced enough to answer t

Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread tbrunz
>> Let's do it, then.  I'll volunteer to do most of the work.  :^)
>
>I will review anything you write :)

I'll write well and add lots of comments to make that easy for you.  :^D

>> My hope is that participating in this will make me capable of creating
>> advanced tutorials all by myself.
>
>I usually like to write to learn and dump what I learned.

That describes me very well, too.  Teaching others (who want to learn) is
fun.

That often provides just the motivation I need to make something, do it
right, and then publish the results (including my own insights).

And you learn best when you're teaching others.  I see that all the time.

So I don't really understand all these people who don't want to learn
anything -- don't want to learn something new, or don't want to learn better
ways of doing what they're already doing.

Maybe most of them are "too busy".  I'm too busy, but I work at it. (?)

 I think that programmers who already know the Pharo
 syntax and messaging semantics could benefit from more advanced
 tutorials
 that demonstrate how to develop "real world" Pharo code for "real
 world"
 processing needs.
>>>
>>> Yes yes I would love that.
>>
>> That was part of my motivation for creating a Pharo app to solve the
>> Zebra
>> Puzzle.  First, of course, I wanted to solve it.  ;^)
>
>I will send you some feeedback and PR.

Thanks!

-t



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



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread Stéphane Ducasse
ted basically 

> Dog class>>newWhite
>  "Returns a new white instance of receiver."
>  ^self new 
>color: Color white;
>yourself


is equivalent to 

> Dog class>>newWhite
>"Returns a new white instance of receiver.”

>   | instance |
  instance := self new.
  instance color: Color white;
> 
>^ instance


So this is really when you do not know what a subclass may do with 
reimplementing color: 
so yourself make sure that your extenders can be doing crazy things, your job 
is good. 

S. 


> On 2 Aug 2020, at 19:55, tbrunz  wrote:
> 
> Got it.  Seems like an important point for those who are trying to understand
> the difference between instances and classes.  
> 
> I've gotten strange results myself until I learned that #yourself is an
> essential thing...
> 
> -t
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread Stéphane Ducasse
+1 


> On 2 Aug 2020, at 19:37, Richard Sargent  wrote:
> 
> 
> 
> On August 2, 2020 10:16:54 AM PDT, tbrunz  wrote:
>> Thanks, Richard.  
>> 
>> So adding #yourself is mostly needed for cases where you send #add: to
>> an
>> OrderedCollection (because that returns the added element instead of
>> returning the collection as most expect it would)?
> 
> No.
> 
> It is used when you don't know what the last message send answers. And, 
> *that* is most of the time, because even when you know the answer today, you 
> don't know the future changes.
> 
> 
>> 
>> I've been adding it in all cases, which I guess does no harm.
> 
> That is the correct answer. Add it unless you want the result of the last 
> message send.
> 
> 
>> 
>> -t
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Stéphane Ducasse


> On 2 Aug 2020, at 19:51, tbrunz  wrote:
> 
>>> I've been thinking lately that it would be nice to expand the number of
>>> Pharo tutorials we have available.  But rather than (or along with)
>>> creating
>>> more "beginner" level tutorials, I'd like to see some good "intermediate"
>>> level Pharo tutorials.
>> 
>> Me too :)
> 
> Let's do it, then.  I'll volunteer to do most of the work.  :^)

I will review anything you write :)
> 
> My hope is that participating in this will make me capable of creating
> advanced tutorials all by myself.

I usually like to write to learn and dump what I learned.
> 
>>> I think that programmers who already know the Pharo
>>> syntax and messaging semantics could benefit from more advanced tutorials
>>> that demonstrate how to develop "real world" Pharo code for "real world"
>>> processing needs.
>> 
>> Yes yes I would love that.
> 
> That was part of my motivation for creating a Pharo app to solve the Zebra
> Puzzle.  First, of course, I wanted to solve it.  ;^)

I will send you some feeedback and PR.
> 
>>> What I'm talking about is something that assumes you know the language,
>>> the
>>> basics of the IDE (but not necessarily how to leverage its capabilities
>>> to
>>> aid development), and the basics of the foundation classes (but not its
>>> details).  I'd like a tutorial for intermediate Pharo programmers who
>>> want
>>> to become experts with Pharo.  Something that can show you how to apply
>>> the
>>> tools of the IDE and the features of the language and base classes to
>>> create
>>> solutions that solve complex problems.
>> 
>> do you have ideas?
> 
> I do!
> 
> As I started building the Logic Puzzle app, it occurred to me that I could
> probably find several different, common structures in OOP (specifically,
> Pharo) to add to the solution.  And then each would be its own example of
> "what real Pharo code looks like".  I.e., be good examples.
> 
> But first, I needed to explore "how to do it in Pharo" for myself, which
> naturally would have me working the IDE strongly.
> 
> Then I thought, the entire application can/should be an example, so it
> should be a tutorial.
> 
> That means that I need more than just a completed application (that's "just
> an example").  To be a *tutorial*, it means starting from scratch, showing
> how to approach the solution, how to start a Pharo app, how to use the IDE,
> how to write tests, how to refactor code, etc.
> 
> Then I thought, this needs a GUI.  Either a Spec2 UI or a web app UI (with
> Seaside or Teapot).  But I would need help with that!  So I'll start by
> creating a message-based solution, and maybe get help to add a UI later.
> 
> I did some prototyping, then got what I think might be a good code structure
> (by version 4; it took a while to "think pure OOP"; old habits are hard to
> fight against).  It runs, it works.
> 
> But.. Is it "good Pharo code"?  I'm not experienced enough to answer that
> question.  I need a code review, criticism, guidance.  Point me in the right
> direction and I'll keep working on it, and start thinking about how to
> express the "meta" elements (how to use the IDE to make/test the code,
> etc.).
> 
>>> What does the community think of this idea?
>> 
>> I love it. I did Pharo by example so that I can get of rid of the beginner
> parts.
>> After I did learning OOP and Pharo with style so that I do not have to talk
> about it
>> again.
>> 
>> So definitively.
> 
> Okay, great.  I'll do most of the work.  But I need help...
> 
> I don't want to go any further without someone much more experienced than I
> am to review what I have and let me know what I'm doing right & what I'm
> doing "no quite so right".  Yes, it runs, it works -- but that's *not* good
> enough.  The goal here isn't to "hack out a solution and move on", the goal
> is to "create an example and tutorial that's high enough quality to use to
> teach Pharo to other people".  I don't want to be teaching *my* bad habits!
> 
> Also, I know next to nothing about Spec2 or Seaside/Teapot.  I just know
> that I need to learn it, and I need to use it to give my tutorial a UI (or
> two).  Newcomers will show up wanting to learn Pharo, and they need to be
> reassured that they can create nice (enough) UIs without a huge effort. 
> (Not everyone is a command line hacker, and end-users certainly don't want
> to be.)
> 
> The more I learn (from you), the more I can be independent, and the more
> tutorials I could produce -- without a lot of help.  I'm willing to do the
> work, because that will help make me a Pharo "master programmer".  (I don't
> want to be a hack, and I can't really be a trainer if I'm just a hack
> myself.)  
> 
> I'll pay back the community by helping to attract and advance more
> developers' skills.  I just have to have the more advanced knowledge &
> skills myself.  So, train the (future) trainer, anyone??
> 
> -Ted
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 

-

Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread tbrunz
Got it.  Seems like an important point for those who are trying to understand
the difference between instances and classes.  

I've gotten strange results myself until I learned that #yourself is an
essential thing...

-t



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



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread tbrunz
>> I've been thinking lately that it would be nice to expand the number of
>> Pharo tutorials we have available.  But rather than (or along with)
>> creating
>> more "beginner" level tutorials, I'd like to see some good "intermediate"
>> level Pharo tutorials.
>
>Me too :)

Let's do it, then.  I'll volunteer to do most of the work.  :^)

My hope is that participating in this will make me capable of creating
advanced tutorials all by myself.

>>  I think that programmers who already know the Pharo
>> syntax and messaging semantics could benefit from more advanced tutorials
>> that demonstrate how to develop "real world" Pharo code for "real world"
>> processing needs.
>
>Yes yes I would love that.

That was part of my motivation for creating a Pharo app to solve the Zebra
Puzzle.  First, of course, I wanted to solve it.  ;^)

>> What I'm talking about is something that assumes you know the language,
>> the
>> basics of the IDE (but not necessarily how to leverage its capabilities
>> to
>> aid development), and the basics of the foundation classes (but not its
>> details).  I'd like a tutorial for intermediate Pharo programmers who
>> want
>> to become experts with Pharo.  Something that can show you how to apply
>> the
>> tools of the IDE and the features of the language and base classes to
>> create
>> solutions that solve complex problems.
>
>do you have ideas?

I do!

As I started building the Logic Puzzle app, it occurred to me that I could
probably find several different, common structures in OOP (specifically,
Pharo) to add to the solution.  And then each would be its own example of
"what real Pharo code looks like".  I.e., be good examples.

But first, I needed to explore "how to do it in Pharo" for myself, which
naturally would have me working the IDE strongly.

Then I thought, the entire application can/should be an example, so it
should be a tutorial.

That means that I need more than just a completed application (that's "just
an example").  To be a *tutorial*, it means starting from scratch, showing
how to approach the solution, how to start a Pharo app, how to use the IDE,
how to write tests, how to refactor code, etc.

Then I thought, this needs a GUI.  Either a Spec2 UI or a web app UI (with
Seaside or Teapot).  But I would need help with that!  So I'll start by
creating a message-based solution, and maybe get help to add a UI later.

I did some prototyping, then got what I think might be a good code structure
(by version 4; it took a while to "think pure OOP"; old habits are hard to
fight against).  It runs, it works.

But.. Is it "good Pharo code"?  I'm not experienced enough to answer that
question.  I need a code review, criticism, guidance.  Point me in the right
direction and I'll keep working on it, and start thinking about how to
express the "meta" elements (how to use the IDE to make/test the code,
etc.).

>> What does the community think of this idea?
>
>I love it. I did Pharo by example so that I can get of rid of the beginner
parts.
>After I did learning OOP and Pharo with style so that I do not have to talk
about it
>again.
>
>So definitively.

Okay, great.  I'll do most of the work.  But I need help...

I don't want to go any further without someone much more experienced than I
am to review what I have and let me know what I'm doing right & what I'm
doing "no quite so right".  Yes, it runs, it works -- but that's *not* good
enough.  The goal here isn't to "hack out a solution and move on", the goal
is to "create an example and tutorial that's high enough quality to use to
teach Pharo to other people".  I don't want to be teaching *my* bad habits!

Also, I know next to nothing about Spec2 or Seaside/Teapot.  I just know
that I need to learn it, and I need to use it to give my tutorial a UI (or
two).  Newcomers will show up wanting to learn Pharo, and they need to be
reassured that they can create nice (enough) UIs without a huge effort. 
(Not everyone is a command line hacker, and end-users certainly don't want
to be.)

The more I learn (from you), the more I can be independent, and the more
tutorials I could produce -- without a lot of help.  I'm willing to do the
work, because that will help make me a Pharo "master programmer".  (I don't
want to be a hack, and I can't really be a trainer if I'm just a hack
myself.)  

I'll pay back the community by helping to attract and advance more
developers' skills.  I just have to have the more advanced knowledge &
skills myself.  So, train the (future) trainer, anyone??
 
-Ted



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



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread Richard Sargent



On August 2, 2020 10:16:54 AM PDT, tbrunz  wrote:
>Thanks, Richard.  
>
>So adding #yourself is mostly needed for cases where you send #add: to
>an
>OrderedCollection (because that returns the added element instead of
>returning the collection as most expect it would)?

No.

It is used when you don't know what the last message send answers. And, *that* 
is most of the time, because even when you know the answer today, you don't 
know the future changes.


>
>I've been adding it in all cases, which I guess does no harm.

That is the correct answer. Add it unless you want the result of the last 
message send.


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



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread tbrunz
Thanks, Richard.  

So adding #yourself is mostly needed for cases where you send #add: to an
OrderedCollection (because that returns the added element instead of
returning the collection as most expect it would)?

I've been adding it in all cases, which I guess does no harm.

-t



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



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread Richard Sargent



On August 2, 2020 9:25:32 AM PDT, tbrunz  wrote:
>Shouldn't this code
>
>> So if you implement a #newWhite method in the "class side" of Dog, it
>> would be something like this. 
>> 
>> Dog class>>newWhite
>>   "Returns a new white instance of receiver."
>>   ^self new color: Color white
>
>be this instead?
>
>> Dog class>>newWhite
>>   "Returns a new white instance of receiver."
>>   ^self new 
>> color: Color white;
>> yourself
>
>in order to return the new Dog instance?  Otherwise it will return the
>Dog
>class itself (not what you expected?

No. It cannot answer the class. It will answer the result of the last message 
send. That could be the new instance OR the result of sending #white to Color.

This latter point is the reason why people generally like to include the 
#yourself message in the cascade.


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



Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread tbrunz
It might be best to have this be configurable/customizable for each user
(which is what I think you're getting at).

The question is what should the default "out of the box" behavior be?  There
are conventions, although they're not exactly "standardized" (as they should
be).  

Most of us have "muscle memory" for many of these operations: Go forward one
word, select a paragraph, expectations of where the cursor will be when you
go forward/backward word-by-word, etc. and I don't think anyone enjoys
having to learn a different way for every tool they use.

So the default probably should follow the most common conventions, while
still allowing a fairly easy way to change it to suit each user.  

The best approach might be to have the default adapt itself automatically to
the platform the VM is running on, so that Windows users get Windows
conventions, Mac users get Mac conventions, Linux users get Linux
conventions.

-t



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



Re: [Pharo-users] smalltalkhub down

2020-08-02 Thread Stéphane Ducasse
Yes the old server is having pain. 
I will advertise a bit http://static.smalltalkhub.com/

S

> On 13 Jul 2020, at 21:19, Sven Van Caekenberghe  wrote:
> 
> Hi Christophe,
> 
> Thanks a lot for taking care.
> 
> About the static version: that already looks great, it even has a search 
> interface.
> 
> What functionality is still missing if I may ask ? Do you need help ?
> 
> I think it would be good to switch to this version as soon as possible to 
> prevent future complaints.
> 
> Sven
> 
>> On 13 Jul 2020, at 20:35, Christophe Demarey  
>> wrote:
>> 
>> Hi all,
>> 
>> Sorry for the downtime. Smalltalkhub should be up again.
>> Also, even if it is not yet fully ready, you can take a look at the static 
>> version of smalltalkhub: http://static.smalltalkhub.com/
>> 
>> Regards
>> 
>>> Le 13 juil. 2020 à 17:20, Offray Vladimir Luna Cárdenas 
>>>  a écrit :
>>> 
>>> I can confirm all these issues, from StHub non-available to error 400,
>>> to VOMongoConnextionError.
>>> 
>>> For me, anything that allow us to keep running GitMigrationTool as
>>> documentent would be good, no matter if the site is static or not. If
>>> web interface is not available, but there is anyway to get a list of the
>>> projects one once hosted in StHub, that's fine.
>>> 
>>> Cheers,
>>> 
>>> Offray
>>> 
>>> On 13/07/20 8:15 a. m., Sven Van Caekenberghe wrote:
 Yes, when you try to download a .mcz file you get a 
 VOMongoConnectionError. 
 
 So something is still not right.
 
 It would probably be better to move to a statically hosted web site ASAP, 
 but then people will probably complain that the web UI is gone.
 
> On 13 Jul 2020, at 11:57, Roch-Alexandre Nominé  
> wrote:
> 
> Hi Sven,
> 
> The web interface is up but it seems impossible to download .mcz , every 
> attempt ends with a timeout.
> 
> Best regards
> 
> Roch.
> 
> Le lun. 13 juil. 2020 à 10:06, Sven Van Caekenberghe  a 
> écrit :
> 
> 
>> On 12 Jul 2020, at 11:19, Sven Van Caekenberghe  wrote:
>> 
>> I am sure somebody will fix the *readonly* version of SmalltalkHub as 
>> soon as possible.
> It is up again.
> 
> But, https://downforeveryoneorjustme.com/github !
 
>>> 
>> 
>> 
> 
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Text-Editing UI

2020-08-02 Thread Stéphane Ducasse
Hello Alex

> Hello. I would like to modify the text-editing UI in Pharo to add some 
> affordances I’m accustomed to from MacOS. Specifically, right now 
> command(a.k.a. meta)-left/right-arrow moves one word left/right in Pharo, 
> whereas on MacOS this is done with the option(a.k.a. alt)-key, and 
> command-left/right-arrow moves to the start/end of the current visual line.

We would love you to be able to do it. 

> Another MacOS convention I use a lot and would like in Pharo is triple-click 
> to select a whole paragraph. And if I can implement that, I would also like 
> to disable the corresponding Pharo convention (double click at the start or 
> end of the paragraph).
For the tripple-click I do not know. 

Now if you want to try use the headless vm (because we are introducing SDL20 as 
a backend to capture event and expose them to the user
so you will be able to get all the events from the OS and not some as it was 
previously the case) and ask. 
Using SDL20 we were able to implement several gesture recognition in the past. 

> Some smaller things that I’m also not used to: When moving the text cursor 
> one word at a time, Pharo treats white space as words, whereas MacOS skips 
> over white space. Conversely, when double-clicking to select a whole word, 
> MacOS treats white space between words like a word, whereas Pharo selects the 
> adjacent word.

Yes Pharo could really improve from that perspectiv. If you provide a fix we 
will really look at it and probably accept it. 
At some point we want to have move to the end of the next word. :)

> So anyway, I’m wondering what I would have to modify to customize these UI 
> conventions. I didn’t see anything relevant in the settings browser. (There 
> was a "Skip over white space” option under "Text Editing," but it didn’t 
> affect how the move-cursor-one-word-at-a-time keystrokes work, so I don’t 
> know what it does.) Does anyone have any pointers on where these behaviors 
> are encoded in the system?

Check the keymapper.
And what you should know is that we are not happy with the text editor (Rubric 
was never made to stay). 

> Or if someone has already posted a package for customizing this sort of thing?
> 
> Alex Landraitis


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] About some stuff to know if I launch new project to build Graphical User Interface for a database...

2020-08-02 Thread Stéphane Ducasse
Hello patrick

> I'm testing pharo and I would like to know about some things I can't yet 
> really get with documentation :
> 1. I was asking myself about delivries for (no pharo) end users. I don't want 
> end user use pharo launcher and look at image to load it. I saw article about 
> to build standalone executable but it was for website into a serveur. What 
> about standalone application with graphical interface ?
> 
> 
Yes the PharoLauncher is the typical example of this. 
You can also run pharo without ui or customize i
> 2. What differences between each smalltalk implementations ? What about Gnu 
> Smalltalk, Smalltalk/X, VisualWork or Pharo ? Do you know a functionnal 
> benchmark web page ?
> 
No because you compare apples with oranges. 
VIsualWorks is proprietary 
Smalltalk/X is not supported nor open source
GnuSmalltalk (check the activity)
> 3. What about standard about pharo language and libraries ?
> 
I do not get your question. 
If you want to have answers to people deploying pro applications with Pharo you 
can ask on the discord
channel (databases, general, seaside for example). 

> It look pretty difficult to get ride with smalltalk libraries…
> 
I do not understand what you means. You can try in french since we understand 
it well too :)

> What do you recomand to know about libaries and tools to build a graphical 
> application with embeded  database application (Like firebird or EasySQL or 
> PostGresql) ?
> 
We do not have an easy builder.
For graphical applications you can use Spec1 (we are about to release Spec2) we 
are slowly rewriting the book 
for spec20. Here is a small tutorial
https://github.com/Ducasse/smalltodo-example/blob/master/SmallTODO-Tutorial-1.md

> Do I need an Object Mapping Framework ?
> 
Not necessarily
You have Restore
Glorp (check the book, you may have to load the code from github instead of 
smalltalkhub). 
Both are open-source
You have P3 as a great support for database. 
But the best you can do is to ask in the database channel on  
https://discord.gg/QewZMZa 
> Do you know one open source ?
> 
You have also document oriented DB support (check the booklet on Voyage) on 
http://books.pharo.org
> 4. What about database reporting (with subreports) framework/library ?
> 
I do not know

> 5. What about smart forms with Database ?
> 

> 6. I'm programming into Linux Mint 9.3. Can I build delivry for Windows from 
> Linux Mint ?
> 
Sure we deliver from any platforms to any other one. 

> Do I need to export/import my project into Windows in order to build Windows 
> delivry ?
> 


> Is'it possible to launch an executable from USB without no install ?
> 
Yes this is the way I was used to give lecture. Bring the VM and the image on a 
stick and students just copy it. 

> 7. I would like to use events to program Graphical User Interfaces as 
> database frontend.
> 
I could not really understand events. We have announcements and the graphical 
libraries can register callbacks
and notification. But this is the job of the libraries to decide how to do it 
and as developers we follow.
> Do you know avanced book to explain semaphores,
> 
http://books.pharo.org
Check the booklet on concurrent programming
> graphicals framework for cross delivries (Linux / Windows) ?
> 
http://books.pharo.org Spec book but with Spec2 you will be able to use GTK as 
backends

> Thank you in advance for your responses.

Do not hesitate to ask. 
You can also chat with us (even if a part of the crew in Lille will be on 
vacation soon)
My little advice is the following: Pharo is really powerful but it can feel 
strange.
It is not perfect but we are working daily on it to improve it. 
And Pharo is not a product so it means that you can also enhance it, modify it 
to fit your need.

> -- 
> M Patrick GELIN
> 78 rue du Truchay
> 38690 BELMONT
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread tbrunz
Shouldn't this code

> So if you implement a #newWhite method in the "class side" of Dog, it
> would be something like this. 
> 
> Dog class>>newWhite
>   "Returns a new white instance of receiver."
>   ^self new color: Color white

be this instead?

> Dog class>>newWhite
>   "Returns a new white instance of receiver."
>   ^self new 
> color: Color white;
> yourself

in order to return the new Dog instance?  Otherwise it will return the Dog
class itself (not what you expected?

-t



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



Re: [Pharo-users] A question concerning Nautilus

2020-08-02 Thread Stéphane Ducasse
Thanks I will check PBE8

S. 


> On 14 Jul 2020, at 03:58, Serge Stinckwich  wrote:
> 
> Hi René,
> 
> use instead:
> 
> ClyFullBrowser openOnMethod: Integer >> #factorial 
> 
> Book should be updated for Pharo 8 :-)
> Regards,
> 
> On Mon, Jul 13, 2020 at 10:42 PM Rene Paul Mages (ramix)  > wrote:
> Hello,
> 
> In the chapter 2 ( A quick tour of Pharo )  of this book :
> 
> https://github.com/SquareBracketAssociates/UpdatedPharoByExample 
> 
> 
>  we can read :
> 
> http://ramix.org/pharo/UpdatePBE/TheSystemBrowser.png 
> 
> 
> When I "do it" the following code Nautilus don't open on the method
> factorial :
> 
> http://ramix.org/pharo/UpdatePBE/Nautilus.png 
> 
> 
> I am running Pharo version 8.0. under a 64 bits Linux machine.
> 
> -- 
> Thanks for your help
> Rene Paul Mages ( GnuPG_key 0x9840A6F7 )
> http://www.pharo.fr 
> http://www.linux-azur.org/ramix 
> http://twitter.com/RenePaulMages 
> 
> 
> 
> 
> 
> 
> -- 
> Serge Stinckwic​h​
> https://twitter.com/SergeStinckwich 
> ​


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Smalltalkhub delete date

2020-08-02 Thread Stéphane Ducasse
Hi Paul

I could not really understand what you mean 
since we will not delete anything. Just make the archive readonly. 
We planned to have SmalltalkHub turn into a file server around november 

https://pharoweekly.wordpress.com/2020/04/03/smalltalkhub-deprecation-notice/

S.

> On 10 Jul 2020, at 16:37, Paul DeBruicker  wrote:
> 
> Hi 
> 
> Would someone please add the date you're going to delete smalltalkhub to 
> every page on Smalltalkhub?  
> 
> Thanks
> 
> Paul
> 
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Class side vs instance side (variables and methods)

2020-08-02 Thread Stéphane Ducasse
Hello patrick

Welcome

> 
> Subject: Class side vs instance side (variables and methods)
> Date: 29 July 2020 at 01:34:22 CEST
> To: Any Question About Pharo Is Welcome 
> 
> 
> Being new not only to Smalltalk, but OOP in general, I think I finally am 
> understanding things.

Did you read my learning OOP book?
It does not contain the answer but …

> One area I am still unsure about is the class side versus the instance side. 
> Does one usually use the class side when they want those inherited in every 
> subclass, which frees one from having to declare them in every instance?

No

Class side instances are 
- to share state among all instances (including subinstances)
- state for classes.


You have classVariables (should be renamed sharedVariables) and this is 
different from class instance variables (which are just instance variables of 
classes
and since classes are kind of global you can use also to have act as shared 
variables). The difference being that there is only one 
classVar(sharedVariable) per hierarchy while you have one class instance 
variable per class. 

S. 

Re: [Pharo-users] Extract-method refactoring erratic behavior in Pharo 8

2020-08-02 Thread tbrunz
> the problem is that right now we can write tests for UI and we try hard to
do it but 
> as soon as we have a pop up we do not have yet a way to capture this
> interaction. 
> We were discussing about it and got it by the covid. 

So many things have been impacted by COVID.  Now we have new ways of
working.

>> Is there a way to emulate a GUI user and the actions of mouse moves &
>> clicks
>> (as well as keypresses)?  
> Yes. 
> You can have a look at Spec20 tests

I guess it's time for me to dive into Spec2...  I want to add a Spec2 UI to
my Zebra Puzzle tutorial.  That certainly will require UI tests, too.

>> And to capture the results of pointing, clicking,
>> right-click menu selections, etc?
>>
>> Is there a UI testing framework for Pharo that includes this?  If not,
>> should we start building one?

> We are missing a way to model pop up and more. 

That sounds like the first step, then...

-t



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



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Stéphane Ducasse


> On 2 Aug 2020, at 15:33, Russ Whaley  wrote:
> 
> EXACTLY!, Stéphane, thank you! I will go through this tutorial today. 
> 
> Has anyone written any documentation or maybe a tool that would help 
> understand what each ‘widget’ is capable of? I review all example code, read 
> all class comments and peruse the class hierarchy, but when a widget 
> capability doesn’t work for me, I don’t know whether I’m using it 
> incorrectly, in the wrong place, or if it’s a bug.. I.e filter/sort, 
> TransmitTo:, drag and drop, double-click, right-click, presenter management 
> (modal, etc), and how to force the display to refresh, etc.  Your thoughts?

Same feeling for me. 

This is why I would like 
- to have the time to propose a way to mark API elements so that we can build a 
little tools to show the API of each widget
We did this in Spec1 and it supported the auto documentation of the system.

- to have better method comments, and class comments. 

- that esteban write more doc. I decided that I will not write anything before 
(because I’m TIRED to learn by try and error to be able to write 
documentation). 
I will never do that again. It is not fun and I prefer to focus on my stupid 
projects because I know them. 

So if you want to help me. 
Ask for them :)

> I appreciate (and admire) all the work you and everyone put into the 
> documentation and tutorials - and I am voracious in consuming them.

Thanks!

> I hope to build my skills to be able to contribute for the community. 
If you find typos or strange english let us know. Because this is already a 
contribution

> 
> Thanks!
> Russ
> 
> On Sun, Aug 2, 2020 at 5:07 AM Stéphane Ducasse  > wrote:
> 
> 
>> On 29 Jul 2020, at 05:06, Russ Whaley > > wrote:
>> 
>> Back on the 'Intermediate Tutorials' question...
>> 
>> I would love to see intermediate tutorials on Spec2 and Seaside and 
>> perhaps how to best adapt an (Sp)Application to serve both 'presenters' with 
>> guidelines on what responsibility goes where on the presenter/component, 
>> application, and model(s).  
> 
> Agreed. 
> Now for the seaside tutorials please ask seasiders because what is killing me 
> is to have to deeply learning something before writing
> may be one person can write some blog posts. 
> 
> For Spec2 we will but I’m waiting for esteban to write and I do a pass after. 
> 
>> What I found most useful in tutorials is specific examples. To me, generic 
>> examples can be too easily misunderstood - making them difficult to 
>> (re)apply.  A specific example, even if silly, can really make a difference…
> 
> Yes!
> Did you see
> 
> https://github.com/Ducasse/smalltodo-example/blob/master/SmallTODO-Tutorial-1.md
>  
> 
> 
> 
>> i.e. I'm never going to create a GUI based on the Class/method hierarchy and 
>> I find it very difficult to apply those examples (although they are slick) 
>> to my application needs.
>> 
>> I love looking at how other people approach problems, identify solutions (I 
>> can't wait to dig into the logic-puzzle code).  This mailing list is great, 
>> but more - and more advanced - tutorials would be very much appreciated!
>> 
>> Thanks!
>> Russ
>> 
>> 
>> On Mon, Jul 27, 2020 at 11:45 PM tbrunz > > wrote:
>> So I decided to write an application to solve the Zebra Puzzle, by solving
>> this type of problem in general.  In Pharo, of course.  
>> 
>> I worked out a few basic algorithms for making deductions and inferences,
>> and coded them, along with tests, in Pharo 8.  Now I've reached the point of
>> having a working "proof of concept" or prototype.  It can't (yet) solve the
>> Zebra Puzzle without some "human assistance", but it does keep track of the
>> solution state as it progresses, it handles the bookkeeping, makes the basic
>> deductions/inferences, and produces reports.
>> 
>> And I've used it to quickly solve the Zebra Puzzle.  I coded the solution as
>> a separate class/method, with extra rules inserted that I was able to infer
>> by iterating to partial solutions, so that it solves the entire thing.  It
>> will interesting to develop the remaining algorithms, and it would be nice
>> to eventually create a nice, interactive user interface for it as well.
>> 
>> Since I want to fashion this into an intermediate-level tutorial, I need
>> feedback on what I have so far.  I don't want my inexperience to lead to me
>> teaching the wrong techniques, etc. to other developers who are learning
>> Pharo.  What I have can no doubt be improved, but I need to hear from the
>> master craftsman in this community what parts are compromised and how (and
>> why) it can be made a better example of "how to program in Pharo" properly.
>> 
>> If anyone has the time and is willing to help, the code (complete with class
>> & method comments, test classes/methods, and the Zebra Puzzle example) is
>>

Re: [Pharo-users] Extract-method refactoring erratic behavior in Pharo 8

2020-08-02 Thread Stéphane Ducasse


> On 2 Aug 2020, at 16:45, tbrunz  wrote:
> 
> I found the same problem only yesterday when I tried "Extract method" in
> Pharo 8 (for the first time).
> 
> Comprehensive UI tests would be a great thing.  But complicated to create. 
> Like writing tutorials for GUI-based applications.  ;^)

the problem is that right now we can write tests for UI and we try hard to do 
it but 
as soon as we have a pop up we do not have yet a way to capture this 
interaction. 
We were discussing about it and got it by the covid. 

> Is there a way to emulate a GUI user and the actions of mouse moves & clicks
> (as well as keypresses)?  
Yes. 
You can have a look at Spec20 tests

> And to capture the results of pointing, clicking,
> right-click menu selections, etc?
> 
> Is there a UI testing framework for Pharo that includes this?  If not,
> should we start building one?

We are missing a way to model pop up and more. 

> 
> How much of the above is tied directly to Spec2 and how much is part of the
> core elements of Pharo?
> 
> -t
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Working directory and image directory

2020-08-02 Thread tbrunz
Russ,

Here's a link; I created a GitHub gist in your honor:

https://gist.github.com/tbrunz/4209026fabc44c5baf0a502f677b708c

Please provide comments, improvements, corrections, or anything that will
make it clearer for others who are in the same boat.

Thanks!
-Ted



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



Re: [Pharo-users] Working directory and image directory

2020-08-02 Thread tbrunz
Hi Russ,

Here's how to submit a bug report.  Fortunately, GitHub makes it easy and
straightforward.

Surf to https://github.com/pharo-project and find the particular project
that's affected.  I think in your case, you want "pharo": 
https://github.com/pharo-project/pharo

Underneath "pharo-project/pharo" you'll see 7 links in a toolbar.  Click on
"Issues", which brings you here:
https://github.com/pharo-project/pharo/issues

On the right is a big green button, "New issue".  Click that to get a bug
entry form.  You have a bug, so click the "Get started" button for "Bug
report".

Choose a good title, nicely worded, to be nice to the devs so they can get a
good idea from just a glance.  Short & sweet.  (They prefer 50 characters or
less, because your title becomes an email "Subject:" line.)

There's a template bug report that tells you what they need from you.  You
can edit it or replace it with your bug report.  Markdown is supported (and
can help with readability).  A "cheat sheet" is here: 
https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf and a more
detailed explanation is here: 
https://guides.github.com/features/mastering-markdown/

The toolbar above the text area will apply the most-commonly-used markdown
for you, with just a button click.  Select text, click the associated
button.

You can click the "Preview" button to see how your markdown will be rendered
in the submitted report; click on "Write" to return to the editable version
you started with.

Note that you can attached code, files, images, etc. to help explain.  Just
drag files into the text area of your report and they'll automagically be
attached for you.  Similarly, you can click where it says, "Attach files by
dragging & dropping, selecting or pasting them" and it will open a file
browser for you to point-and-click.

When you're done, click "Submit new issue".  That it!

-t






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



Re: [Pharo-users] Extract-method refactoring erratic behavior in Pharo 8

2020-08-02 Thread tbrunz
I found the same problem only yesterday when I tried "Extract method" in
Pharo 8 (for the first time).

Comprehensive UI tests would be a great thing.  But complicated to create. 
Like writing tutorials for GUI-based applications.  ;^)

Is there a way to emulate a GUI user and the actions of mouse moves & clicks
(as well as keypresses)?  And to capture the results of pointing, clicking,
right-click menu selections, etc?

Is there a UI testing framework for Pharo that includes this?  If not,
should we start building one?

How much of the above is tied directly to Spec2 and how much is part of the
core elements of Pharo?

-t





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



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Russ Whaley
EXACTLY!, Stéphane, thank you! I will go through this tutorial today.

Has anyone written any documentation or maybe a tool that would help
understand what each ‘widget’ is capable of? I review all example code,
read all class comments and peruse the class hierarchy, but when a widget
capability doesn’t work for me, I don’t know whether I’m using it
incorrectly, in the wrong place, or if it’s a bug.. I.e filter/sort,
TransmitTo:, drag and drop, double-click, right-click, presenter management
(modal, etc), and how to force the display to refresh, etc.  Your thoughts?

I appreciate (and admire) all the work you and everyone put into the
documentation and tutorials - and I am voracious in consuming them. I hope
to build my skills to be able to contribute for the community.

Thanks!
Russ

On Sun, Aug 2, 2020 at 5:07 AM Stéphane Ducasse 
wrote:

>
>
> On 29 Jul 2020, at 05:06, Russ Whaley  wrote:
>
> Back on the 'Intermediate Tutorials' question...
>
> I would love to see intermediate tutorials on Spec2 and Seaside and
> perhaps how to best adapt an (Sp)Application to serve both 'presenters'
> with guidelines on what responsibility goes where on the
> presenter/component, application, and model(s).
>
>
> Agreed.
> Now for the seaside tutorials please ask seasiders because what is killing
> me is to have to deeply learning something before writing
> may be one person can write some blog posts.
>
> For Spec2 we will but I’m waiting for esteban to write and I do a pass
> after.
>
> What I found most useful in tutorials is specific examples. To me, generic
> examples can be too easily misunderstood - making them difficult to
> (re)apply.  A specific example, even if silly, can really make a difference…
>
>
> Yes!
> Did you see
>
>
> https://github.com/Ducasse/smalltodo-example/blob/master/SmallTODO-Tutorial-1.md
>
>
> i.e. I'm never going to create a GUI based on the Class/method hierarchy
> and I find it very difficult to apply those examples (although they are
> slick) to my application needs.
>
> I love looking at how other people approach problems, identify solutions
> (I can't wait to dig into the logic-puzzle code).  This mailing list is
> great, but more - and more advanced - tutorials would be very much
> appreciated!
>
> Thanks!
> Russ
>
>
> On Mon, Jul 27, 2020 at 11:45 PM tbrunz  wrote:
>
>> So I decided to write an application to solve the Zebra Puzzle, by solving
>> this type of problem in general.  In Pharo, of course.
>>
>> I worked out a few basic algorithms for making deductions and inferences,
>> and coded them, along with tests, in Pharo 8.  Now I've reached the point
>> of
>> having a working "proof of concept" or prototype.  It can't (yet) solve
>> the
>> Zebra Puzzle without some "human assistance", but it does keep track of
>> the
>> solution state as it progresses, it handles the bookkeeping, makes the
>> basic
>> deductions/inferences, and produces reports.
>>
>> And I've used it to quickly solve the Zebra Puzzle.  I coded the solution
>> as
>> a separate class/method, with extra rules inserted that I was able to
>> infer
>> by iterating to partial solutions, so that it solves the entire thing.  It
>> will interesting to develop the remaining algorithms, and it would be nice
>> to eventually create a nice, interactive user interface for it as well.
>>
>> Since I want to fashion this into an intermediate-level tutorial, I need
>> feedback on what I have so far.  I don't want my inexperience to lead to
>> me
>> teaching the wrong techniques, etc. to other developers who are learning
>> Pharo.  What I have can no doubt be improved, but I need to hear from the
>> master craftsman in this community what parts are compromised and how (and
>> why) it can be made a better example of "how to program in Pharo"
>> properly.
>>
>> If anyone has the time and is willing to help, the code (complete with
>> class
>> & method comments, test classes/methods, and the Zebra Puzzle example) is
>> here:
>> https://github.com/tbrunz/logic-puzzle and I'm available to answer
>> questions
>> about it, of course.
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>
> --
> Russ Whaley
> whaley.r...@gmail.com
>
>
> 
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Aurore Dalle
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley
> 
> ,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>
> --
Russ Whaley
whaley.r...@gmail.com


Re: [Pharo-users] Cmd+s in P8 not captured using Commander (works in P9) and SpTextPresenter

2020-08-02 Thread Stéphane Ducasse
Can you open a bug entry with your solution?
Like that I can point it to steven.

tx

> On 30 Jul 2020, at 05:10, Hernán Morales Durand  
> wrote:
> 
> I found a difference in shortcut handling between Pharo 8 and Pharo 9 which 
> you can reproduce with the attached minimum working example. In the example, 
> the halt in the Command's #execute method in P9 is sent but not in P8.
> 
> SpComm2SaveTextMWE show.
> 
> The problem seems to be Pharo 8 doesn't execute the KMKeymap callback 
> configured for Cmd+s in SpKMCategoryBuilder>>visitCommand: while Pharo 9 does.
> 
> In some way the only way to capture the Accept keypress is to modify the 
> #buildShortcutsOn: method in RubTextEditor, but I'd like to avoid such 
> approach.
> 
> Is there any workaround to this?
> 
> Cheers,
> 
> Hernán
> 
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Working directory and image directory

2020-08-02 Thread Stéphane Ducasse
Hi Davide 

Can you open a bug entry on Pharo and on Fuel?

S. 

> On 31 Jul 2020, at 11:37, Davide Varvello  wrote:
> 
> 
> From: Davide Varvello 
> Subject: Re: Working directory and image directory
> Date: 31 July 2020 at 11:37:22 CEST
> To: pharo-users@lists.pharo.org
> 
> 
> Hi
> 
> Isn't it weird this behavior for the community? Should I open a bug?
> Cheers
> Davide
> 
> 
> Pharo Smalltalk Users mailing list wrote
>> Hi Guys,
>> As I already described here:
>> http://forum.world.st/Fuel-FLSerializer-tests-are-not-working-pharo-8-td5120052.html
>> there is something weird on Pharo 8 (on Mac) because I'm running an image
>> that is in the same directory of the Pharo.app but "FileLocator
>> workingDirectory" give me the root directory.
>> 
>> I expected the same directory where there is Pharo.app
>> Cheers
>> Davide
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
> 
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Extract-method refactoring erratic behavior in Pharo 8

2020-08-02 Thread Stéphane Ducasse



> On 31 Jul 2020, at 20:21, Esteban Maringolo  wrote:
> 
> Hi,
> 
> I get, more often than not, a message indicating an "invalid source to
> extract", commonly with the "End of statement list encountered"
> explanation.
> 
> In comparison, I can extract the same code in Pharo 4. Is there a
> reason why the "Extract method" refactoring is not working in Pharo 8
> as it was in that or any other version?

I asked my self this exact question. The answer is 
without UI tests we are doomed to break things. 


S. 




Re: [Pharo-users] Extract-method refactoring erratic behavior in Pharo 8

2020-08-02 Thread Stéphane Ducasse


> On 1 Aug 2020, at 01:58, Tim Mackinnon  wrote:
> 
> Well said. Yes - we should work on our refactoring tools a lot more.  As the 
> inventors of refactoring and the tools that back it, we’ve got to a place 
> where we are a bit poor in this area - it’s not fluid and easy like it should 
> be. Although - hats off to the automatic rewrite tools for migration - that 
> is very neat. But let’s rally around making the basic refactorings enjoyable 
> and easy again.

Please help us. 
> 
> Tim 
> 
>> On 31 Jul 2020, at 19:23, Esteban Maringolo  wrote:
>> 
>> Hi,
>> 
>> I get, more often than not, a message indicating an "invalid source to
>> extract", commonly with the "End of statement list encountered"
>> explanation.
>> 
>> In comparison, I can extract the same code in Pharo 4. Is there a
>> reason why the "Extract method" refactoring is not working in Pharo 8
>> as it was in that or any other version?
>> 
>> Thanks!
>> 
>> Esteban A. Maringolo
>> 
> 
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Editing in Pharo Debugger

2020-08-02 Thread Stéphane Ducasse
can you open a bug entry?
Because we should get this back. 

> On 30 Jul 2020, at 03:48, horrido  wrote:
> 
> The latest 9.0 64-bit development version that I downloaded earlier this
> week.
> 
> 
> 
> tbrunz wrote
>> For which version, Richard?
>> 
>> I get the "orange triangle" in Pharo 8.
>> 
>> -t
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
> 
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Stéphane Ducasse


> On 29 Jul 2020, at 05:06, Russ Whaley  wrote:
> 
> Back on the 'Intermediate Tutorials' question...
> 
> I would love to see intermediate tutorials on Spec2 and Seaside and 
> perhaps how to best adapt an (Sp)Application to serve both 'presenters' with 
> guidelines on what responsibility goes where on the presenter/component, 
> application, and model(s).  

Agreed. 
Now for the seaside tutorials please ask seasiders because what is killing me 
is to have to deeply learning something before writing
may be one person can write some blog posts. 

For Spec2 we will but I’m waiting for esteban to write and I do a pass after. 

> What I found most useful in tutorials is specific examples. To me, generic 
> examples can be too easily misunderstood - making them difficult to 
> (re)apply.  A specific example, even if silly, can really make a difference…

Yes!
Did you see

https://github.com/Ducasse/smalltodo-example/blob/master/SmallTODO-Tutorial-1.md


> i.e. I'm never going to create a GUI based on the Class/method hierarchy and 
> I find it very difficult to apply those examples (although they are slick) to 
> my application needs.
> 
> I love looking at how other people approach problems, identify solutions (I 
> can't wait to dig into the logic-puzzle code).  This mailing list is great, 
> but more - and more advanced - tutorials would be very much appreciated!
> 
> Thanks!
> Russ
> 
> 
> On Mon, Jul 27, 2020 at 11:45 PM tbrunz  > wrote:
> So I decided to write an application to solve the Zebra Puzzle, by solving
> this type of problem in general.  In Pharo, of course.  
> 
> I worked out a few basic algorithms for making deductions and inferences,
> and coded them, along with tests, in Pharo 8.  Now I've reached the point of
> having a working "proof of concept" or prototype.  It can't (yet) solve the
> Zebra Puzzle without some "human assistance", but it does keep track of the
> solution state as it progresses, it handles the bookkeeping, makes the basic
> deductions/inferences, and produces reports.
> 
> And I've used it to quickly solve the Zebra Puzzle.  I coded the solution as
> a separate class/method, with extra rules inserted that I was able to infer
> by iterating to partial solutions, so that it solves the entire thing.  It
> will interesting to develop the remaining algorithms, and it would be nice
> to eventually create a nice, interactive user interface for it as well.
> 
> Since I want to fashion this into an intermediate-level tutorial, I need
> feedback on what I have so far.  I don't want my inexperience to lead to me
> teaching the wrong techniques, etc. to other developers who are learning
> Pharo.  What I have can no doubt be improved, but I need to hear from the
> master craftsman in this community what parts are compromised and how (and
> why) it can be made a better example of "how to program in Pharo" properly.
> 
> If anyone has the time and is willing to help, the code (complete with class
> & method comments, test classes/methods, and the Zebra Puzzle example) is
> here:
> https://github.com/tbrunz/logic-puzzle 
>  and I'm available to answer questions
> about it, of course.
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html 
> 
> 
> 
> 
> -- 
> Russ Whaley
> whaley.r...@gmail.com 

Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-08-02 Thread Stéphane Ducasse


> On 28 Jul 2020, at 05:38, tbrunz  wrote:
> 
> tl;dr:  I have some ideas about more advanced Pharo tutorials, and I have an
> example that I would like to have reviewed/critiqued before I develop it any
> further.
> 
> I've been thinking lately that it would be nice to expand the number of
> Pharo tutorials we have available.  But rather than (or along with) creating
> more "beginner" level tutorials, I'd like to see some good "intermediate"
> level Pharo tutorials.

Me too :)

>  I think that programmers who already know the Pharo
> syntax and messaging semantics could benefit from more advanced tutorials
> that demonstrate how to develop "real world" Pharo code for "real world"
> processing needs.

Yes yes I would love that. 
> 
> What I'm talking about is something that assumes you know the language, the
> basics of the IDE (but not necessarily how to leverage its capabilities to
> aid development), and the basics of the foundation classes (but not its
> details).  I'd like a tutorial for intermediate Pharo programmers who want
> to become experts with Pharo.  Something that can show you how to apply the
> tools of the IDE and the features of the language and base classes to create
> solutions that solve complex problems.

do you have ideas?

> What does the community think of this idea?


I love it. I did Pharo by example so that I can get of rid of the beginner 
parts. 
After I did learning OOP and Pharo with style so that I do not have to talk 
about it 
again. 

So definitively. 

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


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France