This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 第1回 Scheme コードバトン | |
;; | |
;; ■ これは何か? | |
;; Scheme のコードをバトンのように回していき面白い物ができあがるのを楽しむ遊びです。 | |
;; 次回 Shibuya.lisp で成果を発表します。 | |
;; Scheme 初心者のコードを書くきっかけに、中級者には他人のコードを読む機会になればと思います。 | |
;; | |
;; ■ 2 つのルール | |
;; | |
;; (1)自分がこれだと思える変更をコードに加えて2日以内に次の人にまわしてください。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
invalid.email.address = 不正なメールアドレスです | |
password.must.be.set = パスワードを設定してください | |
password.too.short = パスワードが短かすぎます | |
passwords.do.not.match = パスワードが一致しません | |
number.required = 数値を入力してください | |
ajax.error=サーバーと接続できませんでした | |
invalid.zip.code = 不正な郵便番号(ZIP コード)です | |
invalid.postal.code = 不正な郵便番号です | |
unique.email.address = Email アドレスは他のユーザーと重複してはいけません | |
must.be.logged.in = ログインしてください |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dialects/dialects-supported.scm b/dialects/dialects-supported.scm | |
index f8e8d5b..60098cc 100644 | |
--- a/dialects/dialects-supported.scm | |
+++ b/dialects/dialects-supported.scm | |
@@ -1,6 +1,7 @@ | |
bigloo | |
chez | |
gambit | |
+gauche | |
guile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use util.match) | |
(use gauche.collection) | |
(use gauche.process) | |
(define (split-redirects rs) | |
(define (input-redirect? x) | |
(memq x '(< << <<< <&))) | |
(define (output-redirect? x) | |
(memq x '(> >> >&))) | |
(fold2 (rec (retry r ins outs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; 行中で最初に現れた括弧と対応する閉じ括弧を(薄く)ハイライトする | |
;;; (jit-lock-register #'dehighlight-paren) | |
;;; で動くつもり | |
(defvar paren-face 'paren-face) | |
(make-face 'paren-face) | |
(set-face-foreground 'paren-face "grey90") | |
(defun dehighlight-paren-1 (pos) | |
(add-text-properties pos (1+ pos) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/library/r6rs_lib.js b/src/library/r6rs_lib.js | |
index 2d738b4..ecdfc42 100644 | |
--- a/src/library/r6rs_lib.js | |
+++ b/src/library/r6rs_lib.js | |
@@ -1216,16 +1216,19 @@ if( typeof(BiwaScheme)!='object' ) BiwaScheme={}; with(BiwaScheme) { | |
x.cdr); | |
}) | |
define_libfunc("values", 0, null, function(ar){ | |
- return new Values(ar); | |
+ if (ar.length == 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use util.match) | |
(define (library-exports path name) | |
(match (guard (_ (else #f)) | |
(call-with-input-file path read | |
:if-does-not-exist #f)) | |
(('define-module (? (cut eq? name <>)) . forms) | |
(any (match-lambda | |
(('export . names) | |
names) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; | |
;;; - (export (rename ...)) できない | |
;;; - import のセマンティクスが違うので他のライブラリから | |
;;; import したものを export できない | |
;;; | |
;;; - ライブラリのバージョンは無視 | |
;;; - import の for も無視 | |
;;; - import 中の名前の衝突はエラーにしない(Gauche に任せる) | |
;;; - (rnrs . _) ライブラリはとりあえず null モジュールへ | |
;;; - (import (rnrs)) しないプログラムはとりあえず考えない |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/liblist.scm b/src/liblist.scm | |
index 0f470a8..d67ef95 100644 | |
--- a/src/liblist.scm | |
+++ b/src/liblist.scm | |
@@ -352,11 +352,16 @@ | |
(cond [(null-list? tail) (pred head)] ; tail call | |
[(not (pred head)) #f] | |
[else (loop (car tail) (cdr tail))]))) | |
- (let loop ([liss (cons lis more)]) | |
- (receive (cars cdrs) ((with-module gauche.internal %zip-nary-args) liss) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/util/stream.scm b/lib/util/stream.scm | |
index b2f67ae..5a45317 100644 | |
--- a/lib/util/stream.scm | |
+++ b/lib/util/stream.scm | |
@@ -576,10 +576,15 @@ | |
(apply stream-any pred (map stream-cdr strs))))) | |
(define (stream-every pred . strs) | |
- (let loop ((strs strs)) | |
- (or (find stream-null? strs) |
OlderNewer