-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
64 lines (38 loc) · 2.09 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
===================================
spad_http : Jupyter kernel for SPAD
===================================
This is the alpha version of a new Jupyter kernel for FriCAS, Axiom ... where "alpha" refers to available features, not to stability.
1. git clone https://github.com/nilqed/spad_http.git
2. cd spad_http
3. ./start.sh
Required
- FriCAS (in path: fricas), compiled with multi-threaded Lisp (e.g. SBCL)
- Python/Jupyter (python 2 required !!)
- Python modules: requests (pip install ...)
- bash (for start.sh)
Status
- Text (charybdis) and LaTeX working
- Code completion
- stdout/stderr -> Notebook
- todo: timing (set message time on) , plotting, inspection
Tested with
Value = "FriCAS 1.3.3 compiled at Don Apr 12 19:26:08 CEST 2018"
.... compiled with sbcl --version SBCL 1.4.6
jupyter --version ==> 4.4.0
Ubuntu 16.04 LTS
- Value = "FriCAS 1.3.4 compiled at Do Jul 12 20:14:56 CEST 2018"
..... compiled with sbcl --version SBCL 1.4.9
jupyter --version ==> 4.4.0
jupyter notebook --version ==> 5.6.0
Ubuntu 18.04 LTS
Note(s):
There is now a jupyter notebook stop command that takes a port number
and shuts down the corresponding notebook server.
From 5.1, also HTTP --> POST request to /api/shutdown.
In start.sh we use "jupyter notebook stop 8888" after FriCAS )quit.
------------
How it works
------------
The directory "spad_http" contains, besides a local "quicklisp" distribution, Hunchentoot - The Common Lisp web server formerly known as TBNL (see http://edicl.github.io/hunchentoot/). The subdirectory "spadserver" contains a Python wrapper kernel (see http://jupyter-client.readthedocs.io/en/stable/wrapperkernels.html) which starts an instance of FriCAS and loading the webserver by "start.input" at the same time. The HTTP server is listening on port 4242 (may be changed, of course) for GET/PUT requests by the kernel. Data interchange goes via JSON, similar to ZMQ (see https://github.com/nilqed/webSPAD for details).
-- Manually starting .......... cd spad_http && fricas -eval ")r start"
-- Test http server with ...... http://localhost:4242/eval?code=D(x^n,x,6)