Changeset 17334 in project


Ignore:
Timestamp:
02/21/10 04:50:06 (11 years ago)
Author:
Kon Lovett
Message:

Save.

Location:
release/4/srfi-27/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • release/4/srfi-27/trunk/composite-random-source.scm

    r17249 r17334  
    5656          (lambda (e) (for-each (lambda (s) ((@random-source-randomize! s) e)) srcs))
    5757          ;pseudo-randomize!
    58           (lambda (i j) (for-each (lambda (s) ((*random-source-pseudo-randomize! s) i j) ) srcs) )
     58          (lambda (i j) (for-each (lambda (s) ((@random-source-pseudo-randomize! s) i j) ) srcs) )
    5959          ;make-integers
    6060          (lambda () (lambda (n) (comb-int (map (cut <> n) make-integers) n)))
  • release/4/srfi-27/trunk/entropy-source.scm

    r17246 r17334  
    4646;; Entropy Source Constructor Registry
    4747
    48 (define registered-entropy-sources)
    49 (define registered-entropy-source)
    50 (define unregister-entropy-source)
    51 (define register-entropy-source!)
    52 (let ((*registered-entropy-sources* '()))
     48(define +sources+ '())
    5349
    54   (set! registered-entropy-sources (lambda () (map car *registered-entropy-sources*)))
     50(define (registered-entropy-sources) (map car +sources+))
    5551
    56   (set! registered-entropy-source (lambda (kind) (alist-ref kind *registered-entropy-sources* eq?)))
     52(define (registered-entropy-source kind) (alist-ref kind +sources+ eq?))
    5753
    58   (set! unregister-entropy-source
    59     (lambda (kind)
    60       (check-symbol 'unregister-entropy-source! kind)
    61       (set! *registered-entropy-sources* (alist-delete! kind *registered-entropy-sources* eq?))))
     54(define (unregister-entropy-source kind) (set! +sources+ (alist-delete! kind +sources+ eq?)))
    6255
    63   (set! register-entropy-source!
    64     (lambda (kind maker)
    65       (check-symbol 'register-entropy-source! kind)
    66       (check-procedure 'register-entropy-source! maker)
    67       (set! *registered-entropy-sources*
    68             (alist-update! kind maker *registered-entropy-sources* eq?)))) )
     56(define (register-entropy-source! kind maker)
     57  (check-symbol 'register-entropy-source! kind)
     58  (check-procedure 'register-entropy-source! maker)
     59  (set! +sources+ (alist-update! kind maker +sources+ eq?)) )
    6960
    7061) ;entropy-source
  • release/4/srfi-27/trunk/entropy-support.scm

    r17330 r17334  
    2929            u8vector-set! make-u8vector u8vector-length
    3030            f64vector-set! make-f64vector f64vector-length
    31             read-u8vector!)
     31            read-u8vector read-u8vector!)
    3232          (only lolevel move-memory!)
    33           (only srfi-27-srfi-4 u8vector-filled! f64vector-filled!))
     33          (only srfi-27-vector-support u8vector-filled! f64vector-filled!))
    3434
    35   (require-library extras srfi-4 lolevel srfi-27-srfi-4)
     35  (require-library
     36    extras lolevel srfi-4
     37    srfi-27-vector-support)
    3638
    3739;; Double stuff
     
    8284                (else                                   (loop) ) ) ) ) ) ) )
    8385
    84 #; Slower but simpler
     86#; ;Slower but simpler
    8587(define (entropic-u8vector-filled/f64 u8cnt u8vec f64gen)
    8688  (let ((u8vec (or u8vec (make-u8vector u8cnt))))
  • release/4/srfi-27/trunk/random-source.scm

    r17320 r17334  
    1212    *random-source-maximum-range
    1313    *random-source-maximum-modulus
    14     *random-source-entropy-source
    15     *random-source-entropy-source-set!
     14    *random-source-entropy-source *random-source-entropy-source-set!
    1615    @random-source-state-ref
    1716    @random-source-state-set!
    1817    @random-source-randomize!
    19     *random-source-pseudo-randomize!
     18    @random-source-pseudo-randomize!
    2019    @random-source-make-integers
    2120    @random-source-make-reals
     
    6564;; Random Source Constructor Registry
    6665
    67 (define registered-random-sources)
    68 (define registered-random-source)
    69 (define unregister-random-source)
    70 (define register-random-source!)
    71 (let ((*registered-random-sources* '()))
     66(define +sources+ '())
    7267
    73   (set! registered-random-sources (lambda () (map car *registered-random-sources*)))
     68(define (registered-random-sources) (map car +sources+))
    7469
    75   (set! registered-random-source (lambda (kind) (alist-ref kind *registered-random-sources* eq?)))
     70(define (registered-random-source kind) (alist-ref kind +sources+ eq?))
    7671
    77   (set! unregister-random-source
    78     (lambda (kind)
    79       (check-symbol 'unregister-random-source! kind)
    80       (set! *registered-random-sources* (alist-delete! kind *registered-random-sources* eq?))))
     72(define (unregister-random-source kind) (set! +sources+ (alist-delete! kind +sources+ eq?)))
    8173
    82   (set! register-random-source!
    83     (lambda (kind maker)
    84       (check-symbol 'register-random-source! kind)
    85       (check-procedure 'register-random-source! maker)
    86       (set! *registered-random-sources*
    87             (alist-update! kind maker *registered-random-sources* eq?)))) )
     74(define (register-random-source! kind maker)
     75  (check-symbol 'register-random-source! kind)
     76  (check-procedure 'register-random-source! maker)
     77  (set! +sources+ (alist-update! kind maker +sources+ eq?)) )
    8878
    8979) ; module random-source
  • release/4/srfi-27/trunk/srfi-27-numbers.scm

    r17332 r17334  
    2424  (import (except scheme
    2525            <= < zero? positive? negative?
    26             + * - / add1 quotient expt
     26            + * - / quotient expt
    2727            integer? real?
    2828            exact->inexact)
     
    3030          (only numbers
    3131            <= < zero? positive? negative?
    32             + * - / add1 quotient expt
     32            + * - / quotient expt
    3333            integer? real?
    3434            exact->inexact)
     35          (only type-checks check-real)
    3536          (only type-errors
    3637            error-argument-type error-open-interval error-closed-interval))
     
    4142    (not usual-integrations
    4243      <= < zero? positive? negative?
    43       + * - / add1 quotient expt
     44      + * - / quotient expt
    4445      integer? real?
    4546      exact->inexact) )
     
    8889;;
    8990
    90 #;
    9191(define (check-real-open-interval loc obj mn mx #!optional argnam)
    9292  (check-real loc obj argnam)
  • release/4/srfi-27/trunk/srfi-27-vector-support.scm

    r17332 r17334  
    2828            f32vector? f32vector-length f32vector-ref f32vector-set!
    2929            f64vector? f64vector-length f64vector-ref f64vector-set!)
    30           (only vector-lib vector-map! vector-fold))
     30          (only vector-lib vector-map! vector-fold)
     31          (only type-errors error-vector))
    3132
    32   (require-library srfi-4 vector-lib)
     33  (require-library srfi-4 vector-lib type-errors)
    3334
    3435;;;
  • release/4/srfi-27/trunk/srfi-27.meta

    r17331 r17334  
    1717        "mwc.scm"
    1818        "moa.scm"
     19        "entropy-source.scm"
    1920        "entropy-support.scm"
    2021        "entropy-port.scm"
    21         "entropy-source.scm"
    2222        "entropy-clock.scm"
    2323        "entropy-unix.scm"
     
    2626        "random-source.scm"
    2727        "composite-random-source.scm"
     28        "srfi-27.scm"
    2829        "srfi-27-distributions.scm"
    2930        "srfi-27-vector.scm"
     
    3132        "srfi-27-numbers.scm"
    3233        "srfi-27-vector-support.scm"
    33         "srfi-27.scm"
    3434  "srfi-27.setup") )
  • release/4/srfi-27/trunk/srfi-27.setup

    r17331 r17334  
    1111    #;-no-procedure-checks)))
    1212
     13#|
    1314(setup-shared-extension-module 'thread-support (extension-version "3.0.0")
    1415  #:compile-options '(
     
    9697    ;-debug-level 0
    9798    #;-no-procedure-checks) )
     99|#
    98100
    99101(setup-shared-extension-module 'mrg32k3a (extension-version "3.0.0")
  • release/4/srfi-27/trunk/thread-reaper.scm

    r17326 r17334  
    99;
    1010; The "reaped" thread's end- result/exception is ignored; it is supposed to
    11 ; be clean.
     11; be "clean" after
    1212
    1313(module thread-reaper
     
    2828          (only miscmacros until)
    2929          (only synch make-object/synch synch-with)
    30           (only thread-support check-thread)
     30          (only thread-support check-thread))
    3131
    32   (require-library data-structures srfi-18 miscmacros synch thread-support)
     32  (require-library
     33    data-structures srfi-18
     34    miscmacros
     35    synch thread-support)
    3336
    3437;;
     
    4043(define thread-reaper-start!)
    4144(define thread-reaper-stop!)
     45(define thread-reaper-greedy)
    4246(define thread-reaper-quantum)
    4347(define thread-reap!)
  • release/4/srfi-27/trunk/timed-resource.scm

    r17326 r17334  
    2121            thread-join! thread-sleep! thread-start! make-thread)
    2222          (only miscmacros begin0)
    23           (only synch make-object/synch object?/synch synch-with set!/synch)
     23          (only synch make-object/synch object?/synch synch-with set!/synch %synch-with)
    2424          (only type-checks check-procedure define-check+error-type)
    2525          (only thread-support check-thread-timeout thread-block-timeout? thread-unblock!)
     
    5555  (let ((th (timed-resource-thread tr)))
    5656    (thread-terminate! th)
    57     (when (timed-resource-item tr) (timed-resource-close! tr))
     57    (when (timed-resource-item tr) (timed-resource-close tr))
    5858    (thread-join! th) ) )
    5959
Note: See TracChangeset for help on using the changeset viewer.