【J言語】アドオンのインストール
 2021-03-18  
 この記事はJ言語公式wikiのPacmanページの意訳を含みます.
## はじめに
J言語でグラフ描画をしてみようと公式wikiのサンプルを実行してみるも
    load 'plot'
not found: c:/users/loliver/j902/addons/graphics/plot/plot.ijsと怒られました.
どうやらアドオンを各自インストールする必要があるようです.
TL;DR
plotアドオンをインストールしたい場合
    load 'pacman' NB. パッケージマネージャのロード
    'install' jpkg 'graphics/plot' NB. アドオンのインストールちなみにアドオン名の検索は
   'search' jpkg 'plot'
+----------------++-------+-----------------------+
|demos/wdplot    ||1.0.50 |Plot demos wd emulation|
+----------------++-------+-----------------------+
|graphics/gnuplot||1.0.7  |Create gnuplot graphics|
+----------------++-------+-----------------------+
|graphics/plot   ||1.0.195|Plot                   |
+----------------++-------+-----------------------+て感じでできる.
Pacman
J言語ではPacmanというパッケージマネージャでアドオンを管理します.
pacmanのロード
    load 'pacman'すべてをインストール/アップデート
    'install' jpkg '*'デスクトップショートカットをインストール
    'shortcut' jpkg 'jqt'
    'shortcut' jpkg 'jhs'
    'shortcut' jpkg 'jc'アドオン管理
記法:<option> jpkg <addon name(s)>
<option>
'help'- 有効なオプションの表示'history'- 変更履歴の表示'install'- 指定されたアドオンのインストール'manifest'- アドオンの詳細表示'reinstall'-'remove'と'install'のショートカット'remove'- 削除'search'- 検索'show'- アドオンの概要表示'showinstalled'- インストール済みのアドオンの表示'shownotinstalled'- 未インストールのアドオンの表示'showupgrade'- 最新バージョンが利用可能なアドオンの表示'status'- アドオンと標準ライブラリのステータスの表示'update'- pacmanサーバからアドオン情報を更新'upgrade'- アドオンの更新
<addon name(s)>
- スペース区切りのアドオン名リテラルのリスト
 - ボックス化されたアドオン名リテラルのリスト
 'upgrade'で空文字リテラルを指定すると,インストール済みのすべてのアドオンの更新を行える
'remove'オプションでは,~addonsディレクトリへの書き込み権限が必要.
'install', 'reinstall', 'update', upgrade'オプションでは,インターネットアクセスと~addonsディレクトリへの書き込み権限が必要.
他のオプションでは,~addonsディレクトリに読み込み権限のみ必要.
jpkgの使い方
    load 'pacman'
    'update' jpkg '' NB. アドオン情報の更新
...
    'status' jpkg ''
...
    'install' jpkg 'convert/misc'
...
    'install' jpkg 'stats/base tables/csv'
...
    'install' jpkg 'base library' NB. "base library"だけ特別
...
    'search' jpkg 'xml'
...
    'search' jpkg 'xml/ pcall nuri'
...
    'show' jpkg 'search' jpkg 'tara'GitHubからインストール
pacmanと同じレイアウトであれば,GitHub上のコードもアドオンとしてインストールすることができる.
スポンサーリンク