Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Dimitris Chloupis
Again very generic statements , and I see you refer to tools and libraries
instead of OOP. We talking here Pharo vs Python on the language level
because Python obviously does not come with an IDE. But then Pharo does not
come with literate programming tools or libraries as well.

I rather not go down the rabbit hole of third party libraries because
obviously I cannot participate in a discussion about libraries and areas of
coding, I know nothing about. Plus Python has countless of libraries which
makes a very longer discussion even if I was familiar with them and Pharo
has much less but still quite a lot of libraries as well.

On Sat, 7 Oct 2017 at 04:46, Offray Vladimir Luna Cárdenas <
offray.l...@mutabit.com> wrote:

> Hi,
>
>
> On 06/10/17 20:41, Dimitris Chloupis wrote:
> > I am no expert in OOP but I cannot say I have found a thing that Pharo
> > can do that Python can’t or is more difficult. Python obviously is
> > very heavily inspired by Smalltalk .
>
> I can find one: creating an environment for reproducible research and
> literate computing (interactive documentation). It can be done on both,
> but is harder and a lot more complicated in Python that in Pharo, as
> experience have shown [1]
>
> [1]
>
> http://mutabit.com/offray/static/blog/output/posts/grafoscopio-idea-and-initial-progress.html
>
> Cheers,
>
> Offray
>
>


Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Dimitris Chloupis
Care to explain what difficulty you experienced in live coding with Python.
Or what Pharo can do that Python can’t live code wise ? Maybe I will learn
something.


On Sat, 7 Oct 2017 at 04:36, Offray Vladimir Luna Cárdenas <
offray.l...@mutabit.com> wrote:

> Well IPython is not near to Pharo in terms of flexibility and live coding,
> and I have been a user of it. For example, recently we made a whole book 13
> Mb PDF book in a single Grafoscopio file of just ~600k, with a pretty good
> layout and final design (more details in other recent thread and in [1]).
> JupyterLab[2] is going in the direction of becoming a more complete IDE,
> but there are still a lot of stuff that is better done in Pharo, like unit
> testing, that in JupyterLab. In fact Brian Granger has told that the "I" is
> for interactive, not for integrated [3]. Of course, after over a decade of
> hard work and several millions of dollars, Jupyter is doing pretty well on
> the interactive notebooks front, but Pharo's edge in live coding and
> moldability, plus a superb small, agile and friendly community allowed a
> beginner to prototype valuable propositions about reproducible research and
> computer storytelling, without such background.
> [1] http://mutabit.com/repos.fossil/mapeda/
> [2] http://jupyterlab.github.io/
> [3] https://www.youtube.com/watch?v=Ejh0ftSjk6g
>
> So, I have experienced live coding in IPython/Jupyter and
> Pharo/Grafoscopio and still I think that Pharo has value proposals hard to
> find on any behemoths. Live coding there is getting good, but Pharo is even
> better, and that plus moldability make Pharo unbeatable, when you're
> changing/exploring a running system.
>
> Cheers,
>
> Offray
>
>
> On 06/10/17 16:18, Dimitris Chloupis wrote:
>
> Wise not to mention Ruby and Python and Pick the worst of the worst in
> OOP. Because frankly the competition for Pharo against those two behemoths
> can be quite brutal in the flexibility and power of OOP.
>
> And no , these language can do live coding with ease. I know because I
> currently code live coding style with Python for an app I am making. Sure
> it wont provide you with a live system out of the box, but put in 10 lines
> of code and you already ready to go with hardcore live coding. At least
> Python , Ruby being practically a rip off of Smalltalk language may need
> even less.
>
> iPython which by the way is by far the most popular Python tool is the
> real deal, a full blow live coding enviroment.
>
> To my suprise its not even hard to do live coding with C/C++ including
> using image format. To my shock live coding is actually supported by both
> the OS and the hardware. Hardware has its own exception system , OS has an
> image flie format called "memory mapped files" used for DLLs and a lot of
> essential functionality.
>
> For some weird reason however its well hidden and not that much utilised
> by coders. They really love long compile times, dont ask me why.
>
> But yeah C++ even though it has come a long way with its template system,
> its still the king of ugly. That sytax, oh the horrors of that syntax.
> yiaks !!!
>
> I am so enternal greatful that Pharo introduced me to live coding and
> opened my eyes to universe of fun and productivity. I cannot imagine coding
> an other way ever again.
>
> I really hope that we take this further though.
>
> On Wed, Oct 4, 2017 at 1:31 PM horrido  wrote:
>
>> Behold Pharo: The Modern Smalltalk
>> <
>> https://medium.com/smalltalk-talk/behold-pharo-the-modern-smalltalk-38e132c46053
>> >
>>
>> If you would like to suggest some edits, I'm all ears. Anything to improve
>> the impact of the article.
>>
>> Thanks.
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>


Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Dimitris Chloupis
Well any code you execute right now is to a degree live code. DLL are
dynamically loaded libraries which means you reload code real time. DLLs
are everywhere and of course even Pharo heavily relies on them.

Yes in Python live coding is as easy , I already explained in previous
post.

On Sat, 7 Oct 2017 at 01:51, horrido  wrote:

> To be honest, I didn't know you could do live coding in Python, Ruby,
> C/C++.
> I had only ever heard of "hot swapping" in Java.
>
> At any rate, I'd be surprised if live coding in these languages was as easy
> and convenient as in Pharo/Smalltalk.
>
>
>
> Sven Van Caekenberghe-2 wrote
> > Yes, you are right: Pharo/Smalltalk is more or less the same as
> > Ruby/Python/C/C++ in terms of power & flexibility of OOP and in live
> > coding.
> >
> > Come on.
> >
> >> On 6 Oct 2017, at 23:18, Dimitris Chloupis 
>
> > kilon.alios@
>
> >  wrote:
> >>
> >> Wise not to mention Ruby and Python and Pick the worst of the worst in
> >> OOP. Because frankly the competition for Pharo against those two
> >> behemoths can be quite brutal in the flexibility and power of OOP.
> >>
> >> And no , these language can do live coding with ease. I know because I
> >> currently code live coding style with Python for an app I am making.
> Sure
> >> it wont provide you with a live system out of the box, but put in 10
> >> lines of code and you already ready to go with hardcore live coding. At
> >> least Python , Ruby being practically a rip off of Smalltalk language
> may
> >> need even less.
> >>
> >> iPython which by the way is by far the most popular Python tool is the
> >> real deal, a full blow live coding enviroment.
> >>
> >> To my suprise its not even hard to do live coding with C/C++ including
> >> using image format. To my shock live coding is actually supported by
> both
> >> the OS and the hardware. Hardware has its own exception system , OS has
> >> an image flie format called "memory mapped files" used for DLLs and a
> lot
> >> of essential functionality.
> >>
> >> For some weird reason however its well hidden and not that much utilised
> >> by coders. They really love long compile times, dont ask me why.
> >>
> >> But yeah C++ even though it has come a long way with its template
> system,
> >> its still the king of ugly. That sytax, oh the horrors of that
> >> syntax. yiaks !!!
> >>
> >> I am so enternal greatful that Pharo introduced me to live coding and
> >> opened my eyes to universe of fun and productivity. I cannot imagine
> >> coding an other way ever again.
> >>
> >> I really hope that we take this further though.
> >>
> >> On Wed, Oct 4, 2017 at 1:31 PM horrido 
>
> > horrido.hobbies@
>
> >  wrote:
> >> Behold Pharo: The Modern Smalltalk
> >> 
> https://medium.com/smalltalk-talk/behold-pharo-the-modern-smalltalk-38e132c46053
> ;
> >>
> >> If you would like to suggest some edits, I'm all ears. Anything to
> >> improve
> >> the impact of the article.
> >>
> >> Thanks.
> >>
> >>
> >>
> >> --
> >> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> >>
>
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Offray Vladimir Luna Cárdenas
Hi,


On 06/10/17 20:41, Dimitris Chloupis wrote:
> I am no expert in OOP but I cannot say I have found a thing that Pharo
> can do that Python can’t or is more difficult. Python obviously is
> very heavily inspired by Smalltalk .

I can find one: creating an environment for reproducible research and
literate computing (interactive documentation). It can be done on both, 
but is harder and a lot more complicated in Python that in Pharo, as
experience have shown [1]

[1]
http://mutabit.com/offray/static/blog/output/posts/grafoscopio-idea-and-initial-progress.html

Cheers,

Offray



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Dimitris Chloupis
Well live coding is a simple process of reloading code. In Pharo the VM
recompiles a method and replace it’s old instance with a new one while code
executes.

Python you basically reload the module. Because Python does not compile per
method but per module which means executing code lively. This happens
because when you import a module in Python, Python does nothing special
than executing the source code. Not before compilation but during
execution. Hence live coding, the Python VM replaces objects lively. Python
can also compile any size of code including individual methods.

That happens with one line of code importlib.reload(mymodule)

The next challenge in live coding is capture the error and not allowing the
app to exit, that is 2 lines of code and is a python exception. Python
exceptions are heavily used in Python to capture errors.

Debugging is up to the debugger that Python provides as a library with
conditional breakpoints and fully integrated . You can of course ask at any
point for any kind of context, global , local, arguments , instance and
class variables. The debugger also comes with its own REPL. Again
everything is an object.

OOP wise , in Python  everything is an object including procedure.
Procedures like blocks in Pharo are objects with one method. Procedures are
anonymous but if the name really bothers you you can use lamba functions.
Python has bigger syntax than Pharo but anything can be implemented as an
object. Global variables are objects, imported modules are objects etc.

Reflection wise , Python is a fully reflective an object can ask itself or
others about its live state, methods, bytecode and source code.

Meta programming wiseython allows for fully manipulation of objects down to
bytecode level. Python has no need for traits because it allows the live
replacement of its methods with procedures or methods from other objects.

Finally like Pharo , Python comes with a very powerful AST library capable
of fully manipulating the syntax . HyLang is a Lisp made in Python that
compiles to Python bytecode and can use any Python library.

The one thing Python cannot do at least out of the box is privacy. In Pharo
everything is private , methods hide behind messages , variables behind
methods. In Python everything is public and privacy is annotated in naming
only using double underscores.

Python also has properties which are methods that override variable
assignment , similarly how we use getter and sender methods for object
variables in Pharo.

What Python recently got has been optional static types  but I am not sure
if they are real static types , because I am not a fan of static typing
anyway.

I am no expert in OOP but I cannot say I have found a thing that Pharo can
do that Python can’t or is more difficult. Python obviously is very heavily
inspired by Smalltalk .

The very brief look I gave Ruby looked to me that it is even closer to
Smalltalk.

