From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b84f51b862b7b6f5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-09 16:14:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!worldnet.att.net!208.49.253.98!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!nntp.clear.net.nz!news.clear.net.nz.POSTED!not-for-mail NNTP-Posting-Date: Thu, 09 Jan 2003 18:14:35 -0600 From: Craig Carey Newsgroups: comp.lang.ada Subject: Re: String library with garbage collection? Date: Fri, 10 Jan 2003 13:14:42 +1300 Message-ID: <501s1voa23mlkfu93dailpb04dh20u7b0n@4ax.com> References: X-Newsreader: Forte Agent 1.92/32.572 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Organization: Customer of Mercury Telecommunications Ltd Cache-Post-Path: drone5.qsi.net.nz!unknown@tnt1-71.quicksilver.net.nz X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) X-Original-NNTP-Posting-Host: drone5-svc-skyt.qsi.net.nz X-Original-Trace: 10 Jan 2003 13:14:32 +1300, drone5-svc-skyt.qsi.net.nz NNTP-Posting-Host: 203.97.37.6 X-Trace: sv3-s8bnoEfPkqnU1TbfsUgIpC3W+0bEKNuAf0h6lVCn8qFgmFsY2WGFbS6Vb81aidRniyk7CnzJQKpMM0I!j0Jb6gixWPE6tKB/0u562P9u7cIBB+bokz0acQDUXuIFJXI/VZdSXEMMuBiVr68jd7PjWh9B0Mra!egyyt7M= X-Complaints-To: Complaints to abuse@clear.net.nz X-DMCA-Complaints-To: Complaints to abuse@clear.net.nz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:32845 Date: 2003-01-10T13:14:42+13:00 List-Id: On Thu, 09 Jan 2003 20:46:45 GMT, "James S. Rogers" wrote: >"Craig Carey" wrote in message >news:u2ar1vcnuqia1j380gc3pk134rg87dgvba@4ax.com... >> On Thu, 09 Jan 2003 11:33:56 +0100, Ingo "I. Marks" > >> wrote: >> >> >I'm looking for an open source dynamic string library with garbage >> >collection for Ada95. ... >> I have a "faster than Unbounded Strings" strings package here: >> >> http://www.ijs.co.nz/code/ada95_strings_pkg.zip ... >Ada.Strings.Unbounded is not intended to be fast. It is intended >to be dynamic. Ada strings are fast and inflexible. The package >Ada.Strings.Unbounded allows you to instantiate fast and flexible >strings. > That seems to be a seriously incomplete argument. Is there anything else that a programmer might simply want that Ada's Unbounded Strings can't deliver?. Since two major somewhat free implementations of Ada 95 have Unbounded Strings that are noticeably slow, the intent may be something that this message thread can fail to inquire into. Also Unbounded Strings are not obviously "flexible" since there is no true array slicing feature and also because of this... If X:=Y is to be done, and Y is 500 MB big, and X has only got 10 KB allocated for it, and also Y will never be used again, then it just can't be done using swapping due to the inflexible design of the .. package and the problem is that there is nothing in the package that is willing to receive the information that variable Y won't be used again. It is missing something, and if there was an AI to correct the problem then based on some private e-mail I got, the AI might be voted against. >The placement of variables in global scope can cause severe problems >in a concurrent system. Be very careful when not to use global variables >with tasks. I meant global to each task. I did write that the globals were parameters. Anyway, the advice has to be ignored... since global variables that do not change their value, and 'pragma Atomic()' variables, can be safe to access. Also that strings package I mentioned labels nodes in a simple global linked list, with Task_Id's which allows safe erroneous simultaneous traversing and updating of the linked list, which is faster than using protected objects. I tested the code and it seems to run OK (and the definition of "erroneous" could be rechecked at some future date). RM 9.10 defines "erroneous": http://www.adaic.org/standards/95aarm/html/AA-9-10.html Craig Carey