On Tuesday, January 19, 2016 at 9:36:12 AM UTC-7, Albert van der Horst wrote:
>
hughag...@gmail.com writes:
>
> >On Monday, January 18, 2016 at 1:39:40 AM UTC-7, Mark Wills wrote:
> >> On Sunday, 17 January 2016 05:49:00 UTC,
hughag...@gmail.com wrote:
> >> > I will look into this string-stack --- maybe put that in my novice-package --- I don't like what I have currently.
> >>
> >>
http://turboforth.net/resources/string_library.html
> >>
> >> There's a PDF with an ANS implementation. Just look at the interfaces,
> >> don't bother with the implementation - produce your own. You'll produce
> >> much more efficient code if you implement using a heap and linked
> >> lists. Of course, this can still be represented as a string stack to
> >> the user, even if strings are scattered across the heap. The various
> >> facilities within the Novice Package would be perfect for implementing
> >> this. If you do implement these interfaces, or a selection of them,
> >> it would be great if you published the code.
>
> >The string stuff in my novice-package is terrible --- I've never been happy with it --- I have been thinking of holding the strings in the heap as you suggest.
>
> >I'll look into your code as a possible way to go. If I do implement this in the novice package I'll give you credit. :-)
>
> You're invited to investigate whether you can get by with ciforth's
> $! $@ $+! $C+
> and
> $/ $^
> without using dynamic buffers (until such time you need dynamic buffering
> for other reasons.)
>
> (I've never seen anything on c.l.f that required more heavy machinery.)
>
> Groetjes Albert
I do need to have more than one level of string in use at one time though. For example, inside of <CSTR ... CSTR> I may call a function that itself uses <CSTR ... CSTR> --- I don't necessarily know if the function uses <CSTR ... CSTR> or not --- I just know that it returns a string and that string will be given to +CSTR to be concatenated into the string being built by <CSTR .. CSTR>.
What I have is also cumbersome because I have CSTR-NEXT needed --- Raimond told me how to get rid of this, but I haven't yet thought through his suggestion to make sure it works.
I haven't really given much thought to the novice package in quite a while, but I should put together the code I've got and do an upgrade --- the
website is down now and may not return anytime soon, so I can't release an upgrade unless I set up my own website.