On Sat, 7 Oct 2017 at 01:17, Sven Van Caekenberghe  wrote:

> Yes, you are right: Pharo/Smalltalk is more or less the same as
> Ruby/Python/C/C++ in terms of power & flexibility of OOP and in live coding.
>
> Come on.
>
> > On 6 Oct 2017, at 23:18, Dimitris Chloupis 
> wrote:
> >
> > Wise not to mention Ruby and Python and Pick the worst of the worst in
> OOP. Because frankly the competition for Pharo against those two behemoths
> can be quite brutal in the flexibility and power of OOP.
> >
> > And no , these language can do live coding with ease. I know because I
> currently code live coding style with Python for an app I am making. Sure
> it wont provide you with a live system out of the box, but put in 10 lines
> of code and you already ready to go with hardcore live coding. At least
> Python , Ruby being practically a rip off of Smalltalk language may need
> even less.
> >
> > iPython which by the way is by far the most popular Python tool is the
> real deal, a full blow live coding enviroment.
> >
> > To my suprise its not even hard to do live coding with C/C++ including
> using image format. To my shock live coding is actually supported by both
> the OS and the hardware. Hardware has its own exception system , OS has an
> image flie format called "memory mapped files" used for DLLs and a lot of
> essential functionality.
> >
> > For some weird reason however its well hidden and not that much utilised
> by coders. They really love long compile times, dont ask me why.
> >
> > But yeah C++ even though it has come a long way with its template
> system, its still the king of ugly. That sytax, oh the horrors of that
> syntax. yiaks !!!
> >
> > I am so enternal greatful that Pharo introduced me to live coding and
> opened my eyes to universe of fun and productivity. I cannot imagine coding
> an other way ever again.
> >
> > I really hope that we take this further though.
> >
> > On Wed, Oct 4, 2017 at 1:31 PM horrido 
> wrote:
> > Behold Pharo: The Modern Smalltalk
> 

Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Offray Vladimir Luna Cárdenas
Well IPython is not near to Pharo in terms of flexibility and live
coding, and I have been a user of it. For example, recently we made a
whole book 13 Mb PDF book in a single Grafoscopio file of just ~600k,
with a pretty good layout and final design (more details in other recent
thread and in [1]). JupyterLab[2] is going in the direction of becoming
a more complete IDE, but there are still a lot of stuff that is better
done in Pharo, like unit testing, that in JupyterLab. In fact Brian
Granger has told that the "I" is for interactive, not for integrated
[3]. Of course, after over a decade of hard work and several millions of
dollars, Jupyter is doing pretty well on the interactive notebooks
front, but Pharo's edge in live coding and moldability, plus a superb
small, agile and friendly community allowed a beginner to prototype
valuable propositions about reproducible research and computer
storytelling, without such background.

[1] http://mutabit.com/repos.fossil/mapeda/
[2] http://jupyterlab.github.io/
[3] https://www.youtube.com/watch?v=Ejh0ftSjk6g

So, I have experienced live coding in IPython/Jupyter and
Pharo/Grafoscopio and still I think that Pharo has value proposals hard
to find on any behemoths. Live coding there is getting good, but Pharo
is even better, and that plus moldability make Pharo unbeatable, when
you're changing/exploring a running system.

Cheers,

Offray

On 06/10/17 16:18, Dimitris Chloupis wrote:
> Wise not to mention Ruby and Python and Pick the worst of the worst in
> OOP. Because frankly the competition for Pharo against those two
> behemoths can be quite brutal in the flexibility and power of OOP. 
>
> And no , these language can do live coding with ease. I know because I
> currently code live coding style with Python for an app I am making.
> Sure it wont provide you with a live system out of the box, but put in
> 10 lines of code and you already ready to go with hardcore live
> coding. At least Python , Ruby being practically a rip off of
> Smalltalk language may need even less. 
>
> iPython which by the way is by far the most popular Python tool is the
> real deal, a full blow live coding enviroment. 
>
> To my suprise its not even hard to do live coding with C/C++ including
> using image format. To my shock live coding is actually supported by
> both the OS and the hardware. Hardware has its own exception system ,
> OS has an image flie format called "memory mapped files" used for DLLs
> and a lot of essential functionality. 
>
> For some weird reason however its well hidden and not that much
> utilised by coders. They really love long compile times, dont ask me why. 
>
> But yeah C++ even though it has come a long way with its template
> system, its still the king of ugly. That sytax, oh the horrors of that
> syntax. yiaks !!!
>
> I am so enternal greatful that Pharo introduced me to live coding and
> opened my eyes to universe of fun and productivity. I cannot imagine
> coding an other way ever again. 
>
> I really hope that we take this further though. 
>
> On Wed, Oct 4, 2017 at 1:31 PM horrido  > wrote:
>
> Behold Pharo: The Modern Smalltalk
> 
> 
>
> If you would like to suggest some edits, I'm all ears. Anything to
> improve
> the impact of the article.
>
> Thanks.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Sean P. DeNigris
Sven Van Caekenberghe-2 wrote
> But the point remains, given an image and all our tools, why go to the
> web.

It seems like the value would be more as a PR tool than a development tool.



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



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread horrido
To be honest, I didn't know you could do live coding in Python, Ruby, C/C++.
I had only ever heard of "hot swapping" in Java.

At any rate, I'd be surprised if live coding in these languages was as easy
and convenient as in Pharo/Smalltalk.



Sven Van Caekenberghe-2 wrote
> Yes, you are right: Pharo/Smalltalk is more or less the same as
> Ruby/Python/C/C++ in terms of power & flexibility of OOP and in live
> coding.
> 
> Come on.
> 
>> On 6 Oct 2017, at 23:18, Dimitris Chloupis 

> kilon.alios@

>  wrote:
>> 
>> Wise not to mention Ruby and Python and Pick the worst of the worst in
>> OOP. Because frankly the competition for Pharo against those two
>> behemoths can be quite brutal in the flexibility and power of OOP. 
>> 
>> And no , these language can do live coding with ease. I know because I
>> currently code live coding style with Python for an app I am making. Sure
>> it wont provide you with a live system out of the box, but put in 10
>> lines of code and you already ready to go with hardcore live coding. At
>> least Python , Ruby being practically a rip off of Smalltalk language may
>> need even less. 
>> 
>> iPython which by the way is by far the most popular Python tool is the
>> real deal, a full blow live coding enviroment. 
>> 
>> To my suprise its not even hard to do live coding with C/C++ including
>> using image format. To my shock live coding is actually supported by both
>> the OS and the hardware. Hardware has its own exception system , OS has
>> an image flie format called "memory mapped files" used for DLLs and a lot
>> of essential functionality. 
>> 
>> For some weird reason however its well hidden and not that much utilised
>> by coders. They really love long compile times, dont ask me why. 
>> 
>> But yeah C++ even though it has come a long way with its template system,
>> its still the king of ugly. That sytax, oh the horrors of that
>> syntax. yiaks !!!
>> 
>> I am so enternal greatful that Pharo introduced me to live coding and
>> opened my eyes to universe of fun and productivity. I cannot imagine
>> coding an other way ever again. 
>> 
>> I really hope that we take this further though. 
>> 
>> On Wed, Oct 4, 2017 at 1:31 PM horrido 

> horrido.hobbies@

>  wrote:
>> Behold Pharo: The Modern Smalltalk
>> https://medium.com/smalltalk-talk/behold-pharo-the-modern-smalltalk-38e132c46053;
>> 
>> If you would like to suggest some edits, I'm all ears. Anything to
>> improve
>> the impact of the article.
>> 
>> Thanks.
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>





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



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Sven Van Caekenberghe
Yes, you are right: Pharo/Smalltalk is more or less the same as 
Ruby/Python/C/C++ in terms of power & flexibility of OOP and in live coding.

Come on.

> On 6 Oct 2017, at 23:18, Dimitris Chloupis  wrote:
> 
> Wise not to mention Ruby and Python and Pick the worst of the worst in OOP. 
> Because frankly the competition for Pharo against those two behemoths can be 
> quite brutal in the flexibility and power of OOP. 
> 
> And no , these language can do live coding with ease. I know because I 
> currently code live coding style with Python for an app I am making. Sure it 
> wont provide you with a live system out of the box, but put in 10 lines of 
> code and you already ready to go with hardcore live coding. At least Python , 
> Ruby being practically a rip off of Smalltalk language may need even less. 
> 
> iPython which by the way is by far the most popular Python tool is the real 
> deal, a full blow live coding enviroment. 
> 
> To my suprise its not even hard to do live coding with C/C++ including using 
> image format. To my shock live coding is actually supported by both the OS 
> and the hardware. Hardware has its own exception system , OS has an image 
> flie format called "memory mapped files" used for DLLs and a lot of essential 
> functionality. 
> 
> For some weird reason however its well hidden and not that much utilised by 
> coders. They really love long compile times, dont ask me why. 
> 
> But yeah C++ even though it has come a long way with its template system, its 
> still the king of ugly. That sytax, oh the horrors of that syntax. yiaks 
> !!!
> 
> I am so enternal greatful that Pharo introduced me to live coding and opened 
> my eyes to universe of fun and productivity. I cannot imagine coding an other 
> way ever again. 
> 
> I really hope that we take this further though. 
> 
> On Wed, Oct 4, 2017 at 1:31 PM horrido  wrote:
> Behold Pharo: The Modern Smalltalk
> 
> 
> If you would like to suggest some edits, I'm all ears. Anything to improve
> the impact of the article.
> 
> Thanks.
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 




Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Dimitris Chloupis
Wise not to mention Ruby and Python and Pick the worst of the worst in OOP.
Because frankly the competition for Pharo against those two behemoths can
be quite brutal in the flexibility and power of OOP.

And no , these language can do live coding with ease. I know because I
currently code live coding style with Python for an app I am making. Sure
it wont provide you with a live system out of the box, but put in 10 lines
of code and you already ready to go with hardcore live coding. At least
Python , Ruby being practically a rip off of Smalltalk language may need
even less.

iPython which by the way is by far the most popular Python tool is the real
deal, a full blow live coding enviroment.

To my suprise its not even hard to do live coding with C/C++ including
using image format. To my shock live coding is actually supported by both
the OS and the hardware. Hardware has its own exception system , OS has an
image flie format called "memory mapped files" used for DLLs and a lot of
essential functionality.

For some weird reason however its well hidden and not that much utilised by
coders. They really love long compile times, dont ask me why.

But yeah C++ even though it has come a long way with its template system,
its still the king of ugly. That sytax, oh the horrors of that syntax.
yiaks !!!

I am so enternal greatful that Pharo introduced me to live coding and
opened my eyes to universe of fun and productivity. I cannot imagine coding
an other way ever again.

