Digest #270 2024-07-27

Contributions

[351] 2024-07-25 16:53:47 TammoFreese wrote:

referenceImplementation - Reuse a test for SOURCE as a starting point for a reference implementation

One of the tests of SOURCE (the word GS4) discards the remainder of the parse area using SOURCE >IN ! DROP. Making it immediate may be enough to make it a reference implementation for the backslash word:

: \ SOURCE >IN ! DROP ; IMMEDIATE

Replies

[r1266] 2024-07-11 12:53:42 ruv replies:

comment - SAVE-INPUT

 : EXECUTE-PARSING ROT ROT SAVE SET-SRC CATCH RESTORE THROW ;

The standard does not allow save-input and restore-input to be used this way, because the identity of the input source on restore-input will not be the same as on save-input (but it shall be the same).

not having REFILL and line by line compilation is too revolutionary.

Not quite. When the input source is a buffer, refill loads the next buffer (not the next line). When the input source is a multiline string, refill does almost nothing (see also my proposal for "\").

So, not having "line by line compilation" is not something revolutionary.