From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Catonano Newsgroups: gmane.lisp.guile.bugs Subject: bug#43372: (help 'NAME) Date: Sun, 13 Sep 2020 12:31:43 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000048f73b05af2f6d4f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31518"; mail-complaints-to="usenet@ciao.gmane.io" To: 43372@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sun Sep 13 12:33:11 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHPJn-00085L-5y for guile-bugs@m.gmane-mx.org; Sun, 13 Sep 2020 12:33:11 +0200 Original-Received: from localhost ([::1]:37676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHPJm-00043l-7K for guile-bugs@m.gmane-mx.org; Sun, 13 Sep 2020 06:33:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHPJe-00043L-DW for bug-guile@gnu.org; Sun, 13 Sep 2020 06:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHPJe-0005Qk-4n for bug-guile@gnu.org; Sun, 13 Sep 2020 06:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHPJe-00084g-1k for bug-guile@gnu.org; Sun, 13 Sep 2020 06:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Catonano Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 13 Sep 2020 10:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43372 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159999312430964 (code B ref -1); Sun, 13 Sep 2020 10:33:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Sep 2020 10:32:04 +0000 Original-Received: from localhost ([127.0.0.1]:49554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHPIi-00083M-4A for submit@debbugs.gnu.org; Sun, 13 Sep 2020 06:32:04 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:58948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHPIg-00082u-GR for submit@debbugs.gnu.org; Sun, 13 Sep 2020 06:32:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHPIf-0003Lg-Ob for bug-guile@gnu.org; Sun, 13 Sep 2020 06:32:01 -0400 Original-Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]:46289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHPIc-0005Jg-2p for bug-guile@gnu.org; Sun, 13 Sep 2020 06:32:01 -0400 Original-Received: by mail-io1-xd33.google.com with SMTP id g7so5762123iov.13 for ; Sun, 13 Sep 2020 03:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Fw9zAoyHSLDpQsNBz3zFTHQaD1Y9A24IUGatyD1T2OY=; b=AUZC04NVO0gPddzADNE3HxinZE/p8rGRsa4rZXnrrW8rLFtadkrcbXDC+Cpl8MOoaS KlOXj4CG4GETWq79z/CJztF0Z9VG3rMdNPP02Z7tNa0+2FCVq8SNE4vXyXOE/LU5DxOJ OTyOBV7UtDKoN0TxFRxyroGWBiPE0HW+wzSDXQXD2pswVWnmdb3DCzO6ggzataaJhrWF 8CzoR1RR+LSdhHD7NeJ0JJt382mkj9FG6AaIuO2CXcVaNQP+yywFqjfr6ZzbNj9J0pGz 9V3vslN3i2DWBWQ3z4E6TWAt56Ftzu8zytXxCCMEgmcY7e/i6E3v8nGS3teXj3noyr8p zuIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Fw9zAoyHSLDpQsNBz3zFTHQaD1Y9A24IUGatyD1T2OY=; b=gUDfylhnwH/UZspc5YI+XnqTu6EI4hJ1w5Wzi8YDxa4c7gGqpdwVLNrcUZH4tGvgq1 WXGMc/mYCLOoDzrBkdJ0bDSPEo+4aAhd00pFqWvNXXAi/WjeVVJsHysXjYRtmRFBfaob rTDSatArhE56IRvkeNTPD+xFDl9vwgJBpwTUMmNLd0+VgET4Occ+JKFxhYzkgJrdrBO2 bWPNvp7dHHvv+7CtZ6RsCPpAWNVobEo13E8ctnS4zgWtNpbXoS+qxFOiSVppXaalNkvj Tah4fBMD6uw7xuSUu6CoYHkPX8whJ5Qq5+TQ6c2ZsaaCzbFvykNvpVHpJSb8KQ/oLaYC 7CXA== X-Gm-Message-State: AOAM533IW/IHDyfhzlIFXEEaxjblSsLDztwOKhyM2HYk0WRUKAOFhB7V 1YJcdUJEVhZ1XgAkCxZDpw8xj7ePAC6gqjXG+Nz7zIwj+A== X-Google-Smtp-Source: ABdhPJzHvh/PfpxE7cAzggyVmFMXp3nx+PKUQF3xmt9ZDeZY3ODUZvWoFOv2md2XICewX5wtoAEnWD/h8BdKxq9WvTc= X-Received: by 2002:a05:6638:c6:: with SMTP id w6mr8984425jao.143.1599993115374; Sun, 13 Sep 2020 03:31:55 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::d33; envelope-from=catonano@gmail.com; helo=mail-io1-xd33.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9884 Archived-At: --00000000000048f73b05af2f6d4f Content-Type: text/plain; charset="UTF-8" the text returned by the help function mentions the option to call (help 'NAME) <-- noice the quote but I'm confused by the behaviour I'm getting on current master (help 'NAME) on a module doesn't work (help 'NAME) on a procedure considers the argument as a module SO what does (help 'NAME)work on ? Let's see a short session to illustrate my point ---------------------------- scheme@(guile-user)> (version) $2 = "3.0.4.38-64c894" -------------------------------- this is the current master on sunday september 13th ---------------------------------------------------------- scheme@(guile-user)> (help '(web client)) Usage: (help NAME) gives documentation about objects named NAME (a symbol) (help REGEXP) ditto for objects with names matching REGEXP (a string) (help 'NAME) gives documentation for NAME, even if it is not an object (help ,EXPR) gives documentation for object returned by EXPR (help (my module)) gives module commentary for `(my module)' (help) gives this text `help' searches among bindings exported from loaded modules, while `apropos' searches among bindings visible from the "current" module. Examples: (help help) (help cons) (help "output-string") Other useful sources of helpful information: (apropos STRING) (arity PROCEDURE) (name PROCEDURE-OR-MACRO) (source PROCEDURE-OR-MACRO) Tools: (backtrace) ;show backtrace from last error (debug) ;enter the debugger (trace [PROCEDURE]) ;trace procedure (no arg => show) (untrace [PROCEDURE]) ;untrace (no arg => untrace all) (OPTIONSET-options 'full) ;display option information (OPTIONSET-enable 'OPTION) (OPTIONSET-disable 'OPTION) (OPTIONSET-set! OPTION VALUE) where OPTIONSET is one of debug, read, eval, print scheme@(guile-user)> ----------------------------- that is, when calling (help '(web client)) I get the same text as if calling (help) with no arguments now let's continue --------------------- scheme@(guile-user)> (help (web client)) (web client) ************ Overview ======== (web client) is a simple HTTP URL fetcher for Guile. In its current incarnation, (web client) is synchronous. If you want to fetch a number of URLs at once, probably the best thing to do is to write an event-driven URL fetcher, similar in structure to the web server. Another option, good but not as performant, would be to use threads, possibly via a thread pool. Usage ===== - Variable: current-http-proxy - Variable: current-https-proxy - Variable: x509-certificate-directory - Function: open-socket-for-uri uri-or-string [#:verify-certificate?] Return an open input/output port for a connection to URI-OR-STRING. When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates. - Function: http-request uri [#:body] [#:verify-certificate?] [#:port] [#:method] [#:version] [#:keep-alive?] [#:headers] [#:decode-body?] [#:streaming?] [#:request] Connect to the server corresponding to URI and ask for the resource, u [...] --------------------- that is, by calling (help (web client)) wito NO quote, I get help about the actual "web client" module Now let's try with procedures ---------------------------------- scheme@(guile-user)> (help car) `car' is a procedure in the (srfi srfi-1) module. - Function: car _ scheme@(guile-user)> (help 'car) While compiling expression: no code for module (quote car) scheme@(guile-user)> ----------------------------------------- So, wrapping up: (help 'NAME) on a module doesn't work (help 'NAME) on a procedure considers the argument as a module For reference, this was briefly discussed in the guile-user mailing list, in this thread https://lists.gnu.org/archive/html/guile-user/2020-09/msg00034.html I hope I made my point clearly Thanks --00000000000048f73b05af2f6d4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
the text returned by the help function mentions the option= to call