I really hope that we take this further though.

On Wed, Oct 4, 2017 at 1:31 PM horrido  wrote:

> Behold Pharo: The Modern Smalltalk
> <
> https://medium.com/smalltalk-talk/behold-pharo-the-modern-smalltalk-38e132c46053
> >
>
> If you would like to suggest some edits, I'm all ears. Anything to improve
> the impact of the article.
>
> Thanks.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread Gabriel Cotelli
I've tried running it from the terminal and it works!.

If I double-click it from the file manager and choose "Run in Terminal" it
gives the previously commented error.



On Fri, Oct 6, 2017 at 5:35 PM, Christophe Demarey <
christophe.dema...@inria.fr> wrote:

> Hi Gabriel,
>
> Le 6 oct. 2017 à 15:48, Gabriel Cotelli  a écrit :
>
> I've tried it on Linux, and after the download has finished it cannot
> launch a Pharo 6.1 image. Find attached the PharoDebug.log
>
> Seems it's searching for the sources file in a wrong location.
> *Pharo cannot locate the sources file named
> /home/gcotelli/Pharo/pharo-launcher/bin/lib/pharo/5.0-201707201942/PharoV60.sources.*
>
>
> Strange indeed!
> I’m not able to reproduce it on my ubuntu vm.
>
> It’s surprising that sources file is search in the folder of the VM
> shipped with the launcher. Images are run with VM downloaded in the VM
> store ($HOME/Pharo/vms) and sources file is search in the vm directory.
> Could you tell me if you run the launcher from a terminal? Could you send
> me your environment variables to see if I can find something relevant there?
>


Re: [Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread Christophe Demarey
Hi Gabriel,

> Le 6 oct. 2017 à 15:48, Gabriel Cotelli  a écrit :
> 
> I've tried it on Linux, and after the download has finished it cannot launch 
> a Pharo 6.1 image. Find attached the PharoDebug.log
> 
> Seems it's searching for the sources file in a wrong location.
> Pharo cannot locate the sources file named 
> /home/gcotelli/Pharo/pharo-launcher/bin/lib/pharo/5.0-201707201942/PharoV60.sources.

Strange indeed!
I’m not able to reproduce it on my ubuntu vm.

It’s surprising that sources file is search in the folder of the VM shipped 
with the launcher. Images are run with VM downloaded in the VM store 
($HOME/Pharo/vms) and sources file is search in the vm directory.
Could you tell me if you run the launcher from a terminal? Could you send me 
your environment variables to see if I can find something relevant there?

Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Richard Sargent
Yes. We have tools that are *designed* for reading code and understanding it. 
But, let's have a ton of dead bits instead.

On Oct 6, 2017, 15:35, at 15:35, Stephane Ducasse  
wrote:
>To get dead objects while we have them live :)
>
>On Fri, Oct 6, 2017 at 8:48 PM, Sven Van Caekenberghe 
>wrote:
>>
>>
>>> On 6 Oct 2017, at 19:57, Sean P. DeNigris 
>wrote:
>>>
>>> Maybe this [1] or this [2] (the two might be the same thing)
>>>
>>> 1. http://forum.world.st/Online-Pharo-Documentation-tp3468690.html
>>> 2. http://forum.world.st/webdoc-tt3654967.html
>>
>>
>http://files.pharo.org/doc/4.0/#classList=package/Kernel.html=package.html=welcome.html
>>
>> This is only up to Pharo 4.
>>
>> But the point remains, given an image and all our tools, why go to
>the web.
>>
>>
>>
>>


Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Stephane Ducasse
To get dead objects while we have them live :)

On Fri, Oct 6, 2017 at 8:48 PM, Sven Van Caekenberghe  wrote:
>
>
>> On 6 Oct 2017, at 19:57, Sean P. DeNigris  wrote:
>>
>> Maybe this [1] or this [2] (the two might be the same thing)
>>
>> 1. http://forum.world.st/Online-Pharo-Documentation-tp3468690.html
>> 2. http://forum.world.st/webdoc-tt3654967.html
>
> http://files.pharo.org/doc/4.0/#classList=package/Kernel.html=package.html=welcome.html
>
> This is only up to Pharo 4.
>
> But the point remains, given an image and all our tools, why go to the web.
>
>
>
>



Re: [Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread Peter Uhnák
+1.0.1 :-)

> Pharo Launcher files (images, VMs) are now considered as user Documents
(easier to find). Consequently, they are now stored in the standard
documents folder, i.e.
> *$HOME/Pharo*

This seems like a step backwards. The expected location is
$XDG_DATA_HOME/Pharo . Is it possible to change or configure this?

Peter

On Fri, Oct 6, 2017 at 7:47 PM, Sean P. DeNigris 
wrote:

> Stephane Ducasse-3 wrote
> > Tx Christophe
>
> +100. Launcher has become indispensable!
>
>
>
> -
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Sven Van Caekenberghe


> On 6 Oct 2017, at 19:57, Sean P. DeNigris  wrote:
> 
> Maybe this [1] or this [2] (the two might be the same thing)
> 
> 1. http://forum.world.st/Online-Pharo-Documentation-tp3468690.html
> 2. http://forum.world.st/webdoc-tt3654967.html

http://files.pharo.org/doc/4.0/#classList=package/Kernel.html=package.html=welcome.html

This is only up to Pharo 4.

But the point remains, given an image and all our tools, why go to the web.






[Pharo-users] [ANN] OSSubprocess Bugfix and enhancements release

2017-10-06 Thread Mariano Martinez Peck
Dear all,

I have just released a new bugfix and enhancements release v0.2.5 for
OSSubprocess as you can see in [1].

This new release is thanks to the awesome work of Guillermo Polito [2]. He
found a problem (and a fix) that would hung/block the Pharo image in a wait
state. This problem has been forever and I have faced it myself. It would
only happen when using #waitForExit and under certain scenario.  Because of
that, I recommend everyone to move to this release.

Aside from that serious bug, he has also done quite some improvements in
the tests and in the Travis setup. Once this PR [3] has been merged and
SmalltalkCI updated, our Travis build [4] should show all green builds for
Linux/OSX and Pharo 5.0 and 6.1.

I have also copied the configuration into Pharo 5.0 and 6.0 catalog so as
of tomorrow, it should be there.


Cheers,

[1] https://github.com/marianopeck/OSSubprocess/releases/tag/v0.2.5
[2] https://github.com/marianopeck/OSSubprocess/pull/25
[3] https://github.com/hpi-swa/smalltalkCI/pull/320
[4] https://travis-ci.org/marianopeck/OSSubprocess


-- 
Mariano
http://marianopeck.wordpress.com


Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Sean P. DeNigris
Maybe this [1] or this [2] (the two might be the same thing)

1. http://forum.world.st/Online-Pharo-Documentation-tp3468690.html
2. http://forum.world.st/webdoc-tt3654967.html



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



Re: [Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread Sean P. DeNigris
Stephane Ducasse-3 wrote
> Tx Christophe

+100. Launcher has become indispensable!



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



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Hilaire
I think Laurent wrote something to export classes and documentation as 
html form to let user browse it.


I have not idea where it is though.

Hilaire

Le 06/10/2017 à 14:54, horrido a écrit :

*Then show me a link of the free, maintained reference documentation for the
classes that form “the core library”, like this one for Python
(https://docs.python.org/3/library/index.html)*


--
Dr. Geo
http://drgeo.eu





Re: [Pharo-users] Organisation and workflows

2017-10-06 Thread Stephane Ducasse
Super. Just do it :)
and we will here to help you helping Pharo

On Mon, Oct 2, 2017 at 5:40 PM, Steven R. Baker  wrote:
>
>
> On 02/10/17 15:28, Esteban Lorenzano wrote:
>>> On 2 Oct 2017, at 15:12, Stephane Ducasse  wrote:
>>>
>>> I discussed with esteban sooner this summer and we really want to have a 
>>> process
>>> where people can deploy applications and not just code.
>>> Now we are not yet there.
>>>
>>> Stef
>>>
>>> On Sun, Oct 1, 2017 at 9:03 PM, Steven R. Baker  
>>> wrote:
 Heya folks,

 [Please jump on any of my statements that sound crazy: use of Spec,
 other assumptions, etc.]

 I'm starting an application in Pharo, using Spec. Basically, a GTD
 application in the spirit of nirvanahq, omnifocus, things, nozbe. The
 code is working just fine, but I'm left with a lot of questions about
 how to organize it.

 First, is there some trick to managing images? Are people using
 one-per-project, or one-per-computer? All of the above? Anyone using
 PharoLauncher these days? Other tools?
>> pharo users tend to prefer one-per-project approach :)
>> most people uses (or should use) pharo launcher. In fact, we want to make it 
>> the default download, is just that to get it right is complicated :)
>>
>> but… pharo launcher is to developers. A final app would require other stuff 
>> to be accomplished (like closing development tools, etc.).
>>
 I'm assuming that the current state of the art is Iceberg; where can I
 find a "This is how you should organize your project using Iceberg"
 document, blog, book, tutorial, video, or otherwise.
>> beware: Iceberg is a cvs (like Monticello or git or svn…): it is use to 
>> store code, not to organise your project.
>> To organise your project you have Metacello.
>>
 Once the application is done, I assume I'll want to ship it in a minimal
 Pharo image. Is there documentation or prior art on this?
>> this is what is hard :)
>> I imagine with the headless VMs we are about to finish it will be easier (to 
>> just initiate a window with your app, instead initiate a window with the 
>> full world as now).
>> but we still require some work.
>>
 Finally, is there a way to run and capture keybindings globally? I have
 one part of my application (a quick-entry window) which I want summoned
 from a global (OS-wide) hotkey. Has this been done before? Or is it not
 easy to break the fourth wall, so to speak, and register a global
 keybinding from inside the VM?
>> there is a keybindings framework inside pharo, but since you have a lot of 
>> development tools, it becomes hard to use (again, something that can be 
>> solved in the near future, with same approach as before, but not yet).
>> now, to get the keybindings of the system you will need to install that *in* 
>> the system.
>>
>> for mac, for example, you can doit using the ObjC bridge (which does not 
>> works in 64bit images... I’m working on a UFFI replacement, but… guess what? 
>> not yet :P)
>> and I guess using UFFI you can get that to work on windows and linux? I’m 
>> really don’t know.
>>
>> all you ask is *doable*… but not all your requirements are *easily* doable 
>> right now, which is want I want to fix :)
> I don't mind contributing code and time on these things, as they present
> real barriers to me. I'm looking for ways to get involved in the
> community again. :)
>
> -Steven
>
>> Esteban
>>
 Thanks!

 -Steven



>>
>
>



Re: [Pharo-users] Equals and HashCode Builder

