• JLine for VMS

    From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Mar 24 10:57:14 2026
    From Newsgroup: comp.os.vms

    Anyone know of a port?

    It only supports FreeBSD, Linux, Mac (old style capitalization) and
    Windows out of the box:

    tar tvf jline-3.25.1.jar | grep "org/jline/nativ"
    ...
    -rw-r--r-- 0 0 0 8945 Jan 23 2024 org/jline/nativ/FreeBSD/x86/libjlinenative.so
    -rw-r--r-- 0 0 0 11637 Jan 23 2024 org/jline/nativ/FreeBSD/x86_64/libjlinenative.so
    ...
    -rw-r--r-- 0 0 0 21016 Jan 23 2024 org/jline/nativ/Linux/arm/libjlinenative.so
    -rw-r--r-- 0 0 0 14248 Jan 23 2024 org/jline/nativ/Linux/arm64/libjlinenative.so
    -rw-r--r-- 0 0 0 14056 Jan 23 2024 org/jline/nativ/Linux/armv6/libjlinenative.so
    -rw-r--r-- 0 0 0 13404 Jan 23 2024 org/jline/nativ/Linux/armv7/libjlinenative.so
    -rw-r--r-- 0 0 0 72008 Jan 23 2024 org/jline/nativ/Linux/ppc64/libjlinenative.so
    -rw-r--r-- 0 0 0 16324 Jan 23 2024 org/jline/nativ/Linux/x86/libjlinenative.so
    -rw-r--r-- 0 0 0 13704 Jan 23 2024 org/jline/nativ/Linux/x86_64/libjlinenative.so
    -rw-r--r-- 0 0 0 51666 Jan 23 2024 org/jline/nativ/Mac/arm64/libjlinenative.jnilib
    -rw-r--r-- 0 0 0 13720 Jan 23 2024 org/jline/nativ/Mac/x86/libjlinenative.jnilib
    -rw-r--r-- 0 0 0 14228 Jan 23 2024 org/jline/nativ/Mac/x86_64/libjlinenative.jnilib
    ...
    -rw-r--r-- 0 0 0 81920 Jan 23 2024 org/jline/nativ/Windows/arm64/libjlinenative.so
    -rw-r--r-- 0 0 0 114585 Jan 23 2024 org/jline/nativ/Windows/x86/jlinenative.dll
    -rw-r--r-- 0 0 0 129577 Jan 23 2024 org/jline/nativ/Windows/x86_64/jlinenative.dll

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Mar 24 14:29:38 2026
    From Newsgroup: comp.os.vms

    On 3/24/2026 2:15 PM, Simon Clubley wrote:
    On 2026-03-24, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    Anyone know of a port?

    It only supports FreeBSD, Linux, Mac (old style capitalization) and
    Windows out of the box:


    How far do you get when trying to build from source ?

    Any luck trying to make the build process think VMS is some form of Unix ?

    I started by asking. If someone had already done the work,
    then no need for me.

    The code is not big.

    https://github.com/jline/jline3/tree/master/native/src/main/native

    I guess it will end up in how *nix compatible VMS is.

    It is obvious from the code that the Windows version was a lot
    of work.

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Craig A. Berry@craigberry@nospam.mac.com to comp.os.vms on Tue Mar 24 15:13:04 2026
    From Newsgroup: comp.os.vms


    On 3/24/26 1:29 PM, Arne Vajh|+j wrote:
    On 3/24/2026 2:15 PM, Simon Clubley wrote:
    On 2026-03-24, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    Anyone know of a port?

    It only supports FreeBSD, Linux, Mac (old style capitalization) and
    Windows out of the box:


    How far do you get when trying to build from source ?

    Any luck trying to make the build process think VMS is some form of
    Unix ?

    I started by asking. If someone had already done the work,
    then no need for me.

    The code is not big.

    https://github.com/jline/jline3/tree/master/native/src/main/native

    I guess it will end up in how *nix compatible VMS is.

    It is obvious from the code that the Windows version was a lot
    of work.

    $ help crtl tcsetattr

    doesn't find anything. Some of the terminal stuff (isatty, ttynam) is available but probably not everything you need.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Mar 24 16:34:06 2026
    From Newsgroup: comp.os.vms

    On 3/24/2026 4:13 PM, Craig A. Berry wrote:
    On 3/24/26 1:29 PM, Arne Vajh|+j wrote:
    The code is not big.

    https://github.com/jline/jline3/tree/master/native/src/main/native

    I guess it will end up in how *nix compatible VMS is.

    It is obvious from the code that the Windows version was a lot
    of work.

    $ help crtl tcsetattr

    doesn't find anything.-a Some of the terminal stuff (isatty, ttynam) is available but probably not everything you need.

    So it would require a VMS implementation of everything
    based on SYS$QIOW ...

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Wed Mar 25 01:46:22 2026
    From Newsgroup: comp.os.vms

    In article <69c2d812$0$677$14726298@news.sunsite.dk>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/24/2026 2:15 PM, Simon Clubley wrote:
    On 2026-03-24, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    Anyone know of a port?

    It only supports FreeBSD, Linux, Mac (old style capitalization) and
    Windows out of the box:


    How far do you get when trying to build from source ?

    Any luck trying to make the build process think VMS is some form of Unix ?

    I started by asking. If someone had already done the work,
    then no need for me.

    The code is not big.

    https://github.com/jline/jline3/tree/master/native/src/main/native

    I guess it will end up in how *nix compatible VMS is.

    It is obvious from the code that the Windows version was a lot
    of work.

    It looks like that's pretty deeply intertwined with the POSIX
    termios interfaces.

    What, exactly, are you trying to do?

    - Dan C.

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Mar 24 22:07:46 2026
    From Newsgroup: comp.os.vms

    On 3/24/2026 9:46 PM, Dan Cross wrote:
    In article <69c2d812$0$677$14726298@news.sunsite.dk>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/24/2026 2:15 PM, Simon Clubley wrote:
    On 2026-03-24, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    Anyone know of a port?

    It only supports FreeBSD, Linux, Mac (old style capitalization) and
    Windows out of the box:


    How far do you get when trying to build from source ?

    Any luck trying to make the build process think VMS is some form of Unix ? >>
    I started by asking. If someone had already done the work,
    then no need for me.

    The code is not big.

    https://github.com/jline/jline3/tree/master/native/src/main/native

    I guess it will end up in how *nix compatible VMS is.

    It is obvious from the code that the Windows version was a lot
    of work.

    It looks like that's pretty deeply intertwined with the POSIX
    termios interfaces.

    What, exactly, are you trying to do?

    There are several Java applications that use JLine.

    It would be nice to be able to run them on VMS.

    Not all of those applications need JLine for
    basic functionality, but still nice to have.

    This is all JLine 3.x - if I remember correctly then
    JLine 2.x tries to run external stty utility, which does
    not work on VMS either.

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Wed Mar 25 04:40:42 2026
    From Newsgroup: comp.os.vms

    On Tue, 24 Mar 2026 22:07:46 -0400, Arne Vajh|+j wrote:

    It would be nice to be able to run them on VMS.

    It would be nice to have lots of things. But the code doesnrCOt write
    itself.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Wed Mar 25 10:54:07 2026
    From Newsgroup: comp.os.vms

    In article <10pvg1j$1g49c$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/24/2026 9:46 PM, Dan Cross wrote:
    In article <69c2d812$0$677$14726298@news.sunsite.dk>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/24/2026 2:15 PM, Simon Clubley wrote:
    On 2026-03-24, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    Anyone know of a port?

    It only supports FreeBSD, Linux, Mac (old style capitalization) and
    Windows out of the box:


    How far do you get when trying to build from source ?

    Any luck trying to make the build process think VMS is some form of Unix ? >>>
    I started by asking. If someone had already done the work,
    then no need for me.

    The code is not big.

    https://github.com/jline/jline3/tree/master/native/src/main/native

    I guess it will end up in how *nix compatible VMS is.

    It is obvious from the code that the Windows version was a lot
    of work.

    It looks like that's pretty deeply intertwined with the POSIX
    termios interfaces.

    What, exactly, are you trying to do?

    There are several Java applications that use JLine.

    It would be nice to be able to run them on VMS.

    Not all of those applications need JLine for
    basic functionality, but still nice to have.

    This is all JLine 3.x - if I remember correctly then
    JLine 2.x tries to run external stty utility, which does
    not work on VMS either.

    Looking at the documentation, this seems to be a mashup of what
    curses and GNU Readline provide on Unix-like systems. Curses
    works on VMS, but JLine seems to want to reach into the
    pseudo-terminal system and do everything itself. Reading
    between the lines, it probably creates PTY master/slave pairs
    behind the scenes, using JNI.

    So if you'd like this to work on OpenVMS, you'll have to provide
    either some sort of compatibility shim that looks like POSIX
    termios, or reimplement those bits using native OpenVMS
    primtives.

    What I'd probably do is dig into the curses (or perhaps ncurses)
    port and see what they do to bridge that gap, and then modify
    JLine's JNI components similarly.

    - Dan C.

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Wed Mar 25 11:02:56 2026
    From Newsgroup: comp.os.vms

    On 3/25/2026 12:40 AM, Lawrence DrCOOliveiro wrote:
    On Tue, 24 Mar 2026 22:07:46 -0400, Arne Vajh|+j wrote:
    It would be nice to be able to run them on VMS.

    It would be nice to have lots of things. But the code doesnrCOt write
    itself.

    I know.

    Even though vendors of various AI tools say otherwise.

    Arne


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Wed Mar 25 11:12:26 2026
    From Newsgroup: comp.os.vms

    On 3/25/2026 6:54 AM, Dan Cross wrote:
    In article <10pvg1j$1g49c$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/24/2026 9:46 PM, Dan Cross wrote:
    It looks like that's pretty deeply intertwined with the POSIX
    termios interfaces.

    What, exactly, are you trying to do?

    There are several Java applications that use JLine.

    It would be nice to be able to run them on VMS.

    Not all of those applications need JLine for
    basic functionality, but still nice to have.

    Looking at the documentation, this seems to be a mashup of what
    curses and GNU Readline provide on Unix-like systems. Curses
    works on VMS, but JLine seems to want to reach into the
    pseudo-terminal system and do everything itself. Reading
    between the lines, it probably creates PTY master/slave pairs
    behind the scenes, using JNI.

    It is commonly used in cases where a tool needs to work
    in 3 ways:

    $ foobar whatever.db
    $

    and:

    $ foobar -c "..."
    $

    and:

    $ foobar
    ...
    ...
    CTRL/Z
    $

    and the last needs some enhanced capabilities.

    So if you'd like this to work on OpenVMS, you'll have to provide
    either some sort of compatibility shim that looks like POSIX
    termios, or reimplement those bits using native OpenVMS
    primtives.

    What I'd probably do is dig into the curses (or perhaps ncurses)
    port and see what they do to bridge that gap, and then modify
    JLine's JNI components similarly.

    Maybe.

    But my order of preference if I were to start on this would be:
    1) SYS$QIOW (QIO is not bad for terminal IO)
    2) SMG$ (haven't used it for 30 years but it is pretty solid)
    3) curses/ncurses (back in the days the VMS curses had a very bad
    reputation, but maybe the Bill P ncurses is OK)

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Wed Mar 25 18:43:02 2026
    From Newsgroup: comp.os.vms

    In article <10q0u0p$20cet$2@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/25/2026 6:54 AM, Dan Cross wrote:
    In article <10pvg1j$1g49c$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/24/2026 9:46 PM, Dan Cross wrote:
    It looks like that's pretty deeply intertwined with the POSIX
    termios interfaces.

    What, exactly, are you trying to do?

    There are several Java applications that use JLine.

    It would be nice to be able to run them on VMS.

    Not all of those applications need JLine for
    basic functionality, but still nice to have.

    Looking at the documentation, this seems to be a mashup of what
    curses and GNU Readline provide on Unix-like systems. Curses
    works on VMS, but JLine seems to want to reach into the
    pseudo-terminal system and do everything itself. Reading
    between the lines, it probably creates PTY master/slave pairs
    behind the scenes, using JNI.

    It is commonly used in cases where a tool needs to work
    in 3 ways:

    $ foobar whatever.db
    $

    and:

    $ foobar -c "..."
    $

    and:

    $ foobar
    ...
    ...
    CTRL/Z
    $

    and the last needs some enhanced capabilities.

    It seems rather more advanced than that. It has a full terminal
    manipulation subsystem baked in, complete with cursor position
    handling and so on. I don't know if they handle the row update
    problem the way that curses does (most recent TUI libraries seem
    to punt on it; practically no one is writing to a plain 'ol
    serial terminal anymore: we're pretty much writing to little
    windows on a screen driven by a bitmapped graphics adapter, so
    "updating rows" is less intersting than just bitblt'ing images).

    So if you'd like this to work on OpenVMS, you'll have to provide
    either some sort of compatibility shim that looks like POSIX
    termios, or reimplement those bits using native OpenVMS
    primtives.

    What I'd probably do is dig into the curses (or perhaps ncurses)
    port and see what they do to bridge that gap, and then modify
    JLine's JNI components similarly.

    Maybe.

    But my order of preference if I were to start on this would be:
    1) SYS$QIOW (QIO is not bad for terminal IO)
    2) SMG$ (haven't used it for 30 years but it is pretty solid)
    3) curses/ncurses (back in the days the VMS curses had a very bad
    reputation, but maybe the Bill P ncurses is OK)

    I don't see how that's significantly different than what I said.
    I presume that the (n)curses ports to VMS use the native VMS
    facilities, and don't try to pretend they talking to Unix. The
    point was to look at the implementation of the ncurses/curses
    ports to see how they do work, and if there's anything useful
    you can mine from them to port this JLine thing.

    - Dan C.

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Wed Mar 25 20:40:41 2026
    From Newsgroup: comp.os.vms

    On 3/24/2026 10:07 PM, Arne Vajh|+j wrote:
    There are several Java applications that use JLine.

    It would be nice to be able to run them on VMS.

    Not all of those applications need JLine for
    basic functionality, but still nice to have.

    Note that:

    $ java -Dorg.jline.terminal.type=dumb
    -Dorg.jline.terminal.provider=jansi ...

    allows JLine to run on VMS.

    Which can be practical in case of something useful
    having a dependency on JLine.

    JLine is of course totally superfluous with that
    as it makes a JLine LineReader work just like a
    standard BufferedReader.

    One arrow up recall provided by terminal driver
    instead of the many (docs say default is 500,
    but I have not tested) provided by JLine
    with the right terminal interface.

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Mar 27 12:41:00 2026
    From Newsgroup: comp.os.vms

    On 3/25/2026 8:40 PM, Arne Vajh|+j wrote:
    On 3/24/2026 10:07 PM, Arne Vajh|+j wrote:
    There are several Java applications that use JLine.

    It would be nice to be able to run them on VMS.

    Not all of those applications need JLine for
    basic functionality, but still nice to have.

    Note that:

    $ java -Dorg.jline.terminal.type=dumb -
    Dorg.jline.terminal.provider=jansi ...

    allows JLine to run on VMS.

    Which can be practical in case of something useful
    having a dependency on JLine.

    JLine is of course totally superfluous with that
    as it makes a JLine LineReader work just like a
    standard BufferedReader.

    One arrow up recall provided by terminal driver
    instead of the many (docs say default is 500,
    but I have not tested) provided by JLine
    with the right terminal interface.

    And it is really working.

    In a sort of 1970ish way.

    :-)

    $ type X3.java
    import java.nio.file.Paths;

    import org.jline.reader.LineReader;
    import org.jline.reader.LineReaderBuilder;
    import org.jline.reader.EndOfFileException;
    import org.jline.reader.History;
    import org.jline.reader.UserInterruptException;
    import org.jline.terminal.Terminal;
    import org.jline.terminal.TerminalBuilder;

    public class X3 {
    public static void main(String[] args) throws Exception {
    Terminal terminal = TerminalBuilder.terminal();
    LineReader reader = LineReaderBuilder.builder().terminal(terminal).variable(LineReader.HISTORY_FILE,
    Paths.get("x3.hst")).build();
    while (true) {
    try {
    String line = reader.readLine("X3> ");
    if(line.toUpperCase().equals("EXIT")) {
    break;
    } else if(line.toUpperCase().equals("HISTORY")) {
    for(History.Entry he : reader.getHistory()) {
    System.out.printf("%d: %s\n", he.index() + 1, he.line());
    }
    } else {
    System.out.println(line);
    }
    } catch(EndOfFileException e) {
    break;
    } catch(UserInterruptException e) {
    break;
    }
    }
    }
    }
    $ type x3.hst
    %TYPE-W-SEARCHFAIL, error searching for DKA0:[arne.jline]x3.hst;
    -RMS-E-FNF, file not found
    $ java -Dorg.jline.terminal.type=dumb
    -Dorg.jline.terminal.provider=jansi -cp .:jline-3_25_1.jar X3
    a
    a
    b
    b
    c
    c
    history
    1: a
    2: b
    3: c
    4: history
    Exit
    $ type x3.hst
    1774632787470:a
    1774632788680:b
    1774632790060:c
    1774632793910:history
    $ java -Dorg.jline.terminal.type=dumb
    -Dorg.jline.terminal.provider=jansi -cp .:jline-3_25_1.jar X3
    history
    1: a
    2: b
    3: c
    4: history
    !1
    a
    !2
    b
    !3
    c
    !4
    1: a
    2: b
    3: c
    4: history
    5: a
    6: b
    7: c
    8: history
    Exit
    $ type x3.hst
    1774632787470:a
    1774632788680:b
    1774632790060:c
    1774632793910:history
    1774632814800:a
    1774632817560:b
    1774632820850:c
    1774632824990:history

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Fri Mar 27 18:18:53 2026
    From Newsgroup: comp.os.vms

    On 2026-03-27, Arne Vajhoj <arne@vajhoej.dk> wrote:
    On 3/25/2026 8:40 PM, Arne Vajhoj wrote:

    One arrow up recall provided by terminal driver
    instead of the many (docs say default is 500,
    but I have not tested) provided by JLine
    with the right terminal interface.

    And it is really working.

    In a sort of 1970ish way.


    What happens when you enter a line longer than the terminal width and
    then try editing it ?

    I would expect you to be able to edit the line until you move left to
    the line boundary.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Mar 27 14:41:36 2026
    From Newsgroup: comp.os.vms

    On 3/27/2026 2:18 PM, Simon Clubley wrote:
    On 2026-03-27, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/25/2026 8:40 PM, Arne Vajh|+j wrote:

    One arrow up recall provided by terminal driver
    instead of the many (docs say default is 500,
    but I have not tested) provided by JLine
    with the right terminal interface.

    And it is really working.

    In a sort of 1970ish way.

    What happens when you enter a line longer than the terminal width and
    then try editing it ?

    I would expect you to be able to edit the line until you move left to
    the line boundary.

    That does not work well.

    But isn't that as expected??

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Fri Mar 27 18:54:19 2026
    From Newsgroup: comp.os.vms

    On 2026-03-27, Arne Vajhoj <arne@vajhoej.dk> wrote:
    On 3/27/2026 2:18 PM, Simon Clubley wrote:
    On 2026-03-27, Arne Vajhoj <arne@vajhoej.dk> wrote:
    On 3/25/2026 8:40 PM, Arne Vajhoj wrote:

    One arrow up recall provided by terminal driver
    instead of the many (docs say default is 500,
    but I have not tested) provided by JLine
    with the right terminal interface.

    And it is really working.

    In a sort of 1970ish way.

    What happens when you enter a line longer than the terminal width and
    then try editing it ?

    I would expect you to be able to edit the line until you move left to
    the line boundary.

    That does not work well.

    But isn't that as expected??


    Yes. I have not looked at the code, so I was wondering if JLine had done something clever, but when you say direct terminal interface, it looks
    like you really do mean direct terminal interface. :-)

    Thanks for checking.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Mar 27 15:12:54 2026
    From Newsgroup: comp.os.vms

    On 3/27/2026 2:54 PM, Simon Clubley wrote:
    On 2026-03-27, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/27/2026 2:18 PM, Simon Clubley wrote:
    On 2026-03-27, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/25/2026 8:40 PM, Arne Vajh|+j wrote:

    One arrow up recall provided by terminal driver
    instead of the many (docs say default is 500,
    but I have not tested) provided by JLine
    with the right terminal interface.

    And it is really working.

    In a sort of 1970ish way.

    What happens when you enter a line longer than the terminal width and
    then try editing it ?

    I would expect you to be able to edit the line until you move left to
    the line boundary.

    That does not work well.

    But isn't that as expected??

    Yes. I have not looked at the code, so I was wondering if JLine had done something clever, but when you say direct terminal interface, it looks
    like you really do mean direct terminal interface. :-)

    With -Dorg.jline.terminal.type=dumb -Dorg.jline.terminal.provider=jansi
    it seems like JLine end up calling standard Java IO, which end up
    calling SYS$GET, which we know have some limitations.

    I would expect full edit capability if JLine got the native
    pieces for VMS. I tested on Windows and no problem editing
    a wrapped line.

    Arne


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Mar 27 15:14:48 2026
    From Newsgroup: comp.os.vms

    On 3/27/2026 3:12 PM, Arne Vajh|+j wrote:
    On 3/27/2026 2:54 PM, Simon Clubley wrote:
    On 2026-03-27, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/27/2026 2:18 PM, Simon Clubley wrote:
    On 2026-03-27, Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/25/2026 8:40 PM, Arne Vajh|+j wrote:

    One arrow up recall provided by terminal driver
    instead of the many (docs say default is 500,
    but I have not tested) provided by JLine
    with the right terminal interface.

    And it is really working.

    In a sort of 1970ish way.

    What happens when you enter a line longer than the terminal width and
    then try editing it ?

    I would expect you to be able to edit the line until you move left to
    the line boundary.

    That does not work well.

    But isn't that as expected??

    Yes. I have not looked at the code, so I was wondering if JLine had done
    something clever, but when you say direct terminal interface, it looks
    like you really do mean direct terminal interface. :-)

    With -Dorg.jline.terminal.type=dumb -Dorg.jline.terminal.provider=jansi
    it seems like JLine end up calling standard Java IO, which end up
    calling SYS$GET, which we know have some limitations.

    I would expect full edit capability if JLine got the native
    pieces for VMS. I tested on Windows and no problem editing
    a wrapped line.

    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From hb0815@mw40171@mucweb.de to comp.os.vms on Sat Mar 28 21:39:43 2026
    From Newsgroup: comp.os.vms

    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is code implementing such a history file for any existing program which uses the
    SMG recall buffer (Debugger, SDA, CMS, ...).
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Mar 28 17:33:44 2026
    From Newsgroup: comp.os.vms

    On 3/28/2026 4:39 PM, hb0815 wrote:
    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is code implementing such a history file for any existing program which uses the
    SMG recall buffer (Debugger, SDA, CMS, ...).

    SMG$REPLACE_INPUT_LINE with SMG$M_KEEP_CONTENTS to load
    and SMG$RETURN_INPUT_LINE to save?

    And setting recall buffer size in SMG$CREATE_VIRTUAL_KEYBOARD?

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From hb0815@mw40171@mucweb.de to comp.os.vms on Sat Mar 28 23:25:59 2026
    From Newsgroup: comp.os.vms

    On 3/28/26 22:33, Arne Vajh|+j wrote:
    On 3/28/2026 4:39 PM, hb0815 wrote:
    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is
    code implementing such a history file for any existing program which
    uses the SMG recall buffer (Debugger, SDA, CMS, ...).

    SMG$REPLACE_INPUT_LINE with SMG$M_KEEP_CONTENTS to load
    and SMG$RETURN_INPUT_LINE to save?

    And setting recall buffer size in SMG$CREATE_VIRTUAL_KEYBOARD?

    Yes and no: the recall buffer size is unchanged.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Mar 28 21:24:03 2026
    From Newsgroup: comp.os.vms

    On 3/28/2026 6:25 PM, hb0815 wrote:
    On 3/28/26 22:33, Arne Vajh|+j wrote:
    On 3/28/2026 4:39 PM, hb0815 wrote:
    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is
    code implementing such a history file for any existing program which
    uses the SMG recall buffer (Debugger, SDA, CMS, ...).

    SMG$REPLACE_INPUT_LINE with SMG$M_KEEP_CONTENTS to load
    and SMG$RETURN_INPUT_LINE to save?

    And setting recall buffer size in SMG$CREATE_VIRTUAL_KEYBOARD?

    Yes and no: the recall buffer size is unchanged.

    The default 20 is probably good enough.

    And it is also sort of tradition.

    :-)

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Mar 28 21:27:59 2026
    From Newsgroup: comp.os.vms

    On 3/28/2026 5:33 PM, Arne Vajh|+j wrote:
    On 3/28/2026 4:39 PM, hb0815 wrote:
    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is
    code implementing such a history file for any existing program which
    uses the SMG recall buffer (Debugger, SDA, CMS, ...).

    SMG$REPLACE_INPUT_LINE with SMG$M_KEEP_CONTENTS to load
    and SMG$RETURN_INPUT_LINE to save?

    And setting recall buffer size in SMG$CREATE_VIRTUAL_KEYBOARD?

    Could not resist the opportunity to write a demo in Pascal.

    prb.pas:

    [inherit('sys$library:pascal$smg_routines',
    'sys$library:pascal$lib_routines', 'sys$library:starlet')]
    module prb(input, output);

    type
    pstr = varying [1024] of char;
    kbid = unsigned;
    byte = [byte] 0..255;

    var
    id : kbid;
    fnm : pstr;
    siz : byte;

    procedure prb_init(hstfnm : pstr; rbsiz : integer);

    var
    stat : integer;
    f : text;
    cmd : pstr;
    lineno : integer;

    begin
    fnm := hstfnm;
    siz := rbsiz;
    stat := smg$create_virtual_keyboard(keyboard_id := id, recall_size
    := siz);
    if not odd(stat) then lib$signal(stat);
    open(f, fnm, unknown);
    reset(f);
    lineno := 1;
    while not eof(f) do begin
    readln(f, cmd);
    stat := smg$replace_input_line(keyboard_id := id, replace_string
    := cmd, line_count := lineno, flags := SMG$M_KEEP_CONTENTS);
    if not odd(stat) then lib$signal(stat);
    lineno := lineno + 1;
    end;
    close(f);
    end;

    function prb_read(pmt : pstr) : pstr;

    var
    res : pstr;
    stat : integer;

    begin
    stat := smg$read_composed_line(keyboard_id := id, resultant_string
    := res.body,
    prompt_string := pmt,
    resultant_length := res.length);
    if not odd(stat) then lib$signal(stat);
    prb_read := res;
    end;

    procedure prb_end;

    var
    stat : integer;
    f : text;
    cmd : pstr;
    i : integer;

    begin
    open(f, fnm, new);
    rewrite(f);
    for i := 1 to siz do begin
    stat := smg$return_input_line(keyboard_id := id, resultant_string
    := cmd.body,
    byte_integer_line_number := i, resultant_length := cmd.length);
    if not odd(stat) then lib$signal(stat);
    if cmd.length > 0 then writeln(f, cmd);
    end;
    close(f);
    stat := smg$delete_virtual_keyboard(keyboard_id := id);
    if not odd(stat) then lib$signal(stat);
    end;

    end.

    testprb.pas:

    [inherit('prb')]
    program testprb(input,output);

    var
    cmd : pstr;
    cont : boolean;

    begin
    prb_init('testprb.hst', 50);
    cont := true;
    while cont do begin
    cmd := prb_read('TESTPRB> ');
    if cmd = 'exit' then begin
    cont := false;
    end else begin
    writeln(cmd);
    end;
    end;
    prb_end;
    end.

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Mar 29 03:19:21 2026
    From Newsgroup: comp.os.vms

    On Sat, 28 Mar 2026 21:27:59 -0400, Arne Vajh|+j wrote:

    cont := true;
    while cont do begin

    I hate that.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From hb0815@mw40171@mucweb.de to comp.os.vms on Sun Mar 29 12:34:29 2026
    From Newsgroup: comp.os.vms

    On 3/29/26 03:24, Arne Vajh|+j wrote:
    On 3/28/2026 6:25 PM, hb0815 wrote:
    On 3/28/26 22:33, Arne Vajh|+j wrote:
    On 3/28/2026 4:39 PM, hb0815 wrote:
    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is
    code implementing such a history file for any existing program which
    uses the SMG recall buffer (Debugger, SDA, CMS, ...).

    SMG$REPLACE_INPUT_LINE with SMG$M_KEEP_CONTENTS to load
    and SMG$RETURN_INPUT_LINE to save?

    And setting recall buffer size in SMG$CREATE_VIRTUAL_KEYBOARD?

    Yes and no: the recall buffer size is unchanged.

    The default 20 is probably good enough.
    The size is unchanged. It is set by the application. If the application
    uses the default setting, that's fine.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From hb0815@mw40171@mucweb.de to comp.os.vms on Sun Mar 29 12:41:02 2026
    From Newsgroup: comp.os.vms

    On 3/29/26 03:27, Arne Vajh|+j wrote:
    On 3/28/2026 5:33 PM, Arne Vajh|+j wrote:
    On 3/28/2026 4:39 PM, hb0815 wrote:
    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is
    code implementing such a history file for any existing program which
    uses the SMG recall buffer (Debugger, SDA, CMS, ...).

    SMG$REPLACE_INPUT_LINE with SMG$M_KEEP_CONTENTS to load
    and SMG$RETURN_INPUT_LINE to save?

    And setting recall buffer size in SMG$CREATE_VIRTUAL_KEYBOARD?

    Could not resist the opportunity to write a demo in Pascal.
    ...

    OK, a demo of how to use SMG to write to and read from a history file
    within a program. It does not help with all the existing programs that
    have not implemented it. In other words, can your code enable history
    files for the Debugger, SDA, CMS, ...?
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sun Mar 29 08:03:53 2026
    From Newsgroup: comp.os.vms

    On 3/29/2026 6:41 AM, hb0815 wrote:
    On 3/29/26 03:27, Arne Vajh|+j wrote:
    On 3/28/2026 5:33 PM, Arne Vajh|+j wrote:
    On 3/28/2026 4:39 PM, hb0815 wrote:
    On 3/27/26 20:14, Arne Vajh|+j wrote:
    But history file works fine on VMS as demoed.

    :-)

    It is just that with !n instead of up arrow it is not
    particular useful.
    When finding the latest voit kit you probably noticed that there is
    code implementing such a history file for any existing program which
    uses the SMG recall buffer (Debugger, SDA, CMS, ...).

    SMG$REPLACE_INPUT_LINE with SMG$M_KEEP_CONTENTS to load
    and SMG$RETURN_INPUT_LINE to save?

    And setting recall buffer size in SMG$CREATE_VIRTUAL_KEYBOARD?

    Could not resist the opportunity to write a demo in Pascal.
    ...

    OK, a demo of how to use SMG to write to and read from a history file
    within a program. It does not help with all the existing programs that
    have not implemented it. In other words, can your code enable history
    files for the Debugger, SDA, CMS, ...?

    No no no.

    I thought you were talking about the ability to change the source code
    to use a history file.

    You are talking about a clever hack to change the EXE to use a history
    file?

    That is way beyond my skills.

    But if you can add it to DCL, then I think Simon is interested. It
    was one of the DCL enhancements he requested a few months ago.

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sun Mar 29 10:13:21 2026
    From Newsgroup: comp.os.vms

    On 3/28/2026 11:19 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 28 Mar 2026 21:27:59 -0400, Arne Vajh|+j wrote:

    cont := true;
    while cont do begin

    I hate that.

    It is a common pattern or at least was a common pattern.

    Maybe a little heavy, but it clearly tells the reader
    what is going on:

    more = true
    while more do // continue until no more
    ...
    if ... then
    more = false // no more
    else
    ...
    end if
    end while

    The modern way is worse in my opinion because it actively
    misleads the reader:

    while true // continue forever
    ...
    if ... then
    break // ha - I fooled you - we are not continuing forever
    end if
    ...
    end while

    The best way is a construct that signals exit in the middle
    (as in Modula-2 and TPU):

    loop // continue until done
    ...
    if ... then
    break // done
    end if
    ...
    end loop

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From kludge@kludge@panix.com (Scott Dorsey) to comp.os.vms on Sun Mar 29 11:05:11 2026
    From Newsgroup: comp.os.vms

    =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk> wrote:
    On 3/28/2026 11:19 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 28 Mar 2026 21:27:59 -0400, Arne Vajh|+j wrote:

    cont := true;
    while cont do begin

    I hate that.

    It is a common pattern or at least was a common pattern.

    In languages that don't have repeat loops. Do the test at the end instead
    of the beginning.
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sun Mar 29 15:51:20 2026
    From Newsgroup: comp.os.vms

    On 3/29/2026 11:05 AM, Scott Dorsey wrote:
    =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk> wrote:
    On 3/28/2026 11:19 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 28 Mar 2026 21:27:59 -0400, Arne Vajh|+j wrote:

    cont := true;
    while cont do begin

    I hate that.

    It is a common pattern or at least was a common pattern.

    In languages that don't have repeat loops. Do the test at the end instead
    of the beginning.

    Repeat until (do while in more modern languages) is not better
    when the test needs to be in the middle.

    more = true
    repeat // continue until something
    ...
    if ... then
    more = false // no more
    else
    ...
    end if
    until not more // until something = until not more

    And most prefer while over repeat until, because
    using while instead of repeat until is safe
    but using repeat until instead of while is
    not safe.

    https://www.linkedin.com/posts/sdalbera_geekhumor-becauseitsfriday-activity-7438097776862986241-Tmj0/

    Arne




    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sun Mar 29 16:03:01 2026
    From Newsgroup: comp.os.vms

    On 3/29/2026 3:51 PM, Arne Vajh|+j wrote:
    And most prefer while over repeat until, because
    using while instead of repeat until is safe
    but using repeat until instead of while is
    not safe.

    https://www.linkedin.com/posts/sdalbera_geekhumor-becauseitsfriday- activity-7438097776862986241-Tmj0/

    Once upon a time it was said that a bottom test was
    faster than a top test.

    Supposedly the reason that many Fortran 66 implementations
    had minimum of one iteration for DO loops.

    DO 100 I=START,END
    ...
    100 CONTINUE

    START=1 and END=1:

    Fortran 66 => 1 iteration
    Fortran 77 => 1 iteration

    START=1 and END=0:

    Fortran 66 => 0 or 1 iteration
    Fortran 77 => 0 iteration

    And I guess it was true.

    movl #1,r1
    100$: cmpl r1,#N
    bgtr 200$:
    ...
    incl r1
    brb 100$
    200$:

    vs:

    movl #1,r1
    100$: ...
    incl r1
    cmpl r1,#N
    bleq 100$

    But doesn't matter any more today.

    Arne

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Mar 29 22:44:00 2026
    From Newsgroup: comp.os.vms

    On Sun, 29 Mar 2026 10:13:21 -0400, Arne Vajh|+j wrote:

    The modern way is worse in my opinion because it actively
    misleads the reader:

    while true // continue forever
    ...
    if ... then
    break // ha - I fooled you - we are not continuing forever
    end if
    ...
    end while

    Nothing misleading about that. ItrCOs a well-known idiom.

    The best way is a construct that signals exit in the middle
    (as in Modula-2 and TPU):

    loop // continue until done

    That is indeed preferable, if available.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Mar 29 22:46:07 2026
    From Newsgroup: comp.os.vms

    On Sun, 29 Mar 2026 12:41:02 +0200, hb0815 wrote:

    In other words, can your code enable history files for the Debugger,
    SDA, CMS, ...?

    Ironically, on the platforms where itrCOs least of a problem, itrCOs also
    an easy problem to fix:

    <https://github.com/hanslub42/rlwrap>
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Mon Mar 30 01:39:46 2026
    From Newsgroup: comp.os.vms

    In article <69c98574$0$668$14726298@news.sunsite.dk>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 3/29/2026 3:51 PM, Arne Vajh|+j wrote:
    And most prefer while over repeat until, because
    using while instead of repeat until is safe
    but using repeat until instead of while is
    not safe.

    https://www.linkedin.com/posts/sdalbera_geekhumor-becauseitsfriday-
    activity-7438097776862986241-Tmj0/

    Once upon a time it was said that a bottom test was
    faster than a top test.

    This is still kind of true, but not in the form presented; the
    idea is to reduce the total number of unconditional jumps.

    That is, given a loop like,

    let mut i = 0;
    while i < 10 {
    // Do something....
    i += 1;
    }

    The compiler will often rewrite this to:

    mov r0, #0
    jmp cond
    top: // Do whatever.
    // Presumably a few instructions.
    add r0, r0, #1
    cond:
    cmp r0, #10
    blt top

    That is, by jumping to the condition at the bottom of the loop
    and testing it there, and then jumping back to the top, the body
    stays on the forward path and the only conditional branch is at
    the end.

    Indeed, for a loop like this, the compiler can even omit the
    `jmp cond` before the loop: it knows that `r0` must be less than
    10, since it just set it to 0, so it can walk right into the
    first iteration:

    mov r0, #0
    top: // Do whatever
    // Probably more than one instruction.
    add r0, r0, #1
    cmp r0, #10
    blt top

    But this is a concern for the compiler's optimizer, not the
    programmer.

    Supposedly the reason that many Fortran 66 implementations
    had minimum of one iteration for DO loops.

    DO 100 I=START,END
    ...
    100 CONTINUE

    START=1 and END=1:

    Fortran 66 => 1 iteration
    Fortran 77 => 1 iteration

    START=1 and END=0:

    Fortran 66 => 0 or 1 iteration
    Fortran 77 => 0 iteration

    And I guess it was true.

    movl #1,r1
    100$: cmpl r1,#N
    bgtr 200$:
    ...
    incl r1
    brb 100$
    200$:

    vs:

    movl #1,r1
    100$: ...
    incl r1
    cmpl r1,#N
    bleq 100$

    But doesn't matter any more today.

    Sure it does. This is the sort of thing that is _de rigueur_
    for optimizing compilers. But most programmers don't have to
    think about it.

    - Dan C.

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From hb0815@mw40171@mucweb.de to comp.os.vms on Mon Mar 30 10:50:33 2026
    From Newsgroup: comp.os.vms

    On 3/29/26 14:03, Arne Vajh|+j wrote:
    ...
    I thought you were talking about the ability to change the source code
    to use a history file.

    You are talking about a clever hack to change the EXE to use a history
    file?

    Thinking of a VOIT-type tool? No, no change of any existing EXE (or
    local copy of it). Any VMS update or upgrade would break this. It's
    symbol preemption. It's not difficult if you know how the linker and the
    image activator work.

    But if you can add it to DCL, then I think Simon is interested. It
    was one of the DCL enhancements he requested a few months ago.

    It's the SMG not the DCL recall buffer.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Mon Mar 30 12:25:09 2026
    From Newsgroup: comp.os.vms

    On 2026-03-29, Arne Vajhoj <arne@vajhoej.dk> wrote:

    Repeat until (do while in more modern languages) is not better
    when the test needs to be in the middle.


    Well, rather than implement all that structured stuff, just implement
    COMEFROM and then call it a day... :-)

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.21f-Linux NewsLink 1.2