[Pharo-users] Re: Wow - Chat GPT understands Smalltalk

2023-03-15 Thread Christopher Fuhrman
I asked it for a NeoCSV example, because the documentation is out of date
with the Pharo 10. I asked it to do some simple saving of data to a file.
It gave me code that didn't work in Pharo 10, I told it about the DNUs on
the csvwriter and that I was using Pharo 10. It then apologized and said
the messages were later introduced in Pharo 50 (!). I then questioned its
understanding and it apologized and said it had been confused and that it
was giving me code for Pharo 5.0. It seems to have trouble with versions
and quick changing APIs. So, we are teaching ChatGPT about smalltalk, too,
when we try to use it.

On Wed, 15 Mar 2023 at 07:35, Esteban Maringolo 
wrote:

> It is good with boilerplate code (e.g. SQL queries) or general algorithm
> structures. But i.e. I asked it to write me a method to parse a string
> (e.g. ISO 8601) and turn it into a DateAndTime, and then asked to write it
> as an Excel formula.
>
> It works much better when you can spot the mistakes, you can tell them to
> add some considerations to the code or even point the LLM to correct a
> message selector to something else. Sometimes you ask it to reprogram
> something and it won't do it, as if it doesn't understand what you're
> asking.
>
> It is not an expert yet, but it is a great assistant. The only thing is
> that is sure is that it will get better.
>
> Best regards,
>
> Esteban A. Maringolo
>
>
> On Wed, Mar 15, 2023 at 7:49 AM Tim Mackinnon  wrote:
>
>> "#isOdd is not Smalltalk" - doh, I typed it in on my phone and so it just
>> goes to show that it highlights the flaw in chatGPT that others have called
>> out in other languages. I had meant to find some trickier code samples to
>> see how well it does...
>>
>> Still, it is very interesting how it reasons on this stuff - and I wonder
>> if there is way to tell it about these mistakes? For example is it reading
>> this email (or will it in the future) and understand that it is #odd and
>> not #isOdd.
>>
>> Tim
>>
>> On Wed, 15 Mar 2023, at 9:57 AM, Joachim Tuchel wrote:
>>
>> interesting
>>
>> #isOdd is not Smalltalk, neither Pharo 10 nor VAST 12  understands this
>> message ;-)
>>
>> If I evaluate your snippet -replacing #isOdd for #odd, I get an empty
>> Collection. The divisible by 4 things is somewhat interesting, because (1
>> to: 100 by: 4) is amn interval 1,5,9 etc ;-)
>>
>> So chatGPT is probably a newbie in Smalltalk. Interesting is how logical
>> the explanation sounds, you're tempted to believe it...
>>
>>
>> Joachim
>>
>>
>>
>> Am 15.03.23 um 10:45 schrieb giorgio ferraris:
>>
>> it's interesting to see how the answer changes with only a small change
>> on the question:
>>
>> (1 to: 100 by: 4) reject: [:i | i isOdd]
>>
>> gives:
>>
>> The code creates a collection of numbers from 1 to 100, incrementing by 4
>> at each step using the to:by: message. It then applies the reject: message
>> to this collection, which returns a new collection containing all elements
>> for which the given block evaluates to false.
>>
>> In this case, the block is [i | i isOdd], which checks whether a given
>> number i is odd using the isOdd method. So the result of the entire
>> expression is a collection of all even numbers between 1 and 100 that are
>> divisible by 4.
>>
>> ciao
>>
>> giorgio
>>
>>
>> On Wed, Mar 15, 2023 at 8:07 AM Tim Mackinnon 
>>  wrote:
>>
>> Of course everyone is talking about ChatGPT, and I saw a post to
>> ExplainCode and didn’t expect it to understand Smalltalk, so was impressed
>> that it does! Presumably the Tonel Smalltalk code on GitHub has helped
>> along with numerous articles?
>>
>> Try it out: https://whatdoesthiscodedo.com/
>>
>> I gave this simple example: (1 to: 100 by: 3) reject: [:i | i isOdd]
>>
>> And got this (neat eh):
>>
>> The code above is written in the programming language Smalltalk.
>>
>> It creates a collection of numbers from 1 to 100, incrementing by 3 at
>> each step. This is done using the "to:by:" construct where the starting
>> value is 1, the ending value is 100, and the increment is 3.
>>
>> The resulting collection is then filtered using the "reject:" method,
>> which takes a block of code as an argument. In this case, the block checks
>> whether each element (denoted by the variable i) is odd by using the
>> "isOdd" method. If an element is odd, it will be rejected from the
>> collection.
>>
>> So, the final result is a collection of all ev

[Pharo-users] Re: Pharo 10 & Windows 10 - Frozen

2022-06-12 Thread Christopher Fuhrman
I also had a frozen image problem on my Surface Pro after it sleeps.

In my case the frozen Pharo window appears to have an image that was
put back into the wrong resolution (I see colored pixels like a P10 window,
but they're misaligned). As far as I can tell, the image doesn't respond to
keyboard shortcuts, etc. I have to kill the image in Explorer.

My setup involves multiple monitors, with different pixel sizes (windows
allows to scale them according to the monitor). Perhaps that is part of the
problem? It affects Pharo Launcher itself, too, which is running Pharo 10
according to a playground window (SystemVersion current version)

Next time I will make an issue on pharo-project/pharo with a screenshot.

On Sun, 12 Jun 2022 at 10:26, Arturo Zambrano 
wrote:

> Hi,
>  I have installed Pharo 10 in windows 10 using Pharo Launcher.
>
>  Whenever Windows goes to sleep or hibernate after coming back Pharo
> is completely frozen.
> The process is consuming almost NO CPU, and I cannot find a workaround to
> get it back to normal.
>
> Any suggestions?
>
> Thanks
> Arturo
>
> --
> Arturo Zambrano
> LinkedIn: https://www.linkedin.com/in/arturozambrano/
>


[Pharo-users] Re: We haven't had a design debate in a while - thoughts on CD.buy article...

2021-05-21 Thread Christopher Fuhrman
Hello all - I am reviving this thread with some OO Design archaeology I
stumbled upon while revising my course notes. In 1995 Peter Coad proposed a
"Do it myself" pattern for assigning responsibilities that says:
>
> "I do those things that are normally done to the actual object that I'm an
> abstraction of."
>

Anyway, this heuristic could explain cd.buy()

Here's the reference (but it's out of print...):
Coad, P. (1997). Object Models : Strategies, Patterns, and Applications
(2nd Revised ed. edition). Upper Saddle
River, N.J : Pearson Technology Group.


[Pharo-users] Re: creating a subclass in system browser

2021-04-27 Thread Christopher Fuhrman
One thing I find challenging when teaching Pharo to new students --
especially those accustomed to IDEs with files, which is pretty much all of
them ;) -- is that there are *sometimes* menus (depending on the Pharo
version) to add a new package, new class, new protocol, but not a new
method, etc.

For onboarding new users, I think it's important that these things be
intuitive and consistent, especially since updating tutorials takes time.
They are super important because inconsistencies become barriers to
onboarding new people. My point here is not that a menu option necessarily
exists, but that we have a consistent way to explain how to create things
even when Pharo changes. Apple used to have 10 commandments for keyboard
shortcuts, and I think a similar idea could apply to having consistency in
these elements of Pharo.

