bug#16363: interactive use subject to compiler limitations

2014-01-05 Thread Zefram
no-auto-compile t2 5 $ guile-2.0 t2 ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/zefram/usr/guile/t2 ;;; WARNING: compilation of /home/zefram/usr/guile/t2 failed: ;;; ERROR: build-constant-store: unr

bug#16364: auto-compile noise can't be avoided by script

2014-01-05 Thread Zefram
to-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/zefram/usr/guile/t0 ;;; WARNING: compilation of /home/zefram/usr/guile/t0 failed: ;;; ERROR: #. read expansion found and read-eval? is #f. hello world $ I can turn

bug#16359: "guild list" lists nothing

2014-01-05 Thread Zefram
ed in the guile documentation are actually available, despite not being listed. This is guile-2.0.9 on Debian. Debian incarnation of this bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734313 -zefram

bug#16361: compile cache confused about file identity

2014-01-05 Thread Zefram
;)' >t13 $ echo '(display "bbb\n")' >t14 $ guile-2.0 t13 ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/zefram/usr/guile/t13 ;;; compiled /home/zefram/.cache/guile/ccache

bug#16357: insufficient print abbreviation in error messages

2014-01-05 Thread Zefram
an incarnation of this bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734128 -zefram

bug#16358: combinatorial explosion in elided stack trace

2014-01-05 Thread Zefram
: ?: 3 [primitive-load "/home/zefram/usr/guile/t6"] In ice-9/eval.scm: 387: 2 ^Z zsh: suspended guile-2.0 --no-auto-compile t6 $ jobs -l [1] + 32574 suspended guile-2.0 --no-auto-compile t6 $ ps vw 32574 PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND 32574 pts/5T

bug#16356: doc out of date about (integer? +inf.0)

2014-01-05 Thread Zefram
N doesn't fit. Scheme's "complex" is similarly extended relative to the mathematical complex numbers, but the mathematical term "hypercomplex" unfortunately refers to something quite different (quaternions and the like). -zefram

bug#16360: "guild help COMMAND" crashes

