I have always admired the docs that we inherited from IBM, but I wonder if they were to undergo a major rearrangement/rewrite (and I'm not sure how big a rework Josep Maria envisages here) it might be strategic to rework them in such a way that they are easily accessible online to IDE auto-complete/help functionality. It might be the case that a completely separate knowledge repository is required with details of methods, arguments etc., but then that might create a bigger maintenance task going...
Hi Rony, I think so - others may know better. I'm not exactly sure how DO OVER works, but I think that would mean executing an unnecessary array~makearray method (you are in effect iterating over .file~readlines(myFile)~makearray) but I'm not sure (and don't currently have time to experiment) what sort of performance hit if any is caused by the array class makearray when the array is already non sparse - it is probably negligible. By the way, following on from what I wrote yesterday - Looking at...
Hi Rony, Yes, but 1) the stream class makearray function is very inefficient. 2) you have re-introduced the need to close the stream explicitly which I thought was what you are trying to avoid here I ran tests reading records into an array and it was much faster to use charin to read the entire file and then the string makearray than to use the stream makearray method. It is very difficult to get a sense of exactly how much faster it is - one gets figures in 2 different ranges. Whilst there is plenty...
Hi Rony, I think it would be nice if this feature plugged as seamlessly as possible into the DO...OVER syntactic sugar. I think that could be solved by a .file class makearray instance method. You could then do: DO line OVER .file~new(filename) To my mind, the line format would have to be the default. I know that one could also do this with the proposed DO line OVER .file~readLines(fileName) but I think as well as reading rather cumbersomely that would involve double handling of the data - a conversion...
This is Jon's code (Thanks!) with a few tweaks. I can't claim any credit for this trick, it was the result of a long thread on this (or perhaps another Rexx) list a couple of decades ago. I don't now know who discovered it. I just wrote a quick script to check that it was still the fastest way today. On Tue, 31 Mar 2026 at 23:24, Rick McGuire bigrixx@users.sourceforge.net wrote: One thing I don't like about the BIF approach is that adding BIFs is an automatic incompatibility because there's just...
Actually, this area is even more confused. If you want to read a file into an array in the most efficient manner you use something like: s=.stream~new(myFile) s~open('read') myArray = s~charin(1,s~chars)~makearray s~close Using the string class makearray is over 22 times faster than using the stream makearray method (at least on 5.10 on my laptop). My own personal preference would be that if the proposed functionality is implemented leveraging the stream class, then we use class methods on the stream...
DialogBox Return codes not as described
Whoops Typo. myBag~putAll~(myArray) should read myBag~putAll(myArray) Jon On Sun, 21 Dec 2025 at 13:03, Jon Wolfers sahananda@users.sourceforge.net wrote: Hi P.O., Just in case somebody misunderstands, the boolean operators can be used with extant collections. The syntax would be myExtantBag = myExtantBag~union(myArray) and the resultant bag would contain all that was in myExtantBag previously along with all the items in myArray PutAll probably reads more straightforwardly though, and for an array,...