Here are some related perspectives:
https://stackoverflow.com/questions/48034993/creation-of-a-class-in-pharo-smalltalk
https://stackoverflow.com/questions/53374761/how-to-add-a-new-method-in-pharo


On Tue, 27 Apr 2021 at 09:47, kmo  wrote:

> Doing it by hand is fiddly and error-prone. I know - because that's the
> way I
> used to do it before I realised that the plus button at the top of the
> browser bottom panel did it for me. (I had no idea that there was also a
> menu option on the refactorings menu). I think you might find the button to
> be the better way - I did.
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>


-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


[Pharo-users] Re: Seaside disappearing under Windows

2021-04-22 Thread Christopher Fuhrman
I second trying Pharo under WSL for robustness. I wrote a blog entry on how
to set it up, and I think it's still valid:
https://fuhrmanator.github.io/2019/02/27/Pharo-in-WSL.html - Since you'd be
using WSL2, you have to do things differently for the DISPLAY variable:
https://github.com/microsoft/WSL/issues/4793#issuecomment-588321333

As to the question of why Windows on Pharo is less stable, I have some
experience using over the years other programs ported to Windows from OSS,
e.g., LyX and InkScape. I have seen a repeating pattern: key OSS devs of
certain libraries are hyper-sensitive to how things are done in Windows
(rightly so, some things are very different and require creative solutions
that break when Windows changes). We all know OSS resources are limited.
Consequently the libraries don't get the love.or testing they need. Despite
this I think the Pharo team does a great job supporting Windows.

On Thu, 22 Apr 2021 at 15:39, Petter  wrote:

> It might be worth trying to run Pharo under wsl if you have to go Windows?
> I
> do on my job laptop and it works fine for me.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>


-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


[Pharo-users] Re: [Pharo-dev] beta testers for the new version of the Pharo mooc

2020-10-01 Thread Christopher Fuhrman
Hi Stef,

At the very least I can help, but I will try to find some students. I just
upgraded to WSL2 on Windows 10 and would like to see how Pharo performs.

C. Fuhrman

On Wed, Sep 30, 2020, 10:30 Stéphane Ducasse 
wrote:

> Hello guys
>
> We are looking for beta tester for the new version of the Pharo mooc.
> The beta test period is planned from 12 to 23 of october
> Let me know if you can help.
>
> Tx
>
>
> 
> 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] How to set path as a variable

2020-06-28 Thread Christopher Fuhrman
>
> Then you can add your directory to it (note that I put a semicolon for
> path separator in Windows):
>
> modifiedPath :=  'D:\DEV_FreeCAD\build\bin\;' + path.


My apologies (I have been coding too much JavaScript lately) - this should
have been:

modifiedPath :=  'D:\DEV_FreeCAD\build\bin\;' , path.


Cheers,


On Sun, 28 Jun 2020 at 11:16, Christopher Fuhrman <
christopher.fuhr...@etsmtl.ca> wrote:

> Hello,
>
> Why not use the PATH environment variable in Windows to do what you want?
> I deal with setting variables used with LibC in my blog entry at
> https://fuhrmanator.github.io/2019/03/16/LibC-Pharo-experiments.html
>
> You can get PATH by using:
>
> path := OSEnvironment current getEnv: 'PATH'.
>
> Then you can add your directory to it (note that I put a semicolon for
> path separator in Windows):
>
> modifiedPath :=  'D:\DEV_FreeCAD\build\bin\;' + path.
>
> Then you have to set the variable in the system:
>
> result := OSEnvironment current setEnv: 'PATH' value: modifiedPath.
>
> You should probably get (again) the variable PATH (as above) to make sure
> the path was set correctly.
>
> Then just do:
>
> result := LibC runCommand: 'makebox.step'.
>
> Let us know if it works for you.
>
> Cheers!
>
> On Sun, 28 Jun 2020 at 09:03, shawon58  wrote:
>
>> In pharo class side , i am creating class side method like as
>> /*makebox
>> LibC system: 'D:\DEV_FreeCAD\build\bin\makebox.step'*/
>> SO i want to set /D:\DEV_FreeCAD\build\bin\ / as a variable like path
>> than i
>> can write like as
>> *LibC system: 'path\makebox.step'*
>>
>> how to do that, if anyone have idea please share the idea with me.
>>
>> Thanks for your help
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>
> --
> Christopher Fuhrman, P.Eng., PhD
>
> *Professeur au Département de génie logiciel et des technologies de
> l'informationÉTS (École de technologie supérieure)*
>
> http://profs.etsmtl.ca/cfuhrman
> +1 514 396 8638
> *L'ÉTS est une constituante de l'Université du Québec*
>


-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


Re: [Pharo-users] How to set path as a variable

2020-06-28 Thread Christopher Fuhrman
Hello,

Why not use the PATH environment variable in Windows to do what you want? I
deal with setting variables used with LibC in my blog entry at
https://fuhrmanator.github.io/2019/03/16/LibC-Pharo-experiments.html

You can get PATH by using:

path := OSEnvironment current getEnv: 'PATH'.

Then you can add your directory to it (note that I put a semicolon for path
separator in Windows):

modifiedPath :=  'D:\DEV_FreeCAD\build\bin\;' + path.

Then you have to set the variable in the system:

result := OSEnvironment current setEnv: 'PATH' value: modifiedPath.

You should probably get (again) the variable PATH (as above) to make sure
the path was set correctly.

Then just do:

result := LibC runCommand: 'makebox.step'.

Let us know if it works for you.

Cheers!

On Sun, 28 Jun 2020 at 09:03, shawon58  wrote:

> In pharo class side , i am creating class side method like as
> /*makebox
> LibC system: 'D:\DEV_FreeCAD\build\bin\makebox.step'*/
> SO i want to set /D:\DEV_FreeCAD\build\bin\ / as a variable like path than
> i
> can write like as
> *LibC system: 'path\makebox.step'*
>
> how to do that, if anyone have idea please share the idea with me.
>
> Thanks for your help
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


Re: [Pharo-users] Cant able to run EXE file using LibC

2020-06-21 Thread Christopher Fuhrman
Hello,

Try the following:

result := LibC runCommand: ' D:\DEV_FreeCAD\build\bin\test1.exe  >output 2>
> errors'.
> 'errors' asFileReference contents lines.
>

You can view the file 'errors' for more information

On Thu, 18 Jun 2020 at 10:48, shawon58  wrote:

> Hello
> I am trying to run "LibC system: 'D:\DEV_FreeCAD\build\bin\test1.exe' " .
> But it dont execute. But if i click the test1.exe than it execute.
>
>
> Thanks for the help
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


Re: [Pharo-users] Hi-DPI Support

2020-04-07 Thread Christopher Fuhrman
Hello and thanks for the info regarding the SQUEAK_FAKEBIGCURSOR=1

It works for WSL (Windows Subsystem for Linux) and I added it to my blog:

https://fuhrmanator.github.io/2019/02/27/Pharo-in-WSL.html

Cheers

On Tue, 18 Feb 2020 at 11:43, tbrunz  wrote:

> I'm also looking forward to Hi-DPI support being fully implemented in
> Pharo.
>
> Until then, there is the "Display scale factor" slider and the ability to
> change the font size.  However, most have probably already noticed that
> these controls don't affect the size of the mouse pointer, which can be
> annoying as it's much harder to find on big screens.
>
> I recently found this posting, which is helpful:
>
> Scaling for HiDPI in Pharo:
> 1.) Evaluating "MenubarMorph reset" will fix the menu bar scaling factor.
> 2.) There's a SQUEAK_FAKEBIGCURSOR env var which you can set to 1 to have
> the VM
> display the cursor twice as big as normal. I've no idea why the word 'FAKE'
> is
> part of this; from the source it looks like it just creates a normal X11
> cursor
> that's twice as big as normal. This should work with Cuis, Squeak, and
> Pharo,
> as it's part of the VM.
>
> I found that entering "export SQUEAK_FAKEBIGCURSOR=1" will cause standalone
> Pharo to have a normal-looking pointer on 4K displays, but this does not
> seem to work as expected with Pharo Launcher, or images launched with Pharo
> Launcher.
>
> After some investigation, I determined that the 'pharo-launcher', 'pharo'
> and 'pharo-ui' bash scripts (for Pharo Launcher and Pharo IOT) can be
> modified to make this work.
>
> The trick is to add "env SQUEAK_FAKEBIGCURSOR=1" to the front of the
> command
> that launches the VM/image within the above scripts.
>
> I've fashioned a set of 'sed' one-liners to automate editing these scripts
> accordingly, and am in the process of making a bash script that will use
> them to add/remove/verify these edits in a user-friendly fashion.  (I also
> have scripts that install Pharo Launcher and Pharo IOT in Linux, that
> create
> & add clickable launcher icons; my plan was to modify these scripts to
> write
> the cursor size correction scripts into their respective folders when
> they're installed.)
>
> I'll make this available when it's complete, likely in the next couple of
> days.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>

-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


Re: [Pharo-users] can I somehow test the contents of a package

2020-02-14 Thread Christopher Fuhrman
Mean time, you can report the Google Drive ZIP files for abuse to Google. I
think you have to be logged in to Google and then you put the ID from the
ZIP file's URL at the end of the following URL:

https://drive.google.com/u/0/abuse?id=

On Fri, 14 Feb 2020 at 17:29, p...@highoctane.be  wrote:

> This is spam from some hacker.
>
> Replaced all passwords on my side and enable 2FA where not done yet.
>
>
> Sorry for the noise.
>
> Phil, the real one
>
>


Re: [Pharo-users] Code overview - or maybe not

2019-12-20 Thread Christopher Fuhrman
Kasper,

There's a way to run PlantUML to process in a pipe (stdin/out) which gives
pretty good performance for rendering:

java -Djava.awt.headless=true -jar plantuml.jar -pipe -tsvg -charset UTF-8


It takes a PlantUML source as input and generates the format of the file
(e.g. SVG) on stdout. The VSCode extension called  markdown-preview-enhanced
<https://github.com/shd101wyy/markdown-preview-enhanced> runs it this way.
Because of the pipe complexity (and the fact that your machine needs a JVM,
GraphViz and a properly configured path, etc.), I never tried to use it
this way in Pharo.

The markdown-preview-enhanced extension for VSCode does a lot of things
(too many?) but I think of pillar when I use it. It shows an HTML version
in real-time as you type, which includes PlantUML diagrams. You can use
pandoc to get to LaTeX/PDF as final output. I'm using it for my course
notes because of this, but also because it does reveal output (useful for
presenting), too. If I had a Mac, I would use pillar :) -- I struggled with
using it in Windows 10 with MikTeX (which I use very well with LyX).

If my memory serves me, Pavel K. and/or Julien D. had done a visitor in
Pharo that would generate PlantUML script from (moose?) (meta)models, but I
can't remember the precise details. I didn't aim for the sexy visitor
version when I did the Moose support because I wanted people to be able to
choose easily what classes to include in the diagram (because there's
usually some context for it to be useful). A list with classes inside a
hierarchy (the way we did it in Moose) seemed to be adequate. I'm pretty
sure you could make an intuitive browser (or reuse the current one) with
filters to select the classes for the diagram.