2014-01-05 Thread Zefram
: 788: 1 [call-with-input-file #f ...] In unknown file: ?: 0 [open-file #f "r" #:encoding #f #:guess-encoding #f] ERROR: In procedure open-file: ERROR: Wrong type (expecting string): #f $ This is guile-2.0.9 on Debian. Debian incarnation of this bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734314 -zefram

bug#16365: (* 0 +inf.0) rationale is flawed

2014-01-05 Thread Zefram
ich is what the flonum indefinite `infinity' really represents.) -zefram

bug#16362: compiler disrespects referential integrity

2014-01-05 Thread Zefram
to disable. ;;; compiling /home/zefram/usr/guile/t9 ;;; compiled /home/zefram/.cache/guile/ccache/2.0-LE-8-2.0/home/zefram/usr/guile/t9.go (5 . 2) (5 . 2) $ guile-2.0 t9 (5 . 2) (5 . 2) In the test case, the explicitly-constructed pair aaa is conflated with the pair literal (1 . 2), and so the ru

bug#16362: compiler disrespects referential integrity

2014-01-15 Thread Zefram
h between actual literal pairs (that can be merged) and non-literals whose distinct identity needs to be preserved. This might well be painful to add to your existing code, given the way you represent pairs. But that's a difficulty with the specific implementation, not an inherent limitation of compilation. -zefram

bug#16363: interactive use subject to compiler limitations

2014-01-15 Thread Zefram
way from script execution. In that case, either the REPL should perform the same fallback that script execution does (as I originally suggested on this ticket), or script execution should not perform the fallback. -zefram

bug#16362: compiler disrespects referential integrity

2014-01-15 Thread Zefram
ments. Presumably you already have that solved in order to compile code that contains function definitions. Aside from that it's all ordinary Lisp objects that look totally serialisable. What do you think is the difficult part? -zefram

bug#16464: + folding differs between compiler and interpreter

2014-01-16 Thread Zefram
xpt 2.0 -53) 1.0) $10 = 1.0002 fl+'s behaviour is not a bug. The R6RS ideal is clearly not mandatory, and the Guile documentation makes no stronger claim than that its fl+ conforms to R6RS. As it is consistent between compiler and interpreter, it is not subject to the concern that I'm raising in this ticket about the generic +. -zefram

bug#16364: auto-compile noise can't be avoided by script

2014-01-17 Thread Zefram
e then a "newer than" banner is emitted. With the environment variable set the cached version will never be updated, nor will it be deleted, so the banner then appears on every execution. -zefram

bug#16361: compile cache confused about file identity

2015-05-13 Thread Zefram
at on the cached file. Although not quite as effective as a hash comparison, it would be a huge practical improvement over the current filename-and-inexact-mtime comparison. -zefram

bug#20822: environment mangled by locale

2015-06-15 Thread Zefram
nsible to offer some explicit control over the encoding to be used with the environment, just as I/O ports have a concept of per-port selected encoding. The same issue applies to other environment access functions too. For setenv the corresponding problem is the inability to *write* an arbitrary octet string to an environment variable. Obviously all the functions should have mutually consistent behaviour. -zefram

bug#20823: argv mangled by locale

2015-06-15 Thread Zefram
ed by locale" mostly apply here too, with a slight change: it seems necessary to store the original octet strings and decode at the time program-arguments is called. With that change, the decoding can be responsive to setlocale (and in particular can reliably use ISO-8859-1 in the absence of setlocale). -zefram

bug#21883: unnecessary bit shifting range limits

2015-11-11 Thread Zefram
(- (integer-length v))) (if (< v 0) -1 0)) (else (ash v s -zefram

bug#21894: escape continuation doc wrong about reinvokability

2015-11-12 Thread Zefram
ation's extent, even if the continuation's extent is still in progress in its original thread and the continuation has never been invoked. -zefram

bug#21897: escape continuation passes barrier

2015-11-12 Thread Zefram
is false in this case. I think a continuation barrier should block the use of the call/ec continuation. -zefram

bug#21899: let/ec continuations not distinct under compiler

2015-11-12 Thread Zefram
It also only happens when compiling, not when interpreting: scheme@(guile-user)> ,o interp #t scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (be 2) $7 = (a (b 2)) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (let/ec be (ae 2) $8 = (a 2) scheme@(guile-user)> (list 'a (let/ec ae (list 'b (ae 2 $9 = (a 2) -zefram

bug#21900: map is not continuation-safe

2015-11-13 Thread Zefram
y in Guile 1.8. -zefram

bug#21901: bit shift wrong on maximal right shift

2015-11-13 Thread Zefram
lem with a 2^63 bit shift. My bug does occur with the rnrs bitwise-arithmetic-shift-right, which was used in #14864, as well as with ash. -zefram

bug#21902: doc incorrectly describes Julian Date

2015-11-13 Thread Zefram
es to UTC should instead be to "UT", the wider class of closely-matching time scales of which UTC is one representative. Also, in the first sentence of this doc section, the phrase "universal time (UTC)" should be either "universal time (UT)" or (more likely) "coordinated universal time (UTC)". -zefram

bug#21903: date->string duff ISO 8601 negative years

2015-11-13 Thread Zefram
"~4") $1 = "-4714-11-24T12:00:00Z" The date in question, the JD epoch, is 24 November 4714 BC (in the proleptic Gregorian calendar). In ISO 8601 format, that year is properly represented as "-4713", not "-4714", because ISO 8601 uses the AD era exclusively. 4714 BC = AD -4713. -zefram

bug#21904: date->string duff ISO 8601 format for non-4-digit years

2015-11-13 Thread Zefram
->string (julian-day->date 1 0) "~1") $8 = "269078-08-07" For year numbers 1 and above, it is necessary to use more than four digits for the year, and that's permitted, but ISO 8601 requires that more than four digits are preceded by a sign. For positive year numbers the sign must be "+". So one should write "+22666" rather than "22666", for example. The formatting of year numbers for ISO 8601 purposes is currently only correct for numbers -1000 and lower (though the choice of number is off by one) and for year numbers 1000 to inclusive. -zefram

bug#21906: julian-day->date negative input breakage

2015-11-13 Thread Zefram
$4 = # Observe the various erroneous field values: negative hour, negative day-of-month, zero month. These occur in general for various negative JD inputs. Not only should the conversion not produce these kinds of values, the date structure type probably ought to reject them if they get that far. -zefram

bug#21907: date->string duff ISO 8601 zone format

2015-11-13 Thread Zefram
rror when trying to represent a zone offset that's not an integral minute. Incidentally, for offsets of -1 to -59 inclusive, the truncation isn't clearing the negative sign, so is producing the invalid output "-". The zero offset is required to be represented with a "+" sign. If you take the rounding option described above, anything that rounds to a zero-minutes offset must yield "+00:00" in the output. -zefram

bug#21911: TAI-to-UTC conversion leaps at wrong time

2015-11-13 Thread Zefram
ent of the leap being misinterpreted as a time-tai seconds value. The UTC-to-TAI conversion is in better shape. As a result, time-tai->time-utc and time-utc->time-tai are not inverses during the 35 second erroneous period. Round-tripping through the two conversions produces an output not matching the input. -zefram

bug#21912: TAI<->UTC conversion botches the unknown

2015-11-13 Thread Zefram
ere will be no leaps at all beyond the historically-scheduled ones that it knows about. Guile ought to be aware of how far its leap table extends, and signal an error when asked to perform a TAI<->UTC conversion that falls outside its scope. -zefram

bug#21915: write inconsistent about #nil

2015-11-13 Thread Zefram
ever is done, even if it's to endorse the inconsistency, the behaviour should be documented, with rationale. -zefram

bug#22033: time-utc format is lossy

2015-11-27 Thread Zefram
t;) Observe that the second immediately following the leap second, the first second of the following UTC day, isn't round-tripped correctly. It comes back as the leap second. These two seconds are perfectly distinct parts of the UTC time scale, and the time-utc format ought to preserve their distinction. -zefram

bug#22034: time-utc->date shows bogus zone-dependent leap second

2015-11-27 Thread Zefram
The faulty output is always 23:59:60 in the output zone. Matching up with this, the actual leap second is never correctly described with a non-zero zone offset. It should be, for example, 00:59:60+01:00. However, probing for this side of the problem also runs into the round-tripping failure that I described in bug#22033. -zefram

bug#22901: drain-input doesn't decode

2016-03-03 Thread Zefram
on the other hand, it is decided to endorse the current non-decoding behaviour, then the break of abstraction needs to be documented. -zefram

bug#22902: GUILE_INSTALL_LOCALE not equivalent to setlocale

2016-03-03 Thread Zefram
am not attempting to use it myself, despite the scenario implied by the above test cases. I think it's a bloody stupid mechanism, imposing on the program something that needs to be under the program's control, and which previously was. I'm actually investigating how to make programs cope with the unpredictable situation caused by this mechanism with the unpredictable environment setting. -zefram

bug#22905: GUILE_INSTALL_LOCALE produces unavoidable noise

2016-03-04 Thread Zefram
ning. However, if it is deemed to be essential that Guile attempt the implicit setlocale and gripe about its failure, then the message should not precede or otherwise mix with the actual program run. The message should be emitted *instead of* running the program, declaring the absolute incompatibility of the Guile framework with this environmental condition. -zefram

bug#22910: read-only setlocale has side effect

2016-03-04 Thread Zefram
ding. Non-primordial ports opened before or after the setlocale call are not affected. -zefram

bug#22910: read-only setlocale has side effect

2016-03-04 Thread Zefram
that it does so, this really amounts to setting the encoding before every I/O operation. -zefram

bug#20822: environment mangled by locale

2016-03-04 Thread Zefram
to determine encoding for all environment access. The latter would match the encoding model used by ports. -zefram

bug#20823: argv mangled by locale

2016-03-04 Thread Zefram
l of encoding will be necessary. -zefram

bug#22913: filenames mangled by locale

2016-03-04 Thread Zefram
file that exists] Obviously, even if a program could turn off the locale mangling in general, this instance of it occurs too early for the program to avoid. The guile framework itself has acquired the kind of 8-bit-cleanliness bug that it is imposing on the programs that it interprets. -zefram

bug#16357: insufficient print abbreviation in error messages

2016-06-21 Thread Zefram
r to get access. Lazy loading sounds like a bad idea. Error handling is a bad place to attempt something that complex and failure-prone. -zefram

bug#16365: (* 0 +inf.0) rationale is flawed

2016-06-21 Thread Zefram
l. The case I originally raised, (* 0 +inf.0), is one for which R6RS offers the choice. -zefram

bug#20823: argv mangled by locale

2016-06-24 Thread Zefram
ecoding via the selected locale does not suffice, because there's no guarantee that there'll be a locale with a cooperative encoding. -zefram

bug#21899: let/ec continuations not distinct under compiler

2016-06-24 Thread Zefram
really easy to trigger within that: scheme@(guile-user)> (let ((x (list 'a)) (y (list 'a))) (eq? x y)) $1 = #f scheme@(guile-user)> (let* ((x (list 'a)) (y (list 'a))) (eq? x y)) $2 = #t scheme@(guile-user)> (let ((x (list 'a))) (let ((y (list 'a))) (eq? x y))) $3 = #t -zefram

bug#21899: let/ec continuations not distinct under compiler

2016-06-24 Thread Zefram
One more variant: scheme@(guile-user)> (let ((x (list 'a))) (eq? x (list 'a))) $1 = #t scheme@(guile-user)> ,opt (let ((x (list 'a))) (eq? x (list 'a))) $2 = (let ((x (list 'a))) (eq? x x)) -zefram

bug#21902: doc incorrectly describes Julian Date

2016-06-24 Thread Zefram
Andy Wingo wrote: >Would you like to propose a specific patch to the documentation? Sure. Patch attached. -zefram --- a/doc/ref/srfi-modules.texi 2014-03-20 20:21:21.0 + +++ b/doc/ref/srfi-modules.texi 2016-06-24 18:57:59.088243245 +0100 @@ -2461,8 +2461,8 @@ @cindex UTC @cin

bug#20822: environment mangled by locale

2016-06-26 Thread Zefram
specifies its own encoding.) The program could be env(1), not interpreting the environment but needing to output the octets correctly. The program could be saving an uninterpreted environment, for a cron job to later run some other program with equivalent settings. -zefram

bug#22905: GUILE_INSTALL_LOCALE produces unavoidable noise

2016-08-07 Thread Zefram
n decide to abort rather than continue with faulty output, would be another middle way. -zefram

bug#24186: setlocale can't be localised

2016-08-08 Thread Zefram
ey expected to manually save and restore port encodings around setlocale calls? (This is complicated by set-port-encoding! not accepting #f as an encoding value, despite it actually being a permitted value for the encoding slot.) Some example code equivalent to the above call-with-locale would be useful. -zefram

bug#22905: GUILE_INSTALL_LOCALE produces unavoidable noise

2016-08-08 Thread Zefram
portable back to Guile versions lacking the new function, by using cond-expand, false-if-exception, or other metaprogramming facilities. -zefram

bug#24186: setlocale can't be localised

2016-08-08 Thread Zefram
orts that are automatically opened at program initialisation can be set to #:locale-at-io, and setlocale now doesn't directly set the encoding of any port. If the user calls setlocale without otherwise controlling port encoding then the locale controls the encoding of the primordial ports. I expect that's the effect that the setlocale code was aiming for, given that when setlocale is called it's too late to affect the opening of the primordial ports. -zefram

bug#24186: setlocale can't be localised

2016-08-09 Thread Zefram
e it under the name "libgc". So I've now got 2.1.3 running. All of the code in my day-of-week-string-for-locale sketch works exactly the same on 2.1.3 as it did on 2.0. -zefram

bug#22905: GUILE_INSTALL_LOCALE produces unavoidable noise

2016-08-09 Thread Zefram
LOCALE=0\n!#\n" immediately following the program's initial #!...!# block. This is ignored as a comment by older Guile versions. The semantic on newer versions would be that the setting given there (which may be 0 or 1) determines conclusively whether the implicit setlocale happens. The environment variable would take effect as it currently does only for programs not containing this kind of setting. -zefram

bug#20823: argv mangled by locale

2016-08-14 Thread Zefram
ategy. These two fluids together would control the encoding and decoding for all operations that currently apply the locale encoding to arbitrary data. (Decoding locale-supplied messages is a different matter.) -zefram

bug#24186: setlocale can't be localised

2016-10-11 Thread Zefram
or the foreseeable future, and it needs to be shorn of its unwanted side effects. -zefram

bug#26149: SRFI-19 doc erroneously warns about Gregorian reform

2017-03-17 Thread Zefram
hould be credited to SRFI-19 (the standard), not to the code. -zefram

bug#26151: date-year-day screws up leap days prior to AD 1

2017-03-17 Thread Zefram
7;s (lack of) text on this matter? You should consider the possibility of changing your implementation to use the conventional astronomical year numbering in this slot. -zefram

bug#26162: time-duration screws up negative durations

2017-03-18 Thread Zefram
for the second would be # or possibly, at a stretch, # (SRFI-19 isn't clear about which way it's meant to be normalised. Having the nanoseconds field always non-negative is less surprising and easier to maintain through computation.) -zefram

bug#26163: time-difference doesn't detect error of differing time types

2017-03-18 Thread Zefram
le documentation says the arguments "must be" of the same type. It would be very easy for time-difference to detect and signal this error. It's not absolutely a bug that it currently doesn't, but it would be a useful improvement if it did. -zefram

bug#26164: time-difference mishandles leap seconds

2017-03-18 Thread Zefram
seconds. It is not somehow squeezed into two UTC seconds. -zefram

bug#26165: date-week-day screws up prior to AD 1

2017-03-18 Thread Zefram
ons for some earlier years once the above is fixed. -zefram

bug#26165: date-week-day screws up prior to AD 1

2017-03-18 Thread Zefram
I wrote: >written to perform divisions with quotient where it obviously needs >modulo. Oops, thinko there. It needs floor-quotient, the quotient-like function that uses floor rounding. modulo is the *remainder*-like function that uses floor rounding. -zefram

bug#26182: cond-expand doc omits guile-2.2 feature

2017-03-19 Thread Zefram
. Since the documentation's list is otherwise complete, presumably it is intended to be a complete list, and the omission of this feature from the list is a mistake. In any case, it would be helpful to list it. -zefram

bug#26259: ~f SRFI-19 format broken for small nanoseconds values

2017-03-25 Thread Zefram
g this requires not using any formatting mechanism that would ever resort to exponent notation for values in the relevant range. -zefram

bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value

2017-03-25 Thread Zefram
ation of ~f, but with that example it does at least seem clear that there should be no padding there. -zefram

bug#26261: ~N mishandles small nanoseconds value

2017-03-25 Thread Zefram
)> (date->string (make-date 5 34 12 26 3 2017 0) "~N") $5 = "" scheme@(guile-user)> (date->string (make-date 2 5 34 12 26 3 2017 0) "~N") $6 = "2" The padding clearly has to be to the full nine digits. -zefram

bug#26329: monotonic time not supplied by current-time

2017-04-01 Thread Zefram
r operations: scheme@(guile-user)> (eqv? time-tai time-monotonic) $4 = #f scheme@(guile-user)> (julian-day->time-tai 245) $5 = # scheme@(guile-user)> (julian-day->time-monotonic 245) $6 = # -zefram

bug#26149: SRFI-19 doc erroneously warns about Gregorian reform

2017-04-19 Thread Zefram
Andy Wingo wrote: >This makes sense to me, FWIW. Patch attached. -zefram >From 444703940983d559935c4dd2a2c89d7888c67119 Mon Sep 17 00:00:00 2001 From: Zefram Date: Wed, 19 Apr 2017 17:08:30 +0100 Subject: [PATCH] correct note about Gregorian reform in SRFI-19 SRFI-19 specifies proleptic

bug#26164: time-difference mishandles leap seconds

2017-04-19 Thread Zefram
and to the bug regarding pre-1972 UTC. The latter I haven't even reported yet because it's difficult to formulate in the presence of some of the other UTC-related bugs such as bug#21911 and bug#21912. So I think this is one to postpone until some of those are out of the way. -zefram

bug#26163: time-difference doesn't detect error of differing time types

2017-04-19 Thread Zefram
Patch attached. -zefram >From 6f9d9b355233b578eb3ce13549c8fdc9d7fb8364 Mon Sep 17 00:00:00 2001 From: Zefram Date: Wed, 19 Apr 2017 19:02:13 +0100 Subject: [PATCH] signal error of time-difference on differing types It is an error to apply SRFI-19's time-difference to time struc

bug#21907: date->string duff ISO 8601 zone format

2017-04-19 Thread Zefram
t the ~z problems in a separate ticket if you like. Beware that the second of these patches has some textual dependence on the first, so trying to handle them separately might just be confusing. -zefram >From e6db0e40e5464591df204f9d07e66b3d7853c0d7 Mon Sep 17 00:00:00 2001 From: Zefram Date: We

bug#26570: GC_is_heap_ptr() dep for 2.2.1

2017-04-19 Thread Zefram
#x27;guile' failed make[3]: *** [guile] Error 1 At a guess, maybe this is supposed to be supplied by libgc. But I have the version of libgc that README says is required (7.2), and configure was happy with it. Maybe a higher version is now required, and README and configure need updating? -zefram

bug#21904: date->string duff ISO 8601 format for non-4-digit years

2017-04-19 Thread Zefram
support in date->string at all, but more strongly because it's useful to have access to ISO 8601 year formatting on its own. There isn't any other format specifier for that job; it looks like SRFI-19 imagines that ~Y will fill that need. -zefram >From 43dfb5fabc9debb80f87b17d82a1

bug#21904: date->string duff ISO 8601 format for non-4-digit years

2017-04-19 Thread Zefram
I wrote: >I chose the former strategy, partly because the funny non-linear year >number doesn't seem a useful thing to support in date->string at all, Sorry, this comment is misplaced. It relates to bug#21903; the choice about ~Y applies to both of these bugs. -zefram

bug#21903: date->string duff ISO 8601 negative years

2017-04-19 Thread Zefram
numbering is really only about this bug. -zefram >From 3d39f1dfa0e210282db48a9af828646d7e9acef3 Mon Sep 17 00:00:00 2001 From: Zefram Date: Thu, 20 Apr 2017 00:53:40 +0100 Subject: [PATCH 2/2] fix SRFI-19's ISO 8601 year numbering The ISO 8601 date formats offered by SRFI-19's date->

bug#26632: TAI<->UTC conversion botches 1961 to 1971

2017-04-23 Thread Zefram
nds it would still be wrong. In the rubber seconds era the number of UTC seconds in an interval differs from the number of TAI seconds. -zefram

bug#26633: TAI<->UTC conversion botches pre-1961 era

2017-04-23 Thread Zefram
hmetic could be performed, because UTC is not defined for any time prior to 1961. The only sane behaviour is for the conversion to signal an error. The same goes for time-tai->time-utc, which at present accurately inverts time-utc->time-tai for the above time. -zefram

bug#22033: time-utc format is lossy

2017-04-24 Thread Zefram
he best way forward. What do you think? If you like it, I could work up a patch. -zefram

bug#26164: time-difference mishandles leap seconds

2018-11-05 Thread Zefram
s (roughly 86399.90003 s). This runs into trouble with SRFI-19's insistence that the nanosecond field of a time object only contain an integer. -zefram

bug#26632: TAI<->UTC conversion botches 1961 to 1971

2018-11-05 Thread Zefram
rary, having attempted conversions signal an error. That would have to be documented, and it seems like it would still amount to a deviation from the requirements of SRFI-19. -zefram