Digest #291 2025-01-23

Contributions

[373] 2025-01-22 15:36:24 pda wrote:

requestClarification - where definition is compiled?

I couldn't find in any standard (fig-forth, ans...) a definition of the word saying how it is implemented, specially where the definition list of the word created using :NONAME is compiled.

In

:NONAME 2 * ;

where "2 *" is compiled? where in memory is literal 2 and * xt? and how long it will be using that memory? is there any way to free the memory?


[374] 2025-01-22 16:50:21 ruv wrote:

requestClarification - `NAME>STRING` result is transient

15.6.2.1909.40 NAME>STRING says:

The buffer containing c-addr u may be transient and valid until the next invocation of NAME>STRING.

What is the point of allowing the returned string to be in a transient buffer? Which implementation approach benefits from that?

In typical implementations, the lifetime of the returned string is the same as the lifetime of nt.

Replies

[r1413] 2024-12-31 10:48:46 AntonErtl replies:

requestClarification - May `CODE` be a parsing word?

The traditional implementation is to use the Forth parser. But given the specification, how would you detect the difference? So yes, I think that both kinds of implementations are standard-conforming.


[r1414] 2025-01-08 19:05:30 EricDennison replies:

comment - There is error in testing

Should the original (presumably incorrect) version of this test still appear here and at F.6.1.2214 SM/REM ?


[r1415] 2025-01-09 12:02:44 ruv replies:

comment - There is error in testing

This web-page shows the contents of the sections 6.1.2214 and F.6.1.2214 in Forth-2012 (pdf) (see also Intro). If this content is changed, it will no longer reflect Forth-2012. I think that only a web-page with erratum (or a special comment in each web-page) can be added to Forth-2012 and here.

See also the issue: Support several versions of the standard in parallel.


[r1416] 2025-01-18 03:42:19 ashleyf replies:

example -

Or perhaps N buffer: counts counts N erase