JOD is a J language programming tool.
Version: 1.0.24 released February 28, 2023
This page maintains references to primary JOD materials.
JOD can be installed and updated with the J package manager.
JOD PDF Help – current JOD system documentation in one PDF document. The same document is also available on this alternate server.
JOD Jupyter Notebooks – Jupyter notebook versions of some JOD labs.
Hard Copy JOD documentation – you can order JOD documentation in book form from Amazon. If this link does not work search Amazon books for ISBN-13: 979-8554921117. You can also search with Amazon’s ASIN key B08M2KBMND.
JOD Dictionary Dump Scripts – This GitHub repository holds working dictionary dump scripts. Dump scripts are used to create, update and archive JOD dictionaries.
JOD Source Code is available as:
- JOD dictionary database dumps – install the jodsource addon with the J package manager.
- A GitHub JOD repository. Pull into an empty local repository with:
git remote add jod https://github.com/bakerjd99/jod.git git pull jod master
- This repository is the official GitHub J Software repository for pacman addons.
- A Knuth style literate programming single PDF document.
Many Examples of JOD Generated Scripts – see the GitHub jacks repository.
34 thoughts on “The JOD Page”
Greatly appreciated. Hope you can get to OZ at some stage – a great place.
Your book is well presented as a pdf with all the links including page numbers in the Table of Contents. Can you what packages where used to create the pdf and I am considering writing a small book and your presentation style is most impressive.
A few years ago I published the JOD manual as a little book. The link is:
One of the things on my endless todo list is to finish a few planned features of JOD and revise this
publication to reflect the current state of the system.
The current PDF distributed in the document addon is current.
How are things in OZ these days. Your continent, and Antartica, are still on my continent todo list.
All is well in OZ – and going into spring -and please get in touch if planning a visit downunder.
Did you write the initial text in word and convert to pdf or some other process to get the links in the pdf ?.
I use LaTeX and the Hyperref package. Both are fairly standard technical writing tools. Even better they are public domain and freely available. Check out TeX Live and MikTeX if you are interested. Cheers John
Couldn’t get it to work through the labs or the tutorial in the pdf doc, using j805 beta and macOS. It creates the files, jod.ijn and jmaster.ijf under the ~addons/general/jod directory after load’general/jod’. The first newd succeeds, but then everything else just returns
0 !JOD error: cannot read master
I have not tested JOD with the j805 beta on mac systems yet but I can offer a few suggestions.
1) J on 32-bit mac systems is being deprecated. From now on only 64-bit mac systems will be supported. So first make sure you are using a 64 bit system. All new macs are 64 bit but older machines may still be 32-bit.
2) The error you are reporting is related to reading a jfiles jmaster.ijf file. If you are not seeing a J error as part of the error message then, for some reason, the J process does not have access to the jmaster.ijf file.
3) If you see a regular J error as part of the JOD message please pass on the message.
4) Finally, all JOD words trap errors. If you type get without arguments you will see something like get_2_. You can call get_2_ directly, this bypasses top level error trapping, and will show in J errors in the standard manner. If such a call generates a J error this means there is a bug in JOD or something is fishy with the j805 beta. If you do not see a J error there is some file access issue in this environment.
Hope this helps. John Baker
Thanks for the reply. There’s an issue with the jsource code, and I sent a message to the beta forum.
About volfree/freedisk, if you want to check disk space, df accepts a path name, and don’t use -l, which breaks nfs. However, it’s unnecessary to check free space. A simple argument is that you can never account for the disk space changes by other processes while you are doing your IO. It’s the system/kernel’s job to do it right. A cleaner way for user space code would be emit an error if any disk IO fails.
When you pass any command line to 2!:0, please quote the argument, just as what you did with the windows rd command. I recommend single quotes instead of double quotes.
Thanks for the package. It’s a very interesting way of organizing code snippets.
The term NIMP is used in the JOD documentation.
What does mean or refer to?
Thanks – obvious from the usage
Thanks for the note.
jodhelpgoes to online help by default. Normally the online help is more current but in the last month I have been making lots of changes to the PDF version.
On thing you can do to is to define a verb that always loads the PDF version if that is your preferrence, eg:
jodpdf_ijod_=: 3 : 'jodhelp~ ''PDF'' '
jodpdf 0always goes to the local PDF version.
Installed latest PDF manual (12/12/2011) : need to rename from jodnew.pdf to jod.pdf.
jodhelp ~ ‘PDF’
works and goes to the local PDF file.
goes to the online help.
It makes more sense to go to the latest help which is online.
Your error is caused by the
arc/zipaddon. It is used in the source setup script to extract the zipped dump scripts. Apparently it doesn’t work on 64 bit systems.
This is not a show stopper.
jodsource.zipis just a plain old zip file. You can extract and build the source dictionaries like this:
utils.ijs, jod.ijs, joddev.ijsto a temp directory say
2) Start J and load JOD:
3) Create your source dictionaries with the location you want:
4) Open the dictionaries and load the dump scripts in this order.
Hope this helps.
load ‘c:/users/owner/j64-701/addons/general/jodsource/jodsourcesetup.ijs’ on a 64 bit system.
Got the following error:
|domain error: unzOpen
| 0=Z=. unzOpen,<ZN
I note that the script has been tested on 32 bit systems.
Can I load the jsource dictionaries into:
c:/users/owner/jod/j701 or c:/users/owner/j64-601
In Section 7 of the PDF (Release 0.8.0 3/2/2009) manual you refer to the jmaster.ijs as a binary component file. Should this be jmaster.ijf ?. Similar treatment for jwords.ijs etc in the section.
How can I get and display the documentation stored by:
newd ‘play’;’c:/jod/j701/play’;’this is documentation to get and display’
You are correct about section 7. I spotted this error when I was revising jod.pdf. There is a new version of the manual jodnew.pdf available here:
and in the Files sidebar that fixes this and also reflects changes to JOD since version 0.8.0.
As for your other question. There is no direct JOD command to fetch this documentation but you can get at it by first displaying the locations of dictionaries with
odand then directly reading component 2 of the
4 od ”
| ||cbh |/home/john/jod/j701/cbh/ ||
| ||docs |/home/john/jod/j701/docs/ ||
| ||play |/home/john/jod/j701/play/ ||
| ||utils |/home/john/jod/j701/utils/ ||
|j toy box|
This looks like a good candidate for a little extension verb that reads and writes this item.
Thanks for your careful reading. If you spot any errors in jodnew.pdf please let me know.
I have extended the
getverbs to read and write dictionary documentation.
NB. read documentation
5 get ”
NB. write documentation – any character list
5 put ‘document me’
This is available in JOD version 0.9.65+
Starting to use JOD. Trivial question. In setting up a new dictionary I did not include any documentation as the third item. How do I subsequently add documentation and edit ?
Any help welcome.
To revise documentation for an existing dictionary you have to unregister and re-register it. The following sequence illustrates how to do this:
Editing the documentation list, ‘this is the documentation’
is something you do outside of JOD. You can use the J or
any text editor to create this list.
Hope this answers your question. – Thanks for dropping bye.
Is JOD a (world-wide) repository of reusable pieces of J code? This reminds about Phrases on jsoftware.com and RosettaCode. No, probably JOD is not that; for that, one needs a universally available storage for pieces.
Is JOD a system for coding in J in an organization? Where someone decided that text files aren’t as good as a company-wide database for code pieces? May be.
I agree that docs on JOD aren’t entirely clear.
Thanks for commenting. I have been using JOD for so long that it’s hard for me to see it through other eyes. JOD’S online documentation is mainly for quick reference. jod.pdf is detailed and should answer most questions about JOD.
JOD is not a world wide repository. It uses local jfiles. The jfiles may be on network drives. If I ever replace JOD’s storage object I might use some global store like Google Storage.
JOD’s main function is organizing my code. In my active dictionaries I have over two thousand J words ranging from tiny tacit definitions to multi-page explicit definitions. J code is typically functional and side effect free which means most of these words can be freely reused in new contexts. I could set up standard require files but it’s easier to define JOD word groups and generate scripts on the fly. This approach yields exactly tailored runtime scripts that do not include redundant or unused chunks of code.
I’ve read the article, I’ve viewed the slides, and read the JOD documentation. Yet, NONE of these sources answers the following questions:
* What is JOD?
* Why would I want to use it?
* What problems does it solve?
I see lots and lots of buzzwords and technical matter in the documentation, but nothing which communicates why it exists at all.
1) What is JOD? It’s a J word database.
2) Why would I want to use it? All J words, including large nouns (arrays), can be stored with a single put ‘array’ and fetched with a single get ‘array’.
3) What problems does it solve? The same problems natural language dictionaries solve.
4) Why does it exist at all? It exists because I had previous experience with code databases and saw how they significantly improve code reuse.