2017-10-06 Thread Stephane Ducasse
Contact noury because I do not remember.
But having a little builder is also nice.

On Fri, Oct 6, 2017 at 4:15 PM, Vitor Medina Cruz  wrote:
> Stephane
>
> "Vitor why don't you take it as a small project to propose a solution for
> Pharo."
>
> I will try :) I like the idea of using a Trait.
>
>
> Em 6 de out de 2017 05:01, "Stephane Ducasse" 
> escreveu:
>
> Here is what I extracted from older emails
>
> From David Allouche in Pharo-dev to see if
> The ==hash== method is used in Pharo to separate objects in
> bucket-based data structures.
>
>
> !! Property
>
> It must have one required property which is required data integrity:
>
>  A.
> Objects that are equal according to ==\=== must have equal hashes.
>
>
> It should have two desirable properties that are required to support
> the algorithmic assumptions of bucket-based data structures:
>
>  B.
> Objects that are not equal should have different hashes. Ideally, the
> probability of hash collision should by 1/N where N is the size of
> hash value space.
>
>  C. The hash values should spread as much as possible over their
> value space. For example: ProtoObject>>#identityHash.
>
>
>
>
> How these two desirable properties can be implemented depends on the
> actual distribution of the values used to compute the hash.
>
> An object can safely use XOR hashing if its instance variables are all
> different objects that already provide a hash method with these two
> properties.
>
> @@todo check following sentence because the use of singleton is obscure
>
> For example, an object whose behaviour is defined by several of
> singleton delegates of different classes that do not override
> Object>>#hash.
>
> But if the instance variables are not guaranteed to have those
> properties, it is necessary to more thoroughly "mix the bits". For
> example the  method ==hash== of ==SequenceableCollection== illustrates
> this point.
>
>
> [[[
> SequenceableCollection >> hash
> | hash |
> hash := self species hash.
> 1 to: self size do: [:i | hash := (hash + (self at: i) hash) hashMultiply].
> ^ hash
> ]]]
>
>
> The mixing of the bits is done by the combination of addition and
> ==hashMultiply==. The value of ==species hash== does not need to be
> processed by ==hashMultiply==, because it is probably computed by the
> method =identityHash== of ==ProtoObject==, and that already provides
> property C.
>
> !!! When we should not use XOR
>
> ==LayoutFrame== is a particularly good example of a data structure
> that should not use XOR hashing. Its instance variables provide none
> of the required properties:
>
> - ==SmallInteger>>hash== is just ==^self==.
> - In addition, common ==LayoutFrame== instances tend to use pairs of
> identical values in their instance variables. Like ==0@0 corner:
> 1@1==, or ==Margin fromNumber: 10==.
>
> A good hash function for LayoutFrame needs to:
>
> - Get hashes for each instance variable that provides properties A and B.
> - Combine them in a way that is order-sensitive (to maintain property
> B) and that does some extra mixing (to provide property C).
>
> Now, we can assume that common values for the instance variables will
> be instances of ==SmallInteger==, ==Float==, or ==Fraction==.
>
> You can see in ==Fraction>>hash==, that a comment mentions the
> assumption that the fraction is already reduced, that is what makes it
> acceptable to use bitXor.
>
> The hash of ==SmallInteger== does provide properties A and B, but not
> property C. The hash of ==Float== is harder to understand, but tests
> show that it provides distinct values for 0.5, 0.25 and 0.125. So it
> hopefully provides B for the range of values of interest to
> ==LayoutFrame==.
>
> Another class that has similar hashing constraints to ==LayoutFrame==
> is ==Point==. Its ==hash== method is:
>
> [[[
> Point >> hash
> "Hash is reimplemented because = is implemented."
> ^(x hash hashMultiply + y hash) hashMultiply
> ]]]
>
> It does not include species in the computation, which is less than
> ideal because it favours collisions with objects of different species
> that have a similar content and a the same hash algorithm.
>
> Finally, it is probably not necessary or useful to use the accessors
> to get to the instance variables.
>
> So a good implementation for LayoutFrame is
>
> [[[
> LayoutFrame >> hash
> | hash |
> hash := self species hash
> hash := (hash + leftFraction hash) hashMultiply
> hash := (hash + leftOffset hash) hashMultiply
> hash := (hash + topFraction hash) hashMultiply
> hash := (hash + topOffset hash) hashMultiply
> hash := (hash + rightFraction hash) hashMultiply
> hash := (hash + rightOffset hash) hashMultiply
> hash := (hash + bottomFraction hash) hashMultiply
> hash := (hash + bottomOffset hash) hashMultiply
> ^ hash
> ]]]
>
> On Fri, Oct 6, 2017 at 9:59 AM, Stephane Ducasse
>  wrote:
>> Noury also proposed a trait to avoid to systematically have to implement
>> hash.
>> Vitor why 

Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Stephane Ducasse
This is fun because I was thinking that we should add to the main page
a videos of the counter coding in the debugger
and GTInspector.

We have the mooc videos showing ProfStef so we have nearly everything
we need and now they are available (should upload them with english
voice).
Stef

On Fri, Oct 6, 2017 at 5:39 PM, Ben Coman  wrote:
> I saw this comment, and wonder if we might have an intro video (or cartoon)
> of how to run the ProfStef tutorial in the first few minutes of opening your
> first image.
>
>> They need to work on the presentation. How do you get started ? How does
>> the code look like ? etc. Not just "download this program and buy this book"
> reply
>
> yes, time, resources, someoneHasToDoIt all apply.
> just a random thought,
> cheers -ben
>
> On Fri, Oct 6, 2017 at 9:47 PM, horrido  wrote:
>>
>> Thanks. I gave your answer verbatim. I also added the following paragraph:
>>
>> The problem I find with today’s developers is that they are rather
>> closed-minded. They are rigid and inflexible, and not willing to adapt to
>> new and different ways of doing things. In my generation (circa
>> 1980–1990),
>> people didn’t have a problem with trying different technologies. That’s
>> why
>> I had no issue with learning Smalltalk 10 years ago, after I had retired
>> from a 20-year-long career in C systems programming and FORTRAN scientific
>> programming.
>>
>>
>>
>> Sven Van Caekenberghe-2 wrote
>> >> On 6 Oct 2017, at 14:54, horrido 
>>
>> > horrido.hobbies@
>>
>> >  wrote:
>> >>
>> >> I received this comment from someone who complained:
>> >>
>> >> *What about the lack of documentation? From time to time I’ve checked
>> >> some
>> >> SmallTalk implementations like Squeak, GNU-Smalltalk and now Pharo. Of
>> >> these, only GNU-SmallTalk appears to have a free, official programming
>> >> guide
>> >> and core library reference that any serious programmer expects from a
>> >> language.
>> >>
>> >> https://www.gnu.org/software/smalltalk/manual-base/html_node/*
>> >>
>> >> I pointed to Pharo's documentation but then he came back with:
>> >>
>> >> *Then show me a link of the free, maintained reference documentation
>> >> for
>> >> the
>> >> classes that form “the core library”, like this one for Python
>> >> (https://docs.python.org/3/library/index.html)*
>> >>
>> >> It's true, most Smalltalks do not have a core library reference, not
>> >> even
>> >> VisualWorks! So what is the proper response to this complaint?
>> >
>> > The first answer is that Pharo/Smalltalk is unique in that a running
>> > system/IDE contains _all_ source code, _all_ documentation (class,
>> > method,
>> > help, tutorial), _all_ unit tests and _all_ runnable examples in a very
>> > easy, accessible way. It takes some getting used to, but this is
>> > actually
>> > better and much more powerful than any alternative.
>> >
>> > The second answer is that there are lots of books and articles that take
>> > the classic/structured book/paper approach. There is
>> > http://books.pharo.org, http://themoosebook.org,
>> > http://book.seaside.st/book, http://medium.com/concerning-pharo and many
>> > more.
>> >
>> >> Thanks.
>> >>
>> >>
>> >>
>> >> --
>> >> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>> >>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>



Re: [Pharo-users] Creating a new method

2017-10-06 Thread Stephane Ducasse
Hi Dirk

have a look at

- one one coding the counter
   
http://rmod-pharo-mooc.lille.inria.fr/MOOC/Videos/W1/C019-W1S-Videos-Redo-Counter-Traditional-FR-v4.mp4
(we should have the english versions now)
   C019-W1-Videos-Redo-CodingCounterInDebugger-FR-V2-HD_720p_4Mbs.m4v

you can find the subtitles around the same folder.

Stef



On Fri, Oct 6, 2017 at 4:16 PM, Ben Coman  wrote:
>
>
> On Fri, Oct 6, 2017 at 6:15 PM, Dirk Olmes  wrote:
>>
>> Hi,
>>
>> I may be asking an absolute noob question but I was unable to find any
>> useful hints on google ...
>>
>> I often find myself writing methods that do not yet exist when
>> implementing other methods, e.g. when I'm writing the implementation of
>> methodA I'm calling out to methodB.
>>
>> What's the easiest way to create the new method? I know I can jump
>> aroung through hoops with a separate browser but that feels cumbersome.
>>
>> I understand that the editor/runtime/whatever cannot know 100% of the
>> time where to put the new method but at least for messages to self it
>> should be smart enough to offer some kind of help.
>>
>> -dirk
>>
>
> A common Pharo workflow is known as "programming from within the debugger."
> Run your #methodA code as soon as possible, and when the debugger pops up
> because someObject hasn't yet implemented #methodB, the debugger helps you
> create #methodB in the right place.
>
> Some examples...
> * https://www.youtube.com/watch?v=ymITEeAOtEA
> *
> http://www.virtuouscode.com/2015/05/11/in-which-i-make-you-hate-ruby-in-7-minutes/
>
> Give it a go and stick with it for a while, and you'll understand why
> Smalltalk invented Test Driven Development (and it may change they way you
> think about programming.)
>
> cheers -ben



Re: [Pharo-users] ZnClient in Pharo 6.1 not working for Https on Windows

2017-10-06 Thread Cyril Ferlicot D.
Le 06/10/2017 à 13:02, kmo a écrit :
> I was trying to Soup on Windows 7 and found I could not access https sites
> 
> On windows 7 and 10 the following code fails:
> 
> ZnEasy get:'https://genius.com/Alice-nuvole-lyrics'.
> 
> This works fine in Pharo 5 on Windows. Also works fine with Pharo 6.1 (32
> bit) on Linux.
> 
> The problem is Pharo 6.1 on Windows.
> 
> The error is:
> 
> "SSL/TLS plugin initialization failed (VM plugin missing ? OS libraries 
> missing ?)" 
> 
> I know that his has been seen on Linux in the past - see
> http://forum.world.st/SSL-TLS-plugin-initailization-failed-VM-plugin-missing-OS-libraries-missing-td4945857.html
> 
> I'm running the latest vm and 6.1 image.
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 

