[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-119-g13fac

From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-119-g13fac28
Date: Thu, 29 Nov 2012 21:44:22 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, stable-2.0 has been updated
       via  13fac28218b42fc5408ce62b64ae3d09c95cd91e (commit)
       via  4d599c24413ace78824a71c755ce2d6a5154a71e (commit)
       via  a638be152c73c9d16b49b923e923748370096db2 (commit)
       via  8eccf6cdbdd03f8816110d07b56111aecc4880e6 (commit)
      from  bd31bce6ac5df7e45d0ec802d9d0738cbc32d9bf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 13fac28218b42fc5408ce62b64ae3d09c95cd91e
Author: Ludovic Courtès <address@hidden>
Date:   Thu Nov 29 22:38:23 2012 +0100

    Update `NEWS'.
    * NEWS: Add news for 2.0.7.

commit 4d599c24413ace78824a71c755ce2d6a5154a71e
Author: Ludovic Courtès <address@hidden>
Date:   Thu Nov 29 21:52:43 2012 +0100

    futures: Remove circular dependency with (ice-9 threads).
    * module/ice-9/futures.scm: Remove now-useless import of (ice-9 threads)
      introduced in commit be05b336.

commit a638be152c73c9d16b49b923e923748370096db2
Author: Ludovic Courtès <address@hidden>
Date:   Thu Nov 29 21:49:49 2012 +0100

    doc: Document nested futures.
    * doc/ref/api-scheduling.texi (Futures): Mention nested futures.
      Explain what happens upon `touch'.

commit 8eccf6cdbdd03f8816110d07b56111aecc4880e6
Author: Ludovic Courtès <address@hidden>
Date:   Thu Nov 29 21:13:00 2012 +0100

    doc: Remove example use of vectors as hash tables.
    Fixes <>.
    Reported by Daniel Hartwig <address@hidden>.
    * doc/ref/api-compound.texi (Hash Table Examples): Remove example use of
      vectors as hash tables.


Summary of changes:
 NEWS                        |  176 +++++++++++++++++++++++++++++++++++++++++++
 doc/ref/api-compound.texi   |   18 -----
 doc/ref/api-scheduling.texi |   30 +++++++-
 module/ice-9/futures.scm    |    1 -
 4 files changed, 205 insertions(+), 20 deletions(-)

diff --git a/NEWS b/NEWS
index 64d374d..c20a01a 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,182 @@ See the end for copying conditions.
 Please send Guile bug reports to address@hidden
+Changes in 2.0.7 (since 2.0.6):
+* Notable changes
+** SRFI-105 curly infix expressions are supported
+Curly infix expressions as described at
+ are now supported by
+Guile's reader.  This allows users to write things like {a * {b + c}}
+instead of (* a (+ b c)).  SRFI-105 support is enabled by using the
+`#!curly-infix' directive in source code, or the `curly-infix' reader
+option.  See the manual for details.
+** Reader options may now be per-port
+Historically, `read-options' and related procedures would manipulate
+global options, affecting the `read' procedure for all threads, and all
+current uses of `read'.
+Guile can now associate `read' options with specific ports, allowing
+different ports to use different options.  For instance, the
+`#!fold-case' and `#!no-fold-case' reader directives have been
+implemented, and their effect is to modify the current read options of
+the current port only; similarly for `#!curly-infix'.  Thus, it is
+possible, for instance, to have one port reading case-sensitive code,
+while another port reads case-insensitive code.
+** Futures may now be nested
+Futures may now be nested: a future can itself spawn and then `touch'
+other futures.  In addition, any thread that touches a future that has
+not completed now processes other futures while waiting for the touched
+future to completed.  This allows all threads to be kept busy, and was
+made possible by the use of delimited continuations (see the manual for
+Consequently, `par-map' has been rewritten and can now use all cores.
+** `load-in-vicinity' search for `.go' files in `%load-compiled-path'
+Previously, `load-in-vicinity' would look for compiled files in the
+auto-compilation cache, but not in `%load-compiled-path'.  This is now
+fixed.  This affects `load', and the `-l' command-line flag.  See
+<> for details.
+** Extension search order fixed, and LD_LIBRARY_PATH preserved
+Up to 2.0.6, Guile would modify the `LD_LIBRARY_PATH' environment
+variable (or whichever is relevant for the host OS) to insert its own
+default extension directories in the search path (using GNU libltdl
+facilities was not possible here.)  This approach was problematic in two
+First, the `LD_LIBRARY_PATH' modification would be visible to
+sub-processes, and would also affect future calls to `dlopen', which
+could lead to subtle bugs in the application or sub-processes.  Second,
+when the installation prefix is /usr/local, the `LD_LIBRARY_PATH'
+modification would typically end up inserting /usr/lib before
+/usr/local/lib in the search path, which is often the opposite of
+system-wide settings such as `'.
+Both issues have now been fixed.
+** `make-vtable-vtable' is now deprecated
+Programs should instead use `make-vtable' and `<standard-vtable>'.
+** The `-Wduplicate-case-datum' and `-Wbad-case-datum' are enabled
+These recently introduced warnings have been documented and are now
+enabled by default when auto-compiling.
+** Optimize calls to `equal?' with a constant argument
+The compiler simplifies calls to `equal?' with a constant argument to
+use `eq?' or `eqv?' instead, when applicable.
+* Manual updates
+** SRFI-9 records now documented under "Compound Data Types"
+The documentation of SRFI-9 record types has been moved in the "Compound
+Data Types", next to Guile's other record APIs.  A new section
+introduces the various record APIs, and describes the trade-offs they
+make.  These changes were made in an attempt to better guide users
+through the maze of records API, and to recommend SRFI-9 as the main
+The documentation of Guile's raw `struct' API has also been improved.
+** (ice-9 and-let-star) and (ice-9 curried-definitions) now documented
+These modules were missing from the manual.
+* New interfaces
+** New "functional record setters" as a GNU extension of SRFI-9
+The (srfi srfi-9 gnu) module now provides three new macros to deal with
+"updates" of immutable records: `define-immutable-record-type',
+`set-field', and `set-fields'.
+The first one allows record type "functional setters" to be defined;
+such setters keep the record unchanged, and instead return a new record
+with only one different field.  The remaining macros provide the same
+functionality, and also optimize updates of multiple or nested fields.
+See the manual for details.
+** web: New `http-get*', `response-body-port', and `text-content-type?'
+   procedures
+These procedures return a port from which to read the response's body.
+Unlike `http-get' and `read-response-body', they allow the body to be
+processed incrementally instead of being stored entirely in memory.
+The `text-content-type?' predicate allows users to determine whether the
+content type of a response is textual.
+See the manual for details.
+** `string-split' accepts character sets and predicates
+The `string-split' procedure can now be given a SRFI-14 character set or
+a predicate, instead of just a character.
+** R6RS SRFI support --- FIXME
+5d7c55b R6RS srfi library names should ignore first identifier after the :n
+acc1d8e Preserve additional R6RS library name components after srfi :n
+** `define-public' is no a longer curried definition by default
+The (ice-9 curried-definitions) should be used for such uses.  See the
+manual for details.
+* Build fixes
+** Remove reference to `scm_init_popen' when `fork' is unavailable
+This fixes a MinGW build issue (
+** Fix race between installing `guild' and the `guile-tools' symlink
+* Bug fixes
+** Procedures returned by `eval' now have docstrings
+   (
+** web client: correctly handle uri-query, etc. in relative URI headers
+   (
+** Fix docs for R6RS `hashtable-copy'
+** R6RS `string-for-each' now accepts multiple string arguments
+** Fix out-of-range error in the compiler's CSE pass
+   (
+** Add missing R6RS `open-file-input/output-port' procedure
+** Futures: Avoid creating the worker pool more than once
+** Fix invalid assertion about mutex ownership in threads.c
+   (
+** Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'
+** The `scandir' procedure now uses `lstat' instead of `stat'
+** Fix `generalized-vector->list' indexing bug with shared arrays
+   (
+** web: Change `http-get' to try all the addresses for the given URI
+** Implement `hash' for structs
+   (
+** `read' now adds source properties for data types beyond pairs
+** Improve error reporting in `append!'
+** In fold-matches, set regexp/notbol unless matching string start
+** Don't stat(2) and access(2) the .go location before using it
+** SRFI-19: use zero padding for hours in ISO 8601 format, not blanks
+** web: Fix uri-encoding for strings with no unreserved chars, and octets 0-15
+** More robust texinfo alias handling
+** Optimize `format' and `simple-format'
+   (
+** Angle of -0.0 is pi, not zero
 Changes in 2.0.6 (since 2.0.5):
 * Notable changes
diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi
index 379ae80..ba2dc8e 100644
--- a/doc/ref/api-compound.texi
+++ b/doc/ref/api-compound.texi
@@ -3750,13 +3750,6 @@ h
 #<hash-table 0/31>
-;; We can also use a vector of alists.
-(define h (make-vector 7 '()))
-#(() () () () () () ())
 ;; Inserting into a hash table can be done with hashq-set!
 (hashq-set! h 'foo "bar")
@@ -3770,17 +3763,6 @@ h
 (hashq-create-handle! h 'frob #f)
 (frob . #f)
-;; The vector now contains three elements in the alists and the frob
-;; entry is at index (hashq 'frob).
-#(((braz . "zonk")) ((foo . "bar")) () () () () ((frob . #f)))
-(hashq 'frob 7)
 @end lisp
 You can get the value for a given key with the procedure
diff --git a/doc/ref/api-scheduling.texi b/doc/ref/api-scheduling.texi
index a301663..9c2b413 100644
--- a/doc/ref/api-scheduling.texi
+++ b/doc/ref/api-scheduling.texi
@@ -982,6 +982,24 @@ machine, though, the computation of @code{(find prime? 
lst2)} may be
 done in parallel with that of the other @code{find} call, which can
 reduce the execution time of @code{find-prime}.
+Futures may be nested: a future can itself spawn and then @code{touch}
+other futures, leading to a directed acyclic graph of futures.  Using
+this facility, a parallel @code{map} procedure can be defined along
+these lines:
+(use-modules (ice-9 futures) (ice-9 match))
+(define (par-map proc lst)
+  (match lst
+    (()
+     '())
+    ((head tail ...)
+     (let ((tail (future (par-map proc tail)))
+           (head (proc head)))
+       (cons head (touch tail))))))
address@hidden lisp
 Note that futures are intended for the evaluation of purely functional
 expressions.  Expressions that have side-effects or rely on I/O may
 require additional care, such as explicit synchronization
@@ -995,6 +1013,15 @@ pool contains one thread per available CPU core, minus 
one, to account
 for the main thread.  The number of available CPU cores is determined
 using @code{current-processor-count} (@pxref{Processes}).
+When a thread touches a future that has not completed yet, it processes
+any pending future while waiting for it to complete, or just waits if
+there are no pending futures.  When @code{touch} is called from within a
+future, the execution of the calling future is suspended, allowing its
+host thread to process other futures, and resumed when the touched
+future has completed.  This suspend/resume is achieved by capturing the
+calling future's continuation, and later reinstating it (@pxref{Prompts,
+delimited continuations}).
 @deffn {Scheme Syntax} future exp
 Return a future for expression @var{exp}.  This is equivalent to:
@@ -1024,7 +1051,8 @@ Return the result of the expression embedded in future 
 If the result was already computed in parallel, @code{touch} returns
 instantaneously.  Otherwise, it waits for the computation to complete,
-if it already started, or initiates it.
+if it already started, or initiates it.  In the former case, the calling
+thread may process other futures in the meantime.
 @end deffn
diff --git a/module/ice-9/futures.scm b/module/ice-9/futures.scm
index 48eeb6a..6ff104d 100644
--- a/module/ice-9/futures.scm
+++ b/module/ice-9/futures.scm
@@ -21,7 +21,6 @@
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-11)
-  #:use-module (ice-9 threads)
   #:use-module (ice-9 q)
   #:use-module (ice-9 match)
   #:export (future make-future future? touch))

GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]