Hi again, On Sun, Nov 8, 2020 at 7:31 AM Rugxulo <[email protected]> wrote: > > Regina was (IIRC) compiled with Watt-32 due to external stack queue or > whatever (rxqueue). You can almost certainly rebuild without it (I've > done it) > > > > Regina at least has some justification. Some later versions of PC DOS > > > came with REXX. > > > Even AWK and REXX have modularity via separate files, which > is interesting and almost surprising. > > > REXX is a very cool language (ANSI standard, too, in 1996).
Just FYI: In REXX, external functions (in separate .REX files) are permitted, which is great for modularity (separation of concerns) and reusing code. But the functions must be immutable, so everything that is needed is passed as parameter, and you then return a relevant result from that. You also must remove the "procedure" keyword (Regina hates it) and forcibly rename the main module as "*.REX" (for BRexx, else it won't run correctly). But Regina is also slower to run that way, moreso than just typical slowdown from simple path searches. I have no idea if that's DJGPP's fault or not (probably not entirely, some is definitely my naive code). I'm also not sure what internal REXX caching is done either. (Regina can tokenize / byte-compile at cmdline, but I'm not sure if that helps speed at all.) Splitting out three of my procedures in one script slows Regina down (on a 2010 laptop atop RAM disk) nine times: from half a second to four and a half seconds! (REXX has a built-in timer for such tests.) It is definitely noticeable, but I do see an obvious optimization to add to my code (that will be unnecessarily redundant and verbose, but only very slightly). BRexx is very fast, regardless of external functions or not. I also tested two other REXX interpreters on Windows (ooREXX and r4), and they had similar slowdowns. I prefer not having tons of external dependencies and dozens of files to keep track of. Although lumping everything into one big file is bad, for very simple scripts (less than 1000 lines), it's probably not worth modularizing except for theoretical reasons. But I did whip up another quick REXX script to automate even that for me, so I don't have to tediously extract it by hand just to test such things. I know not many people around here prefer REXX, but it can be quite a useful language. However, if you already have QBASIC or AWK or Forth or similar, it's much less crucial. _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
