forthy42 / gforth

Gforth mirror on GitHub (original is on Savannah)
GNU General Public License v3.0
151 stars 28 forks source link

gforth manual cannot be automatically queried #40

Closed olleharstedt closed 1 year ago

olleharstedt commented 1 year ago

Comparing with php.net, each function has a clear URL, like https://www.php.net/manual/en/function.array-chunk

For gforth, it looks like https://gforth.org/manual/Memory-Blocks.html#index-erase_0028--addr-u-_002d_002d--_0029-core_002dext for the erase word.

This means I cannot create a script to automatically query the meaning of a word.

see does not explain the semantics of a word, so it's not a good alternative (unless you're willing to learn and read assembly, or already know Forth in-depth).

Would you be willing to restructure the gforth manual homepage to allow for IDE-like word lookup in Vim/Emacs?

forthy42 commented 1 year ago

Gforth (development system) itself contains a word help , which allows to look up the definition of a word. It uses a flat text file of the manual, and looks for the markup of word definitions, so yes, it is possible to automatically query the meaning of a word.

We should probably also generate an index, which collects the entry points for all words, so that other IDEs can jump right into web page.

olleharstedt commented 1 year ago

Perfect! Thank you.