-
Notifications
You must be signed in to change notification settings - Fork 7
/
NEWS
10028 lines (7128 loc) · 369 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-2012 Free Software Foundation, Inc.
See the end for copying conditions.
Please send Guile bug reports to [email protected].
Changes in 2.0.5 (since 2.0.4):
This release fixes the binary interface information (SONAME) of
libguile, which was incorrect in 2.0.4. It does not contain other
changes.
Changes in 2.0.4 (since 2.0.3):
* Notable changes
** Better debuggability for interpreted procedures.
Guile 2.0 came with a great debugging experience for compiled
procedures, but the story for interpreted procedures was terrible. Now,
at least, interpreted procedures have names, and the `arity' procedure
property is always correct (or, as correct as it can be, in the presence
of `case-lambda').
** Support for cross-compilation.
One can now use a native Guile to cross-compile `.go' files for a
different architecture. See the documentation for `--target' in the
"Compilation" section of the manual, for information on how to use the
cross-compiler. See the "Cross building Guile" section of the README,
for more on how to cross-compile Guile itself.
** The return of `local-eval'.
Back by popular demand, `the-environment' and `local-eval' allow the
user to capture a lexical environment, and then evaluate arbitrary
expressions in that context. There is also a new `local-compile'
command. See "Local Evaluation" in the manual, for more. Special
thanks to Mark Weaver for an initial implementation of this feature.
** Fluids can now have default values.
Fluids are used for dynamic and thread-local binding. They have always
inherited their values from the context or thread that created them.
However, there was a case in which a new thread would enter Guile, and
the default values of all the fluids would be `#f' for that thread.
This has now been fixed so that `make-fluid' has an optional default
value for fluids in unrelated dynamic roots, which defaults to `#f'.
** Garbage collector tuning.
The garbage collector has now been tuned to run more often under some
circumstances.
*** Unmanaged allocation
The new `scm_gc_register_allocation' function will notify the collector
of unmanaged allocation. This will cause the collector to run sooner.
Guile's `scm_malloc', `scm_calloc', and `scm_realloc' unmanaged
allocators eventually call this function. This leads to better
performance under steady-state unmanaged allocation.
*** Transient allocation
When the collector runs, it will try to record the total memory
footprint of a process, if the platform supports this information. If
the memory footprint is growing, the collector will run more frequently.
This reduces the increase of the resident size of a process in response
to a transient increase in allocation.
*** Management of threads, bignums
Creating a thread will allocate a fair amount of memory. Guile now does
some GC work (using `GC_collect_a_little') when allocating a thread.
This leads to a better memory footprint when creating many short-lived
threads.
Similarly, bignums can occupy a lot of memory. Guile now offers hooks
to enable custom GMP allocators that end up calling
`scm_gc_register_allocation'. These allocators are enabled by default
when running Guile from the command-line. To enable them in libraries,
set the `scm_install_gmp_memory_functions' variable to a nonzero value
before loading Guile.
** SRFI-39 parameters are available by default.
Guile now includes support for parameters, as defined by SRFI-39, in the
default environment. See "Parameters" in the manual, for more
information. `current-input-port', `current-output-port', and
`current-error-port' are now parameters.
** Add `current-warning-port'.
Guile now outputs warnings on a separate port, `current-warning-port',
initialized to the value that `current-error-port' has on startup.
** Syntax parameters.
Following Racket's lead, Guile now supports syntax parameters. See
"Syntax parameters" in the manual, for more.
Also see Barzilay, Culpepper, and Flatt's 2011 SFP workshop paper,
"Keeping it Clean with syntax-parameterize".
** Parse command-line arguments from the locale encoding.
Guile now attempts to parse command-line arguments using the user's
locale. However for backwards compatibility with other 2.0.x releases,
it does so without actually calling `setlocale'. Please report any bugs
in this facility to [email protected].
** One-armed conditionals: `when' and `unless'
Guile finally has `when' and `unless' in the default environment. Use
them whenever you would use an `if' with only one branch. See
"Conditionals" in the manual, for more.
** `current-filename', `add-to-load-path'
There is a new form, `(current-filename)', which expands out to the
source file in which it occurs. Combined with the new
`add-to-load-path', this allows simple scripts to easily add nearby
directories to the load path. See "Load Paths" in the manual, for more.
** `random-state-from-platform'
This procedure initializes a random seed using good random sources
available on your platform, such as /dev/urandom. See "Random Number
Generation" in the manual, for more.
** Warn about unsupported `simple-format' options.
The `-Wformat' compilation option now reports unsupported format options
passed to `simple-format'.
** Manual updates
Besides the sections already mentioned, the following manual sections
are new in this release: "Modules and the File System", "Module System
Reflection", "Syntax Transformer Helpers", and "Local Inclusion".
* New interfaces
** (ice-9 session): `apropos-hook'
** New print option: `escape-newlines', defaults to #t.
** (ice-9 ftw): `file-system-fold', `file-system-tree', `scandir'
** `scm_c_value_ref': access to multiple returned values from C
** scm_call (a varargs version), scm_call_7, scm_call_8, scm_call_9
** Some new syntax helpers in (system syntax)
Search the manual for these identifiers and modules, for more.
* Build fixes
** FreeBSD build fixes.
** OpenBSD compilation fixes.
** Solaris 2.10 test suite fixes.
** IA64 compilation fix.
** MinGW build fixes.
** Work around instruction reordering on SPARC and HPPA in the VM.
** Gnulib updates: added `dirfd', `setenv' modules.
* Bug fixes
** Add a deprecated alias for $expt.
** Add an exception printer for `getaddrinfo-error'.
** Add deprecated shim for `scm_display_error' with stack as first argument.
** Add warnings for unsupported `simple-format' options.
** Allow overlapping regions to be passed to `bytevector-copy!'.
** Better function prologue disassembly
** Compiler: fix miscompilation of (values foo ...) in some contexts.
** Compiler: fix serialization of #nil-terminated lists.
** Compiler: allow values bound in non-tail let expressions to be collected.
** Deprecate SCM_ASRTGO.
** Document invalidity of (begin) as expression; add back-compat shim.
** Don't leak file descriptors when mmaping objcode.
** Empty substrings no longer reference the original stringbuf.
** FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.
** FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
** FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
** FFI: Properly unpack small integer return values in closure call.
** Fix R6RS `fold-left' so the accumulator is the first argument.
** Fix bit-set*! bug from 2005.
** Fix bug in `make-repl' when `lang' is actually a <language>.
** Fix bugs related to mutation, the null string, and shared substrings.
** Fix <dynwind> serialization.
** Fix erroneous check in `set-procedure-properties!'.
** Fix generalized-vector-{ref,set!} for slices.
** Fix error messages involving definition forms.
** Fix primitive-eval to return #<unspecified> for definitions.
** HTTP: Extend handling of "Cache-Control" header.
** HTTP: Fix qstring writing of cache-extension values
** HTTP: Fix validators for various list-style headers.
** HTTP: Permit non-date values for Expires header.
** HTTP: `write-request-line' writes absolute paths, not absolute URIs.
** Hack the port-column of current-output-port after printing a prompt.
** Make sure `regexp-quote' tests use Unicode-capable string ports.
** Peval: Fix bugs in the new optimizer.
** Statistically unique marks and labels, for robust hygiene across sessions.
** Web: Allow URIs with empty authorities, like "file:///etc/hosts".
** `,language' at REPL sets the current-language fluid.
** `primitive-load' returns the value(s) of the last expression.
** `scm_from_stringn' always returns unique strings.
** `scm_i_substring_copy' tries to narrow the substring.
** i18n: Fix gc_malloc/free mismatch on non-GNU systems.
Changes in 2.0.3 (since 2.0.2):
* Speed improvements
** Guile has a new optimizer, `peval'.
`Peval' is a partial evaluator that performs constant folding, dead code
elimination, copy propagation, and inlining. By default it runs on
every piece of code that Guile compiles, to fold computations that can
happen at compile-time, so they don't have to happen at runtime.
If we did our job right, the only impact you would see would be your
programs getting faster. But if you notice slowdowns or bloated code,
please send a mail to [email protected] with details.
Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
peval and its implementation.
You can see what peval does on a given piece of code by running the new
`,optimize' REPL meta-command, and comparing it to the output of
`,expand'. See "Compile Commands" in the manual, for more.
** Fewer calls to `stat'.
Guile now stats only the .go file and the .scm file when loading a fresh
compiled file.
* Notable changes
** New module: `(web client)', a simple synchronous web client.
See "Web Client" in the manual, for more.
** Users can now install compiled `.go' files.
See "Installing Site Packages" in the manual.
** Remove Front-Cover and Back-Cover text from the manual.
The manual is still under the GNU Free Documentation License, but no
longer has any invariant sections.
** More helpful `guild help'.
`guild' is Guile's multi-tool, for use in shell scripting. Now it has a
nicer interface for querying the set of existing commands, and getting
help on those commands. Try it out and see!
** New macro: `define-syntax-rule'
`define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
one clause. See "Syntax Rules" in the manual, for more.
** The `,time' REPL meta-command now has more precision.
The output of this command now has microsecond precision, instead of
10-millisecond precision.
** `(ice-9 match)' can now match records.
See "Pattern Matching" in the manual, for more on matching records.
** New module: `(language tree-il debug)'.
This module provides a tree-il verifier. This is useful for people that
generate tree-il, usually as part of a language compiler.
** New functions: `scm_is_exact', `scm_is_inexact'.
These provide a nice C interface for Scheme's `exact?' and `inexact?',
respectively.
* Bugs fixed
See the git log (or the ChangeLog) for more details on these bugs.
** Fix order of importing modules and resolving duplicates handlers.
** Fix a number of bugs involving extended (merged) generics.
** Fix invocation of merge-generics duplicate handler.
** Fix write beyond array end in arrays.c.
** Fix read beyond end of hashtable size array in hashtab.c.
** (web http): Locale-independent parsing and serialization of dates.
** Ensure presence of Host header in HTTP/1.1 requests.
** Fix take-right and drop-right for improper lists.
** Fix leak in get_current_locale().
** Fix recursive define-inlinable expansions.
** Check that srfi-1 procedure arguments are procedures.
** Fix r6rs `map' for multiple returns.
** Fix scm_tmpfile leak on POSIX platforms.
** Fix a couple of leaks (objcode->bytecode, make-boot-program).
** Fix guile-lib back-compatibility for module-stexi-documentation.
** Fix --listen option to allow other ports.
** Fix scm_to_latin1_stringn for substrings.
** Fix compilation of untyped arrays of rank not 1.
** Fix unparse-tree-il of <dynset>.
** Fix reading of #||||#.
** Fix segfault in GOOPS when class fields are redefined.
** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
Changes in 2.0.2 (since 2.0.1):
* Notable changes
** `guile-tools' renamed to `guild'
The new name is shorter. Its intended future use is for a CPAN-like
system for Guile wizards and journeyfolk to band together to share code;
hence the name. `guile-tools' is provided as a backward-compatible
symbolic link. See "Using Guile Tools" in the manual, for more.
** New control operators: `shift' and `reset'
See "Shift and Reset" in the manual, for more information.
** `while' as an expression
Previously the return value of `while' was unspecified. Now its
values are specified both in the case of normal termination, and via
termination by invoking `break', possibly with arguments. See "while
do" in the manual for more.
** Disallow access to handles of weak hash tables
`hash-get-handle' and `hash-create-handle!' are no longer permitted to
be called on weak hash tables, because the fields in a weak handle could
be nulled out by the garbage collector at any time, but yet they are
otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
instead.
** More precision for `get-internal-run-time', `get-internal-real-time'
On 64-bit systems which support POSIX clocks, Guile's internal timing
procedures offer nanosecond resolution instead of the 10-millisecond
resolution previously available. 32-bit systems now use 1-millisecond
timers.
** Guile now measures time spent in GC
`gc-stats' now returns a meaningful value for `gc-time-taken'.
** Add `gcprof'
The statprof profiler now exports a `gcprof' procedure, driven by the
`after-gc-hook', to see which parts of your program are causing GC. Let
us know if you find it useful.
** `map', `for-each' and some others now implemented in Scheme
We would not mention this in NEWS, as it is not a user-visible change,
if it were not for one thing: `map' and `for-each' are no longer
primitive generics. Instead they are normal bindings, which can be
wrapped by normal generics. This fixes some modularity issues between
core `map', SRFI-1 `map', and GOOPS.
Also it's pretty cool that we can do this without a performance impact.
** Add `scm_peek_byte_or_eof'.
This helper is like `scm_peek_char_or_eof', but for bytes instead of
full characters.
** Implement #:stop-at-first-non-option option for getopt-long
See "getopt-long Reference" in the manual, for more information.
** Improve R6RS conformance for conditions in the I/O libraries
The `(rnrs io simple)' module now raises the correct R6RS conditions in
error cases. `(rnrs io ports)' is also more correct now, though it is
still a work in progress.
** All deprecated routines emit warnings
A few deprecated routines were lacking deprecation warnings. This has
been fixed now.
* Speed improvements
** Constants in compiled code now share state better
Constants with shared state, like `("foo")' and `"foo"', now share state
as much as possible, in the entire compilation unit. This cuts compiled
`.go' file sizes in half, generally, and speeds startup.
** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
These procedures are now twice as fast as they were.
** UTF-8 ports to bypass `iconv' entirely
This reduces memory usage in a very common case.
** Compiler speedups
The compiler is now about 40% faster. (Note that this is only the case
once the compiler is itself compiled, so the build still takes as long
as it did before.)
** VM speed tuning
Some assertions that were mostly useful for sanity-checks on the
bytecode compiler are now off for both "regular" and "debug" engines.
This together with a fix to cache a TLS access and some other tweaks
improve the VM's performance by about 20%.
** SRFI-1 list-set optimizations
lset-adjoin and lset-union now have fast paths for eq? sets.
** `memq', `memv' optimizations
These procedures are now at least twice as fast than in 2.0.1.
* Deprecations
** Deprecate scm_whash API
`scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
`SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
`scm_whash_insert' are now deprecated. Use the normal hash table API
instead.
** Deprecate scm_struct_table
`SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
`SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
`scm_struct_table', and `scm_struct_create_handle' are now deprecated.
These routines formed part of the internals of the map between structs
and classes.
** Deprecate scm_internal_dynamic_wind
The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
as the `scm_dynwind' API is better, and this API encourages users to
stuff SCM values into pointers.
** Deprecate scm_immutable_cell, scm_immutable_double_cell
These routines are deprecated, as the GC_STUBBORN API doesn't do
anything any more.
* Manual updates
Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
ports)' documentation from the R6RS documentation. Thanks Andreas!
* Bugs fixed
** Fix double-loading of script in -ds case
** -x error message fix
** iconveh-related cross-compilation fixes
** Fix small integer return value packing on big endian machines.
** Fix hash-set! in weak-value table from non-immediate to immediate
** Fix call-with-input-file & relatives for multiple values
** Fix `hash' for inf and nan
** Fix libguile internal type errors caught by typing-strictness==2
** Fix compile error in MinGW fstat socket detection
** Fix generation of auto-compiled file names on MinGW
** Fix multithreaded access to internal hash tables
** Emit a 1-based line number in error messages
** Fix define-module ordering
** Fix several POSIX functions to use the locale encoding
** Add type and range checks to the complex generalized vector accessors
** Fix unaligned accesses for bytevectors of complex numbers
** Fix '(a #{.} b)
** Fix erroneous VM stack overflow for canceled threads
Changes in 2.0.1 (since 2.0.0):
* Notable changes
** guile.m4 supports linking with rpath
The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
include appropriate directives to the linker to include libguile-2.0.so
in the runtime library lookup path.
** `begin' expands macros in its body before other expressions
This enables support for programs like the following:
(begin
(define even?
(lambda (x)
(or (= x 0) (odd? (- x 1)))))
(define-syntax odd?
(syntax-rules ()
((odd? x) (not (even? x)))))
(even? 10))
** REPL reader usability enhancements
The REPL now flushes input after a read error, which should prevent one
error from causing other errors. The REPL also now interprets comments
as whitespace.
** REPL output has configurable width
The REPL now defaults to output with the current terminal's width, in
columns. See "Debug Commands" in the manual for more information on
the ,width command.
** Better C access to the module system
Guile now has convenient C accessors to look up variables or values in
modules and their public interfaces. See `scm_c_public_ref' and friends
in "Accessing Modules from C" in the manual.
** Added `scm_call_5', `scm_call_6'
See "Fly Evaluation" in the manual.
** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
See "Keyword Procedures" in the manual, for more. Note that
`scm_from_locale_keyword' should not be used when the name is a C string
constant.
** R6RS unicode and string I/O work
Added efficient implementations of `get-string-n' and `get-string-n!'
for binary ports. Exported `current-input-port', `current-output-port'
and `current-error-port' from `(rnrs io ports)', and enhanced support
for transcoders.
** Added `pointer->scm', `scm->pointer' to `(system foreign)'
These procedure are useful if one needs to pass and receive SCM values
to and from foreign functions. See "Foreign Variables" in the manual,
for more.
** Added `heap-allocated-since-gc' to `(gc-stats)'
Also fixed the long-standing bug in the REPL `,stat' command.
** Add `on-error' REPL option
This option controls what happens when an error occurs at the REPL, and
defaults to `debug', indicating that Guile should enter the debugger.
Other values include `report', which will simply print a backtrace
without entering the debugger. See "System Commands" in the manual.
** Enforce immutability of string literals
Attempting to mutate a string literal now causes a runtime error.
** Fix pthread redirection
Guile 2.0.0 shipped with headers that, if configured with pthread
support, would re-define `pthread_create', `pthread_join', and other API
to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
unintended, and not necessary: because threads must enter Guile with
`scm_with_guile', Guile can handle thread registration itself, without
needing to make the GC aware of all threads. This oversight has been
fixed.
** `with-continuation-barrier' now unwinds on `quit'
A throw to `quit' in a continuation barrier will cause Guile to exit.
Before, it would do so before unwinding to the barrier, which would
prevent cleanup handlers from running. This has been fixed so that it
exits only after unwinding.
** `string->pointer' and `pointer->string' have optional encoding arg
This allows users of the FFI to more easily deal in strings with
particular (non-locale) encodings, like "utf-8". See "Void Pointers and
Byte Access" in the manual, for more.
** R6RS fixnum arithmetic optimizations
R6RS fixnum operations are are still slower than generic arithmetic,
however.
** New procedure: `define-inlinable'
See "Inlinable Procedures" in the manual, for more.
** New procedure: `exact-integer-sqrt'
See "Integer Operations" in the manual, for more.
** "Extended read syntax" for symbols parses better
In #{foo}# symbols, backslashes are now treated as escapes, as the
symbol-printing code intended. Additionally, "\x" within #{foo}# is now
interpreted as starting an R6RS hex escape. This is backward compatible
because the symbol printer would never produce a "\x" before. The
printer also works better too.
** Added `--fresh-auto-compile' option
This allows a user to invalidate the auto-compilation cache. It's
usually not needed. See "Compilation" in the manual, for a discussion.
* Manual updates
** GOOPS documentation updates
** New man page
Thanks to Mark Harig for improvements to guile.1.
** SRFI-23 documented
The humble `error' SRFI now has an entry in the manual.
* New modules
** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
** `(ice-9 eval-string)': "Fly Evaluation", in the manual
** `(ice-9 command-line)', not documented yet
* Bugs fixed
** Fixed `iconv_t' memory leak on close-port
** Fixed some leaks with weak hash tables
** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
** `after-gc-hook' works again
** `define-record-type' now allowed in nested contexts
** `exact-integer-sqrt' now handles large integers correctly
** Fixed C extension examples in manual
** `vhash-delete' honors HASH argument
** Make `locale-digit-grouping' more robust
** Default exception printer robustness fixes
** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
** `read' updates line/column numbers when reading SCSH block comments
** Fix imports of multiple custom interfaces of same module
** Fix encoding scanning for non-seekable ports
** Fix `setter' when called with a non-setter generic
** Fix f32 and f64 bytevectors to not accept rationals
** Fix description of the R6RS `finite?' in manual
** Quotient, remainder and modulo accept inexact integers again
** Fix `continue' within `while' to take zero arguments
** Fix alignment for structures in FFI
** Fix port-filename of stdin, stdout, stderr to match the docs
** Fix weak hash table-related bug in `define-wrapped-pointer-type'
** Fix partial continuation application with pending procedure calls
** scm_{to,from}_locale_string use current locale, not current ports
** Fix thread cleanup, by using a pthread_key destructor
** Fix `quit' at the REPL
** Fix a failure to sync regs in vm bytevector ops
** Fix (texinfo reflection) to handle nested structures like syntax patterns
** Fix stexi->html double translation
** Fix tree-il->scheme fix for <prompt>
** Fix compilation of <prompt> in <fix> in single-value context
** Fix race condition in ensure-writable-dir
** Fix error message on ,disassemble "non-procedure"
** Fix prompt and abort with the boot evaluator
** Fix `procedure->pointer' for functions returning `void'
** Fix error reporting in dynamic-pointer
** Fix problems detecting coding: in block comments
** Fix duplicate load-path and load-compiled-path in compilation environment
** Add fallback read(2) suppport for .go files if mmap(2) unavailable
** Fix c32vector-set!, c64vector-set!
** Fix mistakenly deprecated read syntax for uniform complex vectors
** Fix parsing of exact numbers with negative exponents
** Ignore SIGPIPE in (system repl server)
** Fix optional second arg to R6RS log function
** Fix R6RS `assert' to return true value.
** Fix fencepost error when seeking in bytevector input ports
** Gracefully handle `setlocale' errors when starting the REPL
** Improve support of the `--disable-posix' configure option
** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
Changes in 2.0.0 (changes since the 1.8.x series):
* New modules (see the manual for details)
** `(srfi srfi-18)', more sophisticated multithreading support
** `(srfi srfi-27)', sources of random bits
** `(srfi srfi-38)', External Representation for Data With Shared Structure
** `(srfi srfi-42)', eager comprehensions
** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
** `(srfi srfi-67)', compare procedures
** `(ice-9 i18n)', internationalization support
** `(ice-9 futures)', fine-grain parallelism
** `(rnrs bytevectors)', the R6RS bytevector API
** `(rnrs io ports)', a subset of the R6RS I/O port API
** `(system xref)', a cross-referencing facility (FIXME undocumented)
** `(ice-9 vlist)', lists with constant-time random access; hash lists
** `(system foreign)', foreign function interface
** `(sxml match)', a pattern matcher for SXML
** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
** `(system vm coverage)', a line-by-line code coverage library
** `(web uri)', URI data type, parser, and unparser
** `(web http)', HTTP header parsers and unparsers
** `(web request)', HTTP request data type, reader, and writer
** `(web response)', HTTP response data type, reader, and writer
** `(web server)', Generic HTTP server
** `(ice-9 poll)', a poll wrapper
** `(web server http)', HTTP-over-TCP web server implementation
** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
Guile's copy of Andrew K. Wright's `match' library has been replaced by
a compatible hygienic implementation by Alex Shinn. It is now
documented, see "Pattern Matching" in the manual.
Compared to Andrew K. Wright's `match', the new `match' lacks
`match-define', `match:error-control', `match:set-error-control',
`match:error', `match:set-error', and all structure-related procedures.
** Imported statprof, SSAX, and texinfo modules from Guile-Lib
The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
toolkit from Guile-Lib have been imported into Guile proper. See
"Standard Library" in the manual for more details.
** Integration of lalr-scm, a parser generator
Guile has included Dominique Boucher's fine `lalr-scm' parser generator
as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
information.
* Changes to the stand-alone interpreter
** Guile now can compile Scheme to bytecode for a custom virtual machine.
Compiled code loads much faster than Scheme source code, and runs around
3 or 4 times as fast, generating much less garbage in the process.
** Evaluating Scheme code does not use the C stack.
Besides when compiling Guile itself, Guile no longer uses a recursive C
function as an evaluator. This obviates the need to check the C stack
pointer for overflow. Continuations still capture the C stack, however.
** New environment variables: GUILE_LOAD_COMPILED_PATH,
GUILE_SYSTEM_LOAD_COMPILED_PATH
GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
for source files. It is a different path, however, because compiled
files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
GUILE_SYSTEM_PATH.
** New read-eval-print loop (REPL) implementation
Running Guile with no arguments drops the user into the new REPL. See
"Using Guile Interactively" in the manual, for more information.
** Remove old Emacs interface
Guile had an unused `--emacs' command line argument that was supposed to
help when running Guile inside Emacs. This option has been removed, and
the helper functions `named-module-use!' and `load-emacs-interface' have
been deprecated.
** Add `(system repl server)' module and `--listen' command-line argument
The `(system repl server)' module exposes procedures to listen on
sockets for connections, and serve REPLs to those clients. The --listen
command-line argument allows any Guile program to thus be remotely
debuggable.
See "Invoking Guile" for more information on `--listen'.
** Command line additions
The guile binary now supports a new switch "-x", which can be used to
extend the list of filename extensions tried when loading files
(%load-extensions).
** New reader options: `square-brackets', `r6rs-hex-escapes',
`hungry-eol-escapes'
The reader supports a new option (changeable via `read-options'),
`square-brackets', which instructs it to interpret square brackets as
parentheses. This option is on by default.
When the new `r6rs-hex-escapes' reader option is enabled, the reader
will recognize string escape sequences as defined in R6RS. R6RS string
escape sequences are incompatible with Guile's existing escapes, though,
so this option is off by default.
Additionally, Guile follows the R6RS newline escaping rules when the
`hungry-eol-escapes' option is enabled.
See "String Syntax" in the manual, for more information.
** Function profiling and tracing at the REPL
The `,profile FORM' REPL meta-command can now be used to statistically
profile execution of a form, to see which functions are taking the most
time. See `,help profile' for more information.
Similarly, `,trace FORM' traces all function applications that occur
during the execution of `FORM'. See `,help trace' for more information.
** Recursive debugging REPL on error
When Guile sees an error at the REPL, instead of saving the stack, Guile
will directly enter a recursive REPL in the dynamic context of the
error. See "Error Handling" in the manual, for more information.
A recursive REPL is the same as any other REPL, except that it
has been augmented with debugging information, so that one can inspect
the context of the error. The debugger has been integrated with the REPL
via a set of debugging meta-commands.
For example, one may access a backtrace with `,backtrace' (or
`,bt'). See "Interactive Debugging" in the manual, for more
information.
** New `guile-tools' commands: `compile', `disassemble'
Pass the `--help' command-line option to these commands for more
information.
** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
Users may now install Guile to nonstandard prefixes and just run
`/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
include `/path/to/lib'.
** Guile's Emacs integration is now more keyboard-friendly
Backtraces may now be disclosed with the keyboard in addition to the
mouse.
** Load path change: search in version-specific paths before site paths
When looking for a module, Guile now searches first in Guile's
version-specific path (the library path), *then* in the site dir. This
allows Guile's copy of SSAX to override any Guile-Lib copy the user has
installed. Also it should cut the number of `stat' system calls by half,
in the common case.
** Value history in the REPL on by default
By default, the REPL will save computed values in variables like `$1',
`$2', and the like. There are programmatic and interactive interfaces to
control this. See "Value History" in the manual, for more information.
** Readline tab completion for arguments
When readline is enabled, tab completion works for arguments too, not
just for the operator position.
** Expression-oriented readline history
Guile's readline history now tries to operate on expressions instead of
input lines. Let us know what you think!
** Interactive Guile follows GNU conventions
As recommended by the GPL, Guile now shows a brief copyright and
warranty disclaimer on startup, along with pointers to more information.
* Changes to Scheme functions and syntax
** Support for R6RS libraries
The `library' and `import' forms from the latest Scheme report have been
added to Guile, in such a way that R6RS libraries share a namespace with
Guile modules. R6RS modules may import Guile modules, and are available
for Guile modules to import via use-modules and all the rest. See "R6RS
Libraries" in the manual for more information.
** Implementations of R6RS libraries
Guile now has implementations for all of the libraries defined in the
R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
Standard Libraries" in the manual for a full list of libraries.
** Partial R6RS compatibility
Guile now has enough support for R6RS to run a reasonably large subset
of R6RS programs.
Guile is not fully R6RS compatible. Many incompatibilities are simply
bugs, though some parts of Guile will remain R6RS-incompatible for the
foreseeable future. See "R6RS Incompatibilities" in the manual, for more
information.
Please contact [email protected] if you have found an issue not
mentioned in that compatibility list.
** New implementation of `primitive-eval'
Guile's `primitive-eval' is now implemented in Scheme. Actually there is
still a C evaluator, used when building a fresh Guile to interpret the
compiler, so we can compile eval.scm. Thereafter all calls to
primitive-eval are implemented by VM-compiled code.
This allows all of Guile's procedures, be they interpreted or compiled,
to execute on the same stack, unifying multiple-value return semantics,
providing for proper tail recursion between interpreted and compiled
code, and simplifying debugging.
As part of this change, the evaluator no longer mutates the internal
representation of the code being evaluated in a thread-unsafe manner.
There are two negative aspects of this change, however. First, Guile
takes a lot longer to compile now. Also, there is less debugging
information available for debugging interpreted code. We hope to improve
both of these situations.
There are many changes to the internal C evalator interface, but all
public interfaces should be the same. See the ChangeLog for details. If
we have inadvertantly changed an interface that you were using, please
contact [email protected].
** Procedure removed: `the-environment'
This procedure was part of the interpreter's execution model, and does
not apply to the compiler.
** No more `local-eval'
`local-eval' used to exist so that one could evaluate code in the
lexical context of a function. Since there is no way to get the lexical
environment any more, as that concept has no meaning for the compiler,
and a different meaning for the interpreter, we have removed the
function.
If you think you need `local-eval', you should probably implement your
own metacircular evaluator. It will probably be as fast as Guile's
anyway.
** Scheme source files will now be compiled automatically.
If a compiled .go file corresponding to a .scm file is not found or is
not fresh, the .scm file will be compiled on the fly, and the resulting
.go file stored away. An advisory note will be printed on the console.
Note that this mechanism depends on the timestamp of the .go file being
newer than that of the .scm file; if the .scm or .go files are moved
after installation, care should be taken to preserve their original
timestamps.
Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
will be created if needed.
To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
variable to 0, or pass --no-auto-compile on the Guile command line.
** New POSIX procedures: `getrlimit' and `setrlimit'
Note however that the interface of these functions is likely to change
in the next prerelease.
** New POSIX procedure: `getsid'
Scheme binding for the `getsid' C library call.
** New POSIX procedure: `getaddrinfo'
Scheme binding for the `getaddrinfo' C library function.
** Multicast socket options
Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
options. See "Network Sockets and Communication" in the manual, for
more information.
** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
These socket procedures now take bytevectors as arguments, instead of
strings. There is some deprecated string support, however.
** New GNU procedures: `setaffinity' and `getaffinity'.
See "Processes" in the manual, for more information.
** New procedures: `compose', `negate', and `const'
See "Higher-Order Functions" in the manual, for more information.
** New procedure in `(oops goops)': `method-formals'
** New procedures in (ice-9 session): `add-value-help-handler!',
`remove-value-help-handler!', `add-name-help-handler!'
`remove-name-help-handler!', `procedure-arguments'
The value and name help handlers provide some minimal extensibility to
the help interface. Guile-lib's `(texinfo reflection)' uses them, for
example, to make stexinfo help documentation available. See those
procedures' docstrings for more information.
`procedure-arguments' describes the arguments that a procedure can take,
combining arity and formals. For example:
(procedure-arguments resolve-interface)