Yes, the name ijconsole (iverson j console) was adopted to work around
java's jconsole being in $PATH on many systems.

This would also be an issue with /usr/bin/env

But I don't see any high priority problems with /usr/bin/ijconsole as
a standard location. There will be some users who cannot install J
there, but it should be simple enough for them to build a tool to
patch incoming J scripts with the install location that they used.

(And, /usr/bin/env is going to be considerably slower than a bit of
undefined verb parsing and garbage collection within J.)

-- 
Raul

On Fri, Mar 10, 2023 at 6:51 PM Elijah Stone <elro...@elronnd.net> wrote:
>
> Fair enough.  I think the obvious thing is #!/usr/bin/env jconsole.  But I
> gather 'jconsole' is also the name of a java-related program, which might be
> why debian uses 'ijconsole' (and I think I have seen 'jc' elsewhere--probably
> for the same reason).  I therefore propose:
>
> 1. Rename jconsole to something which doesn't collide with anything heretofore
> notable
>
> 2. Use #!/usr/bin/env that-something
>
> On Fri, 10 Mar 2023, Raul Miller wrote:
>
> > Perhaps, but I think it would be more useful to have a portable,
> > agreed on path for systems which support the #! convention.
> >
> > That's required for J scripts to be distributable.
> >
> > Thanks,
> >
> > --
> > Raul
> >
> > On Fri, Mar 10, 2023 at 12:04 AM Elijah Stone <elro...@elronnd.net> wrote:
> >>
> >> Perhaps it's simply time to tell the interpreter to start ignoring the 
> >> first
> >> line of a script if it starts with #!...
> >>
> >> On Thu, 9 Mar 2023, Raul Miller wrote:
> >>
> >> > The recent change in directory naming from j903 to j9.4 introduces an
> >> > interesting issue for shell scripts on unix-like systems.
> >> >
> >> > In J shell scripts, this works:
> >> >
> >> > #!/home/username/j903/bin/jconsole
> >> >
> >> > However, this fails with a spelling error:
> >> >
> >> > #!/home/username/j9.4/bin/jconsole
> >> >
> >> > Or, on OSX, the shebang line is different, but the spelling error 
> >> > remains:
> >> >
> >> > #!/Applications/j9.4/bin/jconsole
> >> >
> >> > That said, there's some other issues here, related to portability. One
> >> > of which is that (as a general rule) a home directory is personal
> >> > rather than portable. Another is that there's official java jconsole
> >> > which does not understand J.
> >> >
> >> > But, also, for a long time now, Debian based distributions have been
> >> > distributing j with /usr/bin/ijconsole as a symbolic link to the
> >> > current installed location for J. (Here, the 'i' in ijconsole stands
> >> > for Iverson.)
> >> >
> >> > So I think that now would  be a good time to adopt that as "documented
> >> > standard practice" for j shell scripts.
> >> >
> >> > FYI,
> >> >
> >> > --
> >> > Raul
> >> > ----------------------------------------------------------------------
> >> > For information about J forums see http://www.jsoftware.com/forums.htm
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to