I just saw that Windows Defender consider this plugin as a Trojan and
delete it.

Name of the menace: Trojan:Win32/Azden.A!cl

Should this be reported on Pharo's issue tracker or on opensmalltalk one?

-- 
Cyril Ferlicot
https://ferlicot.fr

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



signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] Seaside Magritte tutorial

2017-10-06 Thread Stephane Ducasse
Now there is a much better one :)
To be announced soon
But you can have it as beta reader.

https://github.com/SquareBracketAssociates/Booklet-Magritte
check the bintray link in the readme

Any typos, bugs, errors are welcome
Stef


On Fri, Oct 6, 2017 at 4:57 PM, Sven Van Caekenberghe  wrote:
>
>
>> On 6 Oct 2017, at 16:54, Vitor Medina Cruz  wrote:
>>
>> Hello!
>>
>> Is there any tutorial focused on Seaside and Magritte that creates an 
>> example app using Magritte in a job trivial way?
>>
>> I mean, something that mix or segregate descriptions from some object to 
>> generate pages on Seaside, that show a way to personalize more the generated 
>> page, if that is possible.
>>
>> Thanks in advance!
>
> Did you see
>
>   http://book.seaside.st/book/advanced/magritte
>
> maybe a bit old, I don't know
>
>



Re: [Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread Stephane Ducasse
Tx Christophe
We should add a new page on Pharo.org about the launcher.

On Fri, Oct 6, 2017 at 1:26 PM, Christophe Demarey
 wrote:
> Hi all,
>
> I just released a new version of the PharoLauncher 1.0.1.
> Here are major improvements since last version:
>
> Pharo launcher is now distributed with a Pharo 60 image with a 32-bits
> threaded VM (to avoid hangs when using OSProcess).
> Add a VM management utility able to find (and download) the appropriate VM
> for a given image. So, the launcher is NOT shipped anymore with an extra VM.
> It will fetch required VM when needed.
> Pharo Launcher files (images, VMs) are now considered as user Documents
> (easier to find). Consequently, they are now stored in the standard
> documents folder, i.e.
>
> $HOME/Documents/Pharo on OS X,
> $HOME/My Documents/Pharo on windows,
> $HOME/Pharo on Linux (some linux distributions provide a document folder but
> some others not, so we put it in the HOME directory in all cases).
> In this folder, you will find your images and virtual machines needed to run
> images.
>
> Use of ProcessWrapper to run images on Windows.
> Adds download of sources file for Pharo images > 60.
> Left panel is now used for official images and Jenkins jobs templates and
> right panel is used for local images.
> New mooc entry with the image ready to start the Pharo Mooc.
> New deprecated category to find old official Pharo images.
> Use system unzip when possible (Pharo unzip does not manage file permissions
> nor symbolic links).
>
> You can get platform bundles from files.pharo.org:
>
> Os X: http://files.pharo.org/platform/launcher/Pharo_1.0.1.dmg
> Windows: http://files.pharo.org/platform/launcher/pharo_installer-1.0.1.exe
> Linux: http://files.pharo.org/platform/launcher/Pharo-linux-1.0.1.zip
>
>
> Enjoy,
> Christophe.
>
> For those wanted more info on how the adequate VM is computed, here is the
> process:
>
> determine the image format version
> find (and optionnaly fetch) a compatible VM (a VM able to run this image
> format) and run the image to get its Pharo version number
> find (and optionnaly fetch) the appropriate VM for this specific Pharo image
> version. Sources files are also downloaded with the VM when applicable.
> run the image with the appropriate VM
>
>



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Ben Coman
I saw this comment, and wonder if we might have an intro video (or cartoon)
of how to run the ProfStef tutorial in the first few minutes of opening
your first image.

> They need to work on the presentation. How do you get started ? How does
the code look like ? etc. Not just "download this program and buy this book"
reply

yes, time, resources, someoneHasToDoIt all apply.
just a random thought,
cheers -ben

On Fri, Oct 6, 2017 at 9:47 PM, horrido  wrote:

> Thanks. I gave your answer verbatim. I also added the following paragraph:
>
> The problem I find with today’s developers is that they are rather
> closed-minded. They are rigid and inflexible, and not willing to adapt to
> new and different ways of doing things. In my generation (circa 1980–1990),
> people didn’t have a problem with trying different technologies. That’s why
> I had no issue with learning Smalltalk 10 years ago, after I had retired
> from a 20-year-long career in C systems programming and FORTRAN scientific
> programming.
>
>
>
> Sven Van Caekenberghe-2 wrote
> >> On 6 Oct 2017, at 14:54, horrido 
>
> > horrido.hobbies@
>
> >  wrote:
> >>
> >> I received this comment from someone who complained:
> >>
> >> *What about the lack of documentation? From time to time I’ve checked
> >> some
> >> SmallTalk implementations like Squeak, GNU-Smalltalk and now Pharo. Of
> >> these, only GNU-SmallTalk appears to have a free, official programming
> >> guide
> >> and core library reference that any serious programmer expects from a
> >> language.
> >>
> >> https://www.gnu.org/software/smalltalk/manual-base/html_node/*
> >>
> >> I pointed to Pharo's documentation but then he came back with:
> >>
> >> *Then show me a link of the free, maintained reference documentation for
> >> the
> >> classes that form “the core library”, like this one for Python
> >> (https://docs.python.org/3/library/index.html)*
> >>
> >> It's true, most Smalltalks do not have a core library reference, not
> even
> >> VisualWorks! So what is the proper response to this complaint?
> >
> > The first answer is that Pharo/Smalltalk is unique in that a running
> > system/IDE contains _all_ source code, _all_ documentation (class,
> method,
> > help, tutorial), _all_ unit tests and _all_ runnable examples in a very
> > easy, accessible way. It takes some getting used to, but this is actually
> > better and much more powerful than any alternative.
> >
> > The second answer is that there are lots of books and articles that take
> > the classic/structured book/paper approach. There is
> > http://books.pharo.org, http://themoosebook.org,
> > http://book.seaside.st/book, http://medium.com/concerning-pharo and many
> > more.
> >
> >> Thanks.
> >>
> >>
> >>
> >> --
> >> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> >>
>
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] ZnClient in Pharo 6.1 not working for Https on Windows

2017-10-06 Thread kmo
Thanks. I re-extracted SqueakSSL.dll from the zip file and now it works! 



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



Re: [Pharo-users] Update of ConfigurationOfGlorp

2017-10-06 Thread Herby Vojčík

Sven Van Caekenberghe wrote:



On 4 Oct 2017, at 17:20, stephan  wrote:

I've added a Pharo 7 version, copied the configurations from DBXTalk/Glorp to 
DBXTalk/Configurations and the metarepos, and
replaced the #'Pharo6.0.x' style names by #'Pharo6.x' style.
Please let me know if that creates problems

Stephan


I tested with the latest ConfigurationOfGlorp-StephanEggermont.61 in Pharo 7 
and that seems OK (not super clean, but OK).

Thx.




Any chance of incorporating fixes 127 / 129?

Herby



Re: [Pharo-users] Update of ConfigurationOfGlorp

2017-10-06 Thread Sven Van Caekenberghe


> On 4 Oct 2017, at 17:20, stephan  wrote:
> 
> I've added a Pharo 7 version, copied the configurations from DBXTalk/Glorp to 
> DBXTalk/Configurations and the metarepos, and
> replaced the #'Pharo6.0.x' style names by #'Pharo6.x' style.
> Please let me know if that creates problems
> 
> Stephan

I tested with the latest ConfigurationOfGlorp-StephanEggermont.61 in Pharo 7 
and that seems OK (not super clean, but OK).

Thx.




Re: [Pharo-users] ZnClient in Pharo 6.1 not working for Https on Windows

2017-10-06 Thread Herby Vojčík

kmo wrote:

I was trying to Soup on Windows 7 and found I could not access https sites

On windows 7 and 10 the following code fails:

ZnEasy get:'https://genius.com/Alice-nuvole-lyrics'.

This works fine in Pharo 5 on Windows. Also works fine with Pharo 6.1 (32
bit) on Linux.

The problem is Pharo 6.1 on Windows.

The error is:

"SSL/TLS plugin initialization failed (VM plugin missing ? OS libraries
missing ?)"


I had it as well. The reason seems to be really strange, but the root 
cause was the zip wasn't unzipped correctly, probably due to Windows 
Defender hijacking it, and SqueakSSL.dll was missing.


Check thouroughly if you actually have all files present in .zip 
actually unzipped in pharo folder.


Herby


I know that his has been seen on Linux in the past - see
http://forum.world.st/SSL-TLS-plugin-initailization-failed-VM-plugin-missing-OS-libraries-missing-td4945857.html

I'm running the latest vm and 6.1 image.



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






Re: [Pharo-users] Seaside Magritte tutorial

2017-10-06 Thread Sven Van Caekenberghe


> On 6 Oct 2017, at 16:54, Vitor Medina Cruz  wrote:
> 
> Hello!
> 
> Is there any tutorial focused on Seaside and Magritte that creates an example 
> app using Magritte in a job trivial way? 
> 
> I mean, something that mix or segregate descriptions from some object to 
> generate pages on Seaside, that show a way to personalize more the generated 
> page, if that is possible.
> 
> Thanks in advance!

Did you see 

  http://book.seaside.st/book/advanced/magritte

maybe a bit old, I don't know




[Pharo-users] Seaside Magritte tutorial

2017-10-06 Thread Vitor Medina Cruz
Hello!

Is there any tutorial focused on Seaside and Magritte that creates an
example app using Magritte in a job trivial way?

I mean, something that mix or segregate descriptions from some object to
generate pages on Seaside, that show a way to personalize more the
generated page, if that is possible.

Thanks in advance!


Re: [Pharo-users] Deploying on Linux with LibC version < 2.15

2017-10-06 Thread Andrew Glynn
There's a reason it's referred to by numerous developers as R-HELL.

Andrew Glynn

-Original Message-

Date: Thu, 5 Oct 2017 21:46:20 +0800
Subject: Re: [Pharo-users] Deploying on Linux with LibC version < 2.15
To: bruce.on...@pckswarms.ch, Any question about pharo is welcome 
Reply-to: Any question about pharo is welcome 
From: Holger Freyther 
> On 5. Oct 2017, at 18:08, Bruce O'Neel 
> wrote:
> 
> Hi,

Hi!


