Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- 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