Deutsch   English   Français   Italiano  
<96ef2a6ddffb7b6d87d76a9743e6976f0e1d3d75@i2pn2.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: dxf <dxforth@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: Back & Forth - Co-routines
Date: Mon, 24 Mar 2025 13:52:10 +1100
Organization: i2pn2 (i2pn.org)
Message-ID: <96ef2a6ddffb7b6d87d76a9743e6976f0e1d3d75@i2pn2.org>
References: <nnd$2fb29a8e$298ef3f8@23fe4f00fa62d734>
 <49736c0ec0e34ca5d67f4e0d6e8cbe2a080e38ab@i2pn2.org>
 <vnkvvq$2a5o$1@dont-email.me> <nnd$14fbaf4d$1e462a10@60e007c2d8488e4d>
 <vnq10p$162l3$1@dont-email.me> <vrmm9l$994t$1@dont-email.me>
 <4dc5d804684a9e6fe364ea7cf288322de5b96629@i2pn2.org>
 <nnd$68f05139$09328b99@aec5a078c289c9c6>
 <62e658efe2da542c8de270bd1624b4fa5ad9034a@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 24 Mar 2025 02:52:10 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="1491131"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <62e658efe2da542c8de270bd1624b4fa5ad9034a@i2pn2.org>
Content-Language: en-GB
Bytes: 3442
Lines: 45

On 24/03/2025 12:50 pm, dxf wrote:
> On 23/03/2025 10:25 pm, Hans Bezemer wrote:
>> On 23-03-2025 04:03, dxf wrote:
>>> On 23/03/2025 2:51 am, sjack wrote:
>>>> Ruvim <ruvim.pinka@gmail.com> wrote:
>>>>
>>>>> An artificial example:
>>>>
>>>> While wondering down roads less taken, I took a path where
>>>> bacForth CUT: and -CUT were used in lieu of CATCH THROW .
>>>
>>> Does anyone have a reference/details for this anywhere as I can't seem to
>>> find anything?
>>>
>>> A possibly useful hit but the doc is locked away:
>>>
>>> https://doi.org/10.1145/165628.165637
>>
>> Found it! Try this one: https://www.complang.tuwien.ac.at/anton/euroforth/ef96/gassanenko96b.txt
>>
>> But I'm gonna spoil it for you: BacForth has an extra "L" stack. CUT: and -CUT use it. You might wanna use this one if you REALLY want it: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/stack.4th
>>
>> It's code for a light weight stack. BTW, TRACKING is missing as well. It might have to do with this one? https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/backtrak.4th
>>
>> : CUT:      \ mark the beginning of the fragment to cut
>>     R>  RP@ >L                   \ copy r-stack top addr. to L-stack
>>         BACK LDROP TRACKING      \ delete this mark when backtracking
>>     >R ;
>> : -CUT  R> L> RP! >R ;  \ delete return points upto the marked addr.
>> : -NOCUT    \ remove the mark, but not the return points
>>     R>
>>       L> RP@ - >R                \ keep the mark as a relative address
>>       BACK R> RP@ + >L  TRACKING \ restore it when backtracking
>>     >R ;
> 
> Thank you (and sjack) for chasing down this one.  More detail appears to be
> available in the SP-Forth sources directory:  \devel\~profit\lib\bac4th.f
> 
> A CP1251 to Unicode converter is here:
> https://convertcyrillic.com/#/convert

M. Gassanenko's original doc with code is in directory:  \devel\~mlg

Don't know whether I should be surprised or not but after passing through
Google Translate the result is amazingly good English.