Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
August 2018
- 58 participants
- 283 messages
Re: [Pharo-users] About describing the JupzterTalk installation process: Which Linux distribution are you using?
by Jesus Mari Aguirre
Hi Mr.Hirzel
about opening SVG, files, in fact you can open SVG as a morph using (
ASVGMorph fromFile: 'file.svg') but first you need to install XML parser
from the catalog. I think there is a missing dependency. so you can do self
display openInJupyter:(ASVGMorph fromFile: 'file.svg'). About nteract and
jupytertalk, I mean you need to install jupyter if you want to use other
kernels but node kernel so your plan about installing only
nteract+jupyterTalk wonn't be factible. I already have JupyterTalk working
on Pharo 32 bits(windows) but it is harder to install than Linux or Mac
because you need to install zeromq 32 bits...it is not so complicated but
you need to install an additional dependency. In a few days it will be
available in JupyterTalk repository.
El mié., 29 ago. 2018 a las 19:38, H. Hirzel (<hannes.hirzel(a)gmail.com>)
escribió:
> About Windows ... do not worry, time will tell...
>
> At the moment I have it on Linux and that is fine.
>
> I am now more interested in actually USING it.
>
> See my question about giving back SVG graphics results
>
>
> On 8/29/18, Jesus Mari Aguirre <jmariaguirre(a)gmail.com> wrote:
> > I think Windows will not be possible by now, there's not Pharo 64 bits on
> > windows...I don't know what version of zeroMQ uses nteract, I think there
> > is a 32 bits version...
> > I'll do my best but I can not guarantee to have JupyterTalk on Windows.
> >
> >
> > El mié., 29 ago. 2018 a las 6:30, H. Hirzel (<hannes.hirzel(a)gmail.com>)
> > escribió:
> >
> >> Thank you for keeping me informed.
> >>
> >> I now manage to get Linux installations working, but the process is
> >> still not consistent, see the installation log for Ubuntu 18.04 below.
> >>
> >> It could be that it is much easier for Windows, at the moment I only
> >> have a 32bit Windows installation, so I cannot check.
> >>
> >> I'd like to focus now on _using_ the Pharo Smalltalk kernel, see
> >> upcoming mail on the list.
> >>
> >> --Hannes
> >>
> >> ========================================
> >>
> >>
> >> New Ubuntu 18.04 installation
> >>
> >> sudo apt-get update
> >>
> >> sudo apt install python3-pip
> >>
> >>
> >> pip3 install jupyter
> >>
> >> did not work the first time (network issues?)
> >>
> >> pip3 install jupyter
> >>
> >> sudo apt install jupyter-core
> >>
> >> sudo apt install jupyter-notebook
> >>
> >>
> >>
> >>
> >>
> >>
> ================================================================================
> >> Installation log
> >>
> >>
> ================================================================================
> >>
> >> user9@Latitude2:~$
> >>
> >> python3 --version
> >> Python 3.6.5
> >>
> >>
> >> sudo apt-get update
> >>
> >> sudo apt install python3-pip
> >>
> >> user9@Latitude2:~$ sudo apt install python3-pip
> >> [sudo] password for user9:
> >> Reading package lists... Done
> >> Building dependency tree
> >> Reading state information... Done
> >> The following additional packages will be installed:
> >> build-essential dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7
> >> libalgorithm-diff-perl libalgorithm-diff-xs-perl
> >> libalgorithm-merge-perl
> >> libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libexpat1-dev
> >> libfakeroot libgcc-7-dev libitm1 liblsan0 libmpx2 libpython3-dev
> >> libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0 libubsan0
> >> linux-libc-dev make manpages-dev python-pip-whl python3-dev
> >> python3-distutils python3-lib2to3 python3-setuptools python3-wheel
> >> python3.6-dev
> >> Suggested packages:
> >> debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg
> >> gcc-multilib autoconf automake libtool flex bison gcc-doc
> >> gcc-7-multilib
> >> gcc-7-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg
> >> libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg
> >> libmpx2-dbg libquadmath0-dbg glibc-doc libstdc++-7-doc make-doc
> >> python-setuptools-doc
> >> The following NEW packages will be installed:
> >> build-essential dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7
> >> libalgorithm-diff-perl libalgorithm-diff-xs-perl
> >> libalgorithm-merge-perl
> >> libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libexpat1-dev
> >> libfakeroot libgcc-7-dev libitm1 liblsan0 libmpx2 libpython3-dev
> >> libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0 libubsan0
> >> linux-libc-dev make manpages-dev python-pip-whl python3-dev
> >> python3-distutils python3-lib2to3 python3-pip python3-setuptools
> >> python3-wheel python3.6-dev
> >> 0 upgraded, 39 newly installed, 0 to remove and 60 not upgraded.
> >> Need to get 32.3 MB of archives.
> >> After this operation, 141 MB of additional disk space will be used.
> >> Do you want to continue? [Y/n] y
> >>
> >>
> >> pip3 install jupyter
> >>
> >>
> >>
> >> Error
> >>
> >>
> >> Downloading
> >>
> https://files.pythonhosted.org/packages/94/dd/fe6c4d683b09eb05342bd2816b777…
> >> (89kB
> >> <
> https://files.pythonhosted.org/packages/94/dd/fe6c4d683b09eb05342bd2816b777…
> >
> >> )
> >> 22% |ââââââââ | 20kB 24kB/s eta
> >> 0:00:03Exception:
> >> Traceback (most recent call last):
> >> File
> >>
> "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py",
> >> line 302, in _error_catcher
> >> yield
> >> File
> >>
> "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py",
> >> line 384, in read
> >>
> >>
> >> REDO
> >>
> >>
> >> pip3 install jupyter
> >>
> >>
> >> But then
> >>
> >> jupyter
> >>
> >> Command 'jupyter' not found, but can be installed with:
> >>
> >> sudo apt install jupyter-core
> >>
> >> user9@Latitude2:~$ sudo apt install jupyter-core
> >> [sudo] password for user9:
> >> Reading package lists... Done
> >> Building dependency tree
> >> Reading state information... Done
> >> The following additional packages will be installed:
> >> python3-decorator python3-ipython-genutils python3-jupyter-core
> >> python3-traitlets
> >> The following NEW packages will be installed:
> >> jupyter-core python3-decorator python3-ipython-genutils
> >> python3-jupyter-core
> >> python3-traitlets
> >> 0 upgraded, 5 newly installed, 0 to remove and 60 not upgraded.
> >> Need to get 132 kB of archives.
> >>
> >>
> >>
> >>
> >>
> >> jupyter --version
> >> 4.4.0
> >>
> >>
> >> jupyter notebook
> >> Error executing Jupyter command 'notebook': [Errno 2] No such file or
> >> directory
> >> user9@Latitude2:~$ Error executing Jupyter command 'notebook': [Errno
> >> 2] No such file or directory
> >> Error: command not found
> >> user9@Latitude2:~$
> >>
> >>
> >>
> >>
> >> sudo apt install jupyter-notebook
> >> Reading package lists... Done
> >> Building dependency tree
> >> Reading state information... Done
> >> The following additional packages will be installed:
> >> fonts-font-awesome fonts-mathjax javascript-common
> >> jupyter-nbextension-jupyter-js-widgets libjs-backbone libjs-bootstrap
> >> libjs-bootstrap-tour libjs-codemirror libjs-es6-promise libjs-jed
> >> libjs-jquery
> >> libjs-jquery-typeahead libjs-jquery-ui libjs-marked libjs-mathjax
> >> libjs-moment
> >> libjs-requirejs libjs-requirejs-text libjs-text-encoding
> >> libjs-underscore libjs-xterm
> >> liblua5.1-0 libluajit-5.1-2 libluajit-5.1-common pandoc pandoc-data
> >> python3-bleach
> >> python3-dateutil python3-entrypoints python3-html5lib
> python3-ipykernel
> >> python3-ipython python3-ipywidgets python3-jinja2 python3-jsonschema
> >> python3-jupyter-client python3-mistune python3-nbconvert
> >> python3-nbformat
> >> python3-notebook python3-pandocfilters python3-pickleshare
> >> python3-prompt-toolkit
> >> python3-pygments python3-simplegeneric python3-terminado
> >> python3-testpath
> >> python3-tornado python3-wcwidth python3-webencodings python3-zmq
> >> Suggested packages:
> >> apache2 | lighttpd | httpd python-ipywidgets libjs-jquery-lazyload
> >> libjs-json
> >> libjs-jquery-ui-docs fonts-mathjax-extras fonts-stix libjs-mathjax-doc
> >> texlive-latex-recommended texlive-xetex texlive-luatex pandoc-citeproc
> >> texlive-latex-extra context wkhtmltopdf python-bleach-doc
> >> python3-genshi python3-lxml
> >> python-ipywidgets-doc python-jinja2-doc python-notebook-doc
> >> ttf-bitstream-vera
> >> python3-pycurl python-tornado-doc python3-twisted
> >> The following NEW packages will be installed:
> >> fonts-font-awesome fonts-mathjax javascript-common
> >> jupyter-nbextension-jupyter-js-widgets jupyter-notebook libjs-backbone
> >> libjs-bootstrap libjs-bootstrap-tour libjs-codemirror
> >> libjs-es6-promise libjs-jed
> >> libjs-jquery libjs-jquery-typeahead libjs-jquery-ui libjs-marked
> >> libjs-mathjax
> >> libjs-moment libjs-requirejs libjs-requirejs-text libjs-text-encoding
> >> libjs-underscore libjs-xterm liblua5.1-0 libluajit-5.1-2
> >> libluajit-5.1-common pandoc
> >> pandoc-data python3-bleach python3-dateutil python3-entrypoints
> >> python3-html5lib
> >> python3-ipykernel python3-ipython python3-ipywidgets python3-jinja2
> >> python3-jsonschema python3-jupyter-client python3-mistune
> >> python3-nbconvert
> >> python3-nbformat python3-notebook python3-pandocfilters
> >> python3-pickleshare
> >> python3-prompt-toolkit python3-pygments python3-simplegeneric
> >> python3-terminado
> >> python3-testpath python3-tornado python3-wcwidth
> >> python3-webencodings python3-zmq
> >> 0 upgraded, 52 newly installed, 0 to remove and 60 not upgraded.
> >> Need to get 20.7 MB of archives.
> >> After this operation, 142 MB of additional disk space will be used.
> >> Do you want to continue? [Y/n]
> >>
> >>
> >>
> >>
> >> Setting up libjs-bootstrap-tour (0.12.0+dfsg-1) ...
> >> Setting up python3-notebook (5.2.2-1) ...
> >> Setting up jupyter-nbextension-jupyter-js-widgets (6.0.0-2) ...
> >> /usr/lib/python3.6/runpy.py:125: RuntimeWarning:
> >> 'notebook.nbextensions' found in sys.modules after import of package
> >> 'notebook', but prior to execution of 'notebook.nbextensions'; this
> >> may result in unpredictable behaviour
> >> warn(RuntimeWarning(msg))
> >> Enabling notebook extension jupyter-js-widgets/extension...
> >> - Validating: OK
> >> Setting up jupyter-notebook (5.2.2-1) ...
> >> Setting up python3-ipywidgets (6.0.0-2) ...
> >> Processing triggers for libc-bin (2.27-3ubuntu1) ...
> >>
> >> user9@Latitude2:~$
> >>
> >>
> >>
> >> jupyter notebook
> >> [I 05:23:54.607 NotebookApp] Writing notebook server cookie secret to
> >> /run/user/1000/jupyter/notebook_cookie_secret
> >> [I 05:23:55.398 NotebookApp] Serving notebooks from local directory:
> >> /home/user9
> >> [I 05:23:55.398 NotebookApp] 0 active kernels
> >> [I 05:23:55.398 NotebookApp] The Jupyter Notebook is running at:
> >> [I 05:23:55.399 NotebookApp]
> >>
> >>
> http://localhost:8888/?token=f3e847ae72b205b350efa0739bfc0c575a44a52c4e02aa…
> >> [I 05:23:55.399 NotebookApp] Use Control-C to stop this server and
> >> shut down all kernels (twice to skip confirmation).
> >> [C 05:23:55.406 NotebookApp]
> >>
> >> Copy/paste this URL into your browser when you connect for the first
> >> time,
> >> to login with a token:
> >>
> >>
> http://localhost:8888/?token=f3e847ae72b205b350efa0739bfc0c575a44a52c4e02aa…
> >> [I 05:23:58.884 NotebookApp] Accepting one-time-token-authenticated
> >> connection from 127.0.0.1
> >> [Parent 5668, Gecko_IOThread] WARNING: pipe error (59): Connection
> >> reset by peer: file
> >>
> >>
> /build/firefox-oscv9o/firefox-61.0.1+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc,
> >> line 353
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 8/27/18, Jesus Mari Aguirre <jmariaguirre(a)gmail.com> wrote:
> >> > *a) https://www.nteract.io/ <https://www.nteract.io/>b) Pharo 6.1c)
> >> > JuypterTalkd) kernel.json in /usr/local/share/jupyter/kernels/pharo *
> >> >
> >> > OK, I'll keep in mind in my instalation script. I'll keep you
> informed.
> >> >
> >> > Regarding on Windows instalation, probably it won't be so hard, It was
> >> very
> >> > easy from Mac os X to Linux, I'm sure Windows will not be different.
> >> >
> >> >
> >> >
> >> > El lun., 27 ago. 2018 a las 13:46, H. Hirzel
> >> > (<hannes.hirzel(a)gmail.com>)
> >> > escribió:
> >> >
> >> >> Thank you for the installation sequence. Good that you will add an
> >> >> installation script to your repository. If you label it as 'example
> >> >> installation script it gives people a clue what is involved and saves
> >> >> time. And they will know that it might not work in all cases or
> >> >> different solutions are possible.
> >> >>
> >> >> Good to know how to get a python3.6 environment in Ubuntu 16.04.
> >> >>
> >> >> My current Ubuntu 16.04 based distribution has
> >> >>
> >> >> python3 --version
> >> >> Python 3.5.2
> >> >>
> >> >>
> >> >> Just for trying I only did
> >> >>
> >> >> sudo add-apt-repository ppa:deadsnakes/ppa
> >> >> pip3 install jupyter
> >> >>
> >> >> and then
> >> >>
> >> >> jupyter notebook
> >> >>
> >> >> works.
> >> >>
> >> >> But as you see from the mail to the list I am primarily interested in
> >> >> getting an easy to use installation sequence and it seems that the
> >> >> following
> >> >>
> >> >> a) https://www.nteract.io/
> >> >> b) Pharo 6.1
> >> >> c) JuypterTalk
> >> >> d) kernel.json in /usr/local/share/jupyter/kernels/pharo
> >> >>
> >> >> should be sufficient.
> >> >>
> >> >> However at the moment I now have some working jupyter notebook
> >> >> installations and I will start to work with them. In particular I am
> >> >> interested in how to output html and svg contents from the Pharo
> >> >> kernel.
> >> >>
> >> >> --Hannes
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On 8/25/18, Jesus Mari Aguirre <jmariaguirre(a)gmail.com> wrote:
> >> >> > sorry... I press ctrl+tab in google mail... as I was saying
> >> >> > I did:
> >> >> >
> >> >> > sudo add-apt-repository ppa:deadsnakes/ppa
> >> >> > sudo apt-get update
> >> >> > sudo apt-get install python3.6
> >> >> > pip3 install jupyter
> >> >> >
> >> >> > I think this was the sequence of commands
> >> >> >
> >> >> > If you are going to use ipywidgets (still not supported by
> >> JupyterTalk)
> >> >> > pip3 install ipywidgets
> >> >> > jupyter nbextension enable --py widgetsnbextension
> >> >> >
> >> >> > I'm preparing a bash script to make it easy, but jupyter is
> >> >> > sometimes
> >> a
> >> >> > pain in the neck.
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > El sáb., 25 ago. 2018 a las 21:07, Jesus Mari Aguirre (<
> >> >> > jmariaguirre(a)gmail.com>) escribió:
> >> >> >
> >> >> >> I did:
> >> >> >> sudo add-apt-repository ppa:deadsnakes/ppa
> >> >> >> sudo apt-get update
> >> >> >> sudo apt-get install python3.6
> >> >> >> pip3 install jupyter
> >> >> >>
> >> >> >> El sáb., 25 ago. 2018 a las 16:39, H. Hirzel (<
> >> hannes.hirzel(a)gmail.com
> >> >> >)
> >> >> >> escribió:
> >> >> >>
> >> >> >>> Hello Jesus Mari
> >> >> >>>
> >> >> >>> On 8/25/18, Jesus Mari Aguirre <jmariaguirre(a)gmail.com> wrote:
> >> >> >>> > I don't care about python version but Jupyter does. I think
> last
> >> >> >>> version of
> >> >> >>> > Jupyter needs Python 3 and Pip3.
> >> >> >>>
> >> >> >>> Going for Python 3 is what I do in Ubuntu 16.04 and Ubuntu 18.04
> >> >> >>>
> >> >> >>> The second approach on
> >> >> >>> http://jupyter.org/install
> >> >> >>> for "experienced" python users (I am not is)
> >> >> >>>
> >> >> >>> python3 -m pip install --upgrade pip
> >> >> >>>
> >> >> >>> This leaves me with an unusable pip3
> >> >> >>>
> >> >> >>> pip3 --version
> >> >> >>> Traceback (most recent call last):
> >> >> >>> File "/usr/bin/pip3", line 9, in <module>
> >> >> >>> from pip import main
> >> >> >>> ImportError: cannot import name 'main'
> >> >> >>>
> >> >> >>> So I did not upgrade pip and directly did
> >> >> >>>
> >> >> >>> python3 -m pip install jupyter
> >> >> >>>
> >> >> >>> In one installation this morning this worked, in another one in
> >> >> >>> the
> >> >> >>> evening (network quality was not so good) it did not work even
> >> >> >>> after
> >> >> >>> several tries. (details below)
> >> >> >>>
> >> >> >>> > I installed everything on Ubuntu 14.
> >> >> >>> Good to know that you can even have it in Ubuntu 14.
> >> >> >>> I use Ubuntu 16.04
> >> >> >>>
> >> >> >>> How did you install Juypter in Ubuntu 14.04?
> >> >> >>>
> >> >> >>> Could you please send me the result of
> >> >> >>>
> >> >> >>> history | grep 'install jupyter'
> >> >> >>>
> >> >> >>>
> >> >> >>> - one installation was fine
> >> >> >>>
> >> >> >>> - the other gave an error message.[1] Jupyter did not install.
> >> >> >>> It bothers me that I cannot repeat the process easily. In the
> end
> >> >> >>> something like a snap package which contains everything the
> >> necessary
> >> >> >>> jupyter files and Pharo6.1 with JupyterTalk installed might be
> the
> >> >> >>> way
> >> >> >>> to go for installing it on different systems.
> >> >> >>>
> >> >> >>>
> >> >> >>> > I'm very surprised you don't need to create the kernel.json
> >> >> >>> > file,
> >> I
> >> >> >>> > can
> >> >> >>> not
> >> >> >>> > explain how does Jupyter starts Pharo without the path and arts
> >> >> >>> > to
> >> >> the
> >> >> >>> > Pharo VM...
> >> >> >>>
> >> >> >>> That was in a third Ubuntu setup. It is probably caused by the
> >> >> >>> installation sequence. I'll have to check again.
> >> >> >>>
> >> >> >>> That is in Ubuntu 18.04 and I used
> >> >> >>>
> >> >> >>> sudo apt-get install jupyter-core
> >> >> >>> sudo apt-get install jupyter-notebook
> >> >> >>>
> >> >> >>> Seems to be in the repository, but it was not sufficient.
> >> >> >>>
> >> >> >>> This is why I like the *nteract* approach. One download which
> >> >> >>> includes
> >> >> >>> everything.
> >> >> >>>
> >> >> >>> Webbrowser with notebook, node kernel.
> >> >> >>>
> >> >> >>> --Hannes
> >> >> >>>
> >> >> >>> > El sáb., 25 ago. 2018 6:53, H. Hirzel <hannes.hirzel(a)gmail.com
> >
> >> >> >>> escribió:
> >> >> >>> >
> >> >> >>> >> Hello Jesus Mari
> >> >> >>> >>
> >> >> >>> >> For my JupyterTalk installation tests I have been using Ubuntu
> >> >> >>> >> 18.04.1
> >> >> >>> so
> >> >> >>> >> far.
> >> >> >>> >> Python 3.
> >> >> >>> >>
> >> >> >>> >> My production environment is 16.04. So I still need to do the
> >> >> >>> >> installation there.
> >> >> >>> >>
> >> >> >>> >> Is your python environment version 2 or 3?
> >> >> >>> >>
> >> >> >>> >> Regards
> >> >> >>> >> Hannes
> >> >> >>> >>
> >> >> >>> >
> >> >> >>> ---------------------------
> >> >> >>>
> >> >> >>> [1]
> >> >> >>> user26@Latitude-E64102:~$ pip3 install jupyter
> >> >> >>> Collecting jupyter
> >> >> >>> Using cached
> >> >> >>>
> >> >>
> >>
> https://files.pythonhosted.org/packages/83/df/0f5dd132200728a86190397e1ea87…
> >> >> >>> Collecting nbconvert (from jupyter)
> >> >> >>> Using cached
> >> >> >>>
> >> >>
> >>
> https://files.pythonhosted.org/packages/39/ea/280d6c0d92f8e3ca15fd798bbcc2e…
> >> >> >>> Collecting ipykernel (from jupyter)
> >> >> >>> Using cached
> >> >> >>>
> >> >>
> >>
> https://files.pythonhosted.org/packages/ab/3f/cd624c835aa3336a9110d0a99e150…
> >> >> >>> Collecting ipywidgets (from jupyter)
> >> >> >>> Using cached
> >> >> >>>
> >> >>
> >>
> https://files.pythonhosted.org/packages/34/3a/5b258ea6d584f5a8527c2295d0ebf…
> >> >> >>> Collecting notebook (from jupyter)
> >> >> >>> Downloading
> >> >> >>>
> >> >>
> >>
> https://files.pythonhosted.org/packages/5e/7c/7fd8e9584779d65dfcad9fa2e09c7…
> >> >> >>> (8.9MB)
> >> >> >>> 52% |âââââââââââââââââ | 4.7MB 50kB/s eta
> >> >> >>> 0:01:22Exception:
> >> >> >>> Traceback (most recent call last):
> >> >> >>> File
> >> >> >>>
> >> >>
> >>
> "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py",
> >> >> >>> line 226, in _error_catcher
> >> >> >>> yield
> >> >> >>> File
> >> >> >>>
> >> >>
> >>
> "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py",
> >> >> >>> line 301, in read
> >> >> >>> data = self._fp.read(amt)
> >> >> >>> File
> >> >> >>>
> >> >>
> >>
> "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/filewrapper.py",
> >> >> >>> line 49, in read
> >> >> >>> data = self.__fp.read(amt)
> >> >> >>> File "/usr/lib/python3.5/http/client.py", line 448, in read
> >> >> >>> n = self.readinto(b)
> >> >> >>> File "/usr/lib/python3.5/http/client.py", line 488, in readinto
> >> >> >>> n = self.fp.readinto(b)
> >> >> >>> File "/usr/lib/python3.5/socket.py", line 575, in readinto
> >> >> >>> return self._sock.recv_into(b)
> >> >> >>> File "/usr/lib/python3.5/ssl.py", line 929, in recv_into
> >> >> >>> return self.read(nbytes, buffer)
> >> >> >>> File "/usr/lib/python3.5/ssl.py", line 791, in read
> >> >> >>> return self._sslobj.read(len, buffer)
> >> >> >>> File "/usr/lib/python3.5/ssl.py", line 575, in read
> >> >> >>> v = self._sslobj.read(len, buffer)
> >> >> >>> socket.timeout: The read operation timed out
> >> >> >>>
> >> >> >>> During handling of the above exception, another exception
> >> >> >>> occurred:
> >> >> >>>
> >> >> >>> Traceback (most recent call last):
> >> >> >>> File "/usr/lib/python3/dist-packages/pip/basecommand.py", line
> >> 209,
> >> >> in
> >> >> >>> main
> >> >> >>> status = self.run(options, args)
> >> >> >>> File "/usr/lib/python3/dist-packages/pip/commands/install.py",
> >> line
> >> >> >>> 328, in run
> >> >> >>> wb.build(autobuilding=True)
> >> >> >>> File "/usr/lib/python3/dist-packages/pip/wheel.py", line 748,
> in
> >> >> build
> >> >> >>> ....
> >> >> >>> 231, in _error_catcher
> >> >> >>> raise ReadTimeoutError(self._pool, None, 'Read timed out.')
> >> >> >>> requests.packages.urllib3.exceptions.ReadTimeoutError:
> >> >> >>> HTTPSConnectionPool(host='files.pythonhosted.org', port=443):
> Read
> >> >> >>> timed out.
> >> >> >>> You are using pip version 8.1.1, however version 18.0 is
> >> >> >>> available.
> >> >> >>> You should consider upgrading via the 'pip install --upgrade pip'
> >> >> >>> command.
> >> >> >>>
> >> >> >>
> >> >> >
> >> >>
> >> >
> >>
> >
>
Aug. 31, 2018
Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)
by Marcus Denker
Here is the new PR:
https://github.com/pharo-project/pharo/pull/1731
> On 31 Aug 2018, at 11:17, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>
> Hi,
>
> I had a look: this works nicely!
>
> I even found a way to automatically fall back to the method creation, so
>
> nil doSomething
>
> on create will create a method.
>
> I have merged your code and will do a PR with the improvement later.
>
> Marcus
>
>> On 30 Aug 2018, at 09:57, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>
>> Thanks! I will have a look at the sprint tomorrow.
>>
>>
>>> On 30 Aug 2018, at 07:11, Tim Mackinnon <tim(a)testit.works> wrote:
>>>
>>> Iâve submitted a PR for what I did, so at least it improves the situation (but potentially could get even more refined as you suggest)
>>>
>>> Tim
>>>
>>>> On 23 Aug 2018, at 11:26, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>
>>>>
>>>>
>>>>> On 23 Aug 2018, at 15:56, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>
>>>>> Hi Marcus - thatâs actually what I do - and âcreateâ in this case, creates a class and then restarts like the method case does.
>>>>>
>>>>
>>>> Yes, that I saw.
>>>>
>>>> But I mean a different case: Imagine you do have code like
>>>>
>>>> nil doSomething
>>>>
>>>> or an expression that evaluates to nil, press âdefineâ and get a method definition dialog, not the error message?
>>>> (it is, as I mentioned, not that important as nobody ever wants to define a method in UndefinedObject, but for consistency it would be nice)
>>>>
>>>>
>>>>> I guess I was wondering if we can do it more cleanly and also improve the debugger message.
>>>>>
>>>>> If Iâve understood you guys correctly- you try to remove the ambiguity around operations. Looking up a class and getting nil - seems like one of these holes you keep sorting out.
>>>>>
>>>>> I think the flaw in my solution is understanding if that message was being sent to a class, or some other global? I dont think I got that bit right (but itâs certainly better than nothing).
>>>>>
>>>>> e.g. in the debugger I am doing (in DoesNotUnderstandDebugAction)
>>>>>
>>>>> msg := self interruptedContext tempAt: 1.
>>>>> (msg lookupClass == UndefinedObject ) ifTrue: [
>>>>> ^self createMissingClassIn: self interruptedContext ].
>>>>>
>>>>>
>>>>> Iâm not totally convinced that lookupClass has to be a class - although maybe its good enough. But really, at the time this happened - we probably knew better than to get a DNU debug action in the the first place - and equally the title in the debugger could be something more akin to the kind of action its supposed to be.
>>>>>
>>>>> Anyway - this is all musing on my part - and I will assemble a proper PR for review by you guys (and at least it advances us forward - and maybe opens the door to better changes further on).
>>>>>
>>>>> Iâm just juggling another change at the moment - so it will be a few days.
>>>>>
>>>>> Tim
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>>> On 23 Aug 2018, at 05:33, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> On 22 Aug 2018, at 16:24, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>
>>>>>>> Hi - but I guess my question is (and excuse my basic knowledge in this area) - when a class isnât found - can we do better than return nil so that the debugger can give a better msg and presumably the code Iâve written could live on that undefined object? Or am thinking about this wrong?
>>>>>>
>>>>>> In pharo7 we could easily do that (due to the âbindingâ, the meta class of the variable) being different. We could return a nil subclass or add code into the method directly. But the problem with that is that nil checks
>>>>>> are always identity checksâ¦
>>>>>>
>>>>>> Could you not in the case you now raise the error just fall back to the âdefine methodâ, the behaviour we have now?
>>>>>>
>>>>>> Marcus
>>>>>>
>>>>>>>
>>>>>>> I will also put together a pr for this in Pharo 7 if you think itâs a decent fix.
>>>>>>>
>>>>>>> Tim
>>>>>>>
>>>>>>> Sent from my iPhone
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Sent from my iPhone
>>>>>>>> On 22 Aug 2018, at 09:51, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I played with it, nice!
>>>>>>>>
>>>>>>>> I guess the case when you really get a DNU on nil (and want to create method there) does not really happen⦠extending nil is for special cases.
>>>>>>>>
>>>>>>>> Marcus
>>>>>>>>
>>>>>>>>
>>>>>>>>> On 22 Aug 2018, at 13:39, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>
>>>>>>>>> Sorry Marcus - you needed to follow the exercism instructions and right click on the exercism package to get an exercism menu to fetch a new exercise (e.g. hello-world). The is then using the TonalReader to pull in code - and then you get a test class that can reference a class that isnât there yet. (But you need to have the exercism cli installed as per the instructions etc).
>>>>>>>>>
>>>>>>>>> In retrospect I think it might be simpler to download this 6.1 image that already has done that - https://www.dropbox.com/s/x2ot9f8arbbvlyb/PharoExercism.zip?dl=0
>>>>>>>>> It has TwoFerTest that is in that state. If you click on the TestWithName orb, you will see "#new was sent to nilâ - can you can see how my Create button has been fixed per you suggestions to create a class. (The code I wrote is in ExercismTools:DoesNotUnderstandDebugAction>>createMissingClassIn:)
>>>>>>>>>
>>>>>>>>> Tim
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> On 22 Aug 2018, at 04:44, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> On 17 Aug 2018, at 14:20, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>
>>>>>>>>>>> The direct link to instructions is here: https://exercism.io/tracks/pharo/installation (not sure if you have to be signed up to see it otherwise its in the repo here: https://github.com/exercism/pharo/blob/master/docs/INSTALLATION.md)
>>>>>>>>>>
>>>>>>>>>> Hm⦠AllExercismTests seems to not be there (just a green test in Welcome)
>>>>>>>>>>
>>>>>>>>>> Is this supposed to contain the code below (the createMissingClassActionFor:in:) ?
>>>>>>>>>>
>>>>>>>>>> It would be nice to have an image that shows exactly the problem (I do not have that much time sadly to work on it,but I do have some time to check if I have an image that is set up to the point where i can easily recreate the problem)
>>>>>>>>>>
>>>>>>>>>> Marcus
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Tim
>>>>>>>>>>>
>>>>>>>>>>>> On 17 Aug 2018, at 07:17, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> On 17 Aug 2018, at 13:00, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Marcus - I can put an image somewhere if that helps (do you just need the .image and .changes)?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Or you can repro from a fresh 6.1 if you follow the exercism Pharo instructions (https://exercism.io/tracks/pharo) to load the first hello world-world example and run the tests. This has my code changes to make create work with a nil class - but maybe we can do better?
>>>>>>>>>>>> I will do that and have a look!
>>>>>>>>>>>>
>>>>>>>>>>>>> Tim
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Sent from my iPhone
>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 17 Aug 2018, at 06:21, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 10 Aug 2018, at 23:16, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Actually I think I figured that bit out - a bit clumsily - (pointers appreciated)
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> createMissingClassActionFor: aMessage in: aContext
>>>>>>>>>>>>>>> |errorNode senderContext newClass variableNode |
>>>>>>>>>>>>>>> senderContext := aContext sender.
>>>>>>>>>>>>>>> errorNode := senderContext method sourceNodeExecutedForPC: senderContext pc.
>>>>>>>>>>>>>>> variableNode := errorNode receiver receiver.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> newClass := OCUndeclaredVariableWarning new node: variableNode; defineClass: variableNode name.
>>>>>>>>>>>>>>> aContext restart.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> However that last line is wrong, as it doesnât restart with my newly defined class - I also tried
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> aContext restartWithNewReceiver: newClass
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> But again, I get a debugger where my class is still bound to nil. So whatâs the trick to re-evaluate with the new class Iâve created? Or maybe Iâm totally on the wrong track (still its very interestingâ¦)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> what is a bit bad is that you catch the problem âtoo lateâ (that is, the DNU to nil, not the read of nil), so nil is already pushed on the stack at this point.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I tried it in the inspector and at least the class binding was correct after defining the class⦠do you have an image with the whole code to try?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Marcus
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
Aug. 31, 2018
Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)
by Marcus Denker
Hi,
I had a look: this works nicely!
I even found a way to automatically fall back to the method creation, so
nil doSomething
on create will create a method.
I have merged your code and will do a PR with the improvement later.
Marcus
> On 30 Aug 2018, at 09:57, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>
> Thanks! I will have a look at the sprint tomorrow.
>
>
>> On 30 Aug 2018, at 07:11, Tim Mackinnon <tim(a)testit.works> wrote:
>>
>> Iâve submitted a PR for what I did, so at least it improves the situation (but potentially could get even more refined as you suggest)
>>
>> Tim
>>
>>> On 23 Aug 2018, at 11:26, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>
>>>
>>>
>>>> On 23 Aug 2018, at 15:56, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>
>>>> Hi Marcus - thatâs actually what I do - and âcreateâ in this case, creates a class and then restarts like the method case does.
>>>>
>>>
>>> Yes, that I saw.
>>>
>>> But I mean a different case: Imagine you do have code like
>>>
>>> nil doSomething
>>>
>>> or an expression that evaluates to nil, press âdefineâ and get a method definition dialog, not the error message?
>>> (it is, as I mentioned, not that important as nobody ever wants to define a method in UndefinedObject, but for consistency it would be nice)
>>>
>>>
>>>> I guess I was wondering if we can do it more cleanly and also improve the debugger message.
>>>>
>>>> If Iâve understood you guys correctly- you try to remove the ambiguity around operations. Looking up a class and getting nil - seems like one of these holes you keep sorting out.
>>>>
>>>> I think the flaw in my solution is understanding if that message was being sent to a class, or some other global? I dont think I got that bit right (but itâs certainly better than nothing).
>>>>
>>>> e.g. in the debugger I am doing (in DoesNotUnderstandDebugAction)
>>>>
>>>> msg := self interruptedContext tempAt: 1.
>>>> (msg lookupClass == UndefinedObject ) ifTrue: [
>>>> ^self createMissingClassIn: self interruptedContext ].
>>>>
>>>>
>>>> Iâm not totally convinced that lookupClass has to be a class - although maybe its good enough. But really, at the time this happened - we probably knew better than to get a DNU debug action in the the first place - and equally the title in the debugger could be something more akin to the kind of action its supposed to be.
>>>>
>>>> Anyway - this is all musing on my part - and I will assemble a proper PR for review by you guys (and at least it advances us forward - and maybe opens the door to better changes further on).
>>>>
>>>> Iâm just juggling another change at the moment - so it will be a few days.
>>>>
>>>> Tim
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On 23 Aug 2018, at 05:33, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> On 22 Aug 2018, at 16:24, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>
>>>>>> Hi - but I guess my question is (and excuse my basic knowledge in this area) - when a class isnât found - can we do better than return nil so that the debugger can give a better msg and presumably the code Iâve written could live on that undefined object? Or am thinking about this wrong?
>>>>>
>>>>> In pharo7 we could easily do that (due to the âbindingâ, the meta class of the variable) being different. We could return a nil subclass or add code into the method directly. But the problem with that is that nil checks
>>>>> are always identity checksâ¦
>>>>>
>>>>> Could you not in the case you now raise the error just fall back to the âdefine methodâ, the behaviour we have now?
>>>>>
>>>>> Marcus
>>>>>
>>>>>>
>>>>>> I will also put together a pr for this in Pharo 7 if you think itâs a decent fix.
>>>>>>
>>>>>> Tim
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>> On 22 Aug 2018, at 09:51, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I played with it, nice!
>>>>>>>
>>>>>>> I guess the case when you really get a DNU on nil (and want to create method there) does not really happen⦠extending nil is for special cases.
>>>>>>>
>>>>>>> Marcus
>>>>>>>
>>>>>>>
>>>>>>>> On 22 Aug 2018, at 13:39, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>
>>>>>>>> Sorry Marcus - you needed to follow the exercism instructions and right click on the exercism package to get an exercism menu to fetch a new exercise (e.g. hello-world). The is then using the TonalReader to pull in code - and then you get a test class that can reference a class that isnât there yet. (But you need to have the exercism cli installed as per the instructions etc).
>>>>>>>>
>>>>>>>> In retrospect I think it might be simpler to download this 6.1 image that already has done that - https://www.dropbox.com/s/x2ot9f8arbbvlyb/PharoExercism.zip?dl=0
>>>>>>>> It has TwoFerTest that is in that state. If you click on the TestWithName orb, you will see "#new was sent to nilâ - can you can see how my Create button has been fixed per you suggestions to create a class. (The code I wrote is in ExercismTools:DoesNotUnderstandDebugAction>>createMissingClassIn:)
>>>>>>>>
>>>>>>>> Tim
>>>>>>>>
>>>>>>>>
>>>>>>>>> On 22 Aug 2018, at 04:44, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> On 17 Aug 2018, at 14:20, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>
>>>>>>>>>> The direct link to instructions is here: https://exercism.io/tracks/pharo/installation (not sure if you have to be signed up to see it otherwise its in the repo here: https://github.com/exercism/pharo/blob/master/docs/INSTALLATION.md)
>>>>>>>>>
>>>>>>>>> Hm⦠AllExercismTests seems to not be there (just a green test in Welcome)
>>>>>>>>>
>>>>>>>>> Is this supposed to contain the code below (the createMissingClassActionFor:in:) ?
>>>>>>>>>
>>>>>>>>> It would be nice to have an image that shows exactly the problem (I do not have that much time sadly to work on it,but I do have some time to check if I have an image that is set up to the point where i can easily recreate the problem)
>>>>>>>>>
>>>>>>>>> Marcus
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Tim
>>>>>>>>>>
>>>>>>>>>>> On 17 Aug 2018, at 07:17, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> On 17 Aug 2018, at 13:00, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Marcus - I can put an image somewhere if that helps (do you just need the .image and .changes)?
>>>>>>>>>>>>
>>>>>>>>>>>> Or you can repro from a fresh 6.1 if you follow the exercism Pharo instructions (https://exercism.io/tracks/pharo) to load the first hello world-world example and run the tests. This has my code changes to make create work with a nil class - but maybe we can do better?
>>>>>>>>>>> I will do that and have a look!
>>>>>>>>>>>
>>>>>>>>>>>> Tim
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Sent from my iPhone
>>>>>>>>>>>>
>>>>>>>>>>>>> On 17 Aug 2018, at 06:21, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 10 Aug 2018, at 23:16, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Actually I think I figured that bit out - a bit clumsily - (pointers appreciated)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> createMissingClassActionFor: aMessage in: aContext
>>>>>>>>>>>>>> |errorNode senderContext newClass variableNode |
>>>>>>>>>>>>>> senderContext := aContext sender.
>>>>>>>>>>>>>> errorNode := senderContext method sourceNodeExecutedForPC: senderContext pc.
>>>>>>>>>>>>>> variableNode := errorNode receiver receiver.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> newClass := OCUndeclaredVariableWarning new node: variableNode; defineClass: variableNode name.
>>>>>>>>>>>>>> aContext restart.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> However that last line is wrong, as it doesnât restart with my newly defined class - I also tried
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> aContext restartWithNewReceiver: newClass
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> But again, I get a debugger where my class is still bound to nil. So whatâs the trick to re-evaluate with the new class Iâve created? Or maybe Iâm totally on the wrong track (still its very interestingâ¦)
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> what is a bit bad is that you catch the problem âtoo lateâ (that is, the DNU to nil, not the read of nil), so nil is already pushed on the stack at this point.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I tried it in the inspector and at least the class binding was correct after defining the class⦠do you have an image with the whole code to try?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Marcus
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>
Aug. 31, 2018
Re: [Pharo-users] Loading a dll usinf UFFI on Win32
by Jesús MarÃ
So nice! i have installed c++redistributable 2010 and everything works fine!
Many thanks Marten!
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Aug. 30, 2018
Re: [Pharo-users] When we create a missing method in debugger - why does it end with a dot?
by Joachim Tuchel
Agreed, Marcus.
In case of the trailing dot it is not only about beauty, however. Most people who favor the dot think about the poor developer who comes after them and needs to append new statements to existing methods.
Some people would say: whatâs the deal here?
The deal is that syntax highlighters and autoconpleters tend to fail for the new statements, and most certainly your method change will not compile just because of that missing dot. Again: oust a few seconds to understand whatâs wrong, easy to fix and no big deal. But it costs brain capacity that could be spent better.
Not sure a âvirtual dotâ visually added by a pretty printer would help here. Iâm afraid it would make things worse, unless it is intelligent enough to know when to âmaterializeâ that virtual dot (I.e. add it to the method whenever somebody writes code after the last statement.
Joachim
...ainât it funny this little dot is back in discussions decades after it was fought over and cost lives back in the 90ies? Seems weâre not over it yet
> Am 30.08.2018 um 09:59 schrieb Marcus Denker <marcus.denker(a)inria.fr>:
>
>
>
>> On 30 Aug 2018, at 06:36, Tim Mackinnon <tim(a)testit.works> wrote:
>>
>> I am looking at porting my missing class creation code into Pharo 7, and I notice there is a DynamicMessageImplementor that does this for methods - but Iâm wondering why when we create a missing method with âself souldBeImplemented.â with a trailing â.â?
>>
>> The Smalltalk style guide normally says the last statement shouldnât have a dot - and I notice some recent cleanups removed some dots on methods (presumably the formatter).
>>
>> This is a bit of a special case as the intent is to replace that method - but shouldnât we create without the dot to set a good example anyway?
>>
>> If so, I can include that change in my pr.
>>
>
> I think there are both schools around⦠with some preference of no . at the end.
>
> Sometimes I think that a system that would have a good pretty printer and *always* pretty print would be nice: you would configure this once, and all code
> would be shown in your âbest readableâ styleâ¦
>
> Marcus
>
>
>
Aug. 30, 2018
Re: [Pharo-users] When we create a missing method in debugger - why does it end with a dot?
by Marcus Denker
> On 30 Aug 2018, at 06:36, Tim Mackinnon <tim(a)testit.works> wrote:
>
> I am looking at porting my missing class creation code into Pharo 7, and I notice there is a DynamicMessageImplementor that does this for methods - but Iâm wondering why when we create a missing method with âself souldBeImplemented.â with a trailing â.â?
>
> The Smalltalk style guide normally says the last statement shouldnât have a dot - and I notice some recent cleanups removed some dots on methods (presumably the formatter).
>
> This is a bit of a special case as the intent is to replace that method - but shouldnât we create without the dot to set a good example anyway?
>
> If so, I can include that change in my pr.
>
I think there are both schools around⦠with some preference of no . at the end.
Sometimes I think that a system that would have a good pretty printer and *always* pretty print would be nice: you would configure this once, and all code
would be shown in your âbest readableâ styleâ¦
Marcus
Aug. 30, 2018
Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)
by Marcus Denker
Thanks! I will have a look at the sprint tomorrow.
> On 30 Aug 2018, at 07:11, Tim Mackinnon <tim(a)testit.works> wrote:
>
> Iâve submitted a PR for what I did, so at least it improves the situation (but potentially could get even more refined as you suggest)
>
> Tim
>
>> On 23 Aug 2018, at 11:26, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>
>>
>>
>>> On 23 Aug 2018, at 15:56, Tim Mackinnon <tim(a)testit.works> wrote:
>>>
>>> Hi Marcus - thatâs actually what I do - and âcreateâ in this case, creates a class and then restarts like the method case does.
>>>
>>
>> Yes, that I saw.
>>
>> But I mean a different case: Imagine you do have code like
>>
>> nil doSomething
>>
>> or an expression that evaluates to nil, press âdefineâ and get a method definition dialog, not the error message?
>> (it is, as I mentioned, not that important as nobody ever wants to define a method in UndefinedObject, but for consistency it would be nice)
>>
>>
>>> I guess I was wondering if we can do it more cleanly and also improve the debugger message.
>>>
>>> If Iâve understood you guys correctly- you try to remove the ambiguity around operations. Looking up a class and getting nil - seems like one of these holes you keep sorting out.
>>>
>>> I think the flaw in my solution is understanding if that message was being sent to a class, or some other global? I dont think I got that bit right (but itâs certainly better than nothing).
>>>
>>> e.g. in the debugger I am doing (in DoesNotUnderstandDebugAction)
>>>
>>> msg := self interruptedContext tempAt: 1.
>>> (msg lookupClass == UndefinedObject ) ifTrue: [
>>> ^self createMissingClassIn: self interruptedContext ].
>>>
>>>
>>> Iâm not totally convinced that lookupClass has to be a class - although maybe its good enough. But really, at the time this happened - we probably knew better than to get a DNU debug action in the the first place - and equally the title in the debugger could be something more akin to the kind of action its supposed to be.
>>>
>>> Anyway - this is all musing on my part - and I will assemble a proper PR for review by you guys (and at least it advances us forward - and maybe opens the door to better changes further on).
>>>
>>> Iâm just juggling another change at the moment - so it will be a few days.
>>>
>>> Tim
>>>
>>> Sent from my iPhone
>>>
>>>> On 23 Aug 2018, at 05:33, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>
>>>>
>>>>
>>>>> On 22 Aug 2018, at 16:24, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>
>>>>> Hi - but I guess my question is (and excuse my basic knowledge in this area) - when a class isnât found - can we do better than return nil so that the debugger can give a better msg and presumably the code Iâve written could live on that undefined object? Or am thinking about this wrong?
>>>>
>>>> In pharo7 we could easily do that (due to the âbindingâ, the meta class of the variable) being different. We could return a nil subclass or add code into the method directly. But the problem with that is that nil checks
>>>> are always identity checksâ¦
>>>>
>>>> Could you not in the case you now raise the error just fall back to the âdefine methodâ, the behaviour we have now?
>>>>
>>>> Marcus
>>>>
>>>>>
>>>>> I will also put together a pr for this in Pharo 7 if you think itâs a decent fix.
>>>>>
>>>>> Tim
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>>
>>>>>
>>>>> Sent from my iPhone
>>>>>> On 22 Aug 2018, at 09:51, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I played with it, nice!
>>>>>>
>>>>>> I guess the case when you really get a DNU on nil (and want to create method there) does not really happen⦠extending nil is for special cases.
>>>>>>
>>>>>> Marcus
>>>>>>
>>>>>>
>>>>>>> On 22 Aug 2018, at 13:39, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>
>>>>>>> Sorry Marcus - you needed to follow the exercism instructions and right click on the exercism package to get an exercism menu to fetch a new exercise (e.g. hello-world). The is then using the TonalReader to pull in code - and then you get a test class that can reference a class that isnât there yet. (But you need to have the exercism cli installed as per the instructions etc).
>>>>>>>
>>>>>>> In retrospect I think it might be simpler to download this 6.1 image that already has done that - https://www.dropbox.com/s/x2ot9f8arbbvlyb/PharoExercism.zip?dl=0
>>>>>>> It has TwoFerTest that is in that state. If you click on the TestWithName orb, you will see "#new was sent to nilâ - can you can see how my Create button has been fixed per you suggestions to create a class. (The code I wrote is in ExercismTools:DoesNotUnderstandDebugAction>>createMissingClassIn:)
>>>>>>>
>>>>>>> Tim
>>>>>>>
>>>>>>>
>>>>>>>> On 22 Aug 2018, at 04:44, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> On 17 Aug 2018, at 14:20, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>
>>>>>>>>> The direct link to instructions is here: https://exercism.io/tracks/pharo/installation (not sure if you have to be signed up to see it otherwise its in the repo here: https://github.com/exercism/pharo/blob/master/docs/INSTALLATION.md)
>>>>>>>>
>>>>>>>> Hm⦠AllExercismTests seems to not be there (just a green test in Welcome)
>>>>>>>>
>>>>>>>> Is this supposed to contain the code below (the createMissingClassActionFor:in:) ?
>>>>>>>>
>>>>>>>> It would be nice to have an image that shows exactly the problem (I do not have that much time sadly to work on it,but I do have some time to check if I have an image that is set up to the point where i can easily recreate the problem)
>>>>>>>>
>>>>>>>> Marcus
>>>>>>>>
>>>>>>>>
>>>>>>>>> Tim
>>>>>>>>>
>>>>>>>>>> On 17 Aug 2018, at 07:17, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> On 17 Aug 2018, at 13:00, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Hi Marcus - I can put an image somewhere if that helps (do you just need the .image and .changes)?
>>>>>>>>>>>
>>>>>>>>>>> Or you can repro from a fresh 6.1 if you follow the exercism Pharo instructions (https://exercism.io/tracks/pharo) to load the first hello world-world example and run the tests. This has my code changes to make create work with a nil class - but maybe we can do better?
>>>>>>>>>> I will do that and have a look!
>>>>>>>>>>
>>>>>>>>>>> Tim
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Sent from my iPhone
>>>>>>>>>>>
>>>>>>>>>>>> On 17 Aug 2018, at 06:21, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> On 10 Aug 2018, at 23:16, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Actually I think I figured that bit out - a bit clumsily - (pointers appreciated)
>>>>>>>>>>>>>
>>>>>>>>>>>>> createMissingClassActionFor: aMessage in: aContext
>>>>>>>>>>>>> |errorNode senderContext newClass variableNode |
>>>>>>>>>>>>> senderContext := aContext sender.
>>>>>>>>>>>>> errorNode := senderContext method sourceNodeExecutedForPC: senderContext pc.
>>>>>>>>>>>>> variableNode := errorNode receiver receiver.
>>>>>>>>>>>>>
>>>>>>>>>>>>> newClass := OCUndeclaredVariableWarning new node: variableNode; defineClass: variableNode name.
>>>>>>>>>>>>> aContext restart.
>>>>>>>>>>>>>
>>>>>>>>>>>>> However that last line is wrong, as it doesnât restart with my newly defined class - I also tried
>>>>>>>>>>>>>
>>>>>>>>>>>>> aContext restartWithNewReceiver: newClass
>>>>>>>>>>>>>
>>>>>>>>>>>>> But again, I get a debugger where my class is still bound to nil. So whatâs the trick to re-evaluate with the new class Iâve created? Or maybe Iâm totally on the wrong track (still its very interestingâ¦)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> what is a bit bad is that you catch the problem âtoo lateâ (that is, the DNU to nil, not the read of nil), so nil is already pushed on the stack at this point.
>>>>>>>>>>>>
>>>>>>>>>>>> I tried it in the inspector and at least the class binding was correct after defining the class⦠do you have an image with the whole code to try?
>>>>>>>>>>>>
>>>>>>>>>>>> Marcus
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>
>
Aug. 30, 2018
Re: [Pharo-users] Loading a dll usinf UFFI on Win32
by Marten Feldtmann
Perhaps you are missing the Microsoft runtime (v100) ?
Marten
Am 29.08.2018 um 22:45 schrieb Jesús MarÃ:
> I'm trying to make zeromq work on win 32. zeromq lib is in C:\Program Files
> (x86)\ZeroMQ 4.0.4\bin\libzmq-v100-mt-4_0_4.dll .
>
> My Api #win32ModuleName returns exactly 'C:\Program Files (x86)\ZeroMQ
> 4.0.4\bin\libzmq-v100-mt-4_0_4.dll' but when I try lo execute any call it
> returns "module not found" error.
>
> Any suggestion?
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
--
Marten Feldtmann
Aug. 30, 2018
Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)
by Tim Mackinnon
Iâve submitted a PR for what I did, so at least it improves the situation (but potentially could get even more refined as you suggest)
Tim
> On 23 Aug 2018, at 11:26, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>
>
>
>> On 23 Aug 2018, at 15:56, Tim Mackinnon <tim(a)testit.works> wrote:
>>
>> Hi Marcus - thatâs actually what I do - and âcreateâ in this case, creates a class and then restarts like the method case does.
>>
>
> Yes, that I saw.
>
> But I mean a different case: Imagine you do have code like
>
> nil doSomething
>
> or an expression that evaluates to nil, press âdefineâ and get a method definition dialog, not the error message?
> (it is, as I mentioned, not that important as nobody ever wants to define a method in UndefinedObject, but for consistency it would be nice)
>
>
>> I guess I was wondering if we can do it more cleanly and also improve the debugger message.
>>
>> If Iâve understood you guys correctly- you try to remove the ambiguity around operations. Looking up a class and getting nil - seems like one of these holes you keep sorting out.
>>
>> I think the flaw in my solution is understanding if that message was being sent to a class, or some other global? I dont think I got that bit right (but itâs certainly better than nothing).
>>
>> e.g. in the debugger I am doing (in DoesNotUnderstandDebugAction)
>>
>> msg := self interruptedContext tempAt: 1.
>> (msg lookupClass == UndefinedObject ) ifTrue: [
>> ^self createMissingClassIn: self interruptedContext ].
>>
>>
>> Iâm not totally convinced that lookupClass has to be a class - although maybe its good enough. But really, at the time this happened - we probably knew better than to get a DNU debug action in the the first place - and equally the title in the debugger could be something more akin to the kind of action its supposed to be.
>>
>> Anyway - this is all musing on my part - and I will assemble a proper PR for review by you guys (and at least it advances us forward - and maybe opens the door to better changes further on).
>>
>> Iâm just juggling another change at the moment - so it will be a few days.
>>
>> Tim
>>
>> Sent from my iPhone
>>
>>> On 23 Aug 2018, at 05:33, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>
>>>
>>>
>>>> On 22 Aug 2018, at 16:24, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>
>>>> Hi - but I guess my question is (and excuse my basic knowledge in this area) - when a class isnât found - can we do better than return nil so that the debugger can give a better msg and presumably the code Iâve written could live on that undefined object? Or am thinking about this wrong?
>>>
>>> In pharo7 we could easily do that (due to the âbindingâ, the meta class of the variable) being different. We could return a nil subclass or add code into the method directly. But the problem with that is that nil checks
>>> are always identity checksâ¦
>>>
>>> Could you not in the case you now raise the error just fall back to the âdefine methodâ, the behaviour we have now?
>>>
>>> Marcus
>>>
>>>>
>>>> I will also put together a pr for this in Pharo 7 if you think itâs a decent fix.
>>>>
>>>> Tim
>>>>
>>>> Sent from my iPhone
>>>>
>>>>
>>>>
>>>> Sent from my iPhone
>>>>> On 22 Aug 2018, at 09:51, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I played with it, nice!
>>>>>
>>>>> I guess the case when you really get a DNU on nil (and want to create method there) does not really happen⦠extending nil is for special cases.
>>>>>
>>>>> Marcus
>>>>>
>>>>>
>>>>>> On 22 Aug 2018, at 13:39, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>
>>>>>> Sorry Marcus - you needed to follow the exercism instructions and right click on the exercism package to get an exercism menu to fetch a new exercise (e.g. hello-world). The is then using the TonalReader to pull in code - and then you get a test class that can reference a class that isnât there yet. (But you need to have the exercism cli installed as per the instructions etc).
>>>>>>
>>>>>> In retrospect I think it might be simpler to download this 6.1 image that already has done that - https://www.dropbox.com/s/x2ot9f8arbbvlyb/PharoExercism.zip?dl=0
>>>>>> It has TwoFerTest that is in that state. If you click on the TestWithName orb, you will see "#new was sent to nilâ - can you can see how my Create button has been fixed per you suggestions to create a class. (The code I wrote is in ExercismTools:DoesNotUnderstandDebugAction>>createMissingClassIn:)
>>>>>>
>>>>>> Tim
>>>>>>
>>>>>>
>>>>>>> On 22 Aug 2018, at 04:44, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> On 17 Aug 2018, at 14:20, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>
>>>>>>>> The direct link to instructions is here: https://exercism.io/tracks/pharo/installation (not sure if you have to be signed up to see it otherwise its in the repo here: https://github.com/exercism/pharo/blob/master/docs/INSTALLATION.md)
>>>>>>>
>>>>>>> Hm⦠AllExercismTests seems to not be there (just a green test in Welcome)
>>>>>>>
>>>>>>> Is this supposed to contain the code below (the createMissingClassActionFor:in:) ?
>>>>>>>
>>>>>>> It would be nice to have an image that shows exactly the problem (I do not have that much time sadly to work on it,but I do have some time to check if I have an image that is set up to the point where i can easily recreate the problem)
>>>>>>>
>>>>>>> Marcus
>>>>>>>
>>>>>>>
>>>>>>>> Tim
>>>>>>>>
>>>>>>>>> On 17 Aug 2018, at 07:17, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> On 17 Aug 2018, at 13:00, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hi Marcus - I can put an image somewhere if that helps (do you just need the .image and .changes)?
>>>>>>>>>>
>>>>>>>>>> Or you can repro from a fresh 6.1 if you follow the exercism Pharo instructions (https://exercism.io/tracks/pharo) to load the first hello world-world example and run the tests. This has my code changes to make create work with a nil class - but maybe we can do better?
>>>>>>>>> I will do that and have a look!
>>>>>>>>>
>>>>>>>>>> Tim
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Sent from my iPhone
>>>>>>>>>>
>>>>>>>>>>> On 17 Aug 2018, at 06:21, Marcus Denker <marcus.denker(a)inria.fr> wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> On 10 Aug 2018, at 23:16, Tim Mackinnon <tim(a)testit.works> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Actually I think I figured that bit out - a bit clumsily - (pointers appreciated)
>>>>>>>>>>>>
>>>>>>>>>>>> createMissingClassActionFor: aMessage in: aContext
>>>>>>>>>>>> |errorNode senderContext newClass variableNode |
>>>>>>>>>>>> senderContext := aContext sender.
>>>>>>>>>>>> errorNode := senderContext method sourceNodeExecutedForPC: senderContext pc.
>>>>>>>>>>>> variableNode := errorNode receiver receiver.
>>>>>>>>>>>>
>>>>>>>>>>>> newClass := OCUndeclaredVariableWarning new node: variableNode; defineClass: variableNode name.
>>>>>>>>>>>> aContext restart.
>>>>>>>>>>>>
>>>>>>>>>>>> However that last line is wrong, as it doesnât restart with my newly defined class - I also tried
>>>>>>>>>>>>
>>>>>>>>>>>> aContext restartWithNewReceiver: newClass
>>>>>>>>>>>>
>>>>>>>>>>>> But again, I get a debugger where my class is still bound to nil. So whatâs the trick to re-evaluate with the new class Iâve created? Or maybe Iâm totally on the wrong track (still its very interestingâ¦)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> what is a bit bad is that you catch the problem âtoo lateâ (that is, the DNU to nil, not the read of nil), so nil is already pushed on the stack at this point.
>>>>>>>>>>>
>>>>>>>>>>> I tried it in the inspector and at least the class binding was correct after defining the class⦠do you have an image with the whole code to try?
>>>>>>>>>>>
>>>>>>>>>>> Marcus
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
Aug. 30, 2018
When we create a missing method in debugger - why does it end with a dot?
by Tim Mackinnon
I am looking at porting my missing class creation code into Pharo 7, and I notice there is a DynamicMessageImplementor that does this for methods - but Iâm wondering why when we create a missing method with âself souldBeImplemented.â with a trailing â.â?
The Smalltalk style guide normally says the last statement shouldnât have a dot - and I notice some recent cleanups removed some dots on methods (presumably the formatter).
This is a bit of a special case as the intent is to replace that method - but shouldnât we create without the dot to set a good example anyway?
If so, I can include that change in my pr.
Tim
Aug. 30, 2018
Re: [Pharo-users] Latest Pharo 7 image doesn't give normal debugger on a method with undefined class method - get System Error
by Tim Mackinnon
Excuse the noise - this was user error, I synchronised my Pharo repository with an out of date local copy, so I must have brought in some incompatible changes with the new VM.
Phew !
Tim
> On 29 Aug 2018, at 23:42, Tim Mackinnon <tim(a)testit.works> wrote:
>
> I was going to look at testing my Create class in the debugger fixes however the latest image behaves in a manner Iâve not seen before.
>
> In a fresh P7 image - build 1198 64bit osx (with latest vm downloaded by launcher) - I have created a new class in a new package
>
> TimTest:TimTest>>testMethod
> "self new testMethod"
> FooObject new someMethod
>
> Where FooObject and someMethod are undefined and when I saved the method I left them as undefined.
>
> I then evaluated - TimeTest new testMethod in a playground and I get a white screen with *** System error handling failed *** (screenshot below)
>
> In an earlier image (build 1167) this wasnât the case?
>
> Has something been broken?
>
> Tim
>
> <PastedGraphic-1.png>
Aug. 30, 2018
Latest Pharo 7 image doesn't give normal debugger on a method with undefined class method - get System Error
by Tim Mackinnon
I was going to look at testing my Create class in the debugger fixes however the latest image behaves in a manner Iâve not seen before.
In a fresh P7 image - build 1198 64bit osx (with latest vm downloaded by launcher) - I have created a new class in a new package
TimTest:TimTest>>testMethod
"self new testMethod"
FooObject new someMethod
Where FooObject and someMethod are undefined and when I saved the method I left them as undefined.
I then evaluated - TimeTest new testMethod in a playground and I get a white screen with *** System error handling failed *** (screenshot below)
In an earlier image (build 1167) this wasnât the case?
Has something been broken?
Tim
Aug. 30, 2018
Re: [Pharo-users] Smalltalk Security Landscape - survey for ESUG 2018
by Jerry Kott
Hello, just a reminder that the survey closes on August 31st. If you missed the announcement and would like to participate, you have a lasst chance.
Thank you all who gave their time to it.
Jerry Kott
This message has been digitally signed.
PGP Fingerprint:
A9181736DD2F1B6CC7CF9E51AC8514F48C0979A5
> On 13-08-2018, at 10:50 AM, Jerry Kott <jkott(a)image-ware.com> wrote:
>
> Dear Smalltalkers and friends,
>
> I am planning to have a presentation titled âSmalltalk Security Landscapeâ at this yearâs ESUG conference. In my presentation I hope to increase cybersecurity awareness within the Smalltalk community and help shape the evolution of the language and its ecosystem.
>
> I have put together a survey to help me research the topic. I ask for your kind help to get a picture of where Smalltalk stands in the area of cybersecurity. The survey is completely anonymous, and should take less than 15 minutes to complete. I appreciate your time and participation.
>
> If you are in a management role, I would like your help by forwarding this to your team members to help reach the broad Smalltalk community.
>
> Here is a link: https://www.surveymonkey.com/r/esug2018 <https://www.surveymonkey.com/r/esug2018>
>
> Thank you for your help, and hope to see you in Cagliari!
>
> Jerry Kott
> This message has been digitally signed.
> PGP Fingerprint:
> A9181736DD2F1B6CC7CF9E51AC8514F48C0979A5
>
>
>
Aug. 30, 2018
Re: [Pharo-users] Tracing Method Calls
by Arturo Zambrano
Thanks Peter! it is really helpful
On Wed, Aug 1, 2018 at 12:14 PM Peter Uhnák <i.uhnak(a)gmail.com> wrote:
> If you want some projects using metalinks for inspiration:
>
> https://github.com/peteruhnak/metalinks-toolkit
> https://github.com/peteruhnak/live-instance-viewer
>
> (the second one also has a link to PDF explaining it in more detail)
>
> Also here an example
> http://blog.yuriy.tymch.uk/2016/02/vigorous-caching-in-pharo-or-how-i-used.…
>
> Peter
>
> On Wed, Aug 1, 2018 at 2:21 PM, Arturo Zambrano <arturo.zambrano(a)gmail.com
> > wrote:
>
>> Hi Steven
>>
>> On Fri, Jul 27, 2018 at 3:53 PM Steven Costiou <steven.costiou(a)kloum.io>
>> wrote:
>>
>>> Hi,
>>>
>>> it may not be actively maintained but Phantom has recently been ported
>>> to Pharo 6/6.1 https://github.com/InesSosa95/PHANtom
>>>
>>
>> that's a good news :)
>>
>>>
>>>
>>> You could also use Reflectivity (look for MetaLink class), which should
>>> not be hard to understand if you are familiar with aspects (although that
>>> is not aspects).
>>>
>>>
>>>
>>> For example, if you wanted to trace the receivers and parameters of a
>>> method named #mWithArg1:withArg2:withArg3: in class C, you could do :
>>>
>>> |link|
>>>
>>> link := MetaLink new.
>>>
>>> link control: #before.
>>>
>>> link arguments: #(#receiver #arguments).
>>>
>>> link metaObject: YourMetaObject.
>>>
>>> link selector: #yourMethodWithArg1:andArg:.
>>>
>>> (C lookupSelector: #mWithArg1:withArg2:withArg3:) ast link: link
>>>
>>>
>>>
>>> YourMetaObject is here an object which will receive the
>>> yourMethodWithArg1:andArg: with as arguments the receiver of the method
>>> #mWithArg1:withArg2:withArg3: and its arguments as an array.
>>>
>>> It could be a block with 2 arguments, or any other object that you would
>>> use to implement your trace behavior. You have a number of reifications
>>> available that you can pass as arguments from the context, look for
>>> subclasses of RFReification.
>>>
>>
>> I was not aware of MetaLink. Thank you!
>>
>>
>>
>>
>>> Steven.
>>>
>>>
>>>
>>>
>>>
>>> Le 2018-07-27 17:25, Arturo Zambrano a écrit :
>>>
>>> Hi all,
>>> I have a piece of undocumented software that I need understand ...
>>> One thing I would like to do is to have a complete trace of method calls
>>> (receivers, parameters) for certain scenarios.
>>> As an "aspects"guy, my first idea was to use Phantom, but it seems not
>>> active anymore.
>>>
>>> Could someone please point me to some tools that I could use for this?
>>> (using Pharo 6, 6.1 or 7)
>>>
>>> Thanks in advance
>>>
>>> Cheers
>>> Arturo
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
Aug. 29, 2018
Loading a dll usinf UFFI on Win32
by Jesús MarÃ
I'm trying to make zeromq work on win 32. zeromq lib is in C:\Program Files
(x86)\ZeroMQ 4.0.4\bin\libzmq-v100-mt-4_0_4.dll .
My Api #win32ModuleName returns exactly 'C:\Program Files (x86)\ZeroMQ
4.0.4\bin\libzmq-v100-mt-4_0_4.dll' but when I try lo execute any call it
returns "module not found" error.
Any suggestion?
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Aug. 29, 2018
Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk
by H. Hirzel
On 8/29/18, Jesús Marà <jmariaguirre(a)gmail.com> wrote:
> You can display text or html using
> self display openInJupyter:'*hello world in bolt*'
>
> or anything in a morph (a jpg, png ..a Roassal drawing).
> self display openInJupyter: aMorph
>
> you can expecify the extent
> self display openInJupyter: aMorph extent: aPoint.
Thanks! This is convenient!
> if you have installed Roassal group (it's a hack of many Roassal Classes)
> then you can visualize Interactive Roassal drawings doing:
>
> "this will load a modified version of Roassal.js that opens a Roassal view
> inside <div>"
> self loadScript: IPRoassal js.
>
> self display
> interactionOn;
> openInJupyter: aRoassalView.
>
Aug. 29, 2018
Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk
by Jesús MarÃ
You can display text or html using
self display openInJupyter:'*hello world in bolt*'
or anything in a morph (a jpg, png ..a Roassal drawing).
self display openInJupyter: aMorph
you can expecify the extent
self display openInJupyter: aMorph extent: aPoint.
if you have installed Roassal group (it's a hack of many Roassal Classes)
then you can visualize Interactive Roassal drawings doing:
"this will load a modified version of Roassal.js that opens a Roassal view
inside <div>"
self loadScript: IPRoassal js.
self display
interactionOn;
openInJupyter: aRoassalView.
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Aug. 29, 2018
Re: [Pharo-users] ssh client for Pharo
by Andrei Stebakov
I upgraded Pharo to latest 6.1. Now the prevouos issue is gone. Now I have
SSL socket related problem when it connects to secure git repo. Let me see
if it's only on Windows
On Aug 29, 2018 10:09, "Andrei Stebakov" <lispercat(a)gmail.com> wrote:
Hi, Denis
It fails to load in Pharo 6.1 with a message "Could not resolve:
BaselineOfLibSSH2".
Does it work for you?
Thanks!
Andrei
On Wed, Aug 29, 2018, 05:47 Denis Kudriashov <dionisiydk(a)gmail.com> wrote:
> Hi Andrei.
> Look at this: https://github.com/dionisiydk/libssh2-pharo-bindings
> It is very initial support but it was working in my tests
>
>
> ÑÑ, 29 авг. 2018 г., 2:19 Andrei Stebakov <lispercat(a)gmail.com>:
>
>> Is there an ssh client for Pharo just like net-ssh for Ruby?
>>
>> Thanks!
>>
>
Aug. 29, 2018
Re: [Pharo-users] ssh client for Pharo
by Andrei Stebakov
Hi, Denis
It fails to load in Pharo 6.1 with a message "Could not resolve:
BaselineOfLibSSH2".
Does it work for you?
Thanks!
Andrei
On Wed, Aug 29, 2018, 05:47 Denis Kudriashov <dionisiydk(a)gmail.com> wrote:
> Hi Andrei.
> Look at this: https://github.com/dionisiydk/libssh2-pharo-bindings
> It is very initial support but it was working in my tests
>
>
> ÑÑ, 29 авг. 2018 г., 2:19 Andrei Stebakov <lispercat(a)gmail.com>:
>
>> Is there an ssh client for Pharo just like net-ssh for Ruby?
>>
>> Thanks!
>>
>
Aug. 29, 2018
Project based learning and Dynabook
by Hilaire
Hi,
Some though on the topic
http://blog.drgeo.eu/post/2018/Project-based-learning
Hilaire
--
Dr. Geo
http://drgeo.eu
Aug. 29, 2018
Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk
by H. Hirzel
Hello Jesús MarÃ
The JavaScript kernel has custom output functions [1] such as
$$.html(htmlString)
$$.svg(svgString)
$$.png(base64String)
$$.jpeg(base64String)
$$.mime(mimeBundle)
What is the equivalent for $$.svg(svgString) for example?
Regards
Hannes
[1] http://n-riesco.github.io/ijavascript/doc/custom.ipynb.html
On 8/27/18, H. Hirzel <hannes.hirzel(a)gmail.com> wrote:
> Actually there is a probably a configuration file, but not in the
> place where I checked, I assume.
>
> I have Ubuntu or Ubuntu based test installations in partitions
> sda6,7,8,9,10. I can not recall in which partition in actually
> happened.
>
> However I found out about the command [1]
>
> jupyter --paths
>
> And I did this in some of the different test installations [2]
>
> In sda8 I have
>
> user8@Latitude2:~$ ls /usr/share/jupyter
> kernels nbextensions
>
> user8@Latitude2:~$ ls /usr/share/jupyter/kernels
> python3
>
> user8@Latitude2:~$ ls /usr/local/share/jupyter/kernels
> pharo
>
>
> So the probable explanation is that there was actually a configuration
> file but not in
>
> /usr/local/share/jupyter/kernels/pharo
>
> as you indicate in
> https://github.com/jmari/JupyterTalk/blob/master/README.md
>
> but in
>
> /usr/share/jupyter/kernels
>
>
> So my guess is that a download *nteract* (https://www.nteract.io/)
> alone and pharo6.1 with Juyptertalk (thus no python notebook) should
> work in a new Linux installation if there is a
>
> a kernel.json file with Pharo Smalltalk [3]
>
> in either
>
> /usr/local/share/jupyter/kernels/pharo
> OR
> /usr/share/jupyter/kernels/pharo
>
> I will test that and report to the list.
>
> --Hannes
>
>
>
>
> [1] jupyter help
> =================
>
> user10@Latitude2:~$ jupyter --help
> usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
> [--paths] [--json]
> [subcommand]
>
> Jupyter: Interactive Computing
>
> positional arguments:
> subcommand the subcommand to launch
>
> optional arguments:
> -h, --help show this help message and exit
> --version show the jupyter command's version and exit
> --config-dir show Jupyter config dir
> --data-dir show Jupyter data dir
> --runtime-dir show Jupyter runtime dir
> --paths show all Jupyter paths. Add --json for machine-readable
> format.
> --json output paths as machine-readable json
>
> Available subcommands: bundlerextension console kernel kernelspec migrate
> nbconvert nbextension notebook qtconsole run serverextension troubleshoot
> trust
>
>
>
> [2] jupyter paths in different test installations
> =================================================
>
>
> sda7
> -----
> jupyter --paths
> config:
> /home/user25/.jupyter
> /home/user25/anaconda3/etc/jupyter
> /usr/local/etc/jupyter
> /etc/jupyter
> data:
> /home/user25/.local/share/jupyter
> /home/user25/anaconda3/share/jupyter
> /usr/local/share/jupyter
> /usr/share/jupyter
> runtime:
> /run/user/1000/jupyter
>
>
> sda8
> -------
>
> jupyter --paths
> config:
> /home/user8/.jupyter
> /usr/etc/jupyter
> /usr/local/etc/jupyter
> /etc/jupyter
> data:
> /home/user8/.local/share/jupyter
> /usr/local/share/jupyter
> /usr/share/jupyter
> runtime:
> /run/user/1000/jupyter
>
>
>
> user8@Latitude2:~$ ls /usr/share/jupyter
> kernels nbextensions
> user8@Latitude2:~$ ls /usr/share/jupyter/kernels
> python3
> user8@Latitude2:~$ ls /usr/local/share/jupyter/kernels
> pharo
> user8@Latitude2:~$
>
>
>
> sda10
> -----
>
>
>
> user10@Latitude2:~$ jupyter --paths
> config:
> /home/user10/.jupyter
> /usr/etc/jupyter
> /usr/local/etc/jupyter
> /etc/jupyter
> data:
> /home/user10/.local/share/jupyter
> /usr/local/share/jupyter
> /usr/share/jupyter
> runtime:
> /run/user/1000/jupyter
>
>
>
>
> [3] Example kernel.json file for Pharo
> ======================================
>
> ls /usr/local/share/jupyter/kernels/pharo
> kernel.json
> user8@Latitude2:~$ cat /usr/local/share/jupyter/kernels/pharo/kernel.json
> {
> "argv": [
> "/home/user8/pharo-vm/bin/pharo",
> "/home/user8/Pharo.image",
> "ipharo",
> "{connection_file}"
> ],
> "display_name": "Pharo Smalltalk",
> "language": "smalltalk"
> }
>
>
>
>
> On 8/24/18, Jesús Marà <jmariaguirre(a)gmail.com> wrote:
>> Last update works also on *nteract*
>>
>> In the other hand, I could not understand how Jupyter knows about Pharo
>> kernel without the configuration file!!! Unbelievable!
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>
Aug. 29, 2018
Re: [Pharo-users] How do I get ZeroMQ working?
by H. Hirzel
To summarize this thread:
Make sure Jupyter (http://jupyter.org/) is installed properly.
Then ZeroMQ will work with the Pharo Smalltalk kernel (
https://github.com/jmari/JupyterTalk)
HH.
On 8/24/18, H. Hirzel <hannes.hirzel(a)gmail.com> wrote:
> user25@Latitude2:~$ find . -name libzmq*
> ./anaconda3/lib/pkgconfig/libzmq.pc
> ./anaconda3/lib/libzmq.so.5
> ./anaconda3/lib/python3.6/site-packages/zmq/backend/cython/libzmq.pxd
> ./anaconda3/lib/libzmq.so
> ./anaconda3/lib/libzmq.so.5.1.5
> ./anaconda3/lib/libzmq.la
> ./anaconda3/lib/libzmq.a
> ./anaconda3/pkgs/zeromq-4.2.5-h439df22_0/lib/pkgconfig/libzmq.pc
> ./anaconda3/pkgs/zeromq-4.2.5-h439df22_0/lib/libzmq.so.5
> ./anaconda3/pkgs/zeromq-4.2.5-h439df22_0/lib/libzmq.so
> ./anaconda3/pkgs/zeromq-4.2.5-h439df22_0/lib/libzmq.so.5.1.5
> ./anaconda3/pkgs/zeromq-4.2.5-h439df22_0/lib/libzmq.la
> ./anaconda3/pkgs/zeromq-4.2.5-h439df22_0/lib/libzmq.a
> ./anaconda3/pkgs/pyzmq-17.0.0-py36h14c3975_0/lib/python3.6/site-packages/zmq/backend/cython/libzmq.pxd
> user25@Latitude2:~$
>
>
> On 8/24/18, H. Hirzel <hannes.hirzel(a)gmail.com> wrote:
>> Yes, I re-evaluated in the playground
>>
>> Metacello new
>> baseline: 'JupyterTalk';
>> repository: 'github://jmari/JupyterTalk:master/repository';
>> load:'all'
>>
>> Then save and quit.
>> I hope that this was sufficient.
>>
>>
>> jupyter notebook
>>
>> create new Pharo Smalltalk notebook
>>
>> --> the notebook was created.
>>
>> Evaluate an expression
>>
>> --> the attached error comes up. The library is still not found. It is
>> looking for version 3 wheras the anaconda installation has 5.
>>
>>
>> At the moment for me anaconda support (600MB download) is nice to have
>> but not necessary.
>>
>> The other ways of installing jupyter notebooks (pip3 and nteract, 50MB
>> download) need less space and start giving good results.
>>
>> I suggest to put this as an issue at
>> https://github.com/jmari/JupyterTalk for the moment.
>>
>> 'Retest anaconda support and fix if necessary'
>>
>> --Hannes
>>
>> On 8/24/18, Jesús Marà <jmariaguirre(a)gmail.com> wrote:
>>> it's done.
>>> please try again
>>> Thanks
>>>
>>>
>>>
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>
>>>
>>
>
Aug. 29, 2018
Re: [Pharo-users] Dynabook and authentic learning pedagogy
by H. Hirzel
On 8/26/18, Sean P. DeNigris <sean(a)clipperadams.com> wrote:
> Offray Vladimir Luna Cárdenas-2 wrote
>> Smalltalk keeps its curse of being so concern with the future that was
>> disconnected from most of the present and so, giving the majority of us
>> no
>> bridge between our present
>> and the Dynabook vision.
>
> The idea of a bridge is an interesting one.
This idea needs to be further elaborated and then the gaps should be
identified and so that bridges may be built.
This should make it possible to use existing material from the curriculum.
>
> One of the core Dynabook/Smalltalk principles is that the whole computer
> should be available for inspection and experimentation by the user. As Dan
> Ingalls said about operating systems "there shouldn't be one".
>
> However, the rest of the world is stuck in an application/stovepipe model.
> While that may cripple and pigeonhole users' creativity, it's a reality
> that
> to be practically and generally useful the Dynabook would now have to
> deal/interact effectively with that whole mess while we're waiting for the
> rest of the world to catch up to our better way of doing things.
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>
Aug. 29, 2018
Re: [Pharo-users] ssh client for Pharo
by Denis Kudriashov
Hi Andrei.
Look at this: https://github.com/dionisiydk/libssh2-pharo-bindings
It is very initial support but it was working in my tests
ÑÑ, 29 авг. 2018 г., 2:19 Andrei Stebakov <lispercat(a)gmail.com>:
> Is there an ssh client for Pharo just like net-ssh for Ruby?
>
> Thanks!
>
Aug. 29, 2018
Re: [Pharo-users] How best to cope with 2 editor/browser frameworks - Calypso and RubSmalltalkEditor
by Tim Mackinnon
Denis - Iâve hopefully corruptly issues a PR on SystemCommands that shows how I approached this. I think its come out quite neat - but it will need the lower level Rubric based PR to be approved first (and then Calypso will have some useful jump to next keyword and intelligently widen selection commands).
Tim
> On 21 Aug 2018, at 20:12, Tim Mackinnon <tim(a)mackinnon.email> wrote:
>
> Thanks Denis - I figured that might be the case. As it turns out - the text selection protocol for the 2 editors is different so I can delegate that to a code block and put it in the
> Code mode.
>
> Anyway Iâll figure it out and show you guys in a or (Iâm almost there)
>
> Tim
>
> Sent from my iPhone
>
> On 21 Aug 2018, at 17:16, Denis Kudriashov <dionisiydk(a)gmail.com <mailto:dionisiydk@gmail.com>> wrote:
>
>> Hi Tim.
>>
>> Currently commands are loaded after rubric. So RubSmalltalkEditor can't use them directly.
>>
>> 2018-08-21 13:03 GMT+01:00 Tim Mackinnon <tim(a)testit.works <mailto:tim@testit.works>>:
>> AH - this makes sense then that SystemCommands is in its own Repo then (although all these tiny repos get quite difficult the track so you can understand where/how to contribute).
>>
>> This leads to another question - if I stick my commands for extend selection and jump to keyword in SystemCommands - is the load order such that RubSmalltalkEditor can safely access those commands (I know that for Calypso its ok, but can I reference those commands in the older RubSmalltalkEditor). Otherwise I will need to put the guts of my commands in the RubSmalltalkCodeMode which is shared by al editors (but it feels a bit too generic place for textMorph navigation stuff).
>>
>> Tim
>>
>>
>>
>>> On 21 Aug 2018, at 05:48, Esteban Lorenzano <estebanlm(a)gmail.com <mailto:estebanlm@gmail.com>> wrote:
>>>
>>> Hi,
>>>
>>>> On 20 Aug 2018, at 00:39, Denis Kudriashov <dionisiydk(a)gmail.com <mailto:dionisiydk@gmail.com>> wrote:
>>>>
>>>>
>>>> 2018-08-19 23:12 GMT+01:00 Tim Mackinnon <tim(a)testit.works <mailto:tim@testit.works>>:
>>>> Thanks Denis - I guess for now I can put the methods in RubSmalltalkEditor so that the playground can operate and then my Calypso plugins can also reference that code too (if class methods).
>>>>
>>>> Is the idea that playground will become part of Calypso too?
>>>>
>>>> No.
>>>> What we can try to achieve is to reused Commander everywhere. So these SystemCommands will be reused by different tools.
>>>
>>> Yes, this is what we are targeting, to have a centralised command library that manages all system commands (so we do not need to duplicate code all around).
>>> With enough time to implement, all tools will use same command mechanism.
>>>
>>> Esteban
>>>
>>>>
>>>> If so, I can add the methods I need as an extension (although I guess this wonât work as the keyboard mapping for playground in one method and not extensible like Calypso which uses pragmas).
>>>>
>>>> Iâll do something as a pr and we can figure it out.
>>>>
>>>> Itâs worth saying, that for my Calypso plugins Iâve had to abuse your mechanism a bit as the simple #execute mechanism doesnât give me access to the text morph to control the cursor. I was able to do it though via the prompting mechanism (I just donât show any ui prompt).
>>>>
>>>> Tim
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On 19 Aug 2018, at 14:28, Denis Kudriashov <dionisiydk(a)gmail.com <mailto:dionisiydk@gmail.com>> wrote:
>>>>
>>>>> Hi.
>>>>>
>>>>> I dont't know answer to your question. But for the note:
>>>>> Calypso was needed to override existing way to spawn implementors/senders and so on. So I added subclass of RubSmalltalkEditor - ClyTextEditor which overrides required methods.
>>>>> So if you will put new methods into the RubSmalltalkEditor then Calypso will be able to use them.
>>>>>
>>>>> 2018-08-19 16:55 GMT+01:00 Tim Mackinnon <tim(a)testit.works <mailto:tim@testit.works>>:
>>>>> Hi Iâm trying to work out the best way to cope with the fact that we are in a hybrid place where the Playground is using an RubSmalltalkEditor but Calypso has its own mechanisms for editing code.
>>>>>
>>>>> I have commands that should/can work in both the playground as well as code method editor (in Calypso).
>>>>>
>>>>> Previously my code lived in RubSmalltalkEditor and Nautilus was using that too - but now Iâm not sure where to put some reusable methods that use RBParser and the AST to find the best place to position your cursor.
>>>>>
>>>>> I can make a class method on RubSmalltalkEditor and Calypso commands could reference that (but that feels wrong somehow). I could make some extension methods on RBParser and both places reference that - but then who should own the extension method (as I think RubSmalltalkEditor is lower level and Calypso is then loaded on top).
>>>>>
>>>>> Anyone have some good suggestions?
>>>>>
>>>>> Tim
>>>>>
>>>>
>>>
>>
>>
Aug. 29, 2018