Pharo By Example problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo By Example problems

Joel Neely
As a Pharo newcomer, I attempted to follow the instructions in section 1.4 of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app on Windows 7 Home Premium (Service Pack 1).

I initially launched Pharo by double-clicking the "pharo" executable in the PBE-OneClick-1.1.app directory, and began working through the test. I encountered the following discrepancies:

1. The files "myPharo.image" and "myPharo.changes" were not stored in the same directory as the Pharo executable, but in the PBE-OneClick-1.1.app/Contents/Resources directory. That was confusing, as the book did not explain where to find those files, and the Pharo4.0 behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in the same directory as "Pharo".

2. After saving and quitting, I attempted to start Pharo from the new "myPharo.image" file (by dragging the file onto the "pharo" executable. Immediately after the Pharo window opened, an error dialog appeared with a title of "Error: Invalid utf8 input detected".

Given the age of the Pharo By Example pdf and application, I'm left wondering whether I have somehow misunderstood the instructions (twice), or whether I simply need to abandon this avenue and look for another introduction to Smalltalk.

Advice will be greatly appreciated.

Joel Neely


--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato

_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Pharo By Example problems

Max Leske
Hi Joel, welcome.



On 06 Jun 2015, at 16:37, Joel Neely <[hidden email]> wrote:

As a Pharo newcomer, I attempted to follow the instructions in section 1.4 of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app on Windows 7 Home Premium (Service Pack 1).

I initially launched Pharo by double-clicking the "pharo" executable in the PBE-OneClick-1.1.app directory, and began working through the test. I encountered the following discrepancies:

1. The files "myPharo.image" and "myPharo.changes" were not stored in the same directory as the Pharo executable, but in the PBE-OneClick-1.1.app/Contents/Resources directory.

True. I think that part was written before the one-click image was built, so the idea was to download the individual parts. Then they would have been in the same directory.

That was confusing, as the book did not explain where to find those files, and the Pharo4.0 behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in the same directory as "Pharo”.

Which Pharo4 download are you referring to exactly?


2. After saving and quitting, I attempted to start Pharo from the new "myPharo.image" file (by dragging the file onto the "pharo" executable. Immediately after the Pharo window opened, an error dialog appeared with a title of "Error: Invalid utf8 input detected”.

That’s a funny error. It has to do with the way the VM accepts parameters. In your case, the VM thinks that the image it just opened is also a script that should be evaluated after startup. You can simply dismiss the error. 
The intention is of course for the user to double click the .exe directly.


Given the age of the Pharo By Example pdf and application, I'm left wondering whether I have somehow misunderstood the instructions (twice), or whether I simply need to abandon this avenue and look for another introduction to Smalltalk.

No, you should be good to go. Just keep in mind that a lot has changed between Pharo 1.1.1 and Pharo 4. The concepts are the same of course but expect to find some big differences too. We need to update Pharo By Example obviously, but there’s always so much going on, and it takes time to write a book :)

If you have more questions, the pharo users list is probably the better place to ask (or join the IRC) (for both look here: http://pharo.org/community). This list is strictly for discussions concering the *writing* of PBE.

HTH,
Max



Advice will be greatly appreciated.

Joel Neely


--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato
_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion


_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Pharo By Example problems

Dmitri Zagidulin-2
In reply to this post by Joel Neely
Hi Joel,

Thanks for the feedback about Pharo by Example.

Since Pharo 4 just came out, and the book you're talking about was written for Pharo 1 (the PBE OneClick image is for Pharo 1.1, specifically), the book (and the image) is very much out of date. I don't think it is currently being supported (in terms of bug fixes or additions).

The good news, however, is that we're actively working on an Updated Pharo by Example book, for Pharo 4. You can get the PDF for the new book off of our CI servers, at: https://ci.inria.fr/pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/UpdatedPharoByExample.pdf

If you find errors, feel free to create issues on the book's github page, at https://github.com/SquareBracketAssociates/UpdatedPharoByExample (or better yet, correct them and make a pull request! :) ).

As far as launching Pharo, and the locations of image files etc, I believe we've fixed those in the Updated book (though let us know if it's still unclear).



On Sat, Jun 6, 2015 at 10:37 AM, Joel Neely <[hidden email]> wrote:
As a Pharo newcomer, I attempted to follow the instructions in section 1.4 of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app on Windows 7 Home Premium (Service Pack 1).

I initially launched Pharo by double-clicking the "pharo" executable in the PBE-OneClick-1.1.app directory, and began working through the test. I encountered the following discrepancies:

1. The files "myPharo.image" and "myPharo.changes" were not stored in the same directory as the Pharo executable, but in the PBE-OneClick-1.1.app/Contents/Resources directory. That was confusing, as the book did not explain where to find those files, and the Pharo4.0 behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in the same directory as "Pharo".

2. After saving and quitting, I attempted to start Pharo from the new "myPharo.image" file (by dragging the file onto the "pharo" executable. Immediately after the Pharo window opened, an error dialog appeared with a title of "Error: Invalid utf8 input detected".

Given the age of the Pharo By Example pdf and application, I'm left wondering whether I have somehow misunderstood the instructions (twice), or whether I simply need to abandon this avenue and look for another introduction to Smalltalk.

Advice will be greatly appreciated.

Joel Neely


--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato

_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion



_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Pharo By Example problems

Dmitri Zagidulin
In reply to this post by Joel Neely
Hi Joel,

Thanks for the feedback about Pharo by Example.

Since Pharo 4 just came out, and the book you're talking about was written for Pharo 1 (the PBE OneClick image is for Pharo 1.1, specifically), the book (and the image) is very much out of date. I don't think it is currently being supported (in terms of bug fixes or additions).

The good news, however, is that we're actively working on an Updated Pharo by Example book, for Pharo 4. You can get the PDF for the new book off of our CI servers, at: https://ci.inria.fr/pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/UpdatedPharoByExample.pdf

If you find errors, feel free to create issues on the book's github page, at https://github.com/SquareBracketAssociates/UpdatedPharoByExample (or better yet, correct them and make a pull request! :) ).

As far as launching Pharo, and the locations of image files etc, I believe we've fixed those in the Updated book (though let us know if it's still unclear).

On Sat, Jun 6, 2015 at 10:37 AM, Joel Neely <[hidden email]> wrote:
As a Pharo newcomer, I attempted to follow the instructions in section 1.4 of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app on Windows 7 Home Premium (Service Pack 1).

I initially launched Pharo by double-clicking the "pharo" executable in the PBE-OneClick-1.1.app directory, and began working through the test. I encountered the following discrepancies:

1. The files "myPharo.image" and "myPharo.changes" were not stored in the same directory as the Pharo executable, but in the PBE-OneClick-1.1.app/Contents/Resources directory. That was confusing, as the book did not explain where to find those files, and the Pharo4.0 behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in the same directory as "Pharo".

2. After saving and quitting, I attempted to start Pharo from the new "myPharo.image" file (by dragging the file onto the "pharo" executable. Immediately after the Pharo window opened, an error dialog appeared with a title of "Error: Invalid utf8 input detected".

Given the age of the Pharo By Example pdf and application, I'm left wondering whether I have somehow misunderstood the instructions (twice), or whether I simply need to abandon this avenue and look for another introduction to Smalltalk.

Advice will be greatly appreciated.

Joel Neely


--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato

_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion



_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Pharo By Example problems

SergeStinckwich
In reply to this post by Joel Neely
Hi Joel,

thank you for your interest in Pharo. Dimitri already told you that
there is an updated version of Pharo by Example for Pharo 4.

You should join also the pharo-users mailing-list if you have any
question about Pharo, because this mailing-list is more for the people
working on the book:
http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org

Regards,

On Sat, Jun 6, 2015 at 4:37 PM, Joel Neely <[hidden email]> wrote:

> As a Pharo newcomer, I attempted to follow the instructions in section 1.4
> of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app
> on Windows 7 Home Premium (Service Pack 1).
>
> I initially launched Pharo by double-clicking the "pharo" executable in the
> PBE-OneClick-1.1.app directory, and began working through the test. I
> encountered the following discrepancies:
>
> 1. The files "myPharo.image" and "myPharo.changes" were not stored in the
> same directory as the Pharo executable, but in the
> PBE-OneClick-1.1.app/Contents/Resources directory. That was confusing, as
> the book did not explain where to find those files, and the Pharo4.0
> behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in
> the same directory as "Pharo".
>
> 2. After saving and quitting, I attempted to start Pharo from the new
> "myPharo.image" file (by dragging the file onto the "pharo" executable.
> Immediately after the Pharo window opened, an error dialog appeared with a
> title of "Error: Invalid utf8 input detected".
>
> Given the age of the Pharo By Example pdf and application, I'm left
> wondering whether I have somehow misunderstood the instructions (twice), or
> whether I simply need to abandon this avenue and look for another
> introduction to Smalltalk.
>
> Advice will be greatly appreciated.
>
> Joel Neely
>
>
> --
> Beauty of style and harmony and grace and good rhythm depend on simplicity.
> - Plato
>
> _______________________________________________
> Sbe-discussion mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
>



--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/
_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Pharo By Example problems

Ben Coman
In reply to this post by Joel Neely
On Sat, Jun 6, 2015 at 10:37 PM, Joel Neely <[hidden email]> wrote:

> As a Pharo newcomer, I attempted to follow the instructions in section 1.4
> of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app
> on Windows 7 Home Premium (Service Pack 1).
>
> I initially launched Pharo by double-clicking the "pharo" executable in the
> PBE-OneClick-1.1.app directory, and began working through the test. I
> encountered the following discrepancies:
>
> 1. The files "myPharo.image" and "myPharo.changes" were not stored in the
> same directory as the Pharo executable, but in the
> PBE-OneClick-1.1.app/Contents/Resources directory. That was confusing, as
> the book did not explain where to find those files, and the Pharo4.0
> behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in
> the same directory as "Pharo".
>
> 2. After saving and quitting, I attempted to start Pharo from the new
> "myPharo.image" file (by dragging the file onto the "pharo" executable.
> Immediately after the Pharo window opened, an error dialog appeared with a
> title of "Error: Invalid utf8 input detected".

I never use Save As and I think many people are the same.  I think its
just there in the doc for completeness and lead into explaining how
things work in  the background with .image and .changes files.
However I've just...
1. Downloaded and unzipped PBE-OneClick-1.1.zip
2. Run PBE-OneClick-1.1.app
3. Immediately done Save As "myPharo"
4. quit
5. Dragged myPharo from resources onto PBE-OneClick-1.1.app

and it worked without problem. This is on Mavericks.  Maybe I heard
someone else had a problem with Yosemite.  If thats what you've got,
it might be worth asking on pharo-users.

Mostly if I want to back up an image I saveQuit the image and copy the
image and changes file.  PharoLauncher [1] is a good way to manage
these.

[1] http://www.smalltalkhub.com/#!/~Pharo/PharoLauncher

> Given the age of the Pharo By Example pdf and application, I'm left
> wondering whether I have somehow misunderstood the instructions (twice), or
> whether I simply need to abandon this avenue and look for another
> introduction to Smalltalk.

You've done right thing matching the the PBE book with
PBE-OneClick-1.1.app version it was written for.  This works better
learning the concepts and then transferring to the latest Pharo.
However if you are adventurous, you might give the Updated Pharo by
Example a go as Dmitri advised.  It might prove more efficient in the
end.  For the chapters that have not been update you might switch back
1.1, or even ask questions to clarify.

So given things are moving forward with UPBE for Pharo 4, I would not
worry about that specific error and just move on. It probably wont
impact your workflow.  Thanks for the feedback anyhow.



On Sun, Jun 7, 2015 at 2:52 AM, Max Leske <[hidden email]> wrote:
>
> If you have more questions, the pharo users list is probably the better
> place to ask (or join the IRC) (for both look here:
> http://pharo.org/community). This list is strictly for discussions concerning
> the *writing* of PBE.

I thought Joel did a good job finding the list and thought it a
reasonable place for such feedback, though pharo-users also works.

cheers -ben
_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Pharo By Example problems

Joel Neely
In reply to this post by Max Leske
Thank you, Max.
Will take any further questions there.
-jn-

On Sat, Jun 6, 2015 at 1:52 PM, Max Leske <[hidden email]> wrote:
Hi Joel, welcome.



On 06 Jun 2015, at 16:37, Joel Neely <[hidden email]> wrote:

As a Pharo newcomer, I attempted to follow the instructions in section 1.4 of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app on Windows 7 Home Premium (Service Pack 1).

I initially launched Pharo by double-clicking the "pharo" executable in the PBE-OneClick-1.1.app directory, and began working through the test. I encountered the following discrepancies:

1. The files "myPharo.image" and "myPharo.changes" were not stored in the same directory as the Pharo executable, but in the PBE-OneClick-1.1.app/Contents/Resources directory.

True. I think that part was written before the one-click image was built, so the idea was to download the individual parts. Then they would have been in the same directory.

That was confusing, as the book did not explain where to find those files, and the Pharo4.0 behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in the same directory as "Pharo”.

Which Pharo4 download are you referring to exactly?


2. After saving and quitting, I attempted to start Pharo from the new "myPharo.image" file (by dragging the file onto the "pharo" executable. Immediately after the Pharo window opened, an error dialog appeared with a title of "Error: Invalid utf8 input detected”.

That’s a funny error. It has to do with the way the VM accepts parameters. In your case, the VM thinks that the image it just opened is also a script that should be evaluated after startup. You can simply dismiss the error. 
The intention is of course for the user to double click the .exe directly.


Given the age of the Pharo By Example pdf and application, I'm left wondering whether I have somehow misunderstood the instructions (twice), or whether I simply need to abandon this avenue and look for another introduction to Smalltalk.

No, you should be good to go. Just keep in mind that a lot has changed between Pharo 1.1.1 and Pharo 4. The concepts are the same of course but expect to find some big differences too. We need to update Pharo By Example obviously, but there’s always so much going on, and it takes time to write a book :)

If you have more questions, the pharo users list is probably the better place to ask (or join the IRC) (for both look here: http://pharo.org/community). This list is strictly for discussions concering the *writing* of PBE.

HTH,
Max



Advice will be greatly appreciated.

Joel Neely


--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato
_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion


_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion




--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato

_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Pharo By Example problems

Joel Neely
In reply to this post by Dmitri Zagidulin-2
​Thank you, Dmitri,
I've downloaded the updated version of the book, and will follow up there with any feedback.
-jn-​

On Sat, Jun 6, 2015 at 3:36 PM, Dmitri Zagidulin <[hidden email]> wrote:
Hi Joel,

Thanks for the feedback about Pharo by Example.

Since Pharo 4 just came out, and the book you're talking about was written for Pharo 1 (the PBE OneClick image is for Pharo 1.1, specifically), the book (and the image) is very much out of date. I don't think it is currently being supported (in terms of bug fixes or additions).

The good news, however, is that we're actively working on an Updated Pharo by Example book, for Pharo 4. You can get the PDF for the new book off of our CI servers, at: https://ci.inria.fr/pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/UpdatedPharoByExample.pdf

If you find errors, feel free to create issues on the book's github page, at https://github.com/SquareBracketAssociates/UpdatedPharoByExample (or better yet, correct them and make a pull request! :) ).

As far as launching Pharo, and the locations of image files etc, I believe we've fixed those in the Updated book (though let us know if it's still unclear).



On Sat, Jun 6, 2015 at 10:37 AM, Joel Neely <[hidden email]> wrote:
As a Pharo newcomer, I attempted to follow the instructions in section 1.4 of Pharo By Example, using a freshly downloaded copy of PBE-OneClick-1.1.app on Windows 7 Home Premium (Service Pack 1).

I initially launched Pharo by double-clicking the "pharo" executable in the PBE-OneClick-1.1.app directory, and began working through the test. I encountered the following discrepancies:

1. The files "myPharo.image" and "myPharo.changes" were not stored in the same directory as the Pharo executable, but in the PBE-OneClick-1.1.app/Contents/Resources directory. That was confusing, as the book did not explain where to find those files, and the Pharo4.0 behavior appears to be to place "Pharo4.0.changes" and "Pharo4.0.image" in the same directory as "Pharo".

2. After saving and quitting, I attempted to start Pharo from the new "myPharo.image" file (by dragging the file onto the "pharo" executable. Immediately after the Pharo window opened, an error dialog appeared with a title of "Error: Invalid utf8 input detected".

Given the age of the Pharo By Example pdf and application, I'm left wondering whether I have somehow misunderstood the instructions (twice), or whether I simply need to abandon this avenue and look for another introduction to Smalltalk.

Advice will be greatly appreciated.

Joel Neely


--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato

_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion



_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion




--
Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato

_______________________________________________
Sbe-discussion mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion