| Topics in Scm web: | Changed: now 12:21 GMT | Changed by: |
| ColonMatrixExpansion | 24 Aug 2007 - 18:52 - NEW | WillFarr | |
| (:matrix x (index i j) M) (let ((m matrix) (rows #f) (cols #f)) (set! rows (matrix-rows m)) (set! cols (matrix-cols m)) (let loop ((i 0) (j 0)) (if ( j+1 cols)) (if ... | |||
| DefineWordBoundary | 21 Nov 2008 - 10:36 - r1.2 | MichaelBurschik | |
| begin scheme (define word-boundary? (lambda (character) (list? (memq character '(#\space #\tab #\newline))))) end | |||
| DoExpansionSRFI42 | 24 Aug 2007 - 18:46 - NEW | WillFarr | |
| (:do (let ( ) ) ( ) (let ( ) ) ( )) (let ( ) (let loop ( ) (if (let ( ) payload (if (loop ) ))))) | |||
| File1 | 31 Mar 2004 - 18:57 - NEW | Main.guest | |
| (require (lib "file.ss")) (make-directory "dir1" "dir2" "dir3") | |||
| FileProcessWords | 22 Jun 2006 - 12:44 - NEW | MichaelBurschik | |
| begin scheme (define for-each-word (lambda (filename proc) (with-input-from-file filename (lambda () (let read-word ((char (read-char)) (word '())) (cond ((eof-object ... | |||
| GaussianRandom | 14 May 2004 - 20:06 - NEW | BrentAFulgham | |
| (define (fract rand) (exact- inexact (/ (random 999999999) 1000000000))) (define (gaussian rand) (letrec ((rval (lambda () (- ( 2 (fract rand)) 1))) (generate (lambda ... | |||
| HashPresence | 16 Sep 2004 - 11:16 - r1.3 | NoelWelsh | |
| (define hash-has-key? (let ((symbol (gensym))) (lambda (table key) (not (eq? (hash-table-get table key (lambda () symbol)) symbol))))) | |||
| Idiom1 | 31 Mar 2004 - 18:58 - NEW | Main.guest | |
| (let ((result (member 3 '(0 1 2 3 4)))) (if result 'found 'not-found)) | |||
| Idiom2 | 31 Mar 2004 - 18:58 - NEW | Main.guest | |
| (require (lib "aif.ss" "macro")) (aif result (member 3 '(0 1 2 3 4)) 'found 'not-found) | |||
| Idiom3 | 31 Mar 2004 - 18:58 - NEW | Main.guest | |
| (define (port- string-list port) (let ((line (read-line port))) (if (eof-object? line) (list) (cons line (port- string-list port))))) | |||
| Idiom4 | 31 Mar 2004 - 18:58 - NEW | Main.guest | |
| (require (lib "aif.ss" "macro")) (define (port- string-list port) (aif line eof-object? (read-line port) (list) (cons line (port- string-list port)))) | |||
| IfItSyntaxLoc | 24 Aug 2007 - 22:38 - NEW | WillFarr | |
| (define-syntax (if-it stx) (syntax-case stx () (src-if-it test then else) (with-syntax ( it (datum- syntax-object (syntax src-if-it) 'it) ) (syntax/loc stx (let ( ... | |||
| ListIntEx | 12 May 2004 - 00:33 - NEW | BrentAFulgham | |
| (require (lib "42.ss" "srfi")) (printf "Infancy is: ") (foldl (lambda (x y) (printf "~a " x)) 0 (list 0 1 2)) (newline) (printf "Toddling is: ") (for-each (lambda ... | |||
| MatchByName | 01 Jan 2006 - 19:07 - NEW | RichardCobbe | |
| ;; tested in PLT Scheme 300.3 (require (lib "plt-match.ss")) (define-struct expr (srcloc)) (define-struct (id expr) (name)) (define-struct (lam expr) (arg body)) ... | |||
| NewSRFI42Generator | 24 Aug 2007 - 18:39 - NEW | WillFarr | |
| (define-syntax :matrix (syntax-rules (index) ((:matrix cc x (index i j) mexpr) (:do cc (let ((m mexpr) (rows #f) (cols #f)) (set! rows (matrix-rows m)) (set! cols ... | |||
| NumRecPassword | 01 Jun 2004 - 20:58 - r1.2 | JensAxelSoegaard | |
| (require (lib "14.ss" "srfi") (lib "27.ss" "srfi") (lib "42.ss" "srfi")) (define (generate-8-password) (string-append-ec (:range i 0 8) (let ((bigcs (substring (char ... | |||
| PattMatchAlphSample | 18 May 2004 - 18:27 - NEW | BrentAFulgham | |
| (require (lib "14.ss" "srfi")) (define (test-alphabetic words) (letrec ((exp (regexp (string-append "^ " (char-set- string (char-set-difference char-set:letter char ... | |||
| PattMatchCommented | 18 May 2004 - 22:27 - NEW | BrentAFulgham | |
| (require (lib "pregexp.ss" "mzlib") (lib "dns.ss" "net")) (define commented-regexp (pregexp "((?x: ; Ignore whitespace (?x: ; Capture the inet address (?! \\- ) ; ... | |||
| ReadingLines | 03 Apr 2004 - 20:14 - NEW | AntonVanStraaten | |
| begin scheme (define (for-each-line-in-file filename proc . mode) (with-input-from-file filename (lambda () (apply for-each-line proc (current-input-port) mode)) ... | |||
| ReadingLinesSample | 27 Oct 2005 - 18:59 - r1.2 | GeorgeHerson | |
| begin scheme (for-each-line-in-file "ReadingLines.scm" (let ((line-num 0)) (lambda (line) (printf "~a: ~a ~n" line-num line) (set! line-num (add1 line-num))))) end ... | |||
| ReadingLinesWithFold | 27 May 2004 - 03:53 - r1.2 | AntonVanStraaten | |
| begin scheme (define (fold-lines-in-file filename proc init . mode) (with-input-from-file filename (lambda () (apply fold-lines proc init (current-input-port) mode ... | |||
| ReadingLinesWithFoldSample | 27 Oct 2005 - 18:58 - r1.2 | GeorgeHerson | |
| begin scheme (fold-lines-in-file "ReadingLinesWithFold.scm" (lambda (line line-num) (printf "~a: ~a ~n" line-num line) (add1 line-num)) 1) end | |||
| SslUrl | 17 Dec 2008 - 15:25 - r1.5 | EricHanchrow | |
| ;; From Eli Barzilay #lang scheme ;; This will give us ssl: for an ssl version of url.ss, but still need an ;; explicit port number specification since url.ss does ... | |||
| Start1 | 31 Mar 2004 - 18:57 - NEW | Main.guest | |
| (define (display-type x) (cond (number? x) (display "It's a number!") (string? x) (display "It's a string!") else (display "It's something else!") )) | |||
| Web1 | 31 Mar 2004 - 18:57 - NEW | Main.guest | |
| (require (lib "url.ss" "net")) (display-pure-port (get-pure-port (string- url "http://schematics.sourceforge.net/"))) | |||
| Web2 | 31 Mar 2004 - 18:57 - NEW | Main.guest | |
| (require (lib "url.ss" "net")) (get-impure-port (string- url "http://schematics.sourceforge.net/")) | |||
| Web3 | 31 Mar 2004 - 18:57 - NEW | Main.guest | |
| (require (lib "url.ss" "net")) (purify-port (get-impure-port (string- url "http://schematics.sourceforge.net/"))) | |||
| WebChanges | 16 Aug 2001 - 19:58 - NEW | PeterThoeny | |
| INCLUDE{" TWIKIWEB .WebChanges"} | |||
| WebFileUpload1 | 07 Apr 2004 - 21:47 - NEW | FranciscoSolsona | |
| #!/bin/sh ":";exec /home/solsona/scheme/plt/bin/mzscheme r $0 (require (lib "cgi.ss" "net") (lib "file-upload.ss" "net")) (let ((b (get-bindings/mime)) (name (extract ... | |||
| WebHome | 25 Aug 2010 - 00:21 - r1.8 | BenKordesh | |
| Schematics Cookbook Source Code Repository This is the Scm web, where source code files for the Cookbook.WebHome Cookbook are stored. Files stored here can be included ... | |||
| WebIndex | 24 Nov 2001 - 11:41 - r1.2 | PeterThoeny | |
| SEARCH{"\. " scope "topic" regex "on" nosearch "on"} See also the faster WebTopicList | |||
| WebNotify | 04 Sep 2004 - 07:25 - r1.3 | AntonVanStraaten | |
| This is a subscription service to be automatically notified by e-mail when topics change in this Scm web. This is a convenient service, so you do not have to come ... | |||
| WebPreferences | 31 Mar 2004 - 18:55 - r1.4 | AntonVanStraaten | |
| TWiki.Scm Web Preferences The following settings are web preferences of the TWiki.Scm web. These preferences overwrite the site-level preferences in TWIKIWEB . WIKIPREFSTOPIC ... | |||
| WebRss | 30 Jan 2003 - 08:15 - NEW | PeterThoeny | |
| TWiki's Scm web SCRIPTURL /view SCRIPTSUFFIX /Scm The Scm web of TWiki. TWiki is a Web-Based Collaboration Platform for the Corporate World. INCLUDE{" TWIKIWEB .WebRssBase ... | |||
| WebSearch | 08 Aug 2001 - 05:26 - NEW | PeterThoeny | |
| INCLUDE{" TWIKIWEB .WebSearch"} | |||
| WebStatistics | 29 Apr 2013 - 14:27 - r1.146 | Main.guest | |
| Statistics for Scm Web Month: Topic views: Topic saves: File uploads: Most popular topic views: Top contributors for topic save and uploads: Apr 2013 2046 0 0 250 ... | |||
| WebTopicList | 24 Nov 2001 - 11:40 - NEW | PeterThoeny | |
| TOPICLIST{" $name "} See also the verbose WebIndex. | |||
| hash-add-element | 19 May 2004 - 20:38 - NEW | KarlaRamirez | |
| (let ((t (make-hash-table))) (hash-table-put! t 1 "foo") (hash-table-put! t 2 "bar")) | |||
| hash-immutable | 19 May 2004 - 21:04 - NEW | KarlaRamirez | |
| (let ((t (make-immutable-hash-table '((1 . "one") (2 . "two"))))) (display (hash-table-get t 1)) ;; The following raises an exception: (hash-table-put! t 3 "three ... | |||
| hash-printing | 19 May 2004 - 21:40 - NEW | KarlaRamirez | |
| (let ((t (make-immutable-hash-table '((1 . "one") (2 . "two"))))) (hash-table-for-each t (lambda (key value) (display (format "~a: ~a~n" key value))))) | |||
| hash-traverse | 19 May 2004 - 21:33 - NEW | KarlaRamirez | |
| (let ((t (make-immutable-hash-table '((1 . "one") (2 . "two"))))) (values (hash-table-map t (lambda (key value) (string-append "Foo:" value))) (hash-table-for-each ... | |||
| list-remove-duplicates-hash-1 | 19 May 2004 - 22:34 - NEW | FranciscoSolsona | |
| (define remove-duplicates (lambda (l) (let ((h (make-hash-table 'equal))) (let loop ((l l) (ans '())) (cond ((null? l) ans) ((hash-table-get h (car l) (lambda () ... | |||
| list-remove-duplicates-hash-2 | 19 May 2004 - 22:34 - NEW | FranciscoSolsona | |
| (require (lib "1.ss" "srfi")) ;; for filter (define remove-duplicates (lambda (l) (let ((h (make-hash-table 'equal))) (filter (lambda (elem) (hash-table-get h elem ... | |||
| recipe-decToroman | 19 May 2004 - 14:25 - r1.3 | JensAxelSoegaard | |
| ; decimal- roman : integer string ; format the integer num using roman numerals (define (decimal- roman num) (let ((decimal-numbers (list 1000 900 500 400 100 90 ... | |||
| recipe-romanTodec | 19 May 2004 - 14:52 - r1.3 | JensAxelSoegaard | |
| (require (lib "13.ss" "srfi")) (read-case-sensitive #t) ; due to the case expression ; roman- decimal : string integer ; convert a string with (uppercase) roman numerals ... | |||
| recipe-roundingNumbers1 | 27 Apr 2004 - 23:39 - NEW | ChandraQuintas | |
| (round .54) (round 43.5) (round .4999) (round 86.21) | |||
| recipe-roundingNumbers2 | 27 Apr 2004 - 23:40 - NEW | ChandraQuintas | |
| (floor 4.3) (ceiling 4.3) (truncate 4.3) (floor 3.5) (ceiling 3.5) (truncate 3.5) | |||
| recipe-validNumber | 27 Apr 2004 - 23:23 - NEW | ChandraQuintas | |
| (number? (string- number "42")) (number? (string- number "2+3i")) (number? (string- number "3.1416")) (number? (string- number "2/3")) (number? (string- number "hello ... | |||
| recipe-validNumber2 | 27 Apr 2004 - 23:22 - NEW | ChandraQuintas | |
| (complex? (string- number "3+4i")) (real? (string- number "#e1e10")) (rational? (string- number "6/10")) (integer? (string- number "3.0")) | |||
| time-arithmetic-1 | 05 May 2004 - 22:17 - r1.2 | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) (let ((now (current-seconds)) ;; using PLT (now-srfi-19 (time-second (current-time))) ;; using SRFI-19 (24-hours-from-now ( 24 60 60 ... | |||
| time-arithmetic-2 | 05 May 2004 - 18:52 - NEW | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) (let ((t1 (make-time 'time-utc 0 5000)) (t2 (make-time 'time-utc 0 2000))) (let ((duration (time-difference t1 t2))) (values (time-second ... | |||
| time-arithmetic-3 | 05 May 2004 - 18:53 - NEW | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) (let ((now (current-time)) (duration (make-time 'time-duration 0 ( 24 60 60)))) (values (add-duration now duration) ;; 24 hours from ... | |||
| time-epoch-1 | 28 Apr 2004 - 01:29 - NEW | FranciscoSolsona | |
| (require (lib "date.ss")) (let ((seconds 1) (minutes 1) (hour 13) (day 21) (month 4) (year 2004)) (find-seconds seconds minutes hour day month year)) | |||
| time-epoch-2 | 28 Apr 2004 - 01:30 - NEW | FranciscoSolsona | |
| (require (lib "date.ss")) (let ((seconds (current-seconds)) (today (seconds- date seconds)) (julian (date- julian/scalinger today))) (values julian (julian/scalinger ... | |||
| time-epoch-3 | 28 Apr 2004 - 01:32 - NEW | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) (let ((today (current-date))) (values (date- julian-day today) (date- modified-julian-day today) (date- time-monotonic today) (date ... | |||
| time-epoch-4 | 28 Apr 2004 - 01:36 - NEW | FranciscoSolsona | |
| (require (lib "date.ss")) (let ((seconds 1083022458) (date (seconds- date seconds))) (date- string date)) | |||
| time-epoch-5 | 28 Apr 2004 - 01:36 - NEW | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) (let ((some-date-string "2004-04-26T18:26:18-0500")) (let ((date (string- date some-date-string "~Y-~m-~dT~k:~M:~S~z"))) (values (date ... | |||
| time-intro-1 | 28 Apr 2004 - 01:12 - NEW | FranciscoSolsona | |
| (let ((seconds (current-seconds)) (today (seconds- date seconds))) (display (date-year today)) (newline)) | |||
| time-today-1 | 28 Apr 2004 - 01:19 - NEW | FranciscoSolsona | |
| (let ((seconds (current-seconds)) (today (seconds- date seconds))) (values (date-day today) (date-month today) (date-year today))) | |||
| time-today-2 | 28 Apr 2004 - 01:20 - NEW | FranciscoSolsona | |
| (require (lib "date.ss")) (let ((seconds (current-seconds)) (today (seconds- date seconds))) (date- string today)) | |||
| time-today-3 | 28 Apr 2004 - 01:20 - NEW | FranciscoSolsona | |
| (require (lib "date.ss")) (let ((seconds (current-seconds)) (today (seconds- date seconds))) (date- string today)) | |||
| time-today-4 | 28 Apr 2004 - 01:22 - NEW | FranciscoSolsona | |
| (require (lib "date.ss")) (let ((seconds (current-seconds)) (today (seconds- date seconds))) (date-display-format 'iso-8601) (date- string today)) | |||
| time-today-5 | 28 Apr 2004 - 01:23 - NEW | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) ;; or (require (lib "19.ss" "srfi" "time")) (let ((today (current-date))) (date- string today "~1")) | |||
| time-week-1 | 05 May 2004 - 21:47 - NEW | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) (let ((today (current-date))) (values (date- string today) (date- string today "Week No.: ~V, day: (~w of week) (~d of month) (~j of ... | |||
| time-week-2 | 05 May 2004 - 21:49 - NEW | FranciscoSolsona | |
| (require (lib "19.ss" "srfi")) (let ((today (current-date))) (values (date- string today) ;; `1' means `Monday' is the first day of the week: (date-week-number today ... | |||