18. Known gaps


18. Known gaps

This chapter lists what the RVM does not do yet, or does wrongly, collected from the "Known gaps" sections of the other chapters and checked against both hosts and native ooRexx. It is a work list: each entry says what is missing or wrong, the hosts that show it, the observable effect and the chapter that explains the mechanism. Differences that are decisions are not here: they are the accepted entries of 17-divergences.md, only cross-referenced at the end, as are the differences pending a decision.

Reading an entry

Kind Meaning
missing not implemented: the construct or routine is absent, or fails with an RVM-specific error (usually 93.900 "RVM: ...")
bug implemented, but the behaviour is wrong and should be fixed
open divergence a difference from native that nobody chose, catalogued in 17 with status open; fixing it is welcome
limit a consequence of a host or platform that cannot be removed without a design change
unverified the RVM's behaviour has not been compared with native

Hosts: both (the ooRexx host, launched by rvm, and the JS host, js/rvm), ooRexx host, JS (Node and browser), Node, browser. Every bug below was reproduced with a probe on both launchers and native rexx.

Language and compiler

  • Parser forms that native ooRexx 5 does not have — missing, both. USE NAMED ARG, trailing blocks, invoked terms on routine/method objects, messages without a name, compound assignment to a stem (a. += 1), USE ARG to targets other than simple variables, stems, compounds, message terms and references, and the AST's Upper.Instruction compile to ERR 93.900, so a program that never executes them still runs. Native ooRexx rejects these at translation (e.g. use named arg is 25.905), so no portable program is affected. See 03, 08.
  • Compilation needs a compiling host — limit, JS. Under Node every compilation (a source file, INTERPRET of a new string, a run-time source, a line typed at an interactive trace pause) spawns native ooRexx (rexx rvm.rex -f): ooRexx must be installed, and each one costs about a quarter of a second. A browser page without the compiler loaded has no INTERPRET (93.900), no run-time sources (Method~new, Routine~new, Package~new(name, source), DEFINE with source: 93.900), no interactive trace (pauses are skipped) and only R-code external routines; sources compiled by the browser's compiler are not cached. See 03, 05, 14.

Concurrency

  • Nested waits that cross — open divergence, both. A wait in code a native runs (runSync, sendSync, a thunk) runs the other activities in place; one of them that waits, in a nested machine of its own, for what only the first can do is 93.900 "RVM: nested waits cross" (native goes on). A limit of the design. See 07, 17.
  • Blocking reads in Node without the worker — limit, JS. With RVM_WORKER=0, and in the browser, a read of standard input blocks every activity until it ends (there is no thread to read it for the program). See 07.

Prelude classes and collections

  • Stale generated prelude — limit, JS. The JS host detects a stale rvm-prelude*.mjs only by its R-code format and ISA versions; after a prelude change without a format change, regenerate by hand. See 10, 14.

Built-in functions

  • BEEP and GC in JS — limit, JS. BEEP makes no sound and GC collects nothing; both return as if they had. In the browser USERID is the constant rexx and DIRECTORY works on the host's virtual file system. See 11.

Libraries

  • Library modules and the macrospace are per process (RXFUNCADD of a classic module registers the name and calling it is 43.1; the macrospace reaches only processes the RVM starts): accepted, see 17.

Streams, commands and queues

  • Commands in the browser — missing. Every command gives RC 30. See 13.
  • Queues and macrospace shared with commands on Windows — missing. Neither host gives the command RVM_QUEUES, RVM_MACROSPACE or the RVM's rxqueue there. See 13.

Hosts and launchers

  • Windows — limit. Both hosts follow ooRexx for Windows (13), but the suites' scripts are Unix scripts: there the RVM is tested with the smoke tool only, and OLE (OLEObject, OLEVariant, which ooRexx for Windows has in .environment) is not there. See 16.
  • Browser — limit. No commands, no rxsock (98.903), no interactive standard input, .RexxInfo~executable/libraryPath are .nil, waits busy-wait on the main thread; external routines must be R-code (a source file is 43.1). Exercised only under Node and in Chromium-based browsers. RVM_TBCHECK works only under Node. See 14.
  • Sockets on Windows — missing. Both hosts behave as rxsock on Unix: the ooRexx host waits for a connection as EINPROGRESS says (Winsock says EWOULDBLOCK, so a connect is -1), and the JS host's worker is Linux's (host names, FIONREAD, SO_RCVTIMEO is ETIMEDOUT on Windows, shutdown of an unconnected socket, errno names). The sock- cases on Windows show them.
  • The pointer of a redirected standard output on Windows, JS host — limit. Node can neither ask a handle where its pointer is nor move it (libuv's writes at a position put it back): the RVM keeps it itself, as on Unix, and takes the size of the file after a command, which is right unless the program moved the pointer back (a command then writes where the handle's pointer is, as on Unix: 17).
  • A positioned write on a redirected standard output moves the descriptor's offset for the program's writes only, not for the commands it runs (Node has no lseek): accepted, see 17.
  • Sockets emulated by the Node worker differ from a kernel's (a bound stream socket already listens, sends never wait, SO_REUSEADDR always): accepted, see 17.
  • Start-up cost of the ooRexx host — limit, ooRexx host. rvm.rex requires all of RVM.Machine.cls, which drags in the objects, BIFs, REXXUTIL, rxmath, hostemu, commands, Number and Stream packages: about half of the 5 MB library and roughly a third of a second of the first load, even for a compile-only run. Splitting those into a package that only the machine requires is proposed, not done. See 15.

Unverified against native

None at present.

Pending a decision

Differences kept until the owner decides whether each is accepted or fixed are described under Open: pending decision in 17, and are neither gaps nor accepted divergences until then. None is pending at present.

Accepted divergences (not gaps)

These look like missing features but are decisions; they are described in 17 and are not to be "fixed" without revisiting the reason given there.

Behaviour Entry in 17
macrospace and RXFUNCADD registrations per process; no rxapi Macrospace, rxapi
deterministic inter-activity order (it also changes which assertions after a REPLY the test framework counts in the official REPLY group) Order
UNINIT only at program end; no WeakReference; no GC-dependent behaviour (Class~subclasses after GC) UNINIT, WeakReference
rexxc images are not read rexxc
rxunixsys not provided Library coverage
REXXUTIL's named semaphores, SysFork, SysWait, SysCreatePipe not provided Library coverage
queues are the process's, shared with commands through a file Queues
EXTERNAL methods of an ooRexx library the RVM lacks fail when they run, not when the package loads EXTERNAL methods
10,000 activations per activity Activation depth
speed of the ooRexx host Speed
a second Stream object on a standard input redirected to a file reads it from the start (undefined behaviour) Second stream

Design notes

  • Bugs and gaps are kept apart from divergences. A gap is a debt with no reason behind it; an accepted divergence has one. The census filter (16) only accepts the latter, so the gaps here are what remains visible as failures, skips or assertion-count differences in the official suite.
  • Unsupported constructs compile to a run-time error (93.900) rather than a translation error, so a program that contains but never executes them still runs. The reverse problem (a check that native does at run time, missing or done too early) is a bug: PROCEDURE and ITERATE of a non-repetitive block are now checked when they run, as native.
  • Maintenance. A change that fixes a gap removes its entry here and from the "Known gaps" section of the chapter that describes it, in the same commit; an open divergence that is fixed also leaves 17.