Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lisp kernel request for Allegro Common Lisp #17

Open
djinnome opened this issue Jan 29, 2016 · 4 comments
Open

Lisp kernel request for Allegro Common Lisp #17

djinnome opened this issue Jan 29, 2016 · 4 comments

Comments

@djinnome
Copy link

Hi Folks,

I use Pathway-tools, which uses Allegro common lisp underneath. On the other hand, if the kernel just needs to connect to a REPL through a socket, Pathway-tools already provides a Unix socket.

Sincerely,

@fredokun
Copy link
Owner

fredokun commented Feb 2, 2016

I am sorry but I do not have access to ACL, hence it's difficult for me to address this issue.

@mmaul
Copy link

mmaul commented Feb 4, 2016

djinnome
It "should" work, I did some tests with Allegro Express, unfortunately Allegro Express is 32 bit and cl-jupyter needs ZMQ and on my system I only have a 64 bit version. (I can grab one but I thought I'd let you give it a go and if you run into problems I'll rundown the dependent 32 bit libs).
Anyways to get it going I'll have your create the profile for allegro manually and once it's dialed in you can give it back to me and I'll create a pull request from it and get it into the cl-jupyter install.

Not knowing how familiar with CL and quicklisp I'll go step by step

Make sure ipython3 is installed if it isn't then you can install for Ubuntu as shown below
apt-get install ipython3-notebook

Install quicklisp
curl -O https://beta.quicklisp.org/quicklisp.lisp
alisp -L quicklisp.lisp
(quicklisp-quickstart:install)
(ql:add-to-init-file)

Clone the cl-jupyter repo in to the directory ~/quicklisp/local-projects directory on your system
git clone https://github.com/fredokun/cl-jupyter.git

cd into cl-jupyter and run install script
python3 ./install-cl-jupyter.py

Start Allegro lisp and load cl-jupyter and exit
alisp
(ql:quickload :cl-jupyter)

Start ipython3 and make sure it works and so it creates the ~/.ipython profile directory then shut it down
ipython3 notebook

Make a directory to hold the config file for the Allegro lisp kernel
mkdir ~/.ipython/kernels/alisp

Create a file called kernel.json in directory ~/.ipython/kernels/alisp with the contents below changing HOMEDIR to the fully qualified path to your home directory.

{"argv": ["alisp",  "-L", "HOMEDIR/.clinit.cl", "-L", "HOMEDIR/quicklisp/local-projects/cl-jupyter/cl-jupyter.lisp", "--", "HOMEDIR/quicklisp/local-projects/cl-jupyter/src", "HOMEDIR/quicklisp/local-projects/cl-jupyter", "{connection_file}"], "language": "lisp", "display_name": "ACL Lisp"}

Finally start ipython and test it out by creating a new notebook and selecting the ACL Lisp kernel.

Let me know how it goes. If you have problems I'll run down the 32 bit libs I need, or if you can get the folks at Pathway to give me a copy of their app and I will see what I can do.

@tuh8888
Copy link

tuh8888 commented Nov 16, 2018

I tried the suggested procedure from @mmaul using Allegro Common Lisp's mlisp. There were, of course, issues due to mlisp being case-sensitive, which I resolved by converting a few variable names to lower case. But I got stuck trying to get the kernel to reply. There appears to be an issue with the utf-8 decoding. Here is the output I got:

cl-jupyter: an enhanced interactive Common Lisp REPL
(Version 0.7 - Jupyter protocol v.5.0)
--> (C) 2014-2015 Frederic Peschanski (cf. LICENSE)

[Hearbeat] starting...
[Kernel] Entering mainloop ...
[Shell] loop started
[Heartbeat] thread started
[Recv]: issue with UTF-8 decoding
[Recv]: parts: (" k�Eg" "<IDS|MSG>" "14118bdd5e6c83b7548073bedd6e4a1b2e5ff12b7d34f141f9ada520cd9a0b22" "{"msg_id":"a74610b4-214290cba208778386689ec1","msg_type":"kernel_info_request","username":"tuh8888","session":"19728febc7a74bcf89e9c102d2c1d3a5","date":"2018-11-16T03:35:37.393943Z","version":"5.3"}" "{}" "{}" "{}")
[W 20:36:37.396 NotebookApp] Timeout waiting for kernel_info reply from f60367ee-3da9-4ee5-801f-f9655cbf9eb8
[Recv]: parts: ("19728febc7a74bcf89e9c102d2c1d3a5" "<IDS|MSG>" "1d1ed1c5d8871d3f75612a1c5c0b967f6aa31910f99a2cfc01175681659bf1a7" "{"msg_id":"f78e442b894a47d39e3a66bd5b2f9ea4","username":"username","session":"19728febc7a74bcf89e9c102d2c1d3a5","msg_type":"kernel_info_request","version":"5.2"}" "{}" "{}" "{}")

@djinnome
Copy link
Author

djinnome commented Sep 15, 2020

Now that allegro common lisp is 64 bit, is it more feasible to get cl-jupyter to support allegro?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants