[Pharo-users] Transcript: printString or asString

2019-10-13 Thread Samuel Teixeira Santos
Hi folks.
I'm starting in Pharo studies by FUN Mooc.
In Week 03, on An Overview of Essential Collections there is the example
below:

| days |
days := Dictionary new.

days
at: #January put: 31;
at: #February put: 28;
at: #March put: 31.

days keysAndValuesDo:
[ :k :v | Transcript show: k asString, ' has ', v printString, ' days'
; cr ]

The code in blue I change for

days keysAndValuesDo:
[ :k :v | Transcript show: k asString, ' has ', v asString, ' days'
; cr ]

And works too on Playground.

There is something different about both? There is someone better than other?

Thanks in advance,


Samuel T. Santos


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

2019-10-13 Thread Tim Mackinnon

Hi - While I’m sure everyone can give you an answer - it’s more useful to teach 
you how to answer these questions for your self.  

Try right clicking with your cursor on asString and choose “implementors of” 
(it may have a slightly different name friending on Pharo version - or press 
“meta”-m. Do the same for printString and compare the results. Also, do the 
same using  “senders of” (meta-n).

Most code in Pharo is explorable like this, and you can generally answer most 
questions by seeing his other code in the system interacts or uses what you are 
exploring.

Tim


Sent from my iPhone

> On 13 Oct 2019, at 11:50, Samuel Teixeira Santos  wrote:
> 
> Hi folks.
> I'm starting in Pharo studies by FUN Mooc.
> In Week 03, on An Overview of Essential Collections there is the example 
> below:
> 
> | days |
> days := Dictionary new.
> 
> days
> at: #January put: 31;
> at: #February put: 28;
> at: #March put: 31.
> 
> days keysAndValuesDo:
> [ :k :v | Transcript show: k asString, ' has ', v printString, ' days'
> ; cr ]
> 
> The code in blue I change for 
> 
> days keysAndValuesDo:
> [ :k :v | Transcript show: k asString, ' has ', v asString, ' days'
> ; cr ]
> 
> And works too on Playground.
> 
> There is something different about both? There is someone better than other?
> 
> Thanks in advance,
> 
> 
> Samuel T. Santos


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

2019-10-13 Thread Samuel Teixeira Santos
Hi Tim.

I just learned in previous videos of the mooc about using nautilus to
explore using "Implementers of..." or "Senders of..."

I will do that for sure now.

Thanks for your tip.


Regards

>


Re: [Pharo-users] Pharo launcher

2019-10-13 Thread ilker özcan
I format my pc and reinstall windows..now it works..thank you.

On Tue, Oct 8, 2019, 18:10 Christophe Demarey 
wrote:

> Hi Ilker,
>
> It looks like you got the same issue as
> https://github.com/pharo-project/pharo-launcher/issues/349
> If you do not run Pharo Launcher from cmd line or unzip is not in the
> path, it should works fine (waiting for a proper fix).
> Please try to delete corrupted VMs (you can use Pharo Launcher VM Manager)
> and try again.
>
> Thanks for the report,
> Christophe
>
> > Le 8 oct. 2019 à 15:35, ilker özcan  a écrit :
> >
> > When i tried to install pharo 7 and 8 with the launcher on windows 10
> there happened a message which says windows can not run 16 bit program..
> >
> > It seems pharo.exe seems to be 16 bit ( i installed 64bit)..anyone with
> such a problem and any idea how i can solve this? Thanks all..
>
>
>


Re: [Pharo-users] Running a teapot instance remotely

2019-10-13 Thread Vince Refiti
Hi Joachim

I see. I have submitted a pull request to change the wording to reflect the 
real situation.

By the way I work professionally on a 20 year old VA Smalltalk app that we just 
upgraded from 6 to 9. That thing is solid as a rock and only walksback with bad 
code. Nothing ever else goes wrong.

Vince

-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
jtuc...@objektfabrik.de
Sent: Friday, 11 October 2019 4:09 PM
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] Running a teapot instance remotely

EXTERNAL: Do not click links or open attachments if you do not recognize the 
sender.

Vince,

I guess this has its roots in long-ongoing discussions about the anticipated 
disadvantages of image-based development in general. It tries to explain that 
Smalltalk has mechanisms for recovering code after an image crashes. It is not 
indicating that images do actually crash more often than other development 
environments. It is more a remark about the fact that of course even Smalltalk 
can crash and that there is a mechanism (namely the changes file and changes 
browsers) for restoring your code after a crash, even if you didn't file-out 
your code or didn't push it to an external repository. Nothing more, nothing 
less.

So please don't read this as: "Since Pharo/Smalltalk isn't stable, we had to 
xyz" - this is not the case. I've been using Smalltalk (mostly not Pharo) for 
more than 25 years and I can only remember having a need to recover source code 
maybe a hand full of times. In my favorite Smalltalk (VA Smalltalk), I am 
almost 100% sure I never had this issue because Envy is exactly the measure 
that is mentioned in the sentence you cited.

Joachim

Am 11.10.19 um 07:39 schrieb Vince Refiti:
> Hi
>
> This brings up some questions I have been meaning to ask for some time. The 
> sentence "When the Pharo image crashes (which will happen), there must be a 
> way to automatically recover from this crash." appears in the Enterprise 
> Pharo Book.
>
> Does this claim still apply? Is Pharo that unstable still?
>
> If it is, what are the major causes in your own applications that crash it? I 
> have run a few small, local, experimental Teapot, Seaside and other Pharo 
> server apps and nothing crashed, but reading something like that makes me 
> nervous about public-facing server apps in Pharo.
>
> Vince
>
> -Original Message-
> From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On 
> Behalf Of Pierce Ng
> Sent: Friday, 11 October 2019 12:39 PM
> To: Any question about pharo is welcome 
> Subject: Re: [Pharo-users] Running a teapot instance remotely
>
> EXTERNAL: Do not click links or open attachments if you do not recognize the 
> sender.
>
> On Thu, Oct 10, 2019 at 04:18:14PM -0400, sergio ruiz wrote:
>> How are people keeping it running these days?
> I used to use daemontools. These days I use Docker.
>
> Pierce
>

--
---
Objektfabrik Joachim Tuchel  mailto:jtuc...@objektfabrik.de
Fliederweg 1 
https://urldefense.com/v3/__http://www.objektfabrik.de__;!09EJrJkydGw!T9iwyNs37EekSPqfOmRtg4DpnjEcw9FV-Jzjbc59Tl-koQTH29rq-sj7txDgv-AzwGmoSvo25w$
 
D-71640 Ludwigsburg  
https://urldefense.com/v3/__http://joachimtuchel.wordpress.com__;!09EJrJkydGw!T9iwyNs37EekSPqfOmRtg4DpnjEcw9FV-Jzjbc59Tl-koQTH29rq-sj7txDgv-AzwGkxDIrO4Q$
 
Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1