(help 'NAME) =C2=A0<-- noice the quote

b= ut I'm confused by the behaviour I'm getting on current master

(help 'NAME) on a module doesn't work
=
(help 'NAME) on a procedure considers the argument as a modu= le

SO what does (help 'NAME)work on ?

Let's see a short session to illustrate my point=

----------------------------
scheme@= (guile-user)> (version)
$2 =3D "3.0.4.38-64c894"
=
--------------------------------

this is the = current master on sunday september 13th

------= ----------------------------------------------------
scheme@(guile= -user)> (help '(web client))
Usage: (help NAME) gives documentati= on about objects named NAME (a symbol)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(help = REGEXP) ditto for objects with names matching REGEXP (a string)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0(help 'NAME) gives documentation for NAME, even if = it is not an object
=C2=A0 =C2=A0 =C2=A0 =C2=A0(help ,EXPR) gives docume= ntation for object returned by EXPR
=C2=A0 =C2=A0 =C2=A0 =C2=A0(help (my= module)) gives module commentary for `(my module)'
=C2=A0 =C2=A0 = =C2=A0 =C2=A0(help) gives this text

`help' searches among bindin= gs exported from loaded modules, while
`apropos' searches among bind= ings visible from the "current" module.

Examples: (help he= lp)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (help cons)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (help "output-string")

Other useful sour= ces of helpful information:

(apropos STRING)
(arity PROCEDURE)(name PROCEDURE-OR-MACRO)
(source PROCEDURE-OR-MACRO)

Tools:
=
(backtrace) ;show backtrace from last error
(debug) ;enter the debug= ger
(trace [PROCEDURE]) ;trace procedure (no arg =3D> show)
(untra= ce [PROCEDURE]) ;untrace (no arg =3D> untrace all)

(OPTIONSET-opt= ions 'full) ;display option information
(OPTIONSET-enable 'OPTIO= N)
(OPTIONSET-disable 'OPTION)
(OPTIONSET-set! OPTION VALUE)
<= br>where OPTIONSET is one of debug, read, eval, print

scheme@(g= uile-user)>
-----------------------------

=

that is, when calling

(help &#= 39;(web client))

I get the same text as if calling=

(help)

with no arguments
now let's continue

--------------= -------
scheme@(guile-user)> (help (web client))

(web c= lient)
************


Overview
=3D=3D=3D=3D=3D=3D=3D=3D
<= br>=C2=A0(web client) is a simple HTTP URL fetcher for Guile.

=C2=A0= In its current incarnation, (web client) is synchronous.=C2=A0 If you
= =C2=A0want to fetch a number of URLs at once, probably the best thing to=C2=A0do is to write an event-driven URL fetcher, similar in structure to<= br>=C2=A0the web server.

=C2=A0Another option, good but not as perfo= rmant, would be to use threads,
=C2=A0possibly via a thread pool.

Usage
=3D=3D=3D=3D=3D

- Variable: current-http-proxy
- Va= riable: current-https-proxy
- Variable: x509-certificate-directory
- = Function: open-socket-for-uri uri-or-string [#:verify-certificate?]
=C2= =A0 =C2=A0 =C2=A0Return an open input/output port for a connection to URI-O= R-STRING.
=C2=A0 =C2=A0 =C2=A0When VERIFY-CERTIFICATE? is true, verify H= TTPS server certificates.

- Function: http-request uri [#:body] [#:v= erify-certificate?] [#:port]
[#:method] [#:version] [#:keep-alive?] [#:h= eaders] [#:decode-body?]
[#:streaming?] [#:request]
=C2=A0 =C2=A0 =C2= =A0Connect to the server corresponding to URI and ask for the
=C2=A0 =C2= =A0 =C2=A0resource, u

[...]

---------------------


that is, b= y calling

(help (web client))

<= /div>
wito NO quote, I get help about the actual "web client"= module



Now let'= s try with procedures

----------------------------= ------
scheme@(guile-user)> (help car)
`car' is a proce= dure in the (srfi srfi-1) module.

- Function: car _

scheme@(g= uile-user)> (help 'car)
While compiling expression:
no code fo= r module (quote car)
scheme@(guile-user)>
------------= -----------------------------


So, w= rapping up:

(help 'NAME) on a module doesn'= ;t work
(help 'NAME) on a procedure considers the argumen= t as a module

For reference, this was briefly disc= ussed in the guile-user mailing list, in this thread
=

I hope I made my point clearly

=
Thanks
--00000000000048f73b05af2f6d4f--