New to Pharo. "Could not coerce arguments" (Problem with character encoding?) + Learning resources?

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

New to Pharo. "Could not coerce arguments" (Problem with character encoding?) + Learning resources?

M O

Hi,

 

I’m new to Pharo, and generally, in programming. I decided that my first programming language is going to be Pharo. However I have encountered some issues when I was exploring some examples. I don’t want them to bother me later, so I’d like them to be resolved as soon as possible.

Some info:

OS: Windows 8.1, language Polish, Pharo version: 7 stable 64, Pharo Launcher installed in C:\PharoLauncher, images and VMs located in C:\users\<user>\Documents\...

My Windows account (admin user) username contains non-ASCII character (“Ł”). I tested all cases below on account with only ASCII characters (“Administrator”) and they all work just fine. Therefore I strongly suspect the main source of issues is character encoding but I have no idea how to solve it or if it’s actual problem.

Noticed that #1 and #2 fails when attempting to perfom FFI call

 

Here’s the list of things with issues I encountered:

  1. AthensDemoMorph example (Args-1 and Args-2)
  2. Downloading packages from git repository (Git-1 and Git-2)

In second example it goes straight to downloading from git repo, while first throws error

  1. Pharo Mooc (Mooc)

Instead of “Ł” there are displayed some “rubbish” characters

 

I opened debugger in case #1 and #2 (On personal account) and noticed that variable “ec” (error code I guess) has value 29 (See “invokeWithArgs”) in method “invokeWithArguments”, and  variable “errCode” has value 6 (See “externalCallFailed”) in method “externalCallFailed”. I guess those values are related to Windows error codes so I looked them up on Microsoft site. For 6 I found it’s error “ERROR_INVALID_HANDLE”, while for 29 it’s “ERROR_WRITE_FAULT”. As I mentioned above, this might be character encoding problem, but this is just my guessing. Hope you can help me resolve it.

 

Second thing I’d like to ask is, what are best up to date learning resources for Pharo? I’m mainly concerned about tools. I know a bit about idea of  “real” OOP (from Alan Kay’s talks). Is Mooc (http://mooc.pharo.org/) and Pharo by Example 5 enough for start? For Mooc, do I need to use Mooc image (It uses a bit outdated Pharo version) or can I use simply Pharo 7?


invokeWithArgs.jpeg (55K) Download Attachment
externalCallFailed.jpeg (49K) Download Attachment
Error.jpeg (62K) Download Attachment
Git-1.PNG (115K) Download Attachment
Git-2.PNG (63K) Download Attachment
Args-1.jpg (133K) Download Attachment
Args-2.jpg (104K) Download Attachment
Mooc.jpg (81K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Christopher Fuhrman-4
Hello,

On Sat, 19 Oct 2019 at 09:45, M O <[hidden email]> wrote:

I’m new to Pharo, and generally, in programming. I decided that my first programming language is going to be Pharo. However I have encountered some issues when I was exploring some examples. I don’t want them to bother me later, so I’d like them to be resolved as soon as possible.

Some info:

OS: Windows 8.1, language Polish, Pharo version: 7 stable 64, Pharo Launcher installed in C:\PharoLauncher, images and VMs located in C:\users\<user>\Documents\...

My Windows account (admin user) username contains non-ASCII character (“Ł”). I tested all cases below on account with only ASCII characters (“Administrator”) and they all work just fine. Therefore I strongly suspect the main source of issues is character encoding but I have no idea how to solve it or if it’s actual problem.


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

Second thing I’d like to ask is, what are best up to date learning resources for Pharo? I’m mainly concerned about tools. I know a bit about idea of  “real” OOP (from Alan Kay’s talks). Is Mooc (http://mooc.pharo.org/) and Pharo by Example 5 enough for start? For Mooc, do I need to use Mooc image (It uses a bit outdated Pharo version) or can I use simply Pharo 7?


The MOOC is a great place to start for the content (the videos and the PDFs are helpful). Pharo By Example 5 is also good. There are small differences in the GUI that sometimes trip up new students.

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