The stated convention in FigForth is for the user to make vocabularies immediate. Don't know if this was a Fig thing - or derived from
practice at the time. Under FigForth vocabularies automatically chain
to the parent.
Long story short I went back to the FigForth vocabulary scheme. The only departure was chaining. It's not automatic - the user must specify it.
For any FigForth (or variants thereof) users out there, do you use the immediate vocab convention? At the moment I'm reviewing whether I should just make vocabs immediate on creation. Not being a fan of vocabularies
I don't use them much. Hence the question.
practice at the time. Under FigForth vocabularies automatically chain
to the parent.
Long story short I went back to the FigForth vocabulary scheme. The only >departure was chaining. It's not automatic - the user must specify it.
For any FigForth (or variants thereof) users out there, do you use the >immediate vocab convention? At the moment I'm reviewing whether I should >just make vocabs immediate on creation. Not being a fan of vocabularies
I don't use them much. Hence the question.
For any FigForth (or variants thereof) users out there, do you use the immediate vocab convention? At the moment I'm reviewing whether I should just make vocabs immediate on creation.
For any FigForth (or variants thereof) users out there, do you use the
immediate vocab convention? At the moment I'm reviewing whether I should
just make vocabs immediate on creation.
There is hardly any use for non-immediate vocabularies, but AFAIK
the „classic” approach is to leave that decision to the user. So it's
up to him to type VOCABULARY MYVOC IMMEDIATE — or to skip
that „IMMEDIATE” for a particular reason.
In article <uc6jpn$3a4h7$1@dont-email.me>, dxforth <dxforth@gmail.com> wrote:
The stated convention in FigForth is for the user to make vocabularies
immediate. Don't know if this was a Fig thing - or derived from
practice at the time. Under FigForth vocabularies automatically chain
to the parent.
Long story short I went back to the FigForth vocabulary scheme. The only
departure was chaining. It's not automatic - the user must specify it.
For any FigForth (or variants thereof) users out there, do you use the
immediate vocab convention? At the moment I'm reviewing whether I should
just make vocabs immediate on creation. Not being a fan of vocabularies
I don't use them much. Hence the question.
It is not a good idea to refurbish partially.
The Fig vocabularies are usable, and so is the ISO wordlists.
The chaining of Fig is the equivalent functionality of the search-order. Dropping the chaining you miss on functionality without good reason,
but at least you leave it as an option.
There is hardly any use for non-immediate vocabularies, but AFAIKImmediate vocab may have been necessary due to limited search order.
the „classic” approach is to leave that decision to the user. So it's up to him to type VOCABULARY MYVOC IMMEDIATE — or to skip
that „IMMEDIATE” for a particular reason.
For any FigForth (or variants thereof) users out there, do you use the immediate vocab convention?
There is hardly any use for non-immediate vocabularies, but AFAIK
the „classic” approach is to leave that decision to the user. So it's
up to him to type VOCABULARY MYVOC IMMEDIATE — or to skip
that „IMMEDIATE” for a particular reason.
Very likely — but apart of this, somehow I can't imagine at the moment
any valid reason to compile the name of the vocabulary (I mean the one created by the user) into the body of any word. Maybe there can be „invented” one, but rather unusual.
I have used the non-immediate wordlists to create specific search order commands for cross-compilers.
Frog example use of non-immediate vocabulary.I have used the non-immediate wordlists to create specific search order commands for cross-compilers.So that's why it's better to leave that decision to the user. He may need it anyway.
There is hardly any use for non-immediate vocabularies, but AFAIKImmediate vocab may have been necessary due to limited search order.
the „classic” approach is to leave that decision to the user. So it's >>> up to him to type VOCABULARY MYVOC IMMEDIATE — or to skip
that „IMMEDIATE” for a particular reason.
Very likely — but apart of this, somehow I can't imagine at the moment
any valid reason to compile the name of the vocabulary (I mean the one created by the user) into the body of any word. Maybe there can be „invented” one, but rather unusual.
On Thursday, August 24, 2023 at 9:38:30 AM UTC-4, Zbig wrote:
Very likely — but apart of this, somehow I can't imagine at the moment
any valid reason to compile the name of the vocabulary (I mean the one
created by the user) into the body of any word. Maybe there can be
„invented” one, but rather unusual.
I have used the non-immediate wordlists to create specific search order commands for cross-compilers.
Examples:
: HOST
ONLY FORTH ALSO ASSEMBLER ALSO MFORTH ALSO FORTH DEFINITIONS ;
: ASMFORTH
ONLY FORTH ALSO ASSEMBLER ALSO MFORTH DEFINITIONS ;
Later I can make an immediate version of these if I need it.
: [HOST] HOST ; IMMEDIATE
Everyday examples would be LABEL and CODE which must select the ASSEMBLER vocab.
The stated convention in FigForth is for the user to make vocabularies immediate. Don't know if this was a Fig thing - or derived from
practice at the time. Under FigForth vocabularies automatically chain
to the parent.
Long story short I went back to the FigForth vocabulary scheme. The only departure was chaining. It's not automatic - the user must specify it.
For any FigForth (or variants thereof) users out there, do you use the immediate vocab convention? At the moment I'm reviewing whether I should d just make vocabs immediate on creation. Not being a fan of vocabularies
I don't use them much. Hence the question.
I can also attest to the utility of immediate vocabularies in
implementing an assembler for the Intel MCS-48 MCU in days of yore.
E. g, the MOV instruction variants were handily solved by a MOV
vocabulary (e. g. MOV A,T, MOV A,R7, MOV A,#FF MOV A,@R0).
I can't understand why having immediate vocabularies is such aYou might want to work on that :)
big deal.
A proven example:I can't understand why having immediate vocabularies is such aYou might want to work on that :)
big deal.
In article <df78b666-ba63-4bba-a999-f38da675f471n@googlegroups.com>,
Myron Plichota <myronplichota@gmail.com> wrote:
<SNIP>
I can also attest to the utility of immediate vocabularies in
implementing an assembler for the Intel MCS-48 MCU in days of yore.
E. g, the MOV instruction variants were handily solved by a MOV
vocabulary (e. g. MOV A,T, MOV A,R7, MOV A,#FF MOV A,@R0).
I can't understand why having immediate vocabularies is such a
big deal.
...
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote:
A proven example:I can't understand why having immediate vocabularies is such aYou might want to work on that :)
big deal.
\ Bugs18 assembler make script
\ by Myron Plichota myronplichota@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when it
is deemed to be of no further use.
In article <8f22d8e9-f6a9-47c2...@googlegroups.com>,
Myron Plichota <myronp...@gmail.com> wrote:
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote:
A proven example:I can't understand why having immediate vocabularies is such aYou might want to work on that :)
big deal.
\ Bugs18 assembler make script
\ by Myron Plichota myronp...@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when itI misunderstood what I meant. The immediacy of vocabularies is not a big deal.
is deemed to be of no further use.
Of course wordlist/namespace/vocabulary is useful.
Not seeing the assembler words is useful. I go a step further.
E.g. if you load floating point in ciforth, you can load the assembler
in a separate memory area, and then remove them without a trace. It
would be annoying to have the assembler hanging around if you only
want floating point.
none albert schrieb am Montag, 28. August 2023 um 11:12:32 UTC+2:
In article <8f22d8e9-f6a9-47c2...@googlegroups.com>,
Myron Plichota <myronp...@gmail.com> wrote:
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote:I misunderstood what I meant. The immediacy of vocabularies is not a big deal.
A proven example:I can't understand why having immediate vocabularies is such aYou might want to work on that :)
big deal.
\ Bugs18 assembler make script
\ by Myron Plichota myronp...@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when it
is deemed to be of no further use.
Of course wordlist/namespace/vocabulary is useful.
Not seeing the assembler words is useful. I go a step further.
E.g. if you load floating point in ciforth, you can load the assembler
in a separate memory area, and then remove them without a trace. It
would be annoying to have the assembler hanging around if you only
want floating point.
To make it usable, ALSO and PREVIOUS would have to be immediate too, no?
In article <df3fb5d0-e851-40bf-95f0-8dc7a569c7cfn@googlegroups.com>,This must be (of course)
minforth <minforth@arcor.de> wrote:
none albert schrieb am Montag, 28. August 2023 um 11:12:32 UTC+2:
In article <8f22d8e9-f6a9-47c2...@googlegroups.com>,
Myron Plichota <myronp...@gmail.com> wrote:
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote: >>> >> > I can't understand why having immediate vocabularies is such aI misunderstood what I meant. The immediacy of vocabularies is not a big deal.
A proven example:big deal.You might want to work on that :)
\ Bugs18 assembler make script
\ by Myron Plichota myronp...@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when it
is deemed to be of no further use.
Of course wordlist/namespace/vocabulary is useful.
Not seeing the assembler words is useful. I go a step further.
E.g. if you load floating point in ciforth, you can load the assembler
in a separate memory area, and then remove them without a trace. It
would be annoying to have the assembler hanging around if you only
want floating point.
To make it usable, ALSO and PREVIOUS would have to be immediate too, no?
Don't go there. If you have a STRING-VOC vocabulary, with APPEND COUNT etc. >use STRING.APPEND STRING.COUNT etc. Less elegantly STRING. COUNT .
In ciforth with the PREFIX facility this is an easy fix.
: STRING-VOC. STRING NAME EVALUATE PREVIOUS ; PREFIX
(NAME is approximately CHECK-FOR-REFILL BL WORD )--
Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the >hide of the bear until you shot it. Better one bird in the hand than ten in >the air. First gain is a cat spinning. - the Wise from Antrim -
none albert schrieb am Montag, 28. August 2023 um 11:12:32 UTC+2:
In article <8f22d8e9-f6a9-47c2...@googlegroups.com>,
Myron Plichota <myronp...@gmail.com> wrote:
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote: >>>>> I can't understand why having immediate vocabularies is such aI misunderstood what I meant. The immediacy of vocabularies is not a big deal.
A proven example:big deal.You might want to work on that :)
\ Bugs18 assembler make script
\ by Myron Plichota myronp...@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when it
is deemed to be of no further use.
Of course wordlist/namespace/vocabulary is useful.
Not seeing the assembler words is useful. I go a step further.
E.g. if you load floating point in ciforth, you can load the assembler
in a separate memory area, and then remove them without a trace. It
would be annoying to have the assembler hanging around if you only
want floating point.
To make it usable, ALSO and PREVIOUS would have to be immediate too, no?
On 28/08/2023 9:56 pm, minforth wrote:
none albert schrieb am Montag, 28. August 2023 um 11:12:32 UTC+2:
In article <8f22d8e9-f6a9-47c2...@googlegroups.com>,
Myron Plichota <myronp...@gmail.com> wrote:
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote: >>>>> I can't understand why having immediate vocabularies is such aI misunderstood what I meant. The immediacy of vocabularies is not a big deal.
A proven example:big deal.You might want to work on that :)
\ Bugs18 assembler make script
\ by Myron Plichota myronp...@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when it
is deemed to be of no further use.
Of course wordlist/namespace/vocabulary is useful.
Not seeing the assembler words is useful. I go a step further.
E.g. if you load floating point in ciforth, you can load the assembler
in a separate memory area, and then remove them without a trace. It
would be annoying to have the assembler hanging around if you only
want floating point.
To make it usable, ALSO and PREVIOUS would have to be immediate too, no?Under ONLY ALSO scheme immediate vocabulary names could be problematic as they are often combined to represent a search order. The wrapper itself could be made immediate. I consider vocabularies 'a necessary evil' i.e.
a last resort. The less 'stack juggling' the better :)
dxforth schrieb am Dienstag, 29. August 2023 um 04:34:07 UTC+2:
On 28/08/2023 9:56 pm, minforth wrote:
none albert schrieb am Montag, 28. August 2023 um 11:12:32 UTC+2:Under ONLY ALSO scheme immediate vocabulary names could be problematic as
In article <8f22d8e9-f6a9-47c2...@googlegroups.com>,
Myron Plichota <myronp...@gmail.com> wrote:
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote: >>>>>>> I can't understand why having immediate vocabularies is such aI misunderstood what I meant. The immediacy of vocabularies is not a big deal.
A proven example:big deal.You might want to work on that :)
\ Bugs18 assembler make script
\ by Myron Plichota myronp...@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when it
is deemed to be of no further use.
Of course wordlist/namespace/vocabulary is useful.
Not seeing the assembler words is useful. I go a step further.
E.g. if you load floating point in ciforth, you can load the assembler >>>> in a separate memory area, and then remove them without a trace. It
would be annoying to have the assembler hanging around if you only
want floating point.
To make it usable, ALSO and PREVIOUS would have to be immediate too, no?
they are often combined to represent a search order. The wrapper itself
could be made immediate. I consider vocabularies 'a necessary evil' i.e.
a last resort. The less 'stack juggling' the better :)
I prefer proper namespace addressing:
s" Alpha Centauri " STRING::TRIM TYPE Alpha Centauri ok
On 29/08/2023 3:56 pm, minforth wrote:
dxforth schrieb am Dienstag, 29. August 2023 um 04:34:07 UTC+2:
On 28/08/2023 9:56 pm, minforth wrote:
none albert schrieb am Montag, 28. August 2023 um 11:12:32 UTC+2:
In article <8f22d8e9-f6a9-47c2...@googlegroups.com>,
Myron Plichota <myronp...@gmail.com> wrote:
On Sunday, August 27, 2023 at 1:42:22 PM UTC-4, Myron Plichota wrote:I misunderstood what I meant. The immediacy of vocabularies is not a big deal.
A proven example:I can't understand why having immediate vocabularies is such a >>>>>>> big deal.You might want to work on that :)
\ Bugs18 assembler make script
\ by Myron Plichota myronp...@gmail.com
Forth definitions marker -Bugs18
vocabulary Bugs18 immediate Bugs18 definitions
hex
s" target.map" included \ the target MCU attributes
s" Bugs18asm.fs" included \ the structured assembler
s" inherited-subs.map" included \ useful subroutines in the serial bootloader
The dictionary can be purged of the Bugs18 vocabulary by invoking -Bugs18 when it
is deemed to be of no further use.
Of course wordlist/namespace/vocabulary is useful.
Not seeing the assembler words is useful. I go a step further.
E.g. if you load floating point in ciforth, you can load the assembler >>>> in a separate memory area, and then remove them without a trace. It >>>> would be annoying to have the assembler hanging around if you only
want floating point.
To make it usable, ALSO and PREVIOUS would have to be immediate too, no? >> Under ONLY ALSO scheme immediate vocabulary names could be problematic as >> they are often combined to represent a search order. The wrapper itself >> could be made immediate. I consider vocabularies 'a necessary evil' i.e. >> a last resort. The less 'stack juggling' the better :)
I prefer proper namespace addressing:Not sure what you mean. To remove leading/trailing blanks from a string I define a word for that.
s" Alpha Centauri " STRING::TRIM TYPE Alpha Centauri ok
Under ONLY ALSO scheme immediate vocabulary names could be problematic as >they are often combined to represent a search order. The wrapper itself >could be made immediate. I consider vocabularies 'a necessary evil' i.e.
a last resort. The less 'stack juggling' the better :)
STRING::TRIM -> the word is TRIM to be found in the STRING namespace (vocabulary)I prefer proper namespace addressing:Not sure what you mean. To remove leading/trailing blanks from a string I
s" Alpha Centauri " STRING::TRIM TYPE Alpha Centauri ok
define a word for that.
STRING::TRIM is one parsed name without blanks (:: is a separator)But you are aware, that this means nothing more than using very long name? Not having any „namespaces” included one can simply use the names like STRING::TRIM and voila, „look, I use namespaces!”.
STRING::TRIM -> the word is TRIM to be found in the STRING namespace (vocabulary)I prefer proper namespace addressing:Not sure what you mean. To remove leading/trailing blanks from a string I define a word for that.
s" Alpha Centauri " STRING::TRIM TYPE Alpha Centauri ok
STRING::TRIM is one parsed name without blanks (:: is a separator)
But you are aware, that this means nothing more than using very long name? Not having any „namespaces” included one can simply use the names like STRING::TRIM and voila, „look, I use namespaces!”.Pardon me, but this is nonsense. STRING:: affects/improves/focusses the search mechanism.
It is separated and processed from STRING::TRIM by a recognizer.
Consider nested namespaces (wordlists) like I use for linear algebra, you must be hit with a
paddle if you prepend hundreds of words with some lengthy ID string.
Obviously this is all non-standard.
In article <ucjler$22io8$1@dont-email.me>, dxforth <dxforth@gmail.com> wrote:
Under ONLY ALSO scheme immediate vocabulary names could be problematic as
they are often combined to represent a search order. The wrapper itself
could be made immediate. I consider vocabularies 'a necessary evil' i.e.
a last resort. The less 'stack juggling' the better :)
On the contrary. wordlists (namespace, vocabulary) are instrumental for extending the language.
In my recent lisp effort (MAL) i have
- the Forth environment where I compile
- the lisp user interface, behaves like lisp.
- a separate wordlist where I accumulate the words used in lisp,
using the search mechanism present in Forth.
If wordlist were not there, I am obliged to invent them.
But you are aware, that this means nothing more than using very long name? >>> Not having any „namespaces” included one can simply use the names like >>> STRING::TRIM and voila, „look, I use namespaces!”.Pardon me, but this is nonsense. STRING:: affects/improves/focusses the search mechanism.
It is separated and processed from STRING::TRIM by a recognizer.
Having defined such „long-named” word one doesn't need any
particular search mechanism different to the standard one. Such
word simply has different name than others — whether it has two
colons middle of its name or, say, two „A” letters.
Consider nested namespaces (wordlists) like I use for linear algebra, you must be hit with a
paddle if you prepend hundreds of words with some lengthy ID string.
Obviously this is all non-standard.
Long ago, when learning TCL, I quickly realized it's kind od „cheating”. So there's a procedure named, say, ::aaa::bbb::cccc::name, but there
are some „helper procedures” that allow to use (in particular conditions) just the „name”, without the prefix „::aaa::bbb::cccc”.
So in Forth that „helper procedure” is simply the name of particular vocabulary.
STRING::TRIM -> the word is TRIM to be found in the STRING namespace (voca= >bulary)
STRING::TRIM is one parsed name without blanks (:: is a separator)
But you are aware, that this means nothing more than using very long name? >Not having any =E2=80=9Enamespaces=E2=80=9D included one can simply use the=
names like
STRING::TRIM and voila, =E2=80=9Elook, I use namespaces!=E2=80=9D.
In article <ucjler$22io8$1@dont-email.me>, dxforth <dxforth@gmail.com> wrote:
Under ONLY ALSO scheme immediate vocabulary names could be problematic as >>> they are often combined to represent a search order. The wrapper itself >>> could be made immediate. I consider vocabularies 'a necessary evil' i.e. >>> a last resort. The less 'stack juggling' the better :)
On the contrary. wordlists (namespace, vocabulary) are instrumental for
extending the language.
In my recent lisp effort (MAL) i have
- the Forth environment where I compile
- the lisp user interface, behaves like lisp.
- a separate wordlist where I accumulate the words used in lisp,
using the search mechanism present in Forth.
If wordlist were not there, I am obliged to invent them.
You are doing all this because it's necessary - or because you want to?
If the latter, then nobody else is obligated.
Zbig <zbigniew2011@gmail.com> writes:
But you are aware, that this means nothing more than using very long name? >> Not having any =E2=80=9Enamespaces=E2=80=9D included one can simply use the= >> names like
STRING::TRIM and voila, =E2=80=9Elook, I use namespaces!=E2=80=9D.
Yes, that's a traditional Forth technique. However, Joerg Voelker
reported that for his applications, he cannot afford the memory needed
by this technique.
In article <ucm6kk$2f6c1$1@dont-email.me>, dxforth <dxforth@gmail.com> wrote:
On 29/08/2023 6:53 pm, albert wrote:
In article <ucjler$22io8$1@dont-email.me>, dxforth <dxforth@gmail.com> wrote:
Under ONLY ALSO scheme immediate vocabulary names could be problematic as >>>> they are often combined to represent a search order. The wrapper itself >>>> could be made immediate. I consider vocabularies 'a necessary evil' i.e. >>>> a last resort. The less 'stack juggling' the better :)
On the contrary. wordlists (namespace, vocabulary) are instrumental for
extending the language.
In my recent lisp effort (MAL) i have
- the Forth environment where I compile
- the lisp user interface, behaves like lisp.
- a separate wordlist where I accumulate the words used in lisp,
using the search mechanism present in Forth.
If wordlist were not there, I am obliged to invent them.
You are doing all this because it's necessary - or because you want to?
If the latter, then nobody else is obligated.
If you don't want to write programs, you don't need to.
Obviously.
In MAL you start up with a lisp interface and prompt:
"
user>(def! a 2)
2
user>(+ 1 a)
3
user>(forth)
2 CONSTANT a
OK
1 a + .
3 OK
main
user>
"
Hard to do (if near impossible) without name spaces, i.e.
switching the topmost wordlist.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 47:13:57 |
Calls: | 6,710 |
Calls today: | 3 |
Files: | 12,243 |
Messages: | 5,354,492 |
Posted today: | 1 |