Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #134921
| Newsgroups | comp.lang.forth |
|---|---|
| References | <10qunhm$1nnbt$1@dont-email.me> <nnd$5fbdae9b$6428335d@7ddbf5ece7eb9625> <nnd$4d4782db$73d0020c@69cc4648be712fe3> <69db0856$1@news.ausics.net> |
| From | albert@spenarnc.xs4all.nl |
| Subject | Re: Coroutines in Forth |
| Message-ID | <nnd$67c8a1a9$1a9e1136@2361cadd8a09da63> (permalink) |
| Organization | KPN B.V. |
| Date | 2026-04-13 12:13 +0200 |
In article <69db0856$1@news.ausics.net>, dxf <dxforth@gmail.com> wrote:
>On 12/04/2026 6:03 am, albert@spenarnc.xs4all.nl wrote:
>> In article <nnd$5fbdae9b$6428335d@7ddbf5ece7eb9625>,
>> Hans Bezemer <the.beez.speaks@gmail.com> wrote:
>>> On 07-04-2026 13:35, albert@spenarnc.xs4all.nl wrote:
>>>> A similar situation applies to "TO must scan". It turns out there
>>>> is no standard program that can detect this. It steers implementation
>>>> towards a scanning TO.
>>>
>>> Frankly, I consider VALUE one of these Forth errors we never got rid of.
>>> Why, you ask? Because every name basically returns a pointer - unless we
>>> DOES> something different.
>>>
>>> Sure, you can have different ways to store a value, but a parsing word?
>>> Really? And all of a sudden it should do different things depending on
>>> type? Yuk!
>>>
>>> Personally, I do VALUE and TO. But only for VALUE. And the compiler
>>> figures out what the most optimal way of handling this retrieval or
>>> assignment is. Is the address known at compile time, we handle it like a
>>> VALUE, otherwise like a VARIABLE.
>>>
>>> And yeah, we have FTO and 2TO. I don't like it - but I like some
>>> smart@$$ "TO" even less. What a waste of code.. And what a horrible design.
>>
>> In ciforth you can do this:
>> Prefixes ("recognizers") are supposed to be parsing the remainder
>> lf tne word, like $DEADBEAT
>>
>> Abuse follows.
>>
>> \ In the minimal wordlist, not masking regular @ !
>> 'ONLY >WID CURRENT !
>> : @ NAME EVALUATE @ ; PREFIX IMMEDIATE
>> : ! NAME EVALUATE ! ; PREFIX IMMEDIATE
>> DEFINITINS \ Snap back.
>>
>> VARIABLE AAP
>> 12 !AAP
>> @AAP .
>> 12 OK
>> 13 !AAP
>> @AAP .
>> 13 OK
>>
>> Just saying.
>>
>> (I don't recommend this, by the way.)
>
>AFAICT the majority of HLL's use 'self-fetching' variables. Setting a
Not so algol 68. no l-value and r-values.
real r;
means that r is a name to designate a memory location where a real
can be stored. r is of type "ref real" (5.4 is of type real , really).
If a compiler sees
a := b+c;
It says, hmm a is the place where I can store the result of the calculation.
In b+c it concludes that it cannot add references. So this is
a coercion, forcing dereferencing a and b.
This is a simular situation in the expression 5.1 + 17
There is no module to add a fp to an integer. So 17 is widened to a
fp number.
>variable required something like := which corresponds to forth's TO.
>IMO local variables in forth was less about 'stack juggling' than
>simulating the 'look and feel' code of other languages. Forth locals
>code uses a fair number of TO's. Hugh once suggested locals ought to
>have used @ ! . This would have been very forth-like - but completely
>misses what locals aficionados were trying to do!
>
>For me at least, VALUEs are an 'almost CONSTANT' in which TO rarely gets
>used. Without that distinction I'd find it hard justifying VALUEs - or
>indeed know when to use them. By clearly stating their intent and usage,
>they provide semantic value to written code and the language in general.
>But I'm not sure ANS ever did say - leaving users to muddle it out for
>themselves. Locals' use of 'values' and TO only muddied the waters.
>
>
>
--
The Chinese government is satisfied with its military superiority over USA.
The next 5 year plan has as primary goal to advance life expectancy
over 80 years, like Western Europe.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-05 23:25 +0100
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-05 23:30 +0100
Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-05 17:16 -0700
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-06 19:58 +0100
Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-22 11:13 -0700
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-22 22:05 +0200
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-07 13:23 +0200
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-06 13:51 +0200
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-06 22:20 +0100
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-07 13:35 +0200
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-07 20:55 +0100
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-08 12:34 +0200
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-08 12:32 +0100
Re: Coroutines in Forth Stephen Pelc <stephen@vfxforth.com> - 2026-04-09 10:12 +0000
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-10 19:01 +0200
Re: Coroutines in Forth dxf <dxforth@gmail.com> - 2026-04-11 11:54 +1000
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-05-01 13:07 +0200
Re: Coroutines in Forth peter <peter.noreply@tin.it> - 2026-04-11 09:49 +0200
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-11 22:03 +0200
Re: Coroutines in Forth dxf <dxforth@gmail.com> - 2026-04-12 12:49 +1000
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-12 12:13 +0200
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-12 17:39 +0200
Re: Coroutines in Forth dxf <dxforth@gmail.com> - 2026-04-13 10:54 +1000
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-13 19:24 +0200
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-12 13:48 +0200
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-13 12:13 +0200
Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-22 11:18 -0700
Re: Coroutines in Forth dxf <dxforth@gmail.com> - 2026-04-23 11:13 +1000
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-23 12:37 +0200
Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-24 10:36 -0700
Re: Coroutines in Forth dxf <dxforth@gmail.com> - 2026-04-25 12:12 +1000
Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-24 23:31 -0700
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-25 10:45 +0200
Re: Coroutines in Forth dxf <dxforth@gmail.com> - 2026-04-25 22:06 +1000
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-25 15:11 +0200
Re: Coroutines in Forth dxf <dxforth@gmail.com> - 2026-04-26 13:33 +1000
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-26 16:28 +0200
Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-25 21:46 -0700
FP stack depth limitations (was: Coroutines in Forth) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-26 05:55 +0000
Re: FP stack depth limitations Paul Rubin <no.email@nospam.invalid> - 2026-04-26 00:28 -0700
Re: FP stack depth limitations dxf <dxforth@gmail.com> - 2026-04-26 19:55 +1000
Re: FP stack depth limitations (was: Coroutines in Forth) peter <peter.noreply@tin.it> - 2026-04-26 09:57 +0200
Re: FP stack depth limitations (was: Coroutines in Forth) albert@spenarnc.xs4all.nl - 2026-04-26 14:34 +0200
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-25 15:01 +0200
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-05-01 13:13 +0200
Forth, C, hardware, and programming virtues (was: Coroutines in Forth) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-25 05:26 +0000
Re: Forth, C, hardware, and programming virtues Paul Rubin <no.email@nospam.invalid> - 2026-04-24 23:55 -0700
Re: Forth, C, hardware, and programming virtues anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-25 08:21 +0000
Re: Forth, C, hardware, and programming virtues albert@spenarnc.xs4all.nl - 2026-04-25 11:27 +0200
Re: Forth, C, hardware, and programming virtues Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-25 15:43 +0200
Re: Forth, C, hardware, and programming virtues anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-25 17:21 +0000
Re: Forth, C, hardware, and programming virtues dxf <dxforth@gmail.com> - 2026-04-26 15:21 +1000
Re: Forth, C, hardware, and programming virtues Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-26 15:08 +0200
Re: Forth, C, hardware, and programming virtues albert@spenarnc.xs4all.nl - 2026-04-26 00:34 +0200
Re: Forth, C, hardware, and programming virtues Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-26 15:10 +0200
locals (was: Coroutines in Forth) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-25 04:47 +0000
Re: locals Paul Rubin <no.email@nospam.invalid> - 2026-04-24 23:21 -0700
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-25 06:43 +0000
Re: locals albert@spenarnc.xs4all.nl - 2026-04-25 11:43 +0200
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-25 10:22 +0000
Re: locals peter <peter.noreply@tin.it> - 2026-04-25 16:07 +0200
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-25 17:38 +0200
Re: locals albert@spenarnc.xs4all.nl - 2026-04-26 01:13 +0200
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-26 14:03 +0000
Re: locals peter <peter.noreply@tin.it> - 2026-04-27 09:31 +0200
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-27 07:53 +0000
Re: locals peter <peter.noreply@tin.it> - 2026-04-27 11:52 +0200
Re: locals albert@spenarnc.xs4all.nl - 2026-04-26 00:51 +0200
Re: locals Paul Rubin <no.email@nospam.invalid> - 2026-04-25 22:40 -0700
Re: locals albert@spenarnc.xs4all.nl - 2026-04-26 14:55 +0200
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-26 09:50 +0000
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-26 16:22 +0200
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-26 17:04 +0000
Re: locals dxf <dxforth@gmail.com> - 2026-04-27 11:51 +1000
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-28 08:21 +0200
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-28 08:22 +0200
Re: locals dxf <dxforth@gmail.com> - 2026-04-27 11:12 +1000
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-28 14:34 +0200
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-28 14:34 +0200
Re: locals Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-29 12:44 +0100
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-29 14:37 +0200
Re: locals Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-29 14:44 +0200
Re: locals Paul Rubin <no.email@nospam.invalid> - 2026-05-01 23:50 -0700
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-02 10:34 +0000
Re: locals Paul Rubin <no.email@nospam.invalid> - 2026-05-01 23:54 -0700
Re: locals dxf <dxforth@gmail.com> - 2026-05-02 17:36 +1000
Re: locals Paul Rubin <no.email@nospam.invalid> - 2026-05-02 01:11 -0700
Re: locals anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-02 15:58 +0000
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-07 09:28 -0500
Re: Coroutines in Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-04-07 16:12 +0000
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-07 18:06 -0500
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-08 11:43 +0100
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-08 13:16 +0200
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-08 11:47 -0500
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-08 21:48 +0100
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-09 07:06 -0500
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-09 16:41 +0200
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-09 13:34 -0500
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-10 01:23 +0200
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-09 21:34 -0500
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-09 13:01 +0200
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-09 07:01 -0500
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-09 16:10 +0200
Re: Coroutines in Forth Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-04-09 13:29 -0500
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-08 21:26 +0100
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-08 14:22 +0200
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-28 15:31 +0200
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-29 10:49 +0200
Re: Coroutines in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-29 15:22 +0200
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-08 11:33 +0100
Re: Coroutines in Forth albert@spenarnc.xs4all.nl - 2026-04-08 13:07 +0200
Re: Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-08 22:05 +0100
csiph-web