|
| 1 | +#Install and use locally |
| 2 | + |
| 3 | +##Installing the Dyalog Jupyter kernel |
| 4 | +**Dyalog version 15.0 or later** and**Python version 3.X**, and the**jupyter** Python package must be installed in order to use the Dyalog Jupyter kernel. |
| 5 | + |
| 6 | +1. Go to[the python website](https://www.python.org/downloads/) to download and install Python on your system. Linux typically comes with Python already installed. |
| 7 | + |
| 8 | +If you need to manage multiple python versions, we recommend [pyenv](https://github.com/pyenv/pyenv). |
| 9 | + |
| 10 | +1. Install[Jupyter](https://jupyter.org/) from a command line or PowerShell terminal. |
| 11 | + |
| 12 | +`pip install jupyter` |
| 13 | + |
| 14 | +1. Download the Dyalog Jupyter kernel repository as a zip: Click[here](https://github.com/Dyalog/dyalog-jupyter-kernel/archive/master.zip) to do so. |
| 15 | +1. After downloading, extract the contents and open the*dyalog-jupyter-kernel-master* directory. |
| 16 | +1. Run the following (it will have little visual effect, if any): |
| 17 | + |
| 18 | +Windows: `install.bat` |
| 19 | + |
| 20 | +Linux and macOS: `install.sh` |
| 21 | + |
| 22 | +##Run Jupyter Notebook |
| 23 | +Use a command line or PowerShell terminal. |
| 24 | + |
| 25 | +Go to the directory which contains your notebooks: |
| 26 | + |
| 27 | +``` |
| 28 | +cd /path/to/my/notebooks |
| 29 | +``` |
| 30 | + |
| 31 | +Then start the Jupyter notebook system: |
| 32 | + |
| 33 | +``` |
| 34 | +jupyter notebook |
| 35 | +``` |
| 36 | + |
| 37 | +Jupyter Notebook uses a web interface. It has a drop-down button labeled*New▾* where you can choose to create a new Dyalog APL notebook. You can also navigate to and click on any existing notebook (a file with the`.ipynb` extension) to open it. |
| 38 | + |
| 39 | +##Troubleshooting |
| 40 | + |
| 41 | +###Python is not found |
| 42 | +>If you get the message |
| 43 | +>``` |
| 44 | +> python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. |
| 45 | +> ``` |
| 46 | +> Run the installer again. Make sure to tick **Add Python to environment variables** |
| 47 | +
|
| 48 | +### Cannot assign requsted address |
| 49 | +> If you get the message |
| 50 | +> `OSError: [Errno 99] Cannot assign requested address` |
| 51 | +> try: |
| 52 | +> `jupyter-notebook --ip=0.0.0.0 --port=8080` |
| 53 | +> or some other port number. |
| 54 | +
|
| 55 | +## Entering APL characters |
| 56 | +
|
| 57 | +You can get an APL language bar and enable key-bindings and character compositions using just a [a bookmarklet](https://abrudz.github.io/lb/apl) (a browser bookmark that contains commands which add new features to the browser). After adding the bookmarklet to your language bar, and opening a Jupyter notebook document in your browser, click on the bookmarklet. You can now insert APL characters in three ways: |
| 58 | +
|
| 59 | +1. Click a symbol on the language bar. |
| 60 | +1. Type *Backtick* (`` ` ``) and then the associated symbol (hover over symbols on the language bar to see associations), e.g. *Backtick*+*r* makes `⍴` and *Backtick*+*Shift*+*e* makes `⍷`. |
| 61 | +1. Type two symbols which roughly make up the APL symbol, then press the *Tab* key to combine them. The two symbols are chosen to be easy to guess according to one of the following systems: |
| 62 | + 1. The symbols roughly make up the APL symbol when overlaid. For example, `O-` *Tab* makes `⊖` and `A|`*Tab* makes `⍋`. |
| 63 | + 1. The symbols roughly make up the APL symbol when juxtaposed. For example, `<>` *Tab* makes `⋄` and `[]` *Tab* makes `⎕` |
| 64 | + 1. The symbols are identical, and are visually similar to the APL symbol. For example, `ee` makes `∊` and `xx` makes `×`. |