Skip to content

1. Offline usage

Stefan Kruger edited this page Nov 29, 2023 · 10 revisions

Install the Dyalog Jupyter kernel

NOTE: See the README.md file for installation instructions for v2.0.X of the Dyalog kernel.

The below instructions are for the OLD release (not compatible with notebook v7 and later)

  1. Install Dyalog APL version 15.0 or later.
  2. Install Anaconda (Python 3.X version).
  3. Download this repository as a zip: Click here to do so.
  4. After downloading, extract the contents and open the dyalog-jupyter-kernel-master directory.
  5. Run the following (it will have little visual effect, if any):
    Windows: install.bat
    Linux and macOS: install.sh

Run Jupyter Notebook

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. To start a web server and try to point your web browser at it, proceed as follows:

Windows

  1. Open the Start menu, and begin typing Jupyter then select Jupyter Notebook.

Linux

  1. Open a terminal window
  2. Optionally change directory (cd mydirectory) to where you want to place new notebooks or load notebooks from (or a parent directory thereof).
  3. Run jupyter-notebook.

Troubleshooting

If you get the message OSError: [Errno 99] Cannot assign requested address try:

jupyter-notebook --ip=0.0.0.0 --port=8080 or some other port number.

Using Dyalog supplied notebooks

  1. Download the notebooks repository and extract it to your Documents folder (on Windows) or home directory (on Linux and macOS) or a subdirectory thereof.
  2. Start Jupyter Notebook:
    Windows: Launch Jupyter Notebook from your start menu
    Linux and macOS: From a command line, navigate to your home directory, then run jupyter-notebook.
  3. This should open a directory view in your browser. Navigate to and click on the notebook document you want to open or click the New▾ button and to create a new empty one.

Entering APL characters

You can get an APL language bar and enable key-bindings and character compositions using just a a bookmarklet (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:

  1. Click a symbol on the language bar.
  2. 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 .
  3. 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:
    1. The symbols roughly make up the APL symbol when overlaid. For example, O- Tab makes and A|Tab makes .
    2. The symbols roughly make up the APL symbol when juxtaposed. For example, <> Tab makes and [] Tab makes
    3. The symbols are identical, and are visually similar to the APL symbol. For example, ee makes and xx makes ×.

Next ▸