> Well, our redhat 6.9 systems have 2.12, so, that qualifies.
> 
> And yes, we still have RedHat 6, and 6.9 was released only 6 months
> ago!  It will finish extended support in a mind-blowing 7 more years
> in 2024.
> 
> Redhat 5, still supported for another 3 years till 2020 has glibc
> 2.5.


for a brief moment you really scared me. I thought you referred to
RedHat Linux 6 which was released in 1999 but you are referring to Red
Hat Enterprise Linux (RHEL).

As it turns out we have "latest" (as soon as a commit is made to pharo-
vm.git) and hand curated "stable" (hand created source tarballs,
rebuilt from a git commit of opensmalltalk-vm) for RHEL6 and CentOS 6.

CentOS 6.x:

# Add the repo
$ yum-config-manager --add-repo http://download.opensuse.org/repositori
es/devel:/languages:/pharo:/latest/CentOS_6/devel:languages:pharo:lates
t.repo

OR (for stable):

http://download.opensuse.org/repositories/devel:/languages:/pharo:/late
st/CentOS_6/devel:languages:pharo:stable.repo

# Install 32bit packages (with X11 dependency for *-ui or not)

$ yum install pharo6-32-ui.i686 or pharo6-32.i386

# Install 64bit packages

$ yum install pharo6-64-ui.x86_64 pharo6-64.x86_64







Re: [Pharo-users] Deploying on Linux with LibC version < 2.15

2017-10-06 Thread Andrew Glynn
RedHat < 7.0 still uses libc 2.12 as far as I'm aware. Pharo 5 has a
downloadable version that works on that OS.  OEL with the UEK has an
updated libc.

Andrew Glynn
openmastery.org

-Original Message-

Date: Thu, 5 Oct 2017 11:43:07 +0200
Subject: Re: [Pharo-users] Deploying on Linux with LibC version < 2.15
To: Any question about pharo is welcome 
Reply-to: Any question about pharo is welcome 
From: Cyril Ferlicot 
On Thu, Oct 5, 2017 at 11:30 AM, Holger Freyther 
wrote:
> 
> Which OS has such old versions of LibC? Which LSB standard does it
> support?
> 

Hi,

This is RedHat. I don't have the right to give more info than the fact
it is a RedHat with a LibC version < 2.15.
I don't know for the LSB support. I can ask but I will probably not
know before the end of next week.



Re: [Pharo-users] Creating a new method

2017-10-06 Thread Ben Coman
On Fri, Oct 6, 2017 at 6:15 PM, Dirk Olmes  wrote:

> Hi,
>
> I may be asking an absolute noob question but I was unable to find any
> useful hints on google ...
>
> I often find myself writing methods that do not yet exist when
> implementing other methods, e.g. when I'm writing the implementation of
> methodA I'm calling out to methodB.
>
> What's the easiest way to create the new method? I know I can jump
> aroung through hoops with a separate browser but that feels cumbersome.
>
> I understand that the editor/runtime/whatever cannot know 100% of the
> time where to put the new method but at least for messages to self it
> should be smart enough to offer some kind of help.
>
> -dirk
>
>
A common Pharo workflow is known as "programming from within the debugger."
Run your #methodA code as soon as possible, and when the debugger pops up
because someObject hasn't yet implemented #methodB, the debugger helps you
create #methodB in the right place.

Some examples...
* https://www.youtube.com/watch?v=ymITEeAOtEA
*
http://www.virtuouscode.com/2015/05/11/in-which-i-make-you-hate-ruby-in-7-minutes/

Give it a go and stick with it for a while, and you'll understand why
Smalltalk invented Test Driven Development (and it may change they way you
think about programming.)

cheers -ben


Re: [Pharo-users] Equals and HashCode Builder

2017-10-06 Thread Vitor Medina Cruz
Stephane

"Vitor why don't you take it as a small project to propose a solution for
Pharo."

I will try :) I like the idea of using a Trait.


Em 6 de out de 2017 05:01, "Stephane Ducasse" 
escreveu:

Here is what I extracted from older emails

>From David Allouche in Pharo-dev to see if
The ==hash== method is used in Pharo to separate objects in
bucket-based data structures.


!! Property

It must have one required property which is required data integrity:

 A.
Objects that are equal according to ==\=== must have equal hashes.


It should have two desirable properties that are required to support
the algorithmic assumptions of bucket-based data structures:

 B.
Objects that are not equal should have different hashes. Ideally, the
probability of hash collision should by 1/N where N is the size of
hash value space.

 C. The hash values should spread as much as possible over their
value space. For example: ProtoObject>>#identityHash.




How these two desirable properties can be implemented depends on the
actual distribution of the values used to compute the hash.

An object can safely use XOR hashing if its instance variables are all
different objects that already provide a hash method with these two
properties.

@@todo check following sentence because the use of singleton is obscure

For example, an object whose behaviour is defined by several of
singleton delegates of different classes that do not override
Object>>#hash.

But if the instance variables are not guaranteed to have those
properties, it is necessary to more thoroughly "mix the bits". For
example the  method ==hash== of ==SequenceableCollection== illustrates
this point.


[[[
SequenceableCollection >> hash
| hash |
hash := self species hash.
1 to: self size do: [:i | hash := (hash + (self at: i) hash) hashMultiply].
^ hash
]]]


The mixing of the bits is done by the combination of addition and
==hashMultiply==. The value of ==species hash== does not need to be
processed by ==hashMultiply==, because it is probably computed by the
method =identityHash== of ==ProtoObject==, and that already provides
property C.

!!! When we should not use XOR

==LayoutFrame== is a particularly good example of a data structure
that should not use XOR hashing. Its instance variables provide none
of the required properties:

- ==SmallInteger>>hash== is just ==^self==.
- In addition, common ==LayoutFrame== instances tend to use pairs of
identical values in their instance variables. Like ==0@0 corner:
1@1==, or ==Margin fromNumber: 10==.

A good hash function for LayoutFrame needs to:

- Get hashes for each instance variable that provides properties A and B.
- Combine them in a way that is order-sensitive (to maintain property
B) and that does some extra mixing (to provide property C).

Now, we can assume that common values for the instance variables will
be instances of ==SmallInteger==, ==Float==, or ==Fraction==.

You can see in ==Fraction>>hash==, that a comment mentions the
assumption that the fraction is already reduced, that is what makes it
acceptable to use bitXor.

The hash of ==SmallInteger== does provide properties A and B, but not
property C. The hash of ==Float== is harder to understand, but tests
show that it provides distinct values for 0.5, 0.25 and 0.125. So it
hopefully provides B for the range of values of interest to
==LayoutFrame==.

Another class that has similar hashing constraints to ==LayoutFrame==
is ==Point==. Its ==hash== method is:

[[[
Point >> hash
"Hash is reimplemented because = is implemented."
^(x hash hashMultiply + y hash) hashMultiply
]]]

It does not include species in the computation, which is less than
ideal because it favours collisions with objects of different species
that have a similar content and a the same hash algorithm.

Finally, it is probably not necessary or useful to use the accessors
to get to the instance variables.

So a good implementation for LayoutFrame is

[[[
LayoutFrame >> hash
| hash |
hash := self species hash
hash := (hash + leftFraction hash) hashMultiply
hash := (hash + leftOffset hash) hashMultiply
hash := (hash + topFraction hash) hashMultiply
hash := (hash + topOffset hash) hashMultiply
hash := (hash + rightFraction hash) hashMultiply
hash := (hash + rightOffset hash) hashMultiply
hash := (hash + bottomFraction hash) hashMultiply
hash := (hash + bottomOffset hash) hashMultiply
^ hash
]]]

On Fri, Oct 6, 2017 at 9:59 AM, Stephane Ducasse
 wrote:
> Noury also proposed a trait to avoid to systematically have to implement
hash.
> Vitor why don't you take it as a small project to propose a solution for
Pharo.
>
> On Thu, Oct 5, 2017 at 6:34 PM, Vitor Medina Cruz 
wrote:
>> Yes, canEqual implementation also make #= be commutative.
>>
>> On Tue, Oct 3, 2017 at 11:11 AM, Denis Kudriashov 
>> wrote:
>>>
>>>
>>> 2017-10-02 17:30 GMT+02:00 Denis Kudriashov :


 

