-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathNEWS
7432 lines (5305 loc) · 271 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, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
See the end for copying conditions.
Please send Guile bug reports to [email protected].
Changes in 1.8.8 (since 1.8.7)
* Bugs fixed
** Fix possible buffer overruns when parsing numbers
** Fix random number generator on 64-bit platforms
Previously the `scm_c_random' function would crash or return only 32-bit
worth of randomness. In addition, the new `scm_c_random64' function
explicitly returns 64 bits of randomness.
** Add missing range checks in `vector-move-left!' and `vector-move-right!'
Previously these procedures could write past the end of a vector.
** Avoid clash with system setjmp/longjmp on IA64
** Don't dynamically link an extension that is already registered
** Fix `wrong type arg' exceptions with IPv6 addresses
** Fix typos in `(srfi srfi-19)'
** Have `(srfi srfi-35)' provide named struct vtables
** Fix C documentation extraction ("snarfing") with recent GCC versions
** Fix some Interix build problems
** Fix Tru64 build problems
** Fix GC-related build issues on Solaris 10 x86 with Sun Studio 12
** Several small documentation fixes
Changes in 1.8.7 (since 1.8.6)
* Bugs fixed
** Fix compilation with `--disable-deprecated'
** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
** Fix build problem when scm_t_timespec is different from struct timespec
** Fix build when compiled with -Wundef -Werror
** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
** Fix reading of complex numbers where both parts are inexact decimals
** Allow @ macro to work with (ice-9 syncase)
Previously, use of the @ macro in a module whose code is being
transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
Now it works as you would expect (giving the value of the specified
module binding).
** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
** Fix potential deadlocks when running on multiple threads
** Fix problems building with the i586-mingw32msvc cross-compiler
It's now possible to build Guile for Windows by using the
i586-mingw32msvc cross-compiler on GNU/Linux. This kind of build
produces DLLs and a main program that can be copied to and used on a
Windows PC. For how to do this, see the `Cross building Guile'
section in `README'.
Changes in 1.8.6 (since 1.8.5)
* New features (see the manual for details)
** New convenience function `scm_c_symbol_length ()'
** Single stepping through code from Emacs
When you use GDS to evaluate Scheme code from Emacs, you can now use
`C-u' to indicate that you want to single step through that code. See
`Evaluating Scheme Code' in the manual for more details.
** New "guile(1)" man page!
* Changes to the distribution
** Automake's `AM_MAINTAINER_MODE' is no longer used
Thus, the `--enable-maintainer-mode' configure option is no longer
available: Guile is now always configured in "maintainer mode".
** `ChangeLog' files are no longer updated
Instead, changes are detailed in the version control system's logs. See
the top-level `ChangeLog' files for details.
* Bugs fixed
** `symbol->string' now returns a read-only string, as per R5RS
** Fix incorrect handling of the FLAGS argument of `fold-matches'
** `guile-config link' now prints `-L$libdir' before `-lguile'
** Fix memory corruption involving GOOPS' `class-redefinition'
** Fix possible deadlock in `mutex-lock'
** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
** Fix misleading output from `(help rationalize)'
** Fix build failure on Debian hppa architecture (bad stack growth detection)
** Fix `gcd' when called with a single, negative argument.
** Fix `Stack overflow' errors seen when building on some platforms
** Fix bug when `scm_with_guile ()' was called several times from the
same thread
** The handler of SRFI-34 `with-exception-handler' is now invoked in the
dynamic environment of the call to `raise'
** Fix potential deadlock in `make-struct'
** Fix compilation problem with libltdl from Libtool 2.2.x
** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
Changes in 1.8.5 (since 1.8.4)
* Infrastructure changes
** Guile repository switched from CVS to Git
The new repository can be accessed using
"git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
** Add support for `pkg-config'
See "Autoconf Support" in the manual for details.
* New modules (see the manual for details)
** `(srfi srfi-88)'
* New features (see the manual for details)
** New `postfix' read option, for SRFI-88 keyword syntax
** Some I/O primitives have been inlined, which improves I/O performance
** New object-based traps infrastructure
This is a GOOPS-based infrastructure that builds on Guile's low-level
evaluator trap calls and facilitates the development of debugging
features like single-stepping, breakpoints, tracing and profiling.
See the `Traps' node of the manual for details.
** New support for working on Guile code from within Emacs
Guile now incorporates the `GDS' library (previously distributed
separately) for working on Guile code from within Emacs. See the
`Using Guile In Emacs' node of the manual for details.
* Bugs fixed
** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
would trigger an unbound variable error for `match:andmap'.
** `(oop goops describe)' now properly provides the `describe' feature
** Fixed `args-fold' from `(srfi srfi-37)'
Previously, parsing short option names of argument-less options would
lead to a stack overflow.
** `(srfi srfi-35)' is now visible through `cond-expand'
** Fixed type-checking for the second argument of `eval'
** Fixed type-checking for SRFI-1 `partition'
** Fixed `struct-ref' and `struct-set!' on "light structs"
** Honor struct field access rights in GOOPS
** Changed the storage strategy of source properties, which fixes a deadlock
** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
** Fixed build issue for GNU/Linux on IA64
** Fixed build issues on NetBSD 1.6
** Fixed build issue on Solaris 2.10 x86_64
** Fixed build issue with DEC/Compaq/HP's compiler
** Fixed `scm_from_complex_double' build issue on FreeBSD
** Fixed `alloca' build issue on FreeBSD 6
** Removed use of non-portable makefile constructs
** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
** Make sure all tests honor `$TMPDIR'
Changes in 1.8.4 (since 1.8.3)
* Bugs fixed
** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
** Fixed a segmentation fault which occurred when displaying the
backtrace of a stack with a promise object (made by `delay') in it.
** Make `accept' leave guile mode while blocking
** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
** Fixed a build problem on AIX (use of func_data identifier)
** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
called with an associator proc that returns neither a pair nor #f.
** Secondary threads now always return a valid module for (current-module).
** Avoid MacOS build problems caused by incorrect combination of "64"
system and library calls.
** `guile-snarf' now honors `$TMPDIR'
** `guile-config compile' now reports CPPFLAGS used at compile-time
** Fixed build with Sun Studio (Solaris 9)
** Fixed wrong-type-arg errors when creating zero length SRFI-4
uniform vectors on AIX.
** Fixed a deadlock that occurs upon GC with multiple threads.
** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
** Fixed autotool-derived build problems on AIX 6.1.
** Fixed NetBSD/alpha support
** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
* New modules (see the manual for details)
** `(srfi srfi-69)'
* Documentation fixes and improvements
** Removed premature breakpoint documentation
The features described are not available in the series of 1.8.x
releases, so the documentation was misleading and has been removed.
** More about Guile's default *random-state* variable
** GOOPS: more about how to use `next-method'
* Changes to the distribution
** Corrected a few files that referred incorrectly to the old GPL + special exception licence
In fact Guile since 1.8.0 has been licensed with the GNU Lesser
General Public License, and the few incorrect files have now been
fixed to agree with the rest of the Guile distribution.
** Removed unnecessary extra copies of COPYING*
The distribution now contains a single COPYING.LESSER at its top level.
Changes in 1.8.3 (since 1.8.2)
* New modules (see the manual for details)
** `(srfi srfi-35)'
** `(srfi srfi-37)'
* Bugs fixed
** The `(ice-9 slib)' module now works as expected
** Expressions like "(set! 'x #t)" no longer yield a crash
** Warnings about duplicate bindings now go to stderr
** A memory leak in `make-socket-address' was fixed
** Alignment issues (e.g., on SPARC) in network routines were fixed
** A threading issue that showed up at least on NetBSD was fixed
** Build problems on Solaris and IRIX fixed
* Implementation improvements
** The reader is now faster, which reduces startup time
** Procedures returned by `record-accessor' and `record-modifier' are faster
Changes in 1.8.2 (since 1.8.1):
* New procedures (see the manual for details)
** set-program-arguments
** make-vtable
* Incompatible changes
** The body of a top-level `define' no longer sees the binding being created
In a top-level `define', the binding being created is no longer visible
from the `define' body. This breaks code like
"(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
unbound in the body. However, such code was not R5RS-compliant anyway,
per Section 5.2.1.
* Bugs fixed
** Fractions were not `equal?' if stored in unreduced form.
(A subtle problem, since printing a value reduced it, making it work.)
** srfi-60 `copy-bit' failed on 64-bit systems
** "guile --use-srfi" option at the REPL can replace core functions
(Programs run with that option were ok, but in the interactive REPL
the core bindings got priority, preventing SRFI replacements or
extensions.)
** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
** `kill' on mingw throws an error for a PID other than oneself
** Procedure names are attached to procedure-with-setters
** Array read syntax works with negative lower bound
** `array-in-bounds?' fix if an array has different lower bounds on each index
** `*' returns exact 0 for "(* inexact 0)"
This follows what it always did for "(* 0 inexact)".
** SRFI-19: Value returned by `(current-time time-process)' was incorrect
** SRFI-19: `date->julian-day' did not account for timezone offset
** `ttyname' no longer crashes when passed a non-tty argument
** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
** Small memory leaks have been fixed in `make-fluid' and `add-history'
** GOOPS: Fixed a bug in `method-more-specific?'
** Build problems on Solaris fixed
** Build problems on HP-UX IA64 fixed
** Build problems on MinGW fixed
Changes in 1.8.1 (since 1.8.0):
* LFS functions are now used to access 64-bit files on 32-bit systems.
* New procedures (see the manual for details)
** primitive-_exit - [Scheme] the-root-module
** scm_primitive__exit - [C]
** make-completion-function - [Scheme] (ice-9 readline)
** scm_c_locale_stringn_to_number - [C]
** scm_srfi1_append_reverse [C]
** scm_srfi1_append_reverse_x [C]
** scm_log - [C]
** scm_log10 - [C]
** scm_exp - [C]
** scm_sqrt - [C]
* Bugs fixed
** Build problems have been fixed on MacOS, SunOS, and QNX.
** `strftime' fix sign of %z timezone offset.
** A one-dimensional array can now be 'equal?' to a vector.
** Structures, records, and SRFI-9 records can now be compared with `equal?'.
** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
** `record-accessor' and `record-modifier' now have strict type checks.
Record accessor and modifier procedures now throw an error if the
record type of the record they're given is not the type expected.
(Previously accessors returned #f and modifiers silently did nothing).
** It is now OK to use both autoload and use-modules on a given module.
** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
Previously there was no checking on primatives like make-vector that
accept "one or two" arguments. Now there is.
** The srfi-1 assoc function now calls its equality predicate properly.
Previously srfi-1 assoc would call the equality predicate with the key
last. According to the SRFI, the key should be first.
** A bug in n-par-for-each and n-for-each-par-map has been fixed.
** The array-set! procedure no longer segfaults when given a bit vector.
** Bugs in make-shared-array have been fixed.
** string<? and friends now follow char<? etc order on 8-bit chars.
** The format procedure now handles inf and nan values for ~f correctly.
** exact->inexact should no longer overflow when given certain large fractions.
** srfi-9 accessor and modifier procedures now have strict record type checks.
This matches the srfi-9 specification.
** (ice-9 ftw) procedures won't ignore different files with same inode number.
Previously the (ice-9 ftw) procedures would ignore any file that had
the same inode number as a file they had already seen, even if that
file was on a different device.
Changes in 1.8.0 (changes since the 1.6.x series):
* Changes to the distribution
** Guile is now licensed with the GNU Lesser General Public License.
** The manual is now licensed with the GNU Free Documentation License.
** Guile now requires GNU MP (http://swox.com/gmp).
Guile now uses the GNU MP library for arbitrary precision arithmetic.
** Guile now has separate private and public configuration headers.
That is, things like HAVE_STRING_H no longer leak from Guile's
headers.
** Guile now provides and uses an "effective" version number.
Guile now provides scm_effective_version and effective-version
functions which return the "effective" version number. This is just
the normal full version string without the final micro-version number,
so the current effective-version is "1.8". The effective version
should remain unchanged during a stable series, and should be used for
items like the versioned share directory name
i.e. /usr/share/guile/1.8.
Providing an unchanging version number during a stable release for
things like the versioned share directory can be particularly
important for Guile "add-on" packages, since it provides a directory
that they can install to that won't be changed out from under them
with each micro release during a stable series.
** Thread implementation has changed.
When you configure "--with-threads=null", you will get the usual
threading API (call-with-new-thread, make-mutex, etc), but you can't
actually create new threads. Also, "--with-threads=no" is now
equivalent to "--with-threads=null". This means that the thread API
is always present, although you might not be able to create new
threads.
When you configure "--with-threads=pthreads" or "--with-threads=yes",
you will get threads that are implemented with the portable POSIX
threads. These threads can run concurrently (unlike the previous
"coop" thread implementation), but need to cooperate for things like
the GC.
The default is "pthreads", unless your platform doesn't have pthreads,
in which case "null" threads are used.
See the manual for details, nodes "Initialization", "Multi-Threading",
"Blocking", and others.
** There is the new notion of 'discouraged' features.
This is a milder form of deprecation.
Things that are discouraged should not be used in new code, but it is
OK to leave them in old code for now. When a discouraged feature is
used, no warning message is printed like there is for 'deprecated'
features. Also, things that are merely discouraged are nevertheless
implemented efficiently, while deprecated features can be very slow.
You can omit discouraged features from libguile by configuring it with
the '--disable-discouraged' option.
** Deprecation warnings can be controlled at run-time.
(debug-enable 'warn-deprecated) switches them on and (debug-disable
'warn-deprecated) switches them off.
** Support for SRFI 61, extended cond syntax for multiple values has
been added.
This SRFI is always available.
** Support for require-extension, SRFI-55, has been added.
The SRFI-55 special form `require-extension' has been added. It is
available at startup, and provides a portable way to load Scheme
extensions. SRFI-55 only requires support for one type of extension,
"srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
13 14)).
** New module (srfi srfi-26) provides support for `cut' and `cute'.
The (srfi srfi-26) module is an implementation of SRFI-26 which
provides the `cut' and `cute' syntax. These may be used to specialize
parameters without currying.
** New module (srfi srfi-31)
This is an implementation of SRFI-31 which provides a special form
`rec' for recursive evaluation.
** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
been merged with the core, making their functionality always
available.
The modules are still available, tho, and you could use them together
with a renaming import, for example.
** Guile no longer includes its own version of libltdl.
The official version is good enough now.
** The --enable-htmldoc option has been removed from 'configure'.
Support for translating the documentation into HTML is now always
provided. Use 'make html'.
** New module (ice-9 serialize):
(serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
don't trust the thread safety of most of your program, but where you
have some section(s) of code which you consider can run in parallel to
other sections. See ice-9/serialize.scm for more information.
** The configure option '--disable-arrays' has been removed.
Support for arrays and uniform numeric arrays is now always included
in Guile.
* Changes to the stand-alone interpreter
** New command line option `-L'.
This option adds a directory to the front of the load path.
** New command line option `--no-debug'.
Specifying `--no-debug' on the command line will keep the debugging
evaluator turned off, even for interactive sessions.
** User-init file ~/.guile is now loaded with the debugging evaluator.
Previously, the normal evaluator would have been used. Using the
debugging evaluator gives better error messages.
** The '-e' option now 'read's its argument.
This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
be used with '-e'. For example, you can now write a script like
#! /bin/sh
exec guile -e '(@ (demo) main)' -s "$0" "$@"
!#
(define-module (demo)
:export (main))
(define (main args)
(format #t "Demo: ~a~%" args))
* Changes to Scheme functions and syntax
** Guardians have changed back to their original semantics
Guardians now behave like described in the paper by Dybvig et al. In
particular, they no longer make guarantees about the order in which
they return objects, and they can no longer be greedy.
They no longer drop cyclic data structures.
The C function scm_make_guardian has been changed incompatibly and no
longer takes the 'greedy_p' argument.
** New function hashx-remove!
This function completes the set of 'hashx' functions.
** The concept of dynamic roots has been factored into continuation
barriers and dynamic states.
Each thread has a current dynamic state that carries the values of the
fluids. You can create and copy dynamic states and use them as the
second argument for 'eval'. See "Fluids and Dynamic States" in the
manual.
To restrict the influence that captured continuations can have on the
control flow, you can errect continuation barriers. See "Continuation
Barriers" in the manual.
The function call-with-dynamic-root now essentially temporarily
installs a new dynamic state and errects a continuation barrier.
** The default load path no longer includes "." at the end.
Automatically loading modules from the current directory should not
happen by default. If you want to allow it in a more controlled
manner, set the environment variable GUILE_LOAD_PATH or the Scheme
variable %load-path.
** The uniform vector and array support has been overhauled.
It now complies with SRFI-4 and the weird prototype based uniform
array creation has been deprecated. See the manual for more details.
Some non-compatible changes have been made:
- characters can no longer be stored into byte arrays.
- strings and bit vectors are no longer considered to be uniform numeric
vectors.
- array-rank throws an error for non-arrays instead of returning zero.
- array-ref does no longer accept non-arrays when no indices are given.
There is the new notion of 'generalized vectors' and corresponding
procedures like 'generalized-vector-ref'. Generalized vectors include
strings, bitvectors, ordinary vectors, and uniform numeric vectors.
Arrays use generalized vectors as their storage, so that you still
have arrays of characters, bits, etc. However, uniform-array-read!
and uniform-array-write can no longer read/write strings and
bitvectors.
** There is now support for copy-on-write substrings, mutation-sharing
substrings and read-only strings.
Three new procedures are related to this: substring/shared,
substring/copy, and substring/read-only. See the manual for more
information.
** Backtraces will now highlight the value that caused the error.
By default, these values are enclosed in "{...}", such as in this
example:
guile> (car 'a)
Backtrace:
In current input:
1: 0* [car {a}]
<unnamed port>:1:1: In procedure car in expression (car (quote a)):
<unnamed port>:1:1: Wrong type (expecting pair): a
ABORT: (wrong-type-arg)
The prefix and suffix used for highlighting can be set via the two new
printer options 'highlight-prefix' and 'highlight-suffix'. For
example, putting this into ~/.guile will output the bad value in bold
on an ANSI terminal:
(print-set! highlight-prefix "\x1b[1m")
(print-set! highlight-suffix "\x1b[22m")
** 'gettext' support for internationalization has been added.
See the manual for details.
** New syntax '@' and '@@':
You can now directly refer to variables exported from a module by
writing
(@ MODULE-NAME VARIABLE-NAME)
For example (@ (ice-9 pretty-print) pretty-print) will directly access
the pretty-print variable exported from the (ice-9 pretty-print)
module. You don't need to 'use' that module first. You can also use
'@' as a target of 'set!', as in (set! (@ mod var) val).
The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
but it can also access variables that have not been exported. It is
intended only for kluges and temporary fixes and for debugging, not
for ordinary code.
** Keyword syntax has been made more disciplined.
Previously, the name of a keyword was read as a 'token' but printed as
a symbol. Now, it is read as a general Scheme datum which must be a
symbol.
Previously:
guile> #:12
#:#{12}#
guile> #:#{12}#
#:#{\#{12}\#}#
guile> #:(a b c)
#:#{}#
ERROR: In expression (a b c):
Unbound variable: a
guile> #: foo
#:#{}#
ERROR: Unbound variable: foo
Now:
guile> #:12
ERROR: Wrong type (expecting symbol): 12
guile> #:#{12}#
#:#{12}#
guile> #:(a b c)
ERROR: Wrong type (expecting symbol): (a b c)
guile> #: foo
#:foo
** The printing of symbols that might look like keywords can be
controlled.
The new printer option 'quote-keywordish-symbols' controls how symbols
are printed that have a colon as their first or last character. The
default now is to only quote a symbol with #{...}# when the read
option 'keywords' is not '#f'. Thus:
guile> (define foo (string->symbol ":foo"))
guile> (read-set! keywords #f)
guile> foo
:foo
guile> (read-set! keywords 'prefix)
guile> foo
#{:foo}#
guile> (print-set! quote-keywordish-symbols #f)
guile> foo
:foo
** 'while' now provides 'break' and 'continue'
break and continue were previously bound in a while loop, but not
documented, and continue didn't quite work properly. The undocumented
parameter to break which gave a return value for the while has been
dropped.
** 'call-with-current-continuation' is now also available under the name
'call/cc'.
** The module system now checks for duplicate bindings.
The module system now can check for name conflicts among imported
bindings.
The behavior can be controlled by specifying one or more 'duplicates'
handlers. For example, to make Guile return an error for every name
collision, write:
(define-module (foo)
:use-module (bar)
:use-module (baz)
:duplicates check)
The new default behavior of the module system when a name collision
has been detected is to
1. Give priority to bindings marked as a replacement.
2. Issue a warning (different warning if overriding core binding).
3. Give priority to the last encountered binding (this corresponds to
the old behavior).
If you want the old behavior back without replacements or warnings you
can add the line:
(default-duplicate-binding-handler 'last)
to your .guile init file.
** New define-module option: :replace
:replace works as :export, but, in addition, marks the binding as a
replacement.
A typical example is `format' in (ice-9 format) which is a replacement
for the core binding `format'.
** Adding prefixes to imported bindings in the module system
There is now a new :use-module option :prefix. It can be used to add
a prefix to all imported bindings.
(define-module (foo)
:use-module ((bar) :prefix bar:))
will import all bindings exported from bar, but rename them by adding
the prefix `bar:'.
** Conflicting generic functions can be automatically merged.
When two imported bindings conflict and they are both generic
functions, the two functions can now be merged automatically. This is
activated with the 'duplicates' handler 'merge-generics'.
** New function: effective-version
Returns the "effective" version number. This is just the normal full
version string without the final micro-version number. See "Changes
to the distribution" above.
** New threading functions: parallel, letpar, par-map, and friends
These are convenient ways to run calculations in parallel in new
threads. See "Parallel forms" in the manual for details.
** New function 'try-mutex'.
This function will attempt to lock a mutex but will return immediately
instead of blocking and indicate failure.
** Waiting on a condition variable can have a timeout.
The function 'wait-condition-variable' now takes a third, optional
argument that specifies the point in time where the waiting should be
aborted.
** New function 'broadcast-condition-variable'.
** New functions 'all-threads' and 'current-thread'.
** Signals and system asyncs work better with threads.
The function 'sigaction' now takes a fourth, optional, argument that
specifies the thread that the handler should run in. When the
argument is omitted, the handler will run in the thread that called
'sigaction'.
Likewise, 'system-async-mark' takes a second, optional, argument that
specifies the thread that the async should run in. When it is
omitted, the async will run in the thread that called
'system-async-mark'.
C code can use the new functions scm_sigaction_for_thread and
scm_system_async_mark_for_thread to pass the new thread argument.
When a thread blocks on a mutex, a condition variable or is waiting
for IO to be possible, it will still execute system asyncs. This can
be used to interrupt such a thread by making it execute a 'throw', for
example.
** The function 'system-async' is deprecated.
You can now pass any zero-argument procedure to 'system-async-mark'.
The function 'system-async' will just return its argument unchanged
now.
** New functions 'call-with-blocked-asyncs' and
'call-with-unblocked-asyncs'
The expression (call-with-blocked-asyncs PROC) will call PROC and will
block execution of system asyncs for the current thread by one level
while PROC runs. Likewise, call-with-unblocked-asyncs will call a
procedure and will unblock the execution of system asyncs by one
level for the current thread.
Only system asyncs are affected by these functions.
** The functions 'mask-signals' and 'unmask-signals' are deprecated.
Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
instead. Those functions are easier to use correctly and can be
nested.
** New function 'unsetenv'.
** New macro 'define-syntax-public'.
It works like 'define-syntax' and also exports the defined macro (but
only on top-level).
** There is support for Infinity and NaNs.
Following PLT Scheme, Guile can now work with infinite numbers, and
'not-a-numbers'.
There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
(negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
"+nan.0"). These numbers are inexact and have no exact counterpart.
Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
sign of the dividend. The infinities are integers, and they answer #t
for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
not '=' to itself, but '+nan.0' is 'eqv?' to itself.
For example
(/ 1 0.0)
=> +inf.0
(/ 0 0.0)
=> +nan.0
(/ 0)
ERROR: Numerical overflow
Two new predicates 'inf?' and 'nan?' can be used to test for the
special values.
** Inexact zero can have a sign.
Guile can now distinguish between plus and minus inexact zero, if your
platform supports this, too. The two zeros are equal according to
'=', but not according to 'eqv?'. For example
(- 0.0)
=> -0.0
(= 0.0 (- 0.0))
=> #t
(eqv? 0.0 (- 0.0))
=> #f
** Guile now has exact rationals.
Guile can now represent fractions such as 1/3 exactly. Computing with
them is also done exactly, of course:
(* 1/3 3/2)
=> 1/2
** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
for exact arguments.
For example: (floor 2) now returns an exact 2 where in the past it
returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
** inexact->exact no longer returns only integers.
Without exact rationals, the closest exact number was always an
integer, but now inexact->exact returns the fraction that is exactly
equal to a floating point number. For example:
(inexact->exact 1.234)
=> 694680242521899/562949953421312
When you want the old behavior, use 'round' explicitly:
(inexact->exact (round 1.234))
=> 1
** New function 'rationalize'.
This function finds a simple fraction that is close to a given real
number. For example (and compare with inexact->exact above):
(rationalize (inexact->exact 1.234) 1/2000)
=> 58/47
Note that, as required by R5RS, rationalize returns only then an exact
result when both its arguments are exact.
** 'odd?' and 'even?' work also for inexact integers.
Previously, (odd? 1.0) would signal an error since only exact integers
were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
returns #f and (odd? 1.5) signals an error.
** Guile now has uninterned symbols.
The new function 'make-symbol' will return an uninterned symbol. This
is a symbol that is unique and is guaranteed to remain unique.
However, uninterned symbols can not yet be read back in.
Use the new function 'symbol-interned?' to check whether a symbol is
interned or not.
** pretty-print has more options.
The function pretty-print from the (ice-9 pretty-print) module can now
also be invoked with keyword arguments that control things like
maximum output width. See the manual for details.
** Variables have no longer a special behavior for `equal?'.
Previously, comparing two variables with `equal?' would recursivly
compare their values. This is no longer done. Variables are now only
`equal?' if they are `eq?'.
** `(begin)' is now valid.
You can now use an empty `begin' form. It will yield #<unspecified>
when evaluated and simply be ignored in a definition context.
** Deprecated: procedure->macro
Change your code to use 'define-macro' or r5rs macros. Also, be aware
that macro expansion will not be done during evaluation, but prior to
evaluation.
** Soft ports now allow a `char-ready?' procedure
The vector argument to `make-soft-port' can now have a length of
either 5 or 6. (Previously the length had to be 5.) The optional 6th
element is interpreted as an `input-waiting' thunk -- i.e. a thunk
that returns the number of characters that can be read immediately
without the soft port blocking.
** Deprecated: undefine
There is no replacement for undefine.
** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
have been discouraged.
They are relics from a time where a keyword like #:foo was used
directly as a Tcl option "-foo" and thus keywords were internally
stored as a symbol with a starting dash. We now store a symbol
without the dash.
Use symbol->keyword and keyword->symbol instead.
** The `cheap' debug option is now obsolete
Evaluator trap calls are now unconditionally "cheap" - in other words,
they pass a debug object to the trap handler rather than a full
continuation. The trap handler code can capture a full continuation
by using `call-with-current-continuation' in the usual way, if it so
desires.
The `cheap' option is retained for now so as not to break existing
code which gets or sets it, but setting it now has no effect. It will
be removed in the next major Guile release.
** Evaluator trap calls now support `tweaking'
`Tweaking' means that the trap handler code can modify the Scheme
expression that is about to be evaluated (in the case of an
enter-frame trap) or the value that is being returned (in the case of
an exit-frame trap). The trap handler code indicates that it wants to
do this by returning a pair whose car is the symbol 'instead and whose
cdr is the modified expression or return value.
* Changes to the C interface