forked from cky/guile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWS
14375 lines (10265 loc) · 538 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Guile NEWS --- history of user-visible changes.
Copyright (C) 1996-2024 Free Software Foundation, Inc.
See the end for copying conditions.
Please send Guile bug reports to bug-guile@gnu.org.
Changes in 3.0.10 (since 3.0.9)
* New interfaces and functionality
** New warning: unused-module
This analysis, enabled at `-W2', issues warnings for modules that appear
in a `use-modules' form or as a #:use-module clause of `define-module',
and whose bindings are unused. This is useful to trim the list of
imports of a module.
In some cases, the compiler cannot conclude whether a module is
definitely unused---this is notably the case for modules that are only
used at macro-expansion time, such as (srfi srfi-26). In those cases,
the compiler reports it as "possibly unused".
** copy-file now supports copy-on-write
The copy-file procedure now takes an additional keyword argument,
#:copy-on-write, specifying whether copy-on-write should be done, if the
underlying file-system supports it. Possible values are 'always, 'auto
and 'never, with 'auto being the default.
This speeds up copying large files a lot while saving the disk space.
** 'seek' can now navigate holes in sparse files
On systems that support it, such as GNU/Linux, the new SEEK_DATA and
SEEK_HOLE values can now be passed to the 'seek' procedure to change
file offset to the next piece of data or to the next hole in sparse
files. See "Random Access" in the manual for details.
** ((scm foreign-object) make-foreign-object-type) now supports #:super
A list of superclasses can now be provided via #:super.
* Bug fixes
** Fix incorrect comparison between exact and inexact numbers
(<https://debbugs.gnu.org/69725>)
** (ice-9 suspendable-ports) incorrect UTF-8 decoding
(<https://bugs.gnu.org/62290>)
** Fix invalid use of 'posix_spawn' on non-glibc systems
(<https://bugs.gnu.org/61095>)
** Adjust 'spawn' test for GNU/Hurd
(<https://bugs.gnu.org/62501>)
** Fix 'system*' with non-file input/output/error port
(<https://bugs.gnu.org/63024>)
** 'spawn' errors out instead of crashing when passed non-file ports
(<https://bugs.gnu.org/61073>)
** Support signal handling child processes after 'primitive-fork'
(<https://bugs.gnu.org/68087>)
** Fix possible deadlock in 'sigaction' (aka. 'scm_sigaction_for_thread')
(<https://bugs.gnu.org/64666>)
** Avoid module resolution in 'call-with-new-thread', which could deadlock
(<https://bugs.gnu.org/62691>)
** Fix deadlock in 'join-thread' when timeout is hit
(<https://bugs.gnu.org/55356>)
** 'read-u8' in (scheme base) now defaults to (current-input-port)
(<https://bugs.gnu.org/62690>)
** Second argument of 'unread-string' is now optional, as previously documented
(<https://bugs.gnu.org/67063>)
** 'ftw' now correctly deals with directory permissions
(<https://bugs.gnu.org/55344>)
** 'make-custom-port' now honors its #:conversion-strategy argument
** 'eval-string' respects #:column (previously it was set to the #:line)
** 'string->date' now allows a colon in the ISO 8601 zone offset
** 'system*' no longer fiddles with the process' signal handlers
(<https://bugs.gnu.org/70144>)
** Hashing of UTF-8 symbols with non-ASCII characters avoids corruption
(<https://bugs.gnu.org/56413>)
This issue could cause `scm_from_utf8_symbol' and
`scm_from_utf8_symboln` to incorrectly conclude that the symbol hadn't
already been interned, and then create a new one, which of course
wouldn't be `eq?' to the other(s). The incorrect hash was the result of
a buffer overrun, and so might vary. This problem affected a number of
other operations, given the internal use of those functions.
Changes in 3.0.9 (since 3.0.8)
* Notable changes
* New interfaces and functionality
** New `spawn' procedure to spawn child processes
The new `spawn' procedure creates a child processes executing the given
program. It lets you control the environment variables of that process
and redirect its standard input, standard output, and standard error
streams.
Being implemented in terms of `posix_spawn', it is more portable, more
robust, and more efficient than the combination of `primitive-fork' and
`execl'. See "Processes" in the manual for details, and see the 2019
paper entitled "A fork() in the road" (Andrew Baumann et al.) for
background information.
`system*', as well as the `open-pipe' and `pipeline' procedures of
(ice-9 popen) are now implemented in terms of `posix_spawn' as well,
which fixes bugs such as redirects: <https://bugs.gnu.org/52835>.
** `open-file' now supports an "e" flag for O_CLOEXEC
Until now, the high-level `open-file' facility did not provide a way to
pass O_CLOEXEC to the underlying `open' call. It can now be done by
appending "e" to the `mode' string passed as a second argument. See
"File Ports" in the manual for more info.
** `pipe' now takes flags as an optional argument
This lets you pass flags such as O_CLOEXEC and O_NONBLOCK, as with the
pipe2(2) system call found on GNU/Linux and GNU/Hurd, instead of having
to call `fnctl' afterwards. See "Ports and File Descriptors" in the
manual for details.
** Bindings to `openat' and friends
The procedures `openat', `open-fdes-at', `statat', `chownat',
`unlinkat', `chmodat', `renameat', `mkdirat' and `symlinkat' have been
added. They resolve file names relative to a directory passed as a file
port. The procedures `chdir' `readlink' and `utime' have been extended
to support file ports. The related flags `AT_REMOVEDIR' and
`AT_EACCESS' have been added. See `File System' in the manual
** Abstract Unix-domain sockets are supported
It is now possible to create an AF_UNIX socket with a leading zero byte
in its file name to create an abstract Unix-domain socket. See
"man 7 unix" for information on abstract Unix-domain sockets.
** New socket-related constants defined
The `IN6ADDR_ANY' and `IN6ADDR_LOOPBACK' are now defined on systems with
IPv6 support; they can be used with `bind'.
Likewise, the `IPPROTO_IPV6' and `IPV6_V6ONLY' constants are defined,
for use with `setsockopt'.
** New `bytevector-slice' procedure
As an extension to the R6RS interface, the new (rnrs bytevectors gnu)
module defines `bytevector-slice', which returns a bytevector that
aliases part of an existing bytevector. See "Bytevector Slices" in the
manual.
** Disassembler now shows intrinsic names
Disassembler output now includes the name of intrinsics next to each
`call-' instruction (info "(guile) Intrinsic Call Instructions").
** Linker and assembler consume less memory
Previously, the entire output ELF file contents would be stored in
memory when compiling as with `guild compile'. This is no longer the
case.
* Bug fixes
** JIT compilation is now supported on Apple M1 processors
(https://bugs.gnu.org/44505)
** Type sizes are correctly determined when cross-compiling
(https://bugs.gnu.org/54198)
** psyntax honors source properties coming from read hash extensions
(https://bugs.gnu.org/54003)
** ./configure checks whether the linker supports '-flto' (needed on macOS)
** libguile/srfi-14.i.c is now longer shipped and is instead built from source
(https://bugs.gnu.org/54111)
** Cross-compilation supports triplets with empty vendor strings
(https://bugs.gnu.org/54915)
** It is possible to use a 'library-form' inside 'cond-expand' in R7RS libraries
(https://bugs.gnu.org/55934)
** 'coverage-data->lcov' accepts a #:modules argument as documented
(https://bugs.gnu.org/54911)
** 'connect' returns #f upon EAGAIN, not just EINPROGRESS
** (web http) capitalizes the "Basic" authorization header
** (web http) terminates chunked encoding with an extra \r\n
** (web client) retries TLS handshake upon non-fatal errors
(https://bugs.gnu.org/49223)
** 'primitive-load' opens files as O_CLOEXEC
(https://bugs.gnu.org/57567)
** Baseline compiler no longer crashes on (not (list 1 2))
(https://bugs.gnu.org/58217)
** Fix documentation of ‘mkdir’
Previously, the documentation implied the umask was ignored if the
mode was set explicitly. However, this is not the case.
** 'system*' honors output/error port redirects
(https://bugs.gnu.org/52835)
** 'open-input-pipe' & co. are now much faster
(https://bugs.gnu.org/59321)
** Fix crash with out-of-bound indexes with `string-ref' and `fluid-ref*'
(https://bugs.gnu.org/60488, https://bugs.gnu.org/58154)
** Fix infinite loop when compiling (make-vector)
(https://bugs.gnu.org/60522)
Changes in 3.0.8 (since 3.0.7)
* Notable changes
** Cross-module inlining
Although historically Guile has treated modules as glorified hash
tables, most modules are actually _declarative_ -- they just define
functions and variables and provide them for other modules to use, and
don't manipulate modules as first-class objects. See "Declarative
Modules" in the manual, for more discussion.
Since version 3.0.0, Guile has taken advantage of declarative semantics
to allow a top-level definition to be inlined within its uses in the
same compilation unit, provided the binding is never assigned and
defined exactly once. Guile 3.0.8 extends this to allow some
exported declarative definitions to be inlined into other modules.
This facility is mostly transparent to the user and is enabled at the
default -O2 optimization level. "Small" definitions are available for
cross-module inlining (-Oinlinable-exports, included at -O2). The
actual inlining decision is performed by Guile's partial evaluation pass
(the -Ocross-module-inlining modifier to -Opeval, included at -O2 also),
subject to effort and size growth counters.
Note however that as with macros, when a definition changes in module A,
a separately compiled module B that uses that definition doesn't
automatically get recompiled. This is a limitation in Guile that we
would like to fix.
As another limitation, cross-module inlining is only available for
imports from modules which have already been compiled at -O2 (or
otherwise with -Oinlinable-exports).
When determining whether to enable this facility by default, we weighed
the usability problems of stale inlined bindings against the benefit of
allowing module boundaries to no longer be optimization boundaries, we
ended up on the "let's do it!" side of the equation. However we welcome
feedback from users as to what should be the default behavior, until
such a time as we have a proper notion of when a compiled file is stale
or not.
** Avoid the need for a custom GMP allocator
In Guile 3.0.6, we fixed a long-standing bug in Guile's use of the
library that Guile uses to implement bignums (large integers), GMP
(https://gmplib.org). See the Guile 3.0.6 release notes. However this
left us with a suboptimal Guile, in which each large integer had to have
a finalizer to free the memory allocated by GMP. Finalizers take time
and space, and so they limit allocation rate, causing bignum performance
to drop. Though you could set an environment variable to go back to the
older, faster behavior, it wasn't the default.
In Guile 3.0.8 we fix this problem comprehensively by avoiding embedding
GMP's mpz_t values in Guile bignums. Instead we embed the bignum digits
directly, avoiding the need for finalizers or custom allocators. This
removes the need for the GUILE_INSTALL_GMP_MEMORY_FUNCTIONS environment
variable mentioned in the Guile 3.0.6 release notes. We also deprecate
the scm_install_gmp_memory_functions variable.
* New interfaces and functionality
** Typed vector copy functions in (srfi srfi-4 gnu)
The functions `u8vector-copy' `s8vector-copy' `u16vector-copy'
`s16vector-copy' `u32vector-copy' `s32vector-copy' `u64vector-copy'
`s64vector-copy' `f32vector-copy' `f64vector-copy' `c32vector-copy'
`c64vector-copy' `u8vector-copy!' `s8vector-copy!' `u16vector-copy!'
`s16vector-copy!' `u32vector-copy!' `s32vector-copy!'
`u64vector-copy!' `s64vector-copy!' `f32vector-copy!'
`f64vector-copy!' `c32vector-copy!' `c64vector-copy!' have been
added. See SRFI-4 - Guile extensions" in the manual.
** New function srfi-4-vector-type-size in (srfi srfi-4 gnu)
See SRFI-4 - Guile extensions" in the manual.
** `bytevector-fill!' supports partial fill through optional arguments
This is an extension to the r6rs procedure. See "Manipulating
Bytevectors" in the manual.
** `vector-copy!' and `vector-copy' from (rnrs base) included in core
Compared to the previous versions, these accept range arguments. See
"Accessing and Modifying Vector Contents" in the manual.
** New function bitvector-copy
See "Bit vectors" in the manual.
** (system foreign) supports C99 complex types
The types `complex-float' and `complex-double' stand for C99 `float
_Complex' and `double _Complex` respectively.
* Other new optimizations
** Better optimization of "let" in right-hand-side of "letrec"
** Allow constant-folding for calls to "expt"
Thanks to Maxime Devos.
** Add ,optimize-cps REPL meta-command
This meta-command is like ,optimize, but at a lower level.
** Improve alias analysis in common subexpression elimination
** Avoid argument-count checks for well-typed calls to known procedures
This speeds up calls to lexically bound procedures.
** Avoid return-value-count checks for calls to known-return-arity procedures
This new optimization, enabled at -O2, speeds up returns from calls to
lexically bound procedures.
* Build system changes
** Update Gnulib (bugs.gnu.org/49930)
Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6.
** Compile libguile with -flto if available
By default, if the compiler supports link-time optimization via the
-flto flag, Guile will add it to CFLAGS. This results in a libguile
that is approximately 15% smaller. Pass --disable-lto to configure to
inhibit this behavior.
** Trim set of prebuilt .go files shipped in the tarball
Guile includes built Scheme files in its tarball to speed up the build,
for casual builders that are less concerned with reproducibility.
However they took a lot of space and we have now trimmed these down to a
more minimal set. As always, you can remove them and build entirely
from source via a `make -C prebuilt clean`.
* New deprecations
** Vector functions require vector arguments
Passing arrays that are not vectors (arrays for which `(vector? array)'
returns false) to functions `vector-move-left!', `vector-move-right!',
`vector->list', and `vector-copy' is deprecated. Use `array-copy!',
`array-copy', and `array->list' for such arguments.
** `scm_from_contiguous_typed_array' is deprecated
This function was added during the Guile 2.x series and was not
documented and is no longer used in Guile itself.
** Deprecate the "simple vector" concept, `scm_is_simple_vector'
This concept meant to indicate "vectors which aren't array slices". Use
scm_is_vector.
** Deprecate internal contiguous array flag
We still reserve space for the flag to preserve ABI but it has no
effect. As such we also remove the internal SCM_I_ARRAY_CONTIGUOUS,
SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG,
SCM_I_ARRAY_CONTP preprocessor interfaces, as they were internal and
there is no longer a sensible way of using them.
** Deprecate symbol properties
Symbols used to have a "function slot" and a "property slot", inherited
from Emacs Lisp and early Lisps, which one would access with
'symbol-pref', 'symbol-fref', 'symbol-pset!', and 'symbol-fset!'. These
procedures have been discouraged in favor of object properties; they are
now deprecated. This saves a few words of memory per symbol.
* Bug fixes
** Fix compilation of (ash x N), where N is a literal, at -O1 and below
** Texinfo and XML parsers are now thread-safe (bugs.gnu.org/51264)
** Fix `filename-completion-function' in (ice-9 readline)
** Fix trace-calls-to-procedure (bugs.gnu.org/43102, bugs.gnu.org/48412)
** Fix bug in nftw function (bugs.gnu.org/44182)
** Fix optimization bug in CSE in eq-constant? if both branches same
** Fix readline initialization with invalid keymaps
** Fix crash when reading #nil (bugs.gnu.org/49305)
** Fix read error when reading #{}}#.
** Fix Darwin host detection in foreign-library facility.
** Fix unification of (x ...) patterns in `match'
** Fix scaling floats with leading zeroes in `format'
** Improve support for r7rs-style `(srfi N)' and r6rs-style `(srfi :N)
module names (bugs.gnu.org/39601, bugs.gnu.org/40371)
** Add support for the ARC architecture (bugs.gnu.org/48816)
** Build fix for const strerror result (bugs.gnu.org/43987)
** Fix typos in SRFI documentation (bugs.gnu.org/50127)
** Fix bounds check in `recvfrom!' (bugs.gnu.org/45595)
** Add support for riscv32
** Limit `ash' to left-shift by 2^32 bits (bugs.gnu.org/48150)
** Fix type confusion in heap-numbers-equal? calls from VM
Hearty thanks to Jakub Wojciech, Robin Green, Daniel Llorens, Matija
Obid, RhodiumToad, Rob Browning, Maxime Devos, Aleix Conchillo Flaqué,
Timothy Sample, d4ryus, Fabrice Fontaine, Taylan Kammer, Vineet Gupta,
Philipp Klaus Krause, Arun Isaac, and Alex Shinn.
Changes in 3.0.7 (since 3.0.6)
* New interfaces and functionality
** More O_* POSIX constants are now defined in Scheme
Guile now defines constants such as `O_NOFOLLOW', `O_CLOEXEC',
`O_TMPFILE', and more on platforms that support them. These may be
passed as arguments to procedures such as `open' and `open-fdes'.
* Bug fixes
** Fix bugs introduced in 3.0.6 with Scheme `read` re-write
** Fix deadlock after `primitive-fork' (#41948)
** Fix duplicates handlers for interfaces that use interfaces (#43025)
** Fix compile-psyntax.scm for (language tree-il canonicalize) removal
** Fix prompt compilation bug (#48098)
** Fix R7RS include-library-declarations, cond-expand (#40252)
** Fix --enable-mini-gmp on FreeBSD and other targets
** Fix excessive compile times for vectors >16k elements long
** Fix use of literal tree-il as source language (#45131)
** Fix SRFI-64 test-end to not remove globally-installed test runner
Changes in 3.0.6 (since 3.0.5)
* Notable changes
** Reimplement dynamic library loading ("dlopening") without libltdl
Guile used to load dynamic libraries with libltdl, a library provided by
the Libtool project.
Libltdl provided some compatibility benefits when loading shared
libraries made with older toolchains on older operating systems.
However, no system from the last 10 years or so appears to need such a
thick compatibility layer.
Besides being an unmaintained dependency of limited utility, libltdl
also has the negative aspect that in its search for libraries to load,
it could swallow useful errors for libraries that are found but not
loadable, instead showing just errors for search path candidates that
are not found.
Guile now implements dynamic library loading directly in terms of the
standard "dlopen" interface, providing a limited shim for platforms with
similar functionality exposed under different names (MinGW).
This change has a few practical impacts to Guile users. There is a new
library search path variable, `GUILE_EXTENSIONS_PATH'. Also, errors when
loading a library fails now have better errors. And Guile no longer has
a libltdl dependency.
Although Guile no longer uses libltdl, for backwards compatibility Guile
still adds `LTDL_LIBRARY_PATH' to the loadable library search path, and
includes ad-hoc logic to support uninstalled dynamically loadable
libraries via also adding the ".libs" subdirectories of
`LTDL_LIBRARY_PATH' elements. See "Foreign Libraries" in the
documentation for a full discussion.
** Fix important incompatibility with GnuTLS
Guile uses the GNU multi-precision (GMP) library to implement
arbitrary-precision integers (bignums) and fractions. Usually Guile is
built to dynamically link to libgmp. In this configuration, any other
user of GMP in the process uses the same libgmp instance, with the same
shared state.
An important piece of shared state is the GMP allocator, responsible for
allocating storage for the digits of large integers. For Guile it's
most efficient to install libgc as the GMP allocator. That way Guile
doesn't need to install finalizers, which have significant overhead, to
free GMP values when Guile bignums are collected. Using libgc to
allocate digits also allows Guile's GC to adequately measure the memory
cost of these values.
However, if the Guile process is linked to some other user of GMP, then
probably the references from the other library to GMP values aren't
visible to the garbage collector. In this case libgc could prematurely
collect values from that other GMP user.
This isn't theoretical, sadly: it happens for Guile-GnuTLS. GnuTLS uses
GMP, and so does Guile. Since Guile 2.0.4, Guile has installed libgc as
the GMP allocator, so since then, Guile-GnuTLS has been buggy.
Therefore, the default is now to not install libgc as the GMP allocator.
This may slow down some uses of bignums. If you know that your Guile
program will never use a library that uses GMP, you can set the
GUILE_INSTALL_GMP_MEMORY_FUNCTIONS=1 in your environment. Guile sets
this environment variable when building Guile, for example. See
"Environment Variables" in the manual, for more.
In some future, Guile may switch to GMP's more low-level "MPN" API for
working with bignums, which would allow us to regain the ability to use
GC-managed digit storage in all configurations.
** New build option: --enable-mini-gmp
For some users, it would be preferable to bundle a private copy of the
GMP bignum library into Guile. Some users would like to avoid the extra
dependency. Others would like to use libgc to manage GMP values, while
not perturbing the GMP allocator for other GMP users.
For these cases, Guile now has an --enable-mini-gmp configure option,
which will use a stripped-down version of GMP, bundled with Guile. This
code doesn't have all the algorithmic optimizations of full GMP, but
implements the same API in a basic way. It can be more optimal in a
Guile context, given that it can use libgc to allocate its data.
Note that a build with --enable-mini-gmp is not ABI-compatible with a
"stock" build, as functions that use GMP types (scm_to_mpz,
scm_from_mpz) are not exported.
Thanks to Niels Möller and other GMP developers for their mini-gmp
implementation!
** New `read' implementation in Scheme
Guile's `read' procedure has been rewritten in Scheme. Compared to the
C reader (which still exists for bootstrapping reasons), the new
implementation is more maintainable, more secure, more debuggable, all
while faithfully reproducing all quirks from Guile's previous reader
implemented in C. Also, the Scheme reader is finally compatible with
suspendable ports, allowing REPL implementations to be built with
lightweight concurrency packages such as the third-party "Fibers"
library. Calls to `read' from Scheme as well as calls to `scm_read'
from C use the new reader.
The Scheme implementation is currently about 60% as fast as the
now-inaccessible C implementation, and we hope to close the gap over
time. Bug reports very welcome.
** Scheme compiler uses `read-syntax' for better debugging
The new Scheme reader also shares implementation with the new
`read-syntax' procedure, which annotates each datum with source location
information. Guile's compiler can use this to provide better
source-level debugging for Scheme programs. Note that this can slightly
increase compiled file sizes, though this is mitigated by some assembler
optimizations.
** Syntax objects record source locations
When compiling a file that defines a macro, the output will usually
include a number of syntax objects as literals. Previously, these
literals had no source information; now they do. This should improve
debugging.
** Optimized run-time relocations
The code that patches references between statically-allocated Scheme
data has been optimized to be about 30% shorter than before or so, which
can significantly decrease compiled file size and run-time
initialization latency.
** Optimized calls to known functions
For calls where the callee is within the compilation unit, Guile can now
skip the argument count check.
** Reduce code size for calls to module variables
All calls to a given exported or private variable from a module now
dispatch through the same trampoline function. This reduces code size.
** Updated Gnulib
The Gnulib compatibility library has been updated, for the first time
since 2017 or so. We expect no functional change but look forward to
any bug reports.
* New interfaces and functionality
** `call-with-port'
See "Ports" in the manual.
** `call-with-input-bytevector', `call-with-output-bytevector'
See "Bytevector Ports" in the manual.
** `GUILE_EXTENSIONS_PATH' environment variable.
See "Environment Variables" in the manual.
** `mkdtemp' and `mkstemp'
See "File System" in the manual. There is still `mkstemp!' but we
recommend that new code uses `mkstemp', which does not mutate the
contents of the "template" argument string. Instead for `mkstemp' you
get the name of the newly-created file by calling `port-filename' on the
returned port.
** `(system foreign-library)' module
See the newly reorganized "Foreign Function Interface", for details.
These new interfaces replace `dynamic-link', `dynamic-pointer' and
similar, which will eventually be deprecated.
** `read-syntax'
See "Annotated Scheme Read" in the manual.
** `quote-syntax'
See "Syntax Case" in the manual.
** `syntax-sourcev'
See "Syntax Transformer Helpers" in the manual.
* Optimizations
** eof-object?
** R6RS vector-map, vector-for-each
* Bug fixes
** Fix reverse-list->string docstring
** Fix R7RS "member" result when no item found
** Fix make-transcoded-port on input+output ports
** Fix (ice-9 ftw) on filesystems where inode values are meaningless
** Fix many bugs that prevented Guile from building on MinGW
** Fix many bugs that prevented Guile from building on MinGW64
** Fix many bugs that prevented Guile's test suite from running on MinGW
** Fix srfi-69 merge-hash
** Fix suspendable-ports implementation of get-bytevector-some!
** Fix overread in string-locale<?, string-locale-ci<?, and friends
** Fix handling of parameter lists to elisp defun to allow nil
** Fix closure-conversion bug for SCC with no free vars and one not-well-known function
** Fix error when < passed non-real value
** Fix bug in which exported and private names in a used module could alias each other
** Fix bug with slot options in redefinable GOOPS classes
** Fix bugs regarding port buffering for TLS connections in web client
Thanks to Vasilij Schneidermann, Andrey Ivanov, Rob Browning, Erik
Dominikus, Göran Weinholt, Michael Gran, Andrew Whatson, Ricardo
G. Herdt, Jan Nieuwenhuizen, David Thompson, and abcdw.
* New deprecations
** `dynamic-unlink'
This function now has no effect; Guile will not unload dynamically
linked modules, as that can destabilize the system.
* Incompatible changes
** `call-with-output-string' closes port on normal exit
This procedure used to leave the port open, even though there was no
useful way to access it. Now we clean it up more promptly, disposing
any possible associated iconv descriptor.
Changes in 3.0.5 (since 3.0.4)
* New interfaces and functionality
** O(1) compilation of `case' and related expressions
Guile now optimizes chains of eq? comparisons to constants, resulting in
O(1) dispatch time, regardless of the length of the chain. This
optimization is also unlocked in many cases for `match' expressions with
many similar clauses whose first differentiator are constants.
** New (ice-9 copy-tree) module
This module includes the `copy-tree' procedure that was previously
implemented in C and present in the default `(guile)' module. See
"Copying" in the manual.
** New warning: use-before-definition
This analysis, enabled at `-W1', issues warnings for programs that use
top-level variables before they are defined.
** New warning: non-idempotent-definition
This analysis, enabled at `-W1', issues warnings for programs that whose
use of a variable is ambiguous. For example, in the program:
(define saved-add +)
(define + error)
The intention would seem to be to "save" the value of the base `+'
procedure, then override it locally. However if this program is ever
loaded twice, then the second time it is loaded, `+' will be taken from
the local binding instead of the import. Users that want this kind of
behavior should either use lexical bindings instead of top-level
bindings, or otherwise rename important clobbered bindings via modules.
* New deprecations
** `copy-tree' in the default environment, and `scm_copy_tree' from C
Import the `(ice-9 copy-tree)' module instead.
** `unbound-variable-analysis`, `macro-use-before-definition-analysis`
These bindings from `(language tree-il analyze)' are replaced by the
use-before-definition analysis, which powers a number of warnings. Use
`make-use-before-definition-analysis', but note that these interfaces
are quite intimate parts of the compiler!
* Incompatible changes
** `copy' read-option removed
This read option would include a copy of the source expression in the
source-properties of each subexpression. This option has always been
off by default and lost most of its use value with the switch to a
compiler in Guile 2.0.
Changes in 3.0.4 (since 3.0.3)
This release fixes the SONAME of libguile-3.0.so, which was erroneously
bumped in 3.0.3 compared to 3.0.2. Distributions are strongly
encouraged to use 3.0.4 instead of 3.0.3.
Thanks to Chris Vine for reporting the issue.
Changes in 3.0.3 (since 3.0.2)
* New interfaces and functionality
** New baseline compiler
Guile's CPS-based compiler generates good code, but it takes time and
memory to do so. For users that prioritize speed of compilation over
speed of generated code, Guile now has a new baseline compiler that goes
directly from the high-level Tree-IL to bytecode, skipping CPS and all
of its optimizations. This compiler is used for `guild compile -O0',
and generally runs around ten times as fast as the CPS compiler.
*** New VM intrinsics to support baseline compiler
See "Intrinsic Call Instructions" in the manual.
*** Compiler support for warning and lowering passes
*** Compiler support for choosing different compilation orders
See "Compiler Tower" in the manual. The new per-language "compiler
chooser" facility can choose different compilers based on optimization
level.
*** Better support for specifying optimization and warning levels
The procedural compilation interfaces (`compile', `compile-file', and so
on) now have #:optimization-level and #:warning-level keyword arguments,
which default to corresponding `default-optimization-level' and
`default-warning-level' parameters. You can still specify warning and
optimization passes manually, but we think most users will find the
higher-level interfaces more robust to use.
** Faster Guile build from source
Guile now uses the baseline compiler for its bootstrap, when building
the first Scheme compiler. Because the baseline compiler runs faster
and includes less code than the CPS compiler, Guile takes less time to
build.
** New 'pipeline' procedure in (ice-9 popen)
The 'pipeline' procedure provides a simple way to spawn command pipeline
as one would do in a shell.
** Refreshed bitvector facility
See "Bit Vectors" in the manual, for more on all of these.
*** New bitvector-count, bitvector-count-bits, bitvector-position
procedures
These replace the wonky "bit-count", "bit-count*", and "bit-position"
procedures.
*** New bitvector-bit-set?, bitvector-bit-clear? procedures
These replace bitvector-ref. The reason to migrate is that it's an
opportunity be more efficient in 3.0 (because the new procedures only
work on true bitvectors, and not generic bit arrays), easier to read (no
need for 'not' when checking for false bits), and more consistent with
other bitvector procedures.
*** New bitvector-set-bit!, bitvector-clear-bit! procedures
These replace bitvector-set!, for similar reasons as the bitvector-ref
replacement above.
*** New bitvector-set-all-bits!, bitvector-clear-all-bits! procedures
These replace bitvector-fill!.
*** New bitvector-flip-all-bits! procedure
This replaces bit-invert!.
*** New bitvector-set-bits!, bitvector-clear-bits! procedures
These replace the wonky "bit-set*!" procedure.
* Bug fixes
** statprof reports the names of primitives
Previously statprof would show strings like "anon #x1234" for primitives
written in C.
** Compiler reduces 'equal?' when passed a character literal
The compiler now properly reduces expressions such as (equal? c #\x) to
(eq? c #\x). This was not the case in 3.0.2, which could lead to slower
code, especially in 'match' expressions with many clauses with
character literals.
** JIT bugs on ARMv7 have been fixed
(<https://bugs.gnu.org/40737>,
<https://gitlab.com/wingo/lightening/-/issues/12>)
** 'http-get', 'http-post', etc. now honor #:verify-certificates?
(<https://bugs.gnu.org/40486>)
** web: Accept URI host names consisting only of hex digits
(<https://bugs.gnu.org/40582>)
** (web http) parser recognizes the CONNECT and PATCH methods
** Initial revealed count of file ports is now zero
(<https://bugs.gnu.org/41204>)
* New deprecations
** Old bitvector interfaces deprecated
See "Bit Vectors" in the manual, for details on all of these
replacements.
*** bit-count, bit-position
Use bitvector-count or bitvector-position instead.
*** bitvector-ref
Use 'bitvector-bit-set?' or 'bitvector-bit-clear?' instead.
*** bitvector-set!
Use 'bitvector-set-bit!' or 'bitvector-clear-bit!' instead.
*** bitvector-fill!
Use 'bitvector-set-all-bits!' or 'bitvector-clear-all-bits!' instead.
*** bit-invert!
Use 'bitvector-flip-all-bits! instead.
*** bit-set*!
Use 'bitvector-set-bits!' or 'bitvector-clear-bits!' instead.
*** bit-count*
Use 'bitvector-count-bits' instead, subtracting from 'bitvector-count'
on the mask bitvector if you are counting unset bits.
*** Accessing generic arrays using the bitvector procedures
For the same efficiency reasons that use of 'vector-ref' on generic
arrays was deprecated in Guile 2.0.10, using 'bitvector->list' and
similar procedures on 1-dimensional boolean-typed arrays is now
deprecated. Use 'array-ref' and similar procedures on arrays.
*** scm_istr2bve
This C-only procedure to parse a bitvector from a string should be
replaced by calling `read' on a string port instead, if needed.
Changes in 3.0.2 (since 3.0.1)
* New interfaces and functionality
** New (srfi srfi-171) module
This module implements "transducers" as specified in
<https://srfi.schemers.org/srfi-171/srfi-171.html>.
Thanks to Linus Björnstam for this new API!
** SRFI-14 character data set upgraded to Unicode 13.0.0
* Bug fixes
** Fix heap corruption when allocating structs
(<https://bugs.gnu.org/39266>)
This bug would cause random crashes; users are invited to upgrade.
Thanks to rr (<https://rr-project.org/>) for being instrumental in
finding this bug!
** Fix race condition between 'abort-to-prompt' and stack marking
(<https://bugs.gnu.org/28211>)
This bug could occasionally cause crashes in multi-threaded Guile
programs using delimited continuations or exceptions.
** Ensure weak sets are occasionally vacuumed
(<https://bugs.gnu.org/40194>)
Previously, weak sets, which are used internally for interned symbols
and for ports with SCM_PORT_TYPE_NEEDS_CLOSE_ON_GC, could grow seemingly
indefinitely without being vacuumed.
** Interpret dynamic library name as literal file name first
(<https://bugs.gnu.org/21076>)
Until now, 'dynamic-link' would always append an extension, such as
".so", to the user-provided file names. Now, 'dynamic-link' first tries
the file name literally, and only then falls back to adding the OS
shared library file name extension.
This allows users to refer to "libsomething.so.1.2.3" instead of
"libsomething.so", the latter being usually provided by "-dev" packages
of GNU/Linux distributions, unlike the former.
** <libguile.h> includes <libguile/hooks.h> again
This fixes an omission in Guile 3.0.
** Fix fixpoint computation in compute-significant-bits
(<https://bugs.gnu.org/38486>)
** Fix compilation '--without-threads'
(<https://bugs.gnu.org/40075>)
* New deprecations
** 'tmpnam' is now deprecated
The 'tmpnam' function in the C library has been deprecated for years due
to security concerns; the Scheme procedure 'tmpnam' is now deprecated as
well, in favor of 'mkstemp!'. In addition, a new '--disable-tmpnam'
option has been added to 'configure' for users who would like to disable
it right away.
Changes in 3.0.1 (since 3.0.0):
* New interfaces and functionality
** Export constructor and predicate for '&quit-exception'
The (ice-9 exceptions) module, new in 3.0.0, now exports
'quit-exception?' and 'make-quit-exception', which is consistent with
other exception types.
** (texinfo plain-text) now exports '*line-width*' fluid
The new '*line-width*' fluid allows users to specify the width of a line
for the purposes of line wrapping. See "texinfo plain-text" in the
manual.
** R7RS support recognizes the '.sld' extension
The '.sld' is what the R7RS suggests as a source file name extension.
It is now recognized when running "guile --r7rs", as well as
the '.guile.sld' extension.
* Bug fixes
** 'hash' correctly handles keywords, ports, hash tables, etc.
(<https://bugs.gnu.org/39634>)
It used to be that the 'hash' procedure would return the same value for
all keyword objects, the same value for all hash tables, the same value
for all input ports, etc.
** 'include' no longer rejects relative file names
A bug in 3.0.0 would lead 'include' to error out when passed a relative
file name.
** Reduce GC pressure when using bignums
Guile no longer installs a finalizer on each bignum (large integer) it
creates. This significantly improves speed and memory usage on