J-command "download"

I work on a J primer and get stuck when it comes to the load command.

In particular, there are times when the next step in the tutorial is load 'foo' , and I get an error, as shown below:

  load 'plot' not found: /users/username/j64-801/addons/graphics/plot/plot.ijs |file name error: script | 0!:0 y[4!:55<'y' 

When I do ls /users/username/j64/addons/ , there is only config and ide , so it is reasonable that graphics not found.

My question is: if an example is given that says load 'foo' , how do I find and install foo ?

+7
installation j
source share
1 answer

I would recommend just installing all the JAL packages (Add-ons). There are not so many of them, so the download will not take much time, and you will have access to everything you need to run the examples Labs, Wiki and any code published by the community (for example, on the J Forums).

To install all available add-ons, enter the following in Jconsole (theoretically you can enter it in JHS or JQT, but since they are distributed as add-ons, you may not be able to update them during their work):

  load'pacman' NB. J PACkage MANager install'all' 

The package manager will start and you will see the output, for example:

 Updating server catalog... Installing 52 packages Downloading base library... Installing base library... Downloading api/gl3... Installing api/gl3... Downloading api/ncurses... Installing api/ncurses... 

Then stop and restart Jconsole and run:

  load 'pacman' 'update' jpkg 'all' 

To make sure that all recursive dependencies are complete and all packages are updated (in particular, the base library). Ultimately, you want to see something like:

 Updating server catalog... Local JAL information was last updated: <datetime> All available packages are installed and up to date. 

Then stop and restart J for the last time. When this is done, you should have everything you need to run the Lab.


To answer your last question, if you see a line like:

  load'foo' 

The first thing you need to do is run getscripts_j_ 'foo' . In your example:

  getscripts_j_ 'plot' +--------------------------------------------------------------+ |c:/users/user/j64-801/addons/graphics/plot/plot.ijs| +--------------------------------------------------------------+ 

Here you can see the fully defined path where J expects the package to live.

In particular, you can see it where it belongs to the add-ons directory, which will always be in the form addons / category / module /foo.ijs. The name of the category and module indicates which add-on you need to install, so all you need to do is select the desired entry from the directory visible in the package manager.

+11
source share

All Articles