JOD comes to Linux

For years I have distributed a J Addon called JOD. JOD stands for J Object Dictionary. JOD is a code database for the J programming language. Instead of storing my J programs in text files, like every other programmer in the world, I break them down into the smallest reusable units. In J parlance I split my scripts into words.

If you are an experienced programmer I wouldn’t blame you for questioning my sanity. What could possibly be gained by discounting good old-fashioned, superbly supported, ASCII/UTF8 text files? The short answer, in trendy software engineer speak, is refactoring. JOD is a refactoring engine that works at the J word level.

What does the word level mean? Program text files are collections of many “words.” They roughly correspond to sentences, paragraphs, sections and chapters in ordinary books. When you reuse, or quote, a book you typically copy passages and paste them into new contexts. Programmers call this cut and paste programming. We have all cut and pasted; it’s a software sin our prophets are constantly nagging us about! JOD minimizes cut and paste programming. You no longer cut and paste or include you simply get lists of words. J words are closer to English words than you might expect: hence this dictionary approach pays big dividends!

With the release of J 7.01 it’s become clear that Windows is no longer the preeminent J platform. The new JGTK interface works well on Windows but it sings on Linux. This is hardly surprising. GTK originated in the Linux/Unix world and still performs best there. Porting JOD to Linux has been on my to-do list for years. The arrival of J 7.01 got me off my butt.

JOD 0.9.3 is the first publicized Linux release. JOD code is 99% J and makes limited use of OS facilities. The port consisted of finding Linux equivalents for a handful of Windows API calls. The always helpful J community provided useful pointers. Joey Tuttle and Bill Lam basically solved my Linux GUID and file handling problems. Thanks guys.

My biggest chore was updating JOD online documentation. In recent months Google Documents changed the format of their word processing documents. Google provided an upgrade tool to convert old documents to the new format but it:

  1. Did not remap scores of old URLs to new URLs. I had to go through every document doing this one link at a time!
  2. Totally wrecked a few documents. I reconstructed JOD Release Notes from version control logs.

Despite these irritants the new format is better. You can attach comments and download documents in ODT, PDF, Word, HTML and ZIP formats. If you find problems with my documents please leave notes.

I am not completely satisfied with some restrictions imposed by JOD 0.9.3.

  1. JOD creates dictionaries in user home directories like /home/user/jod/… and assumes it has the rights to create, write, copy and erase JOD files and directories.
  2. No blanks in file paths, i.e., /home/i like blanks/but jod doesnt/.. will not work.
  3. Dictionary paths must begin with a forward slash, i.e., /home/is/ok/ but ~is/not/allowed/
  4. Volume sizing reports the smallest amount of free space on all mounted volumes and not the free space on the volume containing JOD directories. I just don’t know how to do this on Linux.
  5. jod.pdf has not been updated.

I am sure there are other problems and limitations that I have missed. For more see: Linux Notes. I will be releasing fixes and upgrades via JAL and on the JOD page. Give JOD a whirl. It might change your J ways.

Click for PDF presentation

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.