Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread Stephan Eggermont
H. Hirzel  wrote:
> P.S. I see that the Metacello script installs a lot in one go.
> 
> I might be easier to identify the problem if the installation can be
> done in steps, i.e. several load scripts in sequence.

You already have all the information you need. RT classes missing. Is this
supposed to be run in Moose only?

Stephan






Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread H. Hirzel
On 8/15/18, Stephan Eggermont  wrote:
> H. Hirzel  wrote:
>> P.S. I see that the Metacello script installs a lot in one go.
>>
>> I might be easier to identify the problem if the installation can be
>> done in steps, i.e. several load scripts in sequence.
>
> You already have all the information you need. RT classes missing.
Good point. I was assuming the script pulls in Roassal in case it is needed.

HH



Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread H. Hirzel
After loading Roassal2 through the Pharo 6.1 catalog and re-executing
the Metacello load script

  Metacello new
baseline: 'JupyterTalk';
repository: 'github://jmari/JupyterTalk:master/repository';
load:'all'

All loaded fine.

I found 2 tests. (Result attached). One of them fails.


The question is now how to proceed.

On
https://github.com/jmari/JupyterTalk/blob/master/README.md

writing the installation procedure is noted on the 'ToDo' list.

I suggest that we just develop the procedure in this mail thread.

Most important question now is:

How do I start the Pharo Smalltalk Jupyter kernel?

HH.

On 8/15/18, H. Hirzel  wrote:
> On 8/15/18, Stephan Eggermont  wrote:
>> H. Hirzel  wrote:
>>> P.S. I see that the Metacello script installs a lot in one go.
>>>
>>> I might be easier to identify the problem if the installation can be
>>> done in steps, i.e. several load scripts in sequence.
>>
>> You already have all the information you need. RT classes missing.
> Good point. I was assuming the script pulls in Roassal in case it is
> needed.
>
> HH
>



Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread H. Hirzel
Attachement shows the result of a successful installation into Pharo 6.1



On 8/15/18, H. Hirzel  wrote:
> After loading Roassal2 through the Pharo 6.1 catalog and re-executing
> the Metacello load script
>
>   Metacello new
> baseline: 'JupyterTalk';
> repository: 'github://jmari/JupyterTalk:master/repository';
> load:'all'
>
> All loaded fine.
>
> I found 2 tests. (Result attached). One of them fails.
>
>
> The question is now how to proceed.
>
> On
> https://github.com/jmari/JupyterTalk/blob/master/README.md
>
> writing the installation procedure is noted on the 'ToDo' list.
>
> I suggest that we just develop the procedure in this mail thread.
>
> Most important question now is:
>
> How do I start the Pharo Smalltalk Jupyter kernel?
>
> HH.
>
> On 8/15/18, H. Hirzel  wrote:
>> On 8/15/18, Stephan Eggermont  wrote:
>>> H. Hirzel  wrote:
 P.S. I see that the Metacello script installs a lot in one go.

 I might be easier to identify the problem if the installation can be
 done in steps, i.e. several load scripts in sequence.
>>>
>>> You already have all the information you need. RT classes missing.
>> Good point. I was assuming the script pulls in Roassal in case it is
>> needed.
>>
>> HH
>>
>


Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread H. Hirzel
To clarify my question:

I read the tutorial
http://htmlpreview.github.io/?https://github.com/jmari/JupyterTalk/blob/master/Tutorial1_BasicStatistics.html

My question is: How do I start JupyterTalk and how to I connect then
to the Pharo Smalltalk kernelt from an

