bug#71300: [PATCH v4] doc: Document SRFI 64.

2024-09-29 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language

>> Based on this I believe it describes the specification.
>
>That's correct. It's been slightly modified in places where it said
>things like "left to the implementation" and I was able to verify what
>the current implementation in Guix does.

I assume Guix->Guile.

This modification of “left to the implementation” -> “what Guile does” is 
problematic, since it misleads readers into thinking this is the standard 
behaviour (it is after all named SRFI 64, not GRFI 64).

“What Guile does” is also important information to have.

To avoid this problem, when it documents a choice made by Guile, it should 
indicate in some way that this is Guile behaviour.
(E.g.: “It is left to the implementation what happens when A. Guile chooses to 
B.”, or “It is left to the implementation what happens when A. Guile currently 
chooses to B, but may choose differently in future versions.”)

>> I think either of those is fine (albeit describing the Guile's flavor
>> would be preferred), but is should be stated (that the behavior
>There's not really a Guile flavor; it's more like the reference
implementation flavor ;-).  The one in Guile is pretty stock.

Then Guile flavour is stock flavour, and stock flavour isn’t specification 
vanilla. From what I’ve heard, it’s not just sprinkles added to vanilla, it 
also has bugs (not the crunchy food kind).

>> described by the manual does not match the implementation shipped).
>I'd consider different behavior in the implementation compared to the
specification bugs.

See response by Taylan Kammer.

Best regards,
Maxime Devos


bug#73561: Couple of typos in the documentation

2024-09-29 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
Package: guile
Version: 3.0.10
Severity: minor
Tags: patch

There are a couple typos of missing brackets/parentheses in the documentation 
(for example in the PDF on page 127 under integer-expt or in the first code 
block of page 601).

As I don't know texinfo (only (La)TeX), I don't know if this patch is correct, 
but at least it should be trivial for someone who knows what they're doing to 
write a correct one based on it:

>From 60f0c00557603bbfbc018c9ae37b55754d5d2c3e Mon Sep 17 00:00:00 2001
From: Matthias Kaak 
Date: Sun, 29 Sep 2024 21:01:00 +
Subject: [PATCH] Fixed a couple of typos in the documentation

* doc/ref/api-data.texi: Added missing brackets of exponents in math
  mode
* doc/ref/api-io.texi: Added missing brackets of exponents in math mode
* doc/ref/srfi-modules.texi: Added missing closing parenthesis

Signed-off-by: Matthias Kaak 
---
 doc/ref/api-data.texi | 8 
 doc/ref/api-io.texi   | 2 +-
 doc/ref/srfi-modules.texi | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index b2473d1f9..d089b355a 100644
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -214,8 +214,8 @@ rational is also real, and every real number is also a 
complex number
 In addition to the classification into integers, rationals, reals and
 complex numbers, Scheme also distinguishes between whether a number is
 represented exactly or not.  For example, the result of
-@m{2\sin(\pi/4),2*sin(pi/4)} is exactly @m{\sqrt{2},2^(1/2)}, but Guile
-can represent neither @m{\pi/4,pi/4} nor @m{\sqrt{2},2^(1/2)} exactly.
+@m{2\sin(\pi/4),2*sin(pi/4)} is exactly @m{\sqrt{2},2^{1/2}}, but Guile
+can represent neither @m{\pi/4,pi/4} nor @m{\sqrt{2},2^{1/2}} exactly.
 Instead, it stores an inexact approximation, using the C type
 @code{double}.
 
@@ -1721,7 +1721,7 @@ when @var{count} is negative.  This is an ``arithmetic'' 
shift.
 
 @deffn {Scheme Procedure} round-ash n count
 @deffnx {C Function} scm_round_ash (n, count)
-Return @math{round(n * 2^count)}.
+Return @math{round(n * 2^{count})}.
 @var{n} and @var{count} must be exact integers.
 
 With @var{n} viewed as an infinite-precision twos-complement
@@ -1781,7 +1781,7 @@ zero bit in twos complement form.
 Return @var{n} raised to the power @var{k}.  @var{k} must be an exact
 integer, @var{n} can be any number.
 
-Negative @var{k} is supported, and results in @m{1/n^|k|, 1/n^abs(k)}
+Negative @var{k} is supported, and results in @m{1/n^{|k|}, 1/n^{abs(k)}}
 in the usual way.  @math{@var{n}^0} is 1, as usual, and that includes
 @math{0^0} is 1.
 
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 79bc9e9d6..a53e1555f 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -1096,7 +1096,7 @@ See also @ref{Ports and File Descriptors, open}, for an 
interface
 to the Unix @code{open} system call.
 
 All file access uses the ``LFS'' large file support functions when
-available, so files bigger than 2 gibibytes (@math{2^31} bytes) can be
+available, so files bigger than 2 gibibytes (@math{2^{31}} bytes) can be
 read and written on a 32-bit system.
 
 Most systems have limits on how many files can be open, so it's
diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
index 02da3e2f2..6d4d233b7 100644
--- a/doc/ref/srfi-modules.texi
+++ b/doc/ref/srfi-modules.texi
@@ -550,7 +550,7 @@ following shows a list reversal and the calls it makes,
 
 (cons 1 '())
 (cons 2 '(1))
-(cons 3 '(2 1)
+(cons 3 '(2 1))
 @result{} (3 2 1)
 @end example
 
-- 
2.45.2


(PS: The bug-reporting documentation under 
https://debbugs.gnu.org/Reporting.html and 
https://www.gnu.org/software/guile/contribute/ contradict each other about 
which e-mail address this report should be sent to.  I hope I choose the/a 
correct one.)