I invented prefixes e.g. $ as a loadable extension in order to
run Marcel Hendrix programs. mhx pioneered the use of prefixes.
I didn't want $ in the kernel, because it wasn't even standard
at the time (2000).
In ciforth all numbers and strings are handled by prefixes:
0 1 .. 9 " '
ONLY is a wordlist (OK it is a name of a wordlist) and
contains this stuff. So I can add $ # % as prefixes in
a regular fashion if I make ONLY the wordlist where
definitions are added.
'ONLY >WID CURRENT !
: $ BASE @ >R HEX (NUMBER) R> BASE ! POSTPONE SDLITERAL ;
PREFIX IMMEDIATE 1]
(NUMBER) handles a number from the input stream.
SDLITERAL compiles/interprets a single/double number.
So far so good.
Can I claim compatibility with the 2012 standard (in this
respect) if I supply $ # % as loadable extensions?
Groetjes Albert
1]
PREFIX is a trivial extension. A prefix is found as
it matches the first part of a word.
When the extension is NOT loaded, the text interpreter should<SNIP>
still fulfill § 3.1.4.3 of the standard document IMO. It is a general >requirement (not part of any word set) and stipulates the following
number recognition forms:
When the extension IS loaded, your prefix recognition is part of the >dictionary and standard prefixed number recognition does not come into play
I invented prefixes e.g. $ as a loadable extension in order to
run Marcel Hendrix programs. mhx pioneered the use of prefixes.
I didn't want $ in the kernel, because it wasn't even standard
at the time (2000).
I invented prefixes e.g. $ as a loadable extension in order to
run Marcel Hendrix programs. mhx pioneered the use of prefixes.
I didn't want $ in the kernel, because it wasn't even standard
at the time (2000).
In ciforth all numbers and strings are handled by prefixes:
0 1 .. 9 " '
ONLY is a wordlist (OK it is a name of a wordlist) and
contains this stuff. So I can add $ # % as prefixes in
a regular fashion if I make ONLY the wordlist where
definitions are added.
'ONLY >WID CURRENT !
: $ BASE @ >R HEX (NUMBER) R> BASE ! POSTPONE SDLITERAL ;
PREFIX IMMEDIATE 1]
(NUMBER) handles a number from the input stream.
SDLITERAL compiles/interprets a single/double number.
So far so good.
Can I claim compatibility with the 2012 standard (in this
respect) if I supply $ # % as loadable extensions?
On Monday, December 12, 2022 at 12:25:26 PM UTC-4, none albert wrote:
I invented prefixes e.g. $ as a loadable extension in order to
run Marcel Hendrix programs. mhx pioneered the use of prefixes.
I didn't want $ in the kernel, because it wasn't even standard
at the time (2000).
Not trying to be a pain, but why exactly would it be an issue to
implement $ prefix in the kernel? Aren't there many words defined in
the kernel that are not part of the standard? Does including some
feature that is not standard, make the implementation non-standard? I'm
not following.
Rick C.
In article <ce0ea924-ecba-43a7...@googlegroups.com>,
Lorem Ipsum <gnuarm.del...@gmail.com> wrote:
On Monday, December 12, 2022 at 12:25:26 PM UTC-4, none albert wrote:
I invented prefixes e.g. $ as a loadable extension in order to
run Marcel Hendrix programs. mhx pioneered the use of prefixes.
I didn't want $ in the kernel, because it wasn't even standard
at the time (2000).
Not trying to be a pain, but why exactly would it be an issue toThe computer intelligence Forth (original meaning) was intended to
implement $ prefix in the kernel? Aren't there many words defined in
the kernel that are not part of the standard? Does including some
feature that is not standard, make the implementation non-standard? I'm
not following.
be modular, and introspective, running stand alone on computer.
Each word has a source field pointing at its source, modifying the
source (followed by compilation) should change the word on the fly.
Each word possess a exclusive part of the memory.
That would mean that the startup part of Forth should be minimal,
say initializing registers and setting up virtual memory.
In this vein number handling should be modular and in fact it is.
You can get rid of %1000 numbers to toggle the INVISIBLE bit
in the word %.
Why not implement $ in the kernel?
It has no use in the kernel, and I hate it. So I want to ban
it to a loadable extension.
Many non-standard words in the kernel?
I don't allow words on the kernel that are no use.
It follows that any non-standard words in my kernel are
eminently useful. $ is not one of them.
Does including some feature that is not standard, make the
implementation non-standard?
Of course not. However I don't intend to use that as an excuse
to add the proverbial kitchen sink to a kernel.
I invented prefixes e.g. $ as a loadable extension in order to
run Marcel Hendrix programs. mhx pioneered the use of prefixes.
I didn't want $ in the kernel, because it wasn't even standard
at the time (2000).
In ciforth all numbers and strings are handled by prefixes:
0 1 .. 9 " '
ONLY is a wordlist (OK it is a name of a wordlist) and
contains this stuff. So I can add $ # % as prefixes in
a regular fashion if I make ONLY the wordlist where
definitions are added.
'ONLY >WID CURRENT !
: $ BASE @ >R HEX (NUMBER) R> BASE ! POSTPONE SDLITERAL ;
PREFIX IMMEDIATE 1]
(NUMBER) handles a number from the input stream.
SDLITERAL compiles/interprets a single/double number.
So far so good.
Can I claim compatibility with the 2012 standard (in this
respect) if I supply $ # % as loadable extensions?
As long as one doesn't conflate 'kernel' with 'core' then I don't
see an issue. IMO all that's necessary is to document what steps
a user needs to take to make the system 'standard compliant'.
(TBH ciForth never struck me as a beginner's system and appealsExperience Forthers are not interested in standard compliance?
to the latter will be somewhat lost :)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:12:00 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,091 |