nteract (https://nteract.io/desktop) client

HH

On 8/15/18, H. Hirzel  wrote:
> Attachement shows the result of a successful installation into Pharo 6.1
>
>
>
> On 8/15/18, H. Hirzel  wrote:
>> After loading Roassal2 through the Pharo 6.1 catalog and re-executing
>> the Metacello load script
>>
>>   Metacello new
>> baseline: 'JupyterTalk';
>> repository: 'github://jmari/JupyterTalk:master/repository';
>> load:'all'
>>
>> All loaded fine.
>>
>> I found 2 tests. (Result attached). One of them fails.
>>
>>
>> The question is now how to proceed.
>>
>> On
>> https://github.com/jmari/JupyterTalk/blob/master/README.md
>>
>> writing the installation procedure is noted on the 'ToDo' list.
>>
>> I suggest that we just develop the procedure in this mail thread.
>>
>> Most important question now is:
>>
>> How do I start the Pharo Smalltalk Jupyter kernel?
>>
>> HH.
>>
>> On 8/15/18, H. Hirzel  wrote:
>>> On 8/15/18, Stephan Eggermont  wrote:
 H. Hirzel  wrote:
> P.S. I see that the Metacello script installs a lot in one go.
>
> I might be easier to identify the problem if the installation can be
> done in steps, i.e. several load scripts in sequence.

 You already have all the information you need. RT classes missing.
>>> Good point. I was assuming the script pulls in Roassal in case it is
>>> needed.
>>>
>>> HH
>>>
>>
>



Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread Jesús Marí
First screenshot shows a warning because JupyterTalk script doesn't care
about if Roassal or Polymath are installed or not, only tries to add some
methods to several of its classes...for sure you will be interested in these
frameworks combined with Jupyter, I suggest you to install them before
JupyterTalk. If you are not planning to work with them, you just have to
press "PROCEED" button.

The error in the second screenshot is because JupyterTalk has to free the
ZeroMQ context before closing the Pharo Image but It can not find the
library...did you install Jupyter and ZeroMQ in your system? I have only
tested on Mac Os X...There is a package called ZeroMQ , find LibZeroMQ class 
and check the unix64ModuleName and unixModuleName, it returns 'libzmq.so'
but sure this is not the correct name!. Look for the correct module name in
your system and test this package (this could hang the image, save it
before)

The last thing is to configure Jupyter for the new kernel.  You need to find
the correct path for the kernel configuration files. In Mac Os  is
"/usr/local/share/jupyter/kernels", you have to create a new folder inside
named "pharo" containing a configuration file named "kernel.json" like this.

'{
  "argv": [
"/Path/to/Paro/executable/Pharo",
"/Path/to/Pharo/Image/File/Pharo6.1-64.image",
"ipharo",
"{connection_file}"
  ],
  "display_name": "Pharo Smalltalk",
  "language": "smalltalk"
}'


Optionally, in the same folder you can place an image named "logo-64x64.png"
with a Pharo logo so you will see the logo left to the logout button.


 



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



Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread Jesús Marí
Tutorial files placed on Github are notebooks written on jupyter using
JupyterTalk Kernel. They are not an installation procedure.

I have just ran it in a new linux machine an now it works also on linux. I
have done using pharo-launcher on a 64 bits image.

- kernel description file must be placed in
"/usr/local/share/jupyter/kernels/Pharo" as you can see in the screenshot.
Take a look to the kernel.json file, you have to create this file and save
it in "/usr/local/share/jupyter/kernels/Pharo".



 

- ZeroMQ module name is libzmq.so.3 almost in my ubuntu linux after jupyter
installation. I have updated github repo, so now it is working also on
linux.

Try again, let me know if it's working for you.




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



Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-15 Thread Stephan Eggermont
Jesús Marí  wrote:
> First screenshot shows a warning because JupyterTalk script doesn't care
> about if Roassal or Polymath are installed or not, only tries to add some
> methods to several of its classes...for sure you will be interested in these
> frameworks combined with Jupyter, I suggest you to install them before
> JupyterTalk. If you are not planning to work with them, you just have to
> press "PROCEED" button.

No. Fix the baseline. Read up on Metacello. You need to add some groups

Stephan







Re: [Pharo-users] XML Writer not pretty printing

2018-08-15 Thread Peter Uhnak
Thanks! #removeAllFormattingNodes did the trick.

Perhaps #prettyPrinted / #enablePrettyPrinting should call it by default?

WIth regards,
Peter

On Tue, Aug 14, 2018 at 10:27 PM Carlo  wrote:

> Hi Peter
>
> It seems that #preservesIgnorableWhitespace: is only adhered to "...When
> validation is enabled and a DTD with element declarations is present..."
> (See comment in SAX2ContentHandler>>ignorableWhitespace:) The actual
> parsing code is in SAXParserDriver>>handleWhitespace:
>
> What you could do is use #removeAllFormattingNodes but
> your-mileage-may-vary...
>
> parser := XMLDOMParser
> on:'
> 
>   
> 
> '.
>
> (parser parseDocument)
> removeAllFormattingNodes;
> prettyPrinted.
>
> Regards
> Carlo
>
> On 14 Aug 2018, at 13:08, Peter Uhnak  wrote:
>
> Hi,
>
> I am trying to output a pretty printed document, but it seems that the
> configuration is being ignored
>
> doc := '
> 
>   
> 
> ' parseXML.
>
> String << [ :stream |
> doc
> printOn: stream
> beforeWritingDo: [ :writer |
> writer
> enablePrettyPrinting;
> enablePlatformSpecificLineBreak.
> writer formatter indentString: '  '. ] ]
>
>
> produces
>
>  "'
> 
>   
> 
> '"
>
> I thought that maybe #preservesIgnorableWhitespace: has something to do
> with it, but whether it is true or false, the output is not pretty printed
> (not to mention, that pretty printing should ignore any preserved
> whitespaces anyway).
>
> Is this a bug? Should I print it in a different way?
>
> Thanks,
> Peter
>
>
>