2026-06-14 08:13:16 lofty: what editor are you using? 2026-06-14 09:09:08 xentrac: VS Code 2026-06-14 11:14:20 https://gist.github.com/Ravenslofty/92c4908a7d6e8eff6a62a71e04a74913 <-- so, I ended up adding yet another stack to forth; a position stack that the position functions work on. this turns out to make the code substantially nicer than passing a position around everywhere ^^;; 2026-06-14 13:15:14 $ ./test.fs 2026-06-14 13:15:14 in file included from *OS command line*:-1 2026-06-14 13:15:15 $7F5D31A11A08 throw 2026-06-14 13:15:26 Why they didn't think about shebang? 2026-06-14 13:28:17 Who's "they"? 2026-06-14 13:29:38 Wikipedia's article on the Bourne shell says that "#" as a comment character comes from UNIX System III in 1981, so I don't think Moore was thinking of it :p 2026-06-14 15:08:15 lofty, gforth authors. They could make an exception for she-bang even if forth normal comment is backslash 2026-06-14 15:08:41 `#! /usr/bin/env gforth` 2026-06-14 15:08:50 Other languages tend to add special case # as comment if it's first line 2026-06-14 15:16:25 you have to separate the shebang from the binary path and then it works 2026-06-14 15:18:42 $ ./test.fs 2026-06-14 15:18:42 Hello world! 2026-06-14 15:18:53 #! /usr/bin/env gforth 2026-06-14 15:18:53 \ Use gforth 0.7.3 to run 2026-06-14 18:49:44 I am sure you can add this to Forth. 2026-06-14 19:18:54 lofty: surely it's not harder to change the font of some text in VS Code than it is in Emacs? 2026-06-14 22:46:24 Hi. I was looking at COUNT (https://forth-standard.org/standard/core/COUNT) and it mentions the term "character string specification". I couldn't find this term defined in the spec though. Did I miss it, perhaps by another name? 2026-06-14 23:03:17 Ok, I found "character string" in Chapter 2. I'm still confused though. Does the standard have terms to distinguish between 1) a counted string in memory (i.e. a char for the length followed by the char data), and 2) a counted string on the stack (i.e. a *cell* for the length, with a pointer to the char data under it)? 2026-06-14 23:08:53 Not that I'm aware of; these are both "counted strings" 2026-06-14 23:12:20 no, a counted string is #1 2026-06-14 23:12:57 #2, two values on the stack (a pointer to the char data and a length) is never called a "counted string" in the standard 2026-06-14 23:13:17 I think I might have misinterpreted what oak said 2026-06-14 23:14:02 this is explained in https://forth-standard.org/standard/notation 2026-06-14 23:14:27 counted string: A data structure consisting of one character containing a length followed by zero or more contiguous data characters. Normally, counted strings contain text. 2026-06-14 23:14:54 The standard seems to just refer to #2 as "c-addr u" format 2026-06-14 23:15:04 right 2026-06-14 23:15:21 it would be helpful to have a term for it I think 2026-06-14 23:16:25 because of course you could have a situation where you have a c-addr on the stack with an unsigned number on top of it where the unsigned number is not the length of a string beginning at the c-addr 2026-06-14 23:19:22 I think it would be even better to just not have counted strings (according to the standard definition) at all. they're a pain in the ass, and they're a big source of confusion for new Forthers 2026-06-14 23:19:52 I think the standard is definitely moving in that direction 2026-06-14 23:20:38 it's moving in the direction of not having to use them (for example with the addition of find-name) but not in the direction of removing the existing standardized words that use them