With release v4.4.1 there are a few features which allow documentation to be accessed easily. The "help" procedure is documented on the Gambit wiki here:
http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Documentation:Procedur...
For example, the call (help table->list) will start a browser (the text-only lynx browser by default) which views the section of the Gambit manual documenting the table->list procedure.
There is also a REPL comma command for accessing the documentation. The long form ,(h NAME) will view the procedure or special form NAME. The short form ,h will view the procedure which raised the exception which started the REPL.
The Gambit wiki now contains the documentation for all the Gambit public procedures and special forms. It is currently a copy of the documentation in the Gambit manual. Of course the advantage of the wiki documentation is that it is editable. I'm hoping that people will contribute to the documentation by adding comments, corrections, examples, and information of interest to other users. The plan is to integrate these contributions back to the Gambit manual on a regular basis. Note that the Gambit manual uses the "texinfo" markup language, and for consistency this is also the markup language that the wiki documentation pages use (I wrote a texinfo to HTML plugin for the wiki which handles <texinfo> ... </texinfo> tags). For the integration to go smoothly the user contributions on the wiki should also be in texinfo format.
The Gambit manual in HTML format and the wiki documentation are cross linked. If you click on the procedure or special form name in the HTML Gambit manual you will go to the page on the wiki documenting that procedure or special form. If you click on the name on the wiki you will go to the page in the HTML manual. This is useful when you want to read contextual documentation (like chapter introductions, related procedures, the table of contents, etc).
Marc
Afficher les réponses par date
So I tried the new help procedure but I cant get it to work. Here is my session tryouts:
pavel@dudrenov:~/junk/gambc-v4_4_1$ /usr/local/Gambit-C/bin/gsi Gambit v4.4.1
(help table->list)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR IN (console)@1.1 -- failed to display the document "help" "table->list" "" "Definition_of_table-%3Elist" 1> (help 'table->list) [: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR IN (console)@2.1 -- failed to display the document "help" "table->list" "" "Definition_of_table-%3Elist" 2> ,h 2> 1>
,?
,? : Summary of comma commands ,h | ,(h X) : Help on procedure of last error or procedure/macro named X ,q : Terminate the process ,qt : Terminate the current thread ,t : Jump to toplevel REPL ,d : Jump to enclosing REPL ,c | ,(c X) : Continue the computation with stepping off ,s | ,(s X) : Continue the computation with stepping on (step) ,l | ,(l X) : Continue the computation with stepping on (leap) ,<n> : Move to particular frame (<n> >= 0) ,+ | ,- : Move to next or previous frame of continuation ,y : Display one-line summary of current frame ,i : Display procedure attached to current frame ,b | ,(b X) : Display backtrace of current continuation or X (cont/thread) ,be | ,(be X) : Like ,b and ,(b X) but also display environment ,bed | ,(bed X) : Like ,be and ,(be X) but also display dynamic environment ,e | ,(e X) : Display environment of current frame or X (proc/cont/thread) ,ed | ,(ed X) : Like ,e and ,(e X) but also display dynamic environment ,st | ,(st X) : Display current thread group, or X (thread/thread group) ,(v X) : Start a REPL visiting X (proc/cont/thread)
,(h define-macro)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR -- failed to display the document "help" "define-macro" "" "Definition_of_define-macro"
(help-browser firefox-bin)
*** ERROR IN (console)@6.15 -- Unbound variable: firefox-bin 1> (help-browser 'firefox-bin) *** ERROR IN ##make-parameter -- (Argument 1) STRING expected (help-browser 'firefox-bin) 2> (help-browser "firefox-bin") 2> 1>
,(h define-macro)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR -- failed to display the document "help" "define-macro" "firefox-bin" "Definition_of_define-macro"
(help-browser "firefox") ,(h define-macro)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR -- failed to display the document "help" "define-macro" "firefox" "Definition_of_define-macro"
,(h time)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR -- failed to display the document "help" "time" "firefox" "Definition_of_time"
(help time)
*** ERROR IN (console)@13.7 -- Macro name can't be used as a variable: time
(help 'time)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR IN (console)@14.1 -- failed to display the document "help" "time" "firefox" "Definition_of_time" 1>
(help gensym)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR IN (console)@15.1 -- failed to display the document "help" "gensym" "firefox" "Definition_of_gensym" 1>
Any idea what I'm messing up?
Pavel
On Thu, Feb 12, 2009 at 7:33 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
With release v4.4.1 there are a few features which allow documentation to be accessed easily. The "help" procedure is documented on the Gambit wiki here:
http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Documentation:Procedur...
For example, the call (help table->list) will start a browser (the text-only lynx browser by default) which views the section of the Gambit manual documenting the table->list procedure.
There is also a REPL comma command for accessing the documentation. The long form ,(h NAME) will view the procedure or special form NAME. The short form ,h will view the procedure which raised the exception which started the REPL.
The Gambit wiki now contains the documentation for all the Gambit public procedures and special forms. It is currently a copy of the documentation in the Gambit manual. Of course the advantage of the wiki documentation is that it is editable. I'm hoping that people will contribute to the documentation by adding comments, corrections, examples, and information of interest to other users. The plan is to integrate these contributions back to the Gambit manual on a regular basis. Note that the Gambit manual uses the "texinfo" markup language, and for consistency this is also the markup language that the wiki documentation pages use (I wrote a texinfo to HTML plugin for the wiki which handles <texinfo> ... </texinfo> tags). For the integration to go smoothly the user contributions on the wiki should also be in texinfo format.
The Gambit manual in HTML format and the wiki documentation are cross linked. If you click on the procedure or special form name in the HTML Gambit manual you will go to the page on the wiki documenting that procedure or special form. If you click on the name on the wiki you will go to the page in the HTML manual. This is useful when you want to read contextual documentation (like chapter introductions, related procedures, the table of contents, etc).
Marc
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
On 12-Feb-09, at 6:03 PM, Pavel Dudrenov wrote:
So I tried the new help procedure but I cant get it to work. Here is my session tryouts:
pavel@dudrenov:~/junk/gambc-v4_4_1$ /usr/local/Gambit-C/bin/gsi Gambit v4.4.1
(help table->list)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR IN (console)@1.1 -- failed to display the document "help" "table->list" "" "Definition_of_table-%3Elist"
Seems like your /bin/sh does not support the == operator. Strange! Is this on a Linux system? Which distribution? Which version?
I'm not sure my use of == in ~~bin/gambc-doc.bat is portable. Does anyone have a suggestion for a more portable equality test? Please try this:
In ~~bin/gambc-doc.bat replace the line
if [ "" != "" ]; then
by
if test "" != ""; then
and replace the line
if [ "${GAMBC_DOC_ARG1}" == "help" ]; then
by
if test "${GAMBC_DOC_ARG1}" = "help"; then
Let me know if that works.
Marc
Same thing after the changes, does not work. This is at work on ubuntu distro, Xubuntu 7.10 to be correct. $ uname -a Linux dudrenov 2.6.22-16-generic #1 SMP Mon Jan 26 00:07:52 GMT 2009 i686 GNU/Linux
Interesting after looking at other shell scripts on this system I changed: if [ "${GAMBC_DOC_ARG1}" == "help" ]; then operation_help to: if [ "${GAMBC_DOC_ARG1}" = "help" ]; then operation_help
And it works fine.
I'll try on my gentoo box when I get home and let you know if it works there. Pavel
On Thu, Feb 12, 2009 at 5:18 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
On 12-Feb-09, at 6:03 PM, Pavel Dudrenov wrote:
So I tried the new help procedure but I cant get it to work. Here is my session tryouts:
pavel@dudrenov:~/junk/gambc-v4_4_1$ /usr/local/Gambit-C/bin/gsi Gambit v4.4.1
(help table->list)
[: 73: ==: unexpected operator *** WARNING -- unsupported operation: help *** ERROR IN (console)@1.1 -- failed to display the document "help" "table->list" "" "Definition_of_table-%3Elist"
Seems like your /bin/sh does not support the == operator. Strange! Is this on a Linux system? Which distribution? Which version?
I'm not sure my use of == in ~~bin/gambc-doc.bat is portable. Does anyone have a suggestion for a more portable equality test? Please try this:
In ~~bin/gambc-doc.bat replace the line
if [ "" != "" ]; then
by
if test "" != ""; then
and replace the line
if [ "${GAMBC_DOC_ARG1}" == "help" ]; then
by
if test "${GAMBC_DOC_ARG1}" = "help"; then
Let me know if that works.
Marc
On 12-Feb-09, at 9:03 PM, Pavel Dudrenov wrote:
Same thing after the changes, does not work. This is at work on ubuntu distro, Xubuntu 7.10 to be correct. $ uname -a Linux dudrenov 2.6.22-16-generic #1 SMP Mon Jan 26 00:07:52 GMT 2009 i686 GNU/Linux
Interesting after looking at other shell scripts on this system I changed: if [ "${GAMBC_DOC_ARG1}" == "help" ]; then operation_help to: if [ "${GAMBC_DOC_ARG1}" = "help" ]; then operation_help
And it works fine.
I'll try on my gentoo box when I get home and let you know if it works there. Pavel
Thanks for the feedback. I tried replacing == by = on Mac OS X and it still works fine, so I've put a patch on the repository. I guess the Mac OS X /bin/sh has an extension which allows == in addition to the (older?) = .
Marc
Thanks for the feedback. I tried replacing == by = on Mac OS X and it still works fine, so I've put a patch on the repository. I guess the Mac OS X /bin/sh has an extension which allows == in addition to the (older?) = .
Indeed.
String equality [ "foo" = "foo" ] && echo ok
Number equality [ 1 -eq 1 ] && echo ok
I think there is no reason to have "==", especially as a alias of "=". Should I be an OSX dev, I'd demonstrate for the removal of this from the default shell. Default behaviors must be portable or must not be.</war->.
P!
Cool,
Works now on my home box too.
Pavel
On Thu, Feb 12, 2009 at 6:32 PM, Adrien Piérard pierarda@iro.umontreal.ca wrote:
Thanks for the feedback. I tried replacing == by = on Mac OS X and it still works fine, so I've put a patch on the repository. I guess the Mac OS X /bin/sh has an extension which allows == in addition to the (older?) = .
Indeed.
String equality [ "foo" = "foo" ] && echo ok
Number equality [ 1 -eq 1 ] && echo ok
I think there is no reason to have "==", especially as a alias of "=". Should I be an OSX dev, I'd demonstrate for the removal of this from the default shell. Default behaviors must be portable or must not be.</war->.
P!
-- Français, English, 日本語, 한국어