Re: [Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread Gabriel Cotelli
I've tried it on Linux, and after the download has finished it cannot
launch a Pharo 6.1 image. Find attached the PharoDebug.log

Seems it's searching for the sources file in a wrong location.
*Pharo cannot locate the sources file named
/home/gcotelli/Pharo/pharo-launcher/bin/lib/pharo/5.0-201707201942/PharoV60.sources.*


Let me know if you need more info.
Regards,
Gabriel

On Fri, Oct 6, 2017 at 8:26 AM, Christophe Demarey <
christophe.dema...@inria.fr> wrote:

> Hi all,
>
> I just released a new version of the *PharoLauncher 1.0.1*.
> Here are major improvements since last version:
>
>- Pharo launcher is now distributed with a Pharo 60 image with a
>32-bits threaded VM (to avoid hangs when using OSProcess).
>- Add a *VM management* utility able to find (and download) the
>appropriate VM for a given image. So, the launcher is NOT shipped anymore
>with an extra VM. It will fetch required VM when needed.
>- *Pharo Launcher files (images, VMs)* are now considered as user
>Documents (easier to find). Consequently, they are *now stored in the
>standard documents folder*, i.e.
>   - *$HOME/Documents/Pharo* on OS X,
>   - *$HOME/My Documents/Pharo* on windows,
>   - *$HOME/Pharo* on Linux (some linux distributions provide a
>   document folder but some others not, so we put it in the HOME directory 
> in
>   all cases).
>   - In this folder, you will find your images and virtual machines
>   needed to run images.
>- Use of ProcessWrapper to run images on Windows.
>- Adds download of sources file for Pharo images > 60.
>- Left panel is now used for official images and Jenkins jobs
>templates and right panel is used for local images.
>- New mooc entry with the image ready to start the Pharo Mooc.
>- New deprecated category to find old official Pharo images.
>- Use system unzip when possible (Pharo unzip does not manage file
>permissions nor symbolic links).
>
> You can get platform bundles from files.pharo.org:
>
>- Os X: http://files.pharo.org/platform/launcher/Pharo_1.0.1.dmg
>- Windows: http://files.pharo.org/platform/launcher/pharo_
>installer-1.0.1.exe
>- Linux: http://files.pharo.org/platform/launcher/Pharo-linux-1.0.1.zip
>
>
> Enjoy,
> Christophe.
>
> For those wanted more info on how the adequate VM is computed, here is the
> process:
>
>1. determine the image format version
>2. find (and optionnaly fetch) a compatible VM (a VM able to run this
>image format) and run the image to get its Pharo version number
>3. find (and optionnaly fetch) the appropriate VM for this specific
>Pharo image version. Sources files are also downloaded with the VM when
>applicable.
>4. run the image with the appropriate VM
>
>
>
THERE_BE_DRAGONS_HERE
Pharo cannot locate the sources file named /home/gcotelli/Pharo/pharo-launcher/bin/lib/pharo/5.0-201707201942/PharoV60.sources.

Please check that the file is named properly and is in the
same directory as this image.
6 October 2017 10:39:52.747186 am

VM: unix - i686 - linux-gnu - CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $

Image: Pharo6.0 [Latest update: #60510]

StartupUIManager>>inform:
	Receiver: a StartupUIManager
	Arguments and temporary variables: 
		arg1: 	'Pharo cannot locate the sources file named /home/gcotelli/Pharo/pharo-la...etc...
		tmp1: 	nil
	Receiver's instance variables: 
		doNotQuitOnRestart: 	false
		uiManager: 	nil


PharoFilesOpener(Object)>>inform:
	Receiver: a PharoFilesOpener
	Arguments and temporary variables: 
		arg1: 	'Pharo cannot locate the sources file named /home/gcotelli/Pharo/pharo-la...etc...
	Receiver's instance variables: 
		shouldInformAboutReadOnlyChanges: 	nil


PharoFilesOpener>>inform:withRef:
	Receiver: a PharoFilesOpener
	Arguments and temporary variables: 
		arg1: 	'Pharo cannot locate 

Please check that the file is named prope...etc...
		arg2: 	'the sources file named /home/gcotelli/Pharo/pharo-launcher/bin/lib/pharo...etc...
	Receiver's instance variables: 
		shouldInformAboutReadOnlyChanges: 	nil


PharoFilesOpener>>inform:withSourceRef:
	Receiver: a PharoFilesOpener
	Arguments and temporary variables: 
		arg1: 	'Pharo cannot locate 

Please check that the file is named prope...etc...
		arg2: 	'/home/gcotelli/Pharo/pharo-launcher/bin/lib/pharo/5.0-201707201942/Pharo...etc...
	Receiver's instance variables: 
		shouldInformAboutReadOnlyChanges: 	nil


PharoFilesOpener>>informCannotLocateSources
	Receiver: a PharoFilesOpener
	Arguments and temporary variables: 
		tmp1: 	'Pharo cannot locate 

Please check that the file is named prope...etc...
	Receiver's 

Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread horrido
Thanks. I gave your answer verbatim. I also added the following paragraph:

The problem I find with today’s developers is that they are rather
closed-minded. They are rigid and inflexible, and not willing to adapt to
new and different ways of doing things. In my generation (circa 1980–1990),
people didn’t have a problem with trying different technologies. That’s why
I had no issue with learning Smalltalk 10 years ago, after I had retired
from a 20-year-long career in C systems programming and FORTRAN scientific
programming.



Sven Van Caekenberghe-2 wrote
>> On 6 Oct 2017, at 14:54, horrido 

> horrido.hobbies@

>  wrote:
>> 
>> I received this comment from someone who complained:
>> 
>> *What about the lack of documentation? From time to time I’ve checked
>> some
>> SmallTalk implementations like Squeak, GNU-Smalltalk and now Pharo. Of
>> these, only GNU-SmallTalk appears to have a free, official programming
>> guide
>> and core library reference that any serious programmer expects from a
>> language.
>> 
>> https://www.gnu.org/software/smalltalk/manual-base/html_node/*
>> 
>> I pointed to Pharo's documentation but then he came back with:
>> 
>> *Then show me a link of the free, maintained reference documentation for
>> the
>> classes that form “the core library”, like this one for Python
>> (https://docs.python.org/3/library/index.html)*
>> 
>> It's true, most Smalltalks do not have a core library reference, not even
>> VisualWorks! So what is the proper response to this complaint?
> 
> The first answer is that Pharo/Smalltalk is unique in that a running
> system/IDE contains _all_ source code, _all_ documentation (class, method,
> help, tutorial), _all_ unit tests and _all_ runnable examples in a very
> easy, accessible way. It takes some getting used to, but this is actually
> better and much more powerful than any alternative.
> 
> The second answer is that there are lots of books and articles that take
> the classic/structured book/paper approach. There is
> http://books.pharo.org, http://themoosebook.org,
> http://book.seaside.st/book, http://medium.com/concerning-pharo and many
> more.
> 
>> Thanks.
>> 
>> 
>> 
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>





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



Re: [Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread kmo
This is great. Absolutely love it.



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



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Sven Van Caekenberghe


> On 6 Oct 2017, at 14:54, horrido  wrote:
> 
> I received this comment from someone who complained:
> 
> *What about the lack of documentation? From time to time I’ve checked some
> SmallTalk implementations like Squeak, GNU-Smalltalk and now Pharo. Of
> these, only GNU-SmallTalk appears to have a free, official programming guide
> and core library reference that any serious programmer expects from a
> language.
> 
> https://www.gnu.org/software/smalltalk/manual-base/html_node/*
> 
> I pointed to Pharo's documentation but then he came back with:
> 
> *Then show me a link of the free, maintained reference documentation for the
> classes that form “the core library”, like this one for Python
> (https://docs.python.org/3/library/index.html)*
> 
> It's true, most Smalltalks do not have a core library reference, not even
> VisualWorks! So what is the proper response to this complaint?

The first answer is that Pharo/Smalltalk is unique in that a running system/IDE 
contains _all_ source code, _all_ documentation (class, method, help, 
tutorial), _all_ unit tests and _all_ runnable examples in a very easy, 
accessible way. It takes some getting used to, but this is actually better and 
much more powerful than any alternative.

The second answer is that there are lots of books and articles that take the 
classic/structured book/paper approach. There is http://books.pharo.org, 
http://themoosebook.org, http://book.seaside.st/book, 
http://medium.com/concerning-pharo and many more.

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




Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Richard Sargent
"It's Smalltalk. Read the code, Luke."?

On Oct 6, 2017 08:55, "horrido"  wrote:

> I received this comment from someone who complained:
>
> *What about the lack of documentation? From time to time I’ve checked some
> SmallTalk implementations like Squeak, GNU-Smalltalk and now Pharo. Of
> these, only GNU-SmallTalk appears to have a free, official programming
> guide
> and core library reference that any serious programmer expects from a
> language.
>
> https://www.gnu.org/software/smalltalk/manual-base/html_node/*
>
> I pointed to Pharo's documentation but then he came back with:
>
> *Then show me a link of the free, maintained reference documentation for
> the
> classes that form “the core library”, like this one for Python
> (https://docs.python.org/3/library/index.html)*
>
> It's true, most Smalltalks do not have a core library reference, not even
> VisualWorks! So what is the proper response to this complaint?
>
> Thanks.
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


[Pharo-users] [Ann] PharoLauncher v1.0.1 released!

2017-10-06 Thread Christophe Demarey
Hi all,

I just released a new version of the PharoLauncher 1.0.1.
Here are major improvements since last version:
Pharo launcher is now distributed with a Pharo 60 image with a 32-bits threaded 
VM (to avoid hangs when using OSProcess).
Add a VM management utility able to find (and download) the appropriate VM for 
a given image. So, the launcher is NOT shipped anymore with an extra VM. It 
will fetch required VM when needed.
Pharo Launcher files (images, VMs) are now considered as user Documents (easier 
to find). Consequently, they are now stored in the standard documents folder, 
i.e.
$HOME/Documents/Pharo on OS X,
$HOME/My Documents/Pharo on windows,
$HOME/Pharo on Linux (some linux distributions provide a document folder but 
some others not, so we put it in the HOME directory in all cases).
In this folder, you will find your images and virtual machines needed to run 
images.
Use of ProcessWrapper to run images on Windows.
Adds download of sources file for Pharo images > 60.
Left panel is now used for official images and Jenkins jobs templates and right 
panel is used for local images.
New mooc entry with the image ready to start the Pharo Mooc.
New deprecated category to find old official Pharo images.
Use system unzip when possible (Pharo unzip does not manage file permissions 
nor symbolic links).
You can get platform bundles from files.pharo.org:
Os X: http://files.pharo.org/platform/launcher/Pharo_1.0.1.dmg
Windows: http://files.pharo.org/platform/launcher/pharo_installer-1.0.1.exe
Linux: http://files.pharo.org/platform/launcher/Pharo-linux-1.0.1.zip

Enjoy,
Christophe.

For those wanted more info on how the adequate VM is computed, here is the 
process:
determine the image format version
find (and optionnaly fetch) a compatible VM (a VM able to run this image 
format) and run the image to get its Pharo version number
find (and optionnaly fetch) the appropriate VM for this specific Pharo image 
version. Sources files are also downloaded with the VM when applicable.
run the image with the appropriate VM



[Pharo-users] ZnClient in Pharo 6.1 not working for Https on Windows

2017-10-06 Thread kmo
I was trying to Soup on Windows 7 and found I could not access https sites

On windows 7 and 10 the following code fails:

ZnEasy get:'https://genius.com/Alice-nuvole-lyrics'.

This works fine in Pharo 5 on Windows. Also works fine with Pharo 6.1 (32
bit) on Linux.

The problem is Pharo 6.1 on Windows.

The error is:

"SSL/TLS plugin initialization failed (VM plugin missing ? OS libraries 
missing ?)" 

I know that his has been seen on Linux in the past - see
http://forum.world.st/SSL-TLS-plugin-initailization-failed-VM-plugin-missing-OS-libraries-missing-td4945857.html

I'm running the latest vm and 6.1 image.



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



Re: [Pharo-users] SVG Icons

2017-10-06 Thread Sven Van Caekenberghe
That is a very cool example !

Some nit picking (just trying to help make examples/snippets even more sexy).

The shortest expression to get to the contents of a URL, using only unary 
selectors is

  'https://s.cdpn.io/3/kiwi.svg' asUrl retrieveContents.

XMLDomParser's API also has the option #parseURL: so the following would also 
work

  XMLDomParser parseURL: 'https://s.cdpn.io/3/kiwi.svg'.

I believe that call actually has some additional functionality too.

> On 5 Oct 2017, at 15:24, Peter Uhnák  wrote:
> 
> Hi,
> 
> this is not really tested, but you can try to do the following
> 
> (installation)
> a) install XMLParser from catalog
> b) in monticello browser open Pharo/Athens and load latest version of 
> Athens-SVG package
> 
> (usage)
> Then you import SVG XML using Converter and paint it on a surface, which you 
> convert to Form.
> 
> ```
> contents := (ZnEasy get: 'https://s.cdpn.io/3/kiwi.svg') contents.
> 
> xmlDoc := XMLDOMParser parse: contents.
> 
> svg := AthensSVGConverter new importXMLDocument: xmlDoc.
> svg transform: 'scale(0.5)'.
> 
> extent := 500 @ 500.
> 
> surface := AthensCairoSurface extent: extent.
> surface drawDuring: [ :aCanvas | svg renderOn: aCanvas ].
> surface asForm.
> ```
> 
> 
> 
> Peter
> 
> On Thu, Oct 5, 2017 at 1:50 PM, Steven R. Baker  
> wrote:
> Heya folks!
> 
> I need to load SVG images (for icons) in my application. I've searched
> my 6.1 image for SVG, but haven't found anything.
> 
> Is there a library for loading SVGs? I'd really like to get them
> directly into instances of Form if possible, but I'm flexible. :)
> 
> Thanks!
> 
> -Steven
> 
> 
> 
> 




Re: [Pharo-users] Creating a new method

2017-10-06 Thread Peter Uhnák
What I often do is that I write a test and then I just execute the code.
When it runs into the non-existent method, the debugger offers a button
"create" method.

Alternatively I do open a second browser (clicking on "scoped" in the
current one or like that (or doubleclicking on a method to get the same
method opened in a new browser)

Peter

On Fri, Oct 6, 2017 at 12:15 PM, Dirk Olmes  wrote:

> Hi,
>
> I may be asking an absolute noob question but I was unable to find any
> useful hints on google ...
>
> I often find myself writing methods that do not yet exist when
> implementing other methods, e.g. when I'm writing the implementation of
> methodA I'm calling out to methodB.
>
> What's the easiest way to create the new method? I know I can jump
> aroung through hoops with a separate browser but that feels cumbersome.
>
> I understand that the editor/runtime/whatever cannot know 100% of the
> time where to put the new method but at least for messages to self it
> should be smart enough to offer some kind of help.
>
> -dirk
>
>


[Pharo-users] Creating a new method

2017-10-06 Thread Dirk Olmes
Hi,

I may be asking an absolute noob question but I was unable to find any
useful hints on google ...

I often find myself writing methods that do not yet exist when
implementing other methods, e.g. when I'm writing the implementation of
methodA I'm calling out to methodB.

What's the easiest way to create the new method? I know I can jump
aroung through hoops with a separate browser but that feels cumbersome.

I understand that the editor/runtime/whatever cannot know 100% of the
time where to put the new method but at least for messages to self it
should be smart enough to offer some kind of help.

-dirk



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread horrido
I've incorporated some of the suggestions. Thanks.

Here's a very lively discussion at Hacker News:
https://news.ycombinator.com/item?id=15399442

The article has sparked a raging debate. Hacker News readers seem to really
like the article, as it has garnered 150 points, /more than any other
article that I've ever posted!/

(Even  my original TechBeacon article
  
-- which launched my campaign! -- only got 115 points.)

You should all participate in the discussion and help to dispel the many
misconceptions people have about Pharo/Smalltalk. I find a great deal of
ignorance out there, and *only you folks* can address it properly.

Thanks.



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



Re: [Pharo-users] Equals and HashCode Builder

2017-10-06 Thread Stephane Ducasse
Here is what I extracted from older emails

>From David Allouche in Pharo-dev to see if
The ==hash== method is used in Pharo to separate objects in
bucket-based data structures.


!! Property

It must have one required property which is required data integrity:

 A.
Objects that are equal according to ==\=== must have equal hashes.


It should have two desirable properties that are required to support
the algorithmic assumptions of bucket-based data structures:

 B.
Objects that are not equal should have different hashes. Ideally, the
probability of hash collision should by 1/N where N is the size of
hash value space.

 C. The hash values should spread as much as possible over their
value space. For example: ProtoObject>>#identityHash.




How these two desirable properties can be implemented depends on the
actual distribution of the values used to compute the hash.

An object can safely use XOR hashing if its instance variables are all
different objects that already provide a hash method with these two
properties.

@@todo check following sentence because the use of singleton is obscure

For example, an object whose behaviour is defined by several of
singleton delegates of different classes that do not override
Object>>#hash.

But if the instance variables are not guaranteed to have those
properties, it is necessary to more thoroughly "mix the bits". For
example the  method ==hash== of ==SequenceableCollection== illustrates
this point.


[[[
SequenceableCollection >> hash
| hash |
hash := self species hash.
1 to: self size do: [:i | hash := (hash + (self at: i) hash) hashMultiply].
^ hash
]]]


The mixing of the bits is done by the combination of addition and
==hashMultiply==. The value of ==species hash== does not need to be
processed by ==hashMultiply==, because it is probably computed by the
method =identityHash== of ==ProtoObject==, and that already provides
property C.

!!! When we should not use XOR

==LayoutFrame== is a particularly good example of a data structure
that should not use XOR hashing. Its instance variables provide none
of the required properties:

- ==SmallInteger>>hash== is just ==^self==.
- In addition, common ==LayoutFrame== instances tend to use pairs of
identical values in their instance variables. Like ==0@0 corner:
1@1==, or ==Margin fromNumber: 10==.

A good hash function for LayoutFrame needs to:

- Get hashes for each instance variable that provides properties A and B.
- Combine them in a way that is order-sensitive (to maintain property
B) and that does some extra mixing (to provide property C).

Now, we can assume that common values for the instance variables will
be instances of ==SmallInteger==, ==Float==, or ==Fraction==.

You can see in ==Fraction>>hash==, that a comment mentions the
assumption that the fraction is already reduced, that is what makes it
acceptable to use bitXor.

The hash of ==SmallInteger== does provide properties A and B, but not
property C. The hash of ==Float== is harder to understand, but tests
show that it provides distinct values for 0.5, 0.25 and 0.125. So it
hopefully provides B for the range of values of interest to
==LayoutFrame==.

Another class that has similar hashing constraints to ==LayoutFrame==
is ==Point==. Its ==hash== method is:

[[[
Point >> hash
"Hash is reimplemented because = is implemented."
^(x hash hashMultiply + y hash) hashMultiply
]]]

It does not include species in the computation, which is less than
ideal because it favours collisions with objects of different species
that have a similar content and a the same hash algorithm.

Finally, it is probably not necessary or useful to use the accessors
to get to the instance variables.

So a good implementation for LayoutFrame is

[[[
LayoutFrame >> hash
| hash |
hash := self species hash
hash := (hash + leftFraction hash) hashMultiply
hash := (hash + leftOffset hash) hashMultiply
hash := (hash + topFraction hash) hashMultiply
hash := (hash + topOffset hash) hashMultiply
hash := (hash + rightFraction hash) hashMultiply
hash := (hash + rightOffset hash) hashMultiply
hash := (hash + bottomFraction hash) hashMultiply
hash := (hash + bottomOffset hash) hashMultiply
^ hash
]]]

On Fri, Oct 6, 2017 at 9:59 AM, Stephane Ducasse
 wrote:
> Noury also proposed a trait to avoid to systematically have to implement hash.
> Vitor why don't you take it as a small project to propose a solution for 
> Pharo.
>
> On Thu, Oct 5, 2017 at 6:34 PM, Vitor Medina Cruz  
> wrote:
>> Yes, canEqual implementation also make #= be commutative.
>>
>> On Tue, Oct 3, 2017 at 11:11 AM, Denis Kudriashov 
>> wrote:
>>>
>>>
>>> 2017-10-02 17:30 GMT+02:00 Denis Kudriashov :


 2017-10-02 17:13 GMT+02:00 Vitor Medina Cruz :
>
> I am sorry, not species, but #isKindOf istead of #= to compare classes.


 It is bad idea. #= should be transitive.
>>>
>>>
>>> Oh, I 

Re: [Pharo-users] Equals and HashCode Builder

2017-10-06 Thread Stephane Ducasse
Noury also proposed a trait to avoid to systematically have to implement hash.
Vitor why don't you take it as a small project to propose a solution for Pharo.

On Thu, Oct 5, 2017 at 6:34 PM, Vitor Medina Cruz  wrote:
> Yes, canEqual implementation also make #= be commutative.
>
> On Tue, Oct 3, 2017 at 11:11 AM, Denis Kudriashov 
> wrote:
>>
>>
>> 2017-10-02 17:30 GMT+02:00 Denis Kudriashov :
>>>
>>>
>>> 2017-10-02 17:13 GMT+02:00 Vitor Medina Cruz :

 I am sorry, not species, but #isKindOf istead of #= to compare classes.
>>>
>>>
>>> It is bad idea. #= should be transitive.
>>
>>
>> Oh, I used wrong word, shame on me :). I tried to say commutative.
>>
>>>
>>> How you will generate it with isKindOf: logic? You need to know common
>>> parent.
>>>
>>> Also I not remember cases where I was needed two instances of different
>>> classes to be equal.
>>> And I can imaging the problems which it will lead to.
>>>


 On Mon, Oct 2, 2017 at 11:57 AM, Denis Kudriashov 
 wrote:
>
>
> 2017-10-02 16:37 GMT+02:00 Sean P. DeNigris :
>>
>>
>> Two questions/comments about the generated code:
>> 1. #=
>> ...
>> self class = anObject class "should compare #species instead?"
>> ifFalse: [ ^ false ].
>> ...
>> Typically, I've seen #species instead of #class in the guard
>> statement.
>> Should we change it to that?
>
>
> I doubt that it is important for domain classes. Because I never saw
> the user of #species which is not a kind of Collection. And for 
> collections
> this refactoring is not valid anyway.
>
>>
>>
>>
>> 2. #hash
>> ^ var1 hash bitXor: (var2 hash bitXor: var3 hash)
>> Is this implementation always safe? It's what I usually hand roll
>> based on
>> what I've seen, but Andres Valloud wrote a whole (large) book on
>> hashing, so
>> I've always wondered if I was missing something…
>>
>>
>>
>> -
>> Cheers,
>> Sean
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>

>>>
>>
>



Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-10-06 Thread Stephane Ducasse
Thanks I think that this is really nice.
Thanks for your time.

On Fri, Oct 6, 2017 at 2:42 AM, Offray Vladimir Luna Cárdenas
 wrote:
> Cool! Waiting for the updated version with this mailing list feedback on it.
>
> Cheers,
>
> Offray
>
>
> On 05/10/17 19:35, horrido wrote:
>> Yes, the "updated" angle was the crucial tactic. Thanks.
>>
>> I just wanted to inform you that in just 48 hours since publication, this
>> article has gathered over 11,000 views! This is a new record for me. Fastest
>> rising.
>>
>> I am astounded by the number; I really didn't expect it. It's a very, very
>> nice way to end my campaign on a high note. Hopefully, Pharo (and Smalltalk)
>> will become more popular.
>>
>> Cheers.
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>
>