As for using UML to make diagrams, I also have toyed with the idea of
making an editor on top of PlantUMLs SVG, such that you could change the
source script intuitively. For example, if you don't want to see the 30+
messages a class supports, you can right click on the class in the SVG and
choose a "hide" option. Sadly, the SVG that is generated by PlantUML is
more for drawing (it was ported from the PNG code I think) and so things
like a bounding box of a class or the IDs for classes don't exist. Classes
are "drawn" as a rectangle for the title, a rectangle for the attributes,
etc. However, those are all things that could be coded back into PlantUML
(it's open source). SVG (in a modern browser at least) can be pretty
powerful.

These days, the only UML diagrams I "draw" are on whiteboards or an
electronic sketch pad (Surface pro). Pushing rectangles and lines around in
a graphics editor is something that only makes me anxious (I have used some
Visio templates a few years ago, but they're all now requiring too many
clicks when you're used to PlantUML). Plus, PlantUML also supports many
other formats (including DOT, just put @startdot/@enddot).

On Fri, 20 Dec 2019 at 14:31, Kasper Østerbye 
wrote:

> On 20 December 2019 at 19.59.05, tbrunz (wild.id...@gmail.com) wrote:
>
> What I would find useful (and what I think Kasper has started down the
> road
> to) is the ability to generate PlantUML script from a specified (set of)
> packages or classes in Pharo. That would make it easy not only to examine
> the design (in a more synoptic way -- something I've seen several other
> newcomers express an interest in), but also to embed diagrams in
> documentation such as PDFs & web pages.
>
> I expect that to be done over the hollidays. I expect to have a working
> copies of
>
> - Generate object diagram from a root (I will filter on category names and
> subclasses)
>
> - Generate a sequence diagram by analysing a MessageTally from a block.
> Filter on categories, subclasses and methods
>
> Short of that, and probably much easier to implement, is to just add
> PlantUML script to Pharo class comments as you write them -- but have a
> simple way to trigger the system to parse the comment and render the
> script
> into PlantUML diagrams. This could be in the form of opening a web browser
> in the host and having the diagram appear via the PlantUML server. But
> more
> useful perhaps would be to have it create PNG file(s) in the host
> filesystem
> (and open them).
>
> I have that working in my image. The
> https://github.com/kasperosterbye/PillarRichTextRender allow pillar to be
> used and rendered in class and package comments. Again, in my image I have
> an extension which allow the [[[ … ]]] syntax of pillar (and ```of github)
> to use a language called ‘plantuml’, which renders the diagram in the
> documentation. I hope to package it all up over the holidays or early
> January. The same thing allow latex math to be rendered in those same
> comments.
>
> Best,
>
> Kasper
>


-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de 

Re: [Pharo-users] Code overview - or maybe not

2019-12-19 Thread Christopher Fuhrman
If you want to consider changing background color that takes into
consideration the theme background (e.g. dark or light themes), this code
(see it on GitHub)
<https://github.com/moosetechnology/Moose-Easy/blob/f7967b310021147792858c576a41a31bdf35d7fd/src/Moose-Easy/MooseEasyFamixMakerPresenter.class.st#L279>
can
adapt to it:

normalColor := Smalltalk ui theme backgroundColor.
green := normalColor mixed: 0.8 with: Color green.
red := normalColor mixed: 0.8 with: Color red.

I didn't really test it with all possibilities of themes, however.

On Thu, 19 Dec 2019 at 12:58, Hilaire  wrote:

> You should use TextMorph.
>
> What about:
>
> || t |
> t := TextMorph new.
> t backgroundColor: Color blue.
> t contents: 'Hello'.
> t lock.
> t openInWorld||
> |
>
> Le 19/12/2019 à 15:28, Kasper Osterbye a écrit :
> > I was struggling for weeks (not every day, but still) to find out how
> > to change the system to be able to give background color to text.
> >
> --
> Dr. Geo
> http://drgeo.eu
>
>
>
>

-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*


Re: [Pharo-users] Zinc & IdentityServer4

2019-11-14 Thread Christopher Fuhrman
On Sat, Nov 9, 2019, 08:17 Tim Mackinnon  wrote:

> should we have something written that google will find first, to help
> people get to this stuff?
>

Google indexes stackoverflow almost instantly. Maybe pose and answer the
same question there? I did it already for a few questions like how to do a
progress bar, etc. The SO workflow allows for it.

Cris


> tim
>
> On Mon, 4 Nov 2019, at 9:49 AM, Sven Van Caekenberghe wrote:
>
> Hi Siemen,
>
> This seems to be an implementation of OpenID Connect and OAuth 2.0.
>
> There already exists a working implementation of OAuth for Zinc/Pharo,
> load the 'SSO' group from the baseline to get the code.
>
> Now, this subject requires some learning curve, it is not super complex,
> but you have to really understand how it works in order to set it up and
> debug it. You have to start by reading a couple of good tutorials.
>
> I am not using this, but others are, so maybe they can help you further.
>
> Sven
>
> > On 4 Nov 2019, at 10:37, Siemen Baader  wrote:
> >
> > Hi,
> >
> > I’m trying to log a registered user into a webshop (https://mad.coop.dk)
> using Zinc, but it uses IdentityServer4 (
> https://github.com/IdentityServer/IdentityServer4) for authentication (at
> https://accounts.cl.coop.dk/). So there are more steps involved than just
> submitting credentials.
> >
> > Usually I just inspect how things work in the Firefox console, then
> replicate the interactions in Pharo, but this system is a bit too complex,
> with many unrelated requests happening.
> >
> > Can anyone guide me towards the correct steps to sign in?
> >
> > thanks
> > Siemen
>
>
>
>
>


Re: [Pharo-users] We Are Smalltalk

2019-10-30 Thread Christopher Fuhrman
On Tue, 29 Oct 2019 at 12:24, Christopher Fuhrman <
christopher.fuhr...@etsmtl.ca> wrote:

>  ... expecting to find a link to a tutorial
>

Google helped me find it:
https://pharoweekly.wordpress.com/2015/03/07/athenssketch-how-to-browse-cool-athens-graphics-example/

I subclassed as suggested and re-typed the drawStepOn: method (I had to do
it in a System Browser, as the SketchBrowser gave me troubles to compile,
in Pharo 8 at least). It works as shown in the video (more or less). The
graphics portal has no window frame, but you can move it around.

However, making the live changes in Pharo 8 finally leads to a bad state:
[image: image.png]

When I have more time, I'll try it with Pharo 7. It's a great demo for live
programming.


Re: [Pharo-users] We Are Smalltalk

2019-10-29 Thread Christopher Fuhrman
On Tue, 29 Oct 2019 at 10:50, tbrunz  wrote:

> Thank you Serge!  And thank you, Richard for your efforts over the years in
> providing good material on Medium, Hackernoon, et al.
>
> We need more videos like these...  I just started a Slack channel where I
> work (for promoting and discussing Pharo/Smalltalk), and I plan to start
> posting things like these videos and Richard's material on a regular
> basis.
> Both will help to grab attention & interest.
>
> -t
>
>
Very nice!

I'm surely not the only person expecting to find a link to a tutorial so
anyone can do this in Pharo (or whatever environment it was done in...).
Can someone add that please?

-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*


Re: [Pharo-users] New to Pharo. "Could not coerce arguments" (Problem with character encoding?) + Learning resources?

2019-10-19 Thread Christopher Fuhrman
Hello,

On Sat, 19 Oct 2019 at 09:45, M O  wrote:

> I’m new to Pharo, and generally, in programming. I decided that my first
> programming language is going to be Pharo. However I have encountered some
> issues when I was exploring some examples. I don’t want them to bother me
> later, so I’d like them to be resolved as soon as possible.
>
> Some info:
>
> OS: Windows 8.1, language Polish, Pharo version: 7 stable 64, Pharo
> Launcher installed in C:\PharoLauncher, images and VMs located in
> C:\users\\Documents\...
>
> My Windows account (admin user) username contains non-ASCII character
> (“Ł”). I tested all cases below on account with only ASCII characters
> (“Administrator”) and they all work just fine. Therefore I strongly suspect
> the main source of issues is character encoding but I have no idea how to
> solve it or if it’s actual problem.
>

I think you found two things that will make it harder to use the Pharo
environment:

   - Windows 8.1 is not a recent version of an OS, and therefore much of
   the community who develop Pharo won't be able to guarantee support for it.
   I suspect it's the cause of the problems #1 and #2 (FFI), but it's hard to
   know as I don't have Windows 8.1. But as you have seen, some things are
   working, so some learning might be possible. A possible solution for you
   could be to run Linux in a VM on your Windows 8 machine and use Pharo for
   Linux. The Pharo Launcher and other things work in a similar way under
   Linux, although installing linux is a big distraction from your goal to
   learn Pharo and programming (which often happens in information
   technology).
   - The use of non-ascii characters in the path (in Windows) has been a
   source of bugs (e.g.,
   https://github.com/pharo-project/pharo-launcher/issues/333 but it's not
   only in Pharo). As you have already found out, you can use another account
   (maybe you can call it Pharo) without special characters.

*Second thing I’d like to ask is, what are best up to date learning
> resources for Pharo? I’m mainly concerned about tools. I know a bit about
> idea of  “real” OOP (from Alan Kay’s talks). Is Mooc
> (http://mooc.pharo.org/ ) and Pharo by Example 5
> enough for start? For Mooc, do I need to use Mooc image (It uses a bit
> outdated Pharo version) or can I use simply Pharo 7?*
>
>
The MOOC is a great place to start for the content (the videos and the PDFs
are helpful). Pharo By Example 5 is also good. There are small differences
in the GUI that sometimes trip up new students.

Do you know of exercism.io? There is a Pharo track there, and you can
always ask for help with those challenges using the #exercism channel of
the Pharo Discord server  https://discordapp.com/invite/QewZMZa


Re: [Pharo-users] Transcript: printString or asString

2019-10-14 Thread Christopher Fuhrman
On Mon, Oct 14, 2019, 08:49 Samuel Teixeira Santos 
wrote:

> when you say when: "what this object converted *to a string means in my
> domain"* - what really means, specially about when you say *'domain'?*
>
> Could you give some example for this?
>
> Thanks
>

A good example might be PLU codes [1] on produce in North America. They're
4 or 5 digits, and employees of a grocery store usually know them by heart
(they're in the "employee of a grocery store" domain). Customers, however,
are interested in knowing what the vegetable or fruit is, not the code.

So, depending on the application domain, #asString might print the code
(for grocery store employees) or the name of the item (for customers).

Delving deeper, we find these codes even contain info about whether produce
is GMO, organic, etc. which could also be used by #asString depending on
requirements.

[1]: http://innvista.com/health/foods/plu-codes-alphabetical-order/

>


Re: [Pharo-users] Installing PharoJS

2019-10-06 Thread Christopher Fuhrman
Hello,

The screenshot cuts off the error, but it may be the problem with file
names that are too long in libgit2.

It's a controversial problem in libgit2 for at least six years.
https://github.com/libgit2/libgit2/issues/1899

Hitting this problem is what drove me to install WSL on Windows 10 and use
Pharo that way, effectively not using Windows 10 for Pharo.

Other workarounds exist, including a short image name in the launcher,
putting image folders at the root level, telling Pharo to put iceberg repos
in a fixed directory closer to the root, etc. You want a way to prevent a
Pharo file path that's longer than 260 chars.

Cheers,

Cris

On Sun, Oct 6, 2019, 10:52 Shaping  wrote:

> All you need to do is evaluating the following expression in a playground.
>
> I suggest you do it in a fresh image.
>
>
>
> Metacello new
>baseline: 'PharoJS';
>repository: 'github://bouraqadi/PharoJS';
>load
>
>
>
> That was one of the tests mentioned.   See the screenshot below.  The
> problem seems Git-related:
>
>
>
>
>
>
>
>
>
> Shaping
>
>
>
> On 6 Oct 2019, at 14:49, Shaping  wrote:
>
>
>
> Hi.
>
> Can someone explain exactly how to install the latest version of PharoJS,
> and verify that the proedure really works?
>
> I've tried:
>
> 1) cloning the PharoJS repo in Pharo 8.0 with Iceberg, and get a Not Loaded
> final state for the repo.
> 2) loading into Pharo 7, 6.1, and 5 using
>
> Metacello new
>baseline: 'PharoJS';
>repository: 'github://bouraqadi/PharoJS';
>load
>
> All tries fail with a walkback.
>
> 3) loading into Pharo 4.0 using
>
> Gofer it
> smalltalkhubUser: 'noury' project: 'PharoJS';
> addPackage: #ConfigurationOfPharoJS ;
> loadStable.
>
> The walkback here mentions missing dependency RBGlobalNode.
>
>
> Suggestions are welcome.
>
> Thanks.
>
>
> Shaping
>
>
>
>
>
>
>


Re: [Pharo-users] Workflows and possible usages

2019-09-29 Thread Christopher Fuhrman
On Sun, 29 Sep 2019 at 11:01, Stephan Eggermont  wrote:

> Christopher Fuhrman
>  wrote:
> > On Thu, 26 Sep 2019 at 04:27, Tim Mackinnon
> >  wrote:
> >> Anyone have any thoughts or directions to explore?
>
> > My intuition says that most software projects don't last long enough to
> > invest in a general solution to supporting workflows.
>
> So, is there a causal relationship? And in which direction?
>

Interesting question, for which I have no answer.

At the risk of going off topic, here's more context for my "intuition": I'm
talking about startups (or even companies such as Google who have many
"beta" projects that will likely die because they're experiments). The goal
is a Minimal Viable Product (MVP) first, because many projects (or
features?) don't continue for reasons that are often not technical.

So spending resources (especially time) on workflow frameworks to support
change is possibly a waste until some other (bigger) risks are mitigated.
It's a form of YAGNI. The MVP is usually a form of cowboy hacking
(hard-coded workflow), and if the project makes it to the next round, the
company will manage the technical debt if changes are needed. We as
software architects/designers are put off by these kinds of things. Maybe
this is the kind of scenario Tim describes in the first post?

Technical debt due to brittle design could be a reason a project dies, but
I think it's not really the common reason. I believe we as software
engineers are biased, because software was less prevalent when the
discipline of SE was created. It's still true today that it costs too much
to maintain software that lasts a long time. But how many projects last
long enough for it to be a problem?

A related topic about traditional CS/SE curriculum not being adequate for
the context of startups was discussed recently [1].

Cris

[1]
https://spectrum.ieee.org/the-institute/ieee-member-news/software-engineering-grads-lack-the-skills-startups-need


> Stephan
>
>
>
>
>
>

-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


Re: [Pharo-users] Workflows and possible usages

2019-09-27 Thread Christopher Fuhrman
On Thu, 26 Sep 2019 at 04:27, Tim Mackinnon  wrote:

>
> Anyone have any thoughts or directions to explore?
>

My contribution is very academic, and not really my field of expertise (we
evaluated a BPML/BPMN tool about 10 years ago which I think is dead now).
The conference paper from 2016 at
https://link.springer.com/chapter/10.1007/978-3-319-42887-1_2 (which is
behind a paywall) mentions lots of acronyms for the notations and
languages. I put the date of the cited reference for each:

   - BPMN Business Process Modelling Notation (2013)
   - CMMN Case Management Modeling and Notation (2014, OMG)
   - Declare (framework, 2009)
   - DPIL Declarative Process Intermediate Language (2014)
   - WRP Workflow Resource Patterns (2005)
   - Dynamic Condition Response-Graphs (DCR-Graphs, 2013)
   - EM-BrA2CE (framework, 2008)

My intuition says that most software projects don't last long enough to
invest in a general solution to supporting workflows.


Re: [Pharo-users] Microsoft COM

2019-09-26 Thread Christopher Fuhrman
On Thu, 26 Sep 2019 at 05:18, teso...@gmail.com  wrote:

> Do you have any use case in mind to start working on?
>

I can suggest something I did in the past (it's the idea behind PlantUML
Gizmo). With Roassal, we can generate visualizations (PNG?) that go into a
Word document. The source (which is a kind of DSL to produce an image, like
PlantUML) can be in a playground. The problem is when you insert the image
into word, you can't re-do it unless you have the source, which is in some
Pharo image or Git repository... it's nicer to be able to keep the source
inside your documentation (Word).

So, a use-case would be to automate (with COM) the insertion of the
visualization (a morph in the form of a GIF or PNG?) into the
currently-open Word document. The Roassal source (DSL, from the playground)
would be attached to the image as ALT_TEXT. That way, you could recover the
source into Pharo later if/when you want to modify it after it's in your
Word document. There would be a complementary function to recover the
"selected" image/source from word back into Pharo. This is a rough
description I know.

I have made a plugin for Word (VSTO, VB.net) that does this using
PlantUML.com and it works quite well. But you could easily imagine
Pharo/Roassal as the DSL + image generator (it's a little more complex).
Maybe not the most interesting use case, but it's something to test out the
COM library.

The source of the method to replace/insert an image in VB.NET I wrote is
here [1] (the context is VSTO, so it's surely different in COM, but it
might be useful to someone).

Cris

[1]:
https://github.com/fuhrmanator/plantuml-word-add-in-vsto/blob/6f917e94779a1c6a20a93dff4f2f09943f5caa1f/PlantUML%20add-in/PlantUML%20editor.vb#L16


>
> Thanks,
> Pablo
>
> On Wed, Sep 25, 2019 at 10:29 PM eftomi  wrote:
> >
> > Hi,
> >
> > I finally got some time to check Pablo's PharoCOM package closely. At
> first
> > I had problems with simple things, like making Word visible with
> > properyNamed:put: (it's frustrating when you see the app on the processes
> > list but you cannot control it :-)) but then I found the reason - it was
> a
> > tiny detail in Win32VariantBool>>#write:to:, and then - voila!
> >
> > Here's an example of opening Word for Windows, adding a blank document,
> > typing some text and getting this text back to Pharo:
> >
> > Ole32Lib uniqueInstance initLibrary.
> > wrd := COMDispatchInstance createInstanceByName: 'Word.Application'.
> > wrd propertyNamed: 'Visible' put: true.
> >
> > docs := wrd propertyNamed: 'Documents'.
> > docs dispatch: 'Add'.
> >
> > sel := wrd propertyNamed: 'Selection'.
> > sel dispatch: 'TypeText' withArguments: {'Hello from Pharo!'}.
> >
> > sel dispatch: 'WholeStory' .
> > Transcript show: (sel propertyNamed: 'Text'); cr.
> >
> > Another example is with Active Data Objects to get DB access:
> >
> > conn := COMDispatchInstance createInstanceByName: 'ADODB.Connection' .
> > conn dispatch: 'Open' withArguments: { 'DSN=this; Uid=that;
> Pwd=theOther;' }
> > .
> > conn propertyNamed: 'State' . --> true!
> > rst := (COMDispatchInstance createInstanceByName: 'ADODB.Recordset') .
> > rst dispatch: 'Open' withArguments: { 'SomeTableName' . conn . 3 . 1 }.
> >
> > The last line raises an exception because not all of the data types that
> > functions are reporting are implemented yet, as Pablo mentioned in his
> post.
> >
> > The package is really nicely prepared. The most impressive is it's
> > reflective capability. My "proof of concept" work with DispHelper library
> > that I mentioned in another forum topic was successful (I can get to the
> SQL
> > Server :-)), however it's a dead-end regarding the reflection.
> >
> > I'm very interested in COM implementation since I found Pharo to be very
> > useful as a tool, and since I work in "windowed" environment the COM
> > interaction is crucial to me. I decided to spent my free evenings
> working on
> > the project finalization. I'm not sure of how long will it take though
> :-)
> > Pablo, I hope that I can count on your help regarding the questions about
> > the overall architecture that you set.
> >
> > Is anybody else interested in this? Maybe we can join our efforts.
> >
> > Best wishes,
> > Tomaz
> >
> >
> >
> > --
> > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> >
>
>
> --
> Pablo Tesone.
> teso...@gmail.com
>
>

-- 
Christopher Fuhrman, P.Eng., PhD

*Professeur au Département de génie logiciel et des technologies de
l'informationÉTS (École de technologie supérieure)*

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*


Re: [Pharo-users] Mindmaps and WardleyMaps in Pharo

2019-08-01 Thread Christopher Fuhrman
With the help of several folks in RMoD, the project for PlantUML is now
pretty stable. Here's an example with a mind map:
https://github.com/fuhrmanator/PlantUMLPharoGizmo#mind-map

On Thu, 9 May 2019 at 20:27, Christopher Fuhrman <
christopher.fuhr...@gmail.com> wrote:

> PlantUML now supports mind maps. I am thinking of doing a class in pharo
> to use PlantUML on the web to render diagrams (PNG, SVG) in Pharo.
>
> On Thu, May 9, 2019, 11:46 Rafael Luque 
> wrote:
>
>> I'm looking for drawing some mindmaps and (obviously) I'd like to be able
>> to draw and visualize them inside my own Pharo tools.
>>
>> I've found this video in Stephan Eggermont's channel:
>>
>> https://vimeo.com/136943448
>>
>> Do you know any other alternatives for Pharo?
>>
>> BTW, I also found this other video about Wardley maps:
>> https://vimeo.com/141653455
>> I found it very interesting. Somebody knows where can I find this project?
>>
>> Thank you!
>>
>>
>>

-- 
Christopher Fuhrman, P.Eng, PhD

*Professor in the Département of Software and IT EngineeringÉTS (École de
technologie supérieure)*
http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*
*Confidentiality Notice*
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify
christopher.fuhr...@etsmtl.ca. This message contains confidential
information and is intended only for the individual named. If you are not
the named addressee you should not disseminate, distribute or copy this
e-mail.
*Avis de confidentialité*
L'information contenue dans ce message électronique ainsi que dans les
fichiers qui peuvent y être attachés est de nature confidentielle et
destinée à l'usage exclusif du destinataire. Si ce message vous est parvenu
par erreur ou que vous n'êtes pas le destinataire visé, vous êtes par la
présente avisé que tout usage, copie ou distribution de l'information
contenue dans ce message est strictement interdit et vous êtes prié d'en
aviser christopher.fuhr...@etsmtl.ca et de détruire ce message.


Re: [Pharo-users] [ANN] GitBridge

2019-07-16 Thread Christopher Fuhrman
Very cool! I think the quickstart section would benefit from an example
such as loading icons or a test resource (mse file for moose).

Also, can you explain how updating a Readme.md would work using GitBridge?
I assume it would be modified with a text editor in Pharo then Iceberg will
see the changes to commit them? Sorry if I'm reading too much into it.

On Tue, Jul 16, 2019, 22:40 Tomohiro Oda 
wrote:

> Cyril,
>
> Awesome!
> I've been wanting to make something like this for my project.
> Great thanks!
> ---
> tomo
>
> 2019年7月17日(水) 5:07 Cyril Ferlicot D. :
> >
> > Hi!
> >
> > Today I released the v1 of a project I wanted to do since a long time:
> > GitBridge.
> >
> > The goal of the project is to easily access external resources stored in
> > the git repository of the project and other information.
> >
> > For more infos check the Quick start or documentation present at:
> > https://github.com/jecisc/GitBridge
> >
> > When Monticello was the most common VCS usable with Pharo we stored a
> > lot of external resources in the image. Now we are able to store them
> > outside, get a lighter image and make it easier to edit and version them!
> >
> > This can be useful to store test resources, CSS/JS files for web
> > applications, documentation, etc.
> >
> > This can also be useful to get from the application some information
> > such as the current version of the application instead of hard-coding it
> > in a method to update at each release.
> >
> > It implementation relies on Iceberg and the repositories registered in
> it.
> >
> > --
> > Cyril Ferlicot
> > https://ferlicot.fr
> >
>
>


Re: [Pharo-users] Modeling HABTM

2019-06-13 Thread Christopher Fuhrman
On Thu, Jun 13, 2019, 04:35 Jeff Gray  wrote:

> This may not be a very object thing to say but if you have a relational
> database with tables for episode, track and play like in Christopher's
> diagram, you may not need a class to model play. As it is just a repository
> for a set of links


I suppose it depends on the requirements for the software. If you wanted to
know the start time (relative to the start of the episode) of the Play,
that would be an attribute for the class.

I might just have a method on an Episode class that calls
> the sql to return a collection of Tracks and vice versa.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] Modeling HABTM

2019-06-10 Thread Christopher Fuhrman
Using an intermediate object "Play" (abstraction of a track being played
during an episode), a UML diagram

might look like:

[image: image.png]


On Mon, 10 Jun 2019 at 23:02, sergio ruiz  wrote:

> these numbers are super tiny..
>
> 25 episodes so far with about 15 tracks per episode..
>
>
>
> On Jun 10, 2019, at 1:36 PM, James Foster  wrote:
>
> The disadvantage is extra time doing the lookup. But before you discount
> this approach, ask yourself what performance penalty this will cost. How
> many episodes? How many tracks? Do you have less than 10K of each? How many
> milliseconds does it take to do a “brute-force” search? I strongly
> recommend:
>
>
> 
> peace,
> sergio
> photographer, journalist, visionary
>
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>
>


Re: [Pharo-users] Strange 'Connection closed while waiting for data.' Zinc error

2019-06-07 Thread Christopher Fuhrman
Hi - I'm resurrecting an old question

I found on forum.world.st (sorry for the formatting)

Dec 26, 2017; 10:14am Sven wrote:

> > On 26 Dec 2017, at 08:21, Yuriy Tymchuk wrote:
> >
> > Hi Sven,
> >
> > No, I’m on Mac (OS 10.13).
> That is not good then, Uko, but again, there is no way to start debugging
> this without a reliable test case that I can run too.
>

I hit this today while testing on localhost: a PlantUML server.

I think I can give you a simple(ish) way to recreate:

   - clone the repo at  https://github.com/plantuml/plantuml-server
   - install Java
   - install maven
   - In the clone directory, run:
   *mvn jetty:run*

In Pharo, it's just:

ZnEasy getPng: 'http://localhost:8080/plantuml/img/IzIrIm80'.

Cheers,
Christopher
p.s. the workaround with *ZnNetworkingUtils default socketStreamClass:
SocketStream.* is OK for me. I'm running Pharo 8 on Windows 10 (WSL) and
the server's running on the Windows part.

Sven
> > Cheers.
> > Uko


Re: [Pharo-users] Right clicking often fails first time?

2019-05-20 Thread Christopher Fuhrman
Since I read your email, I've noticed now that an image when opened ignores
my first click (right or otherwise). Using the latest Pharo Launcher with
Pharo 703 images in Windows Subsystem for Linux (Windows 10). It's very
easy to just click again, so I never really noticed before. But it is
mildly annoying.

At first I was thinking it was an XWindows focus problem (under Windows
10). My tests show that keyboard events go through (e.g., I can use the
arrow keys to move selections around), but the first mouse-click is
ignored.

On Tue, 30 Apr 2019 at 17:16, Tim Mackinnon  wrote:

> This has been bugging me for a long time - but its incredibly annoying
> that when you right click on a class, package, Iceberg entry - that the
> context menu doesn’t often appear. You have to click again (or remember to
> click first and then right click - even if the reverent item is already
> highlighted).
>
> Why is this? Is it a bug worth reporting and seeing if it can be fixed (or
> is it just me? This is in 703, OSX High Sierra)
>
> Tim
>


[Pharo-users] Pharo Launcher could select newly created image (to be played) by default

2019-05-17 Thread Christopher Fuhrman
I posted a feature request at
https://github.com/pharo-project/pharo-launcher/issues/339


Re: [Pharo-users] Smalltalk tutorial is broken

2019-05-10 Thread Christopher Fuhrman
On Fri, May 10, 2019, 15:32 Richard Kenneth Eng 
wrote:

> So say many visitors to https://amber-lang.net/learn.html.
>
> The problem is this: visitors are failing to read and comprehend the last
> instruction on the first page of the tutorial. The one that reads: *Select
> the text below and click on the 'DoIt' button*.
> ...
>
How to fix this? How to avoid this PR nightmare?
>
I can think of at least three easy solutions:

Change the button from "DoIt" to "do the selected text"

Change the first line to:
Profstef next "(you must select this entire line of text.)"

But the best one might be:
Catch the parse error and if it's a null, remind the user she must first
select the text.


Re: [Pharo-users] Mindmaps and WardleyMaps in Pharo

2019-05-09 Thread Christopher Fuhrman
PlantUML now supports mind maps. I am thinking of doing a class in pharo to
use PlantUML on the web to render diagrams (PNG, SVG) in Pharo.

On Thu, May 9, 2019, 11:46 Rafael Luque 
wrote:

> I'm looking for drawing some mindmaps and (obviously) I'd like to be able
> to draw and visualize them inside my own Pharo tools.
>
> I've found this video in Stephan Eggermont's channel:
>
> https://vimeo.com/136943448
>
> Do you know any other alternatives for Pharo?
>
> BTW, I also found this other video about Wardley maps:
> https://vimeo.com/141653455
> I found it very interesting. Somebody knows where can I find this project?
>
> Thank you!
>
>
>


Re: [Pharo-users] Iceberg for files other than code?

2019-04-06 Thread Christopher Fuhrman
Hi Konrad,

On Sat, 6 Apr 2019 at 15:46, Konrad Hinsen 
wrote:

> Hi everyone,
>
> Is it possible to read and modify files not containing Pharo code in a
> repository managed by Iceberg? I am thinking of reading the repository's
> README file, for example, or storing data files read by my code
> alongside the code itself.
>

I'm not sure if you are referring to GitHub's README, but if you are, I
maintain my project's README on GitHub's web site (which requires care if
you're using branches). I like the markdown preview there which requires no
fancy software installed on my PC. You need to pull the change to Iceberg.

There's indeed a copy of the README.md in my image's
pharo-local/iceberg/GITHUBUSERNAME/GITHUBPROJECT directory, and I can even
modify it using Pharo 7's File Browser. However, any modifications to it
are not seen or committed by Iceberg (at least I don't know of a way to
make that happen). I believe Iceberg's change detection is limited to the
smalltalk files in the packages that are in the repositories it knows
about. But I'm still far from an expert with this. Hopefully a more
qualified person can confirm.

There's theoretically a way to run a git client outside of Pharo that knows
about the local git repo that Iceberg's using, so maybe you can commit the
non-Pharo files that way. However, doing that is sure to cause a "detached"
state with the repo in the image. That is not a catastrophic problem, but
it's more accidental complexity to deal with. I picked my battles and
maintain README on GitHub.

Christopher


> Konrad.
>
>

-- 
Christopher Fuhrman, P.Eng, PhD

*Professor in the Département of Software and IT EngineeringÉTS (École de
technologie supérieure)*
http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
*L'ÉTS est une constituante de l'Université du Québec*
*Confidentiality Notice*
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify
christopher.fuhr...@etsmtl.ca. This message contains confidential
information and is intended only for the individual named. If you are not
the named addressee you should not disseminate, distribute or copy this
e-mail.
*Avis de confidentialité*
L'information contenue dans ce message électronique ainsi que dans les
fichiers qui peuvent y être attachés est de nature confidentielle et
destinée à l'usage exclusif du destinataire. Si ce message vous est parvenu
par erreur ou que vous n'êtes pas le destinataire visé, vous êtes par la
présente avisé que tout usage, copie ou distribution de l'information
contenue dans ce message est strictement interdit et vous êtes prié d'en
aviser christopher.fuhr...@etsmtl.ca et de détruire ce message.


Re: [Pharo-users] What oo/modelling books/articles do we recommend these days?

2019-03-26 Thread Christopher Fuhrman
On Tue, 26 Mar 2019 at 10:17, Tim Mackinnon  wrote:

> Wasn’t there something that encouraged you to underline the nouns and
> circle the verbs and then start to identify objects and responsibilities?
> Its that kind of thing I am starting to see as the weak point in people
> approaching problems.
>

That's the Booch method which Larman mentions as the noun-phrase
identification (I actually learned that in 1986 in my first Ada course).
See slide 22 or so at
http://stg-tud.github.io/eise/WS11-EiSE-07-Domain_Modeling.pdf

You could/should cherry-pick Larman's book (there's way too much there even
for one course). There are all the references to Resp-Driven Design and
even a lightweight "domain model" pattern (which doesn't have separate
conceptual classes) from Fowler.
https://martinfowler.com/eaaCatalog/domainModel.html

In my courses I get a lot of mileage from just the two GRASP patterns (that
come from Wirfs-Brock et al if I'm not mistaken): Information Expert
<https://en.wikipedia.org/wiki/GRASP_(object-oriented_design)#Information_expert>
and Creator, but the latter is easier to apply if you have a domain model
as a separate artifact.

IMO the older approaches to OO design get in to trouble today especially
when 1) most objects use composition (an not inheritance with polymorphism,
although it's very powerful for extending programs) and 2) inheritance is
hard to get right the first time (and is difficult to change). There's real
power in refactoring to patterns (e.g., )

There's the CRC method that Horstmann presents, too (I think that's what
Pharo even recommends in the Class Comment template). Booch and CRC are
mentioned on this page:
http://www.cs.fsu.edu/~myers/cop3331/notes/analysis1.html

Finally - I'm not familiar with exercism exercises (I signed up but saw
that smalltalk is still in alpha). Is there a sneak peak of an example
exercise?

Cris


>
> Tim
>
> On 24 Mar 2019, at 22:47, Christopher Fuhrman <
> christopher.fuhr...@gmail.com> wrote:
>
> On Sun, 24 Mar 2019 at 21:26, Tim Mackinnon  wrote:
>
>> Any good references come to mind? As I’ll build up a list that I can
>> point people to, that hopefully puts them in a better place to solve these
>> more interesting and hopefully rewarding problems.
>>
>
> Since 2003 in one of my courses I've used Craig Larman's Applying UML and
> Patterns because it has an analysis approach (getting from a semi-complex
> problem to a working OO solution in iterations, with UML if you want). It's
> using the Point Of Sale (cash register) problem which is complex yet
> familiar enough for most people to grasp (no pun intended, GRASP are the
> patterns he pushes as underlying responsibility-driven principles).
>
> Otherwise, Cay Horstmann's 3rd edition of OO Design and Patterns (Java,
> but applies to any OO language) should be out soon (I provided feedback on
> a draft copy last year). It has some good coverage of OO qualities and also
> uses a realistic problem (Graphics Editing framework, Violet) as the basis
> of lots of examples.
>
>
>


Re: [Pharo-users] What oo/modelling books/articles do we recommend these days?

2019-03-24 Thread Christopher Fuhrman
On Sun, 24 Mar 2019 at 21:26, Tim Mackinnon  wrote:

> Any good references come to mind? As I’ll build up a list that I can point
> people to, that hopefully puts them in a better place to solve these more
> interesting and hopefully rewarding problems.
>

Since 2003 in one of my courses I've used Craig Larman's Applying UML and
Patterns because it has an analysis approach (getting from a semi-complex
problem to a working OO solution in iterations, with UML if you want). It's
using the Point Of Sale (cash register) problem which is complex yet
familiar enough for most people to grasp (no pun intended, GRASP are the
patterns he pushes as underlying responsibility-driven principles).

Otherwise, Cay Horstmann's 3rd edition of OO Design and Patterns (Java, but
applies to any OO language) should be out soon (I provided feedback on a
draft copy last year). It has some good coverage of OO qualities and also
uses a realistic problem (Graphics Editing framework, Violet) as the basis
of lots of examples.


[Pharo-users] Using GitHub's APIs to query repo metadata with Pharo 7

2019-03-22 Thread Christopher Fuhrman
Another blog entry, this time for my experiments with GitHub's API to get
metadata about repos. It's probably not so esoteric, but I documented what
I did in hope that it will be useful.

https://fuhrmanator.github.io/Using-GitHub-API-in-Pharo/


Re: [Pharo-users] Test skip isn't working?

2019-03-18 Thread Christopher Fuhrman
What about:

self skipOnClassRun: 'message'.

?

On Mon, Mar 18, 2019, 15:53 Ben Coman  wrote:

> This is a tough one to consider.  Dennis's position seems very reasonable,
> but that Vitor got stuck is an indication of something missing.
> Just one other option occurs to me, that a notification pops up saying
> "force run skipped method",
> but I'm not even sure that would be beneficial.
>
> cheers -ben
>
> On Mon, 18 Mar 2019 at 22:21, Vitor Medina Cruz 
> wrote:
>
>> It is confusing because something unexpected and different from what is
>> explicitly said on code happens... I consider it an error.
>>
>> I think It should execute informing the test is skipped or don't provide
>> the click button at all. It took me a long time looking at skip
>> implementation and trying different stuff until I figure I hadn't done
>> anything wrong.
>>
>> On Mon, Mar 18, 2019 at 4:22 AM Denis Kudriashov 
>> wrote:
>>
>>> I think it is a feature. When you click icon on a single test you
>>> explicitly raise a wish to run it.
>>>
>>> пн, 18 мар. 2019 г., 1:26 Vitor Medina Cruz :
>>>
 Skip only works when I run tests from class. If I click the test button
 from the method skipped it don't work, maybe an error in calypso?

 On Sun, Mar 17, 2019 at 3:13 PM Vitor Medina Cruz 
 wrote:

> Hello,
>
> someTest
> self skip: 'some message'.
>
> rest of the test
>
> Rest of the test is being executed. There is a different woy of
> skipping tests?
>
> Thanks,
> Vitor.
>



[Pharo-users] LibC experiments in Pharo 7

2019-03-16 Thread Christopher Fuhrman
I wrote a blog entry about how I've used LibC in Pharo 7.

https://fuhrmanator.github.io/LibC-Pharo-experiments/

Cheers!

Christopher


[Pharo-users] Running Pharo under Ubuntu (Windows Subsystem for Linux)

2019-02-28 Thread Christopher Fuhrman
Thanks to Cyril who told me it was possible, I got Pharo 7 Unix running
under the Ubuntu 18 that's part of Windows Subsystem for Linux (WSL) in
Windows 10. It's not a VM VirtualBox.

I documented the install steps on my new blog that uses Jekyll and github
pages, which actually took longer to set up than the Pharo under WSL :)

The Mesa install step on the blog might be useful for documenting how to
get Pharo 7 to work in Ubuntu 18?

https://fuhrmanator.github.io/Pharo-in-WSL/