This file contains hidden or 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
(define-module util.toplevel-let | |
(export toplevel-let)) | |
(select-module util.toplevel-let) | |
(define-syntax toplevel-let | |
(syntax-rules (define-toplevel define) | |
[(_ "loop" () binds0 binds1 tops) | |
(define-values tops (let binds0 (letrec binds1 (values . tops))))] | |
[(_ "loop" ((define-toplevel (name . args) . body) . xs) |
This file contains hidden or 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/vminsn.scm b/src/vminsn.scm | |
index f8e2dc9..8c7318d 100644 | |
--- a/src/vminsn.scm | |
+++ b/src/vminsn.scm | |
@@ -757,6 +757,7 @@ | |
(define-insn GSET 0 obj #f | |
(let* ((loc)) | |
(FETCH-OPERAND loc) | |
+ (SCM_FLONUM_ENSURE_MEM VAL0) | |
(cond |
This file contains hidden or 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
;; -*- coding: utf-8 -*- | |
(use gauche.time) | |
(define last-mb #`",(make-string 10000 #\\あ)ア") | |
(define middle-mb #`",(make-string 5000 #\\あ)ア,(make-string 5000 #\\あ)") | |
(define first-mb #`"ア,(make-string 10000 #\\あ)") | |
(define last-sb #`",(make-string 10000 #\\あ):") | |
(define middle-sb #`",(make-string 5000 #\\あ):,(make-string 5000 #\\あ)") | |
(define first-sb #`":,(make-string 10000 #\\あ)") |
This file contains hidden or 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/makiki.scm b/makiki.scm | |
index 82d260b..2c8b302 100644 | |
--- a/makiki.scm | |
+++ b/makiki.scm | |
@@ -564,29 +564,26 @@ | |
(cond [(null? uvs) dest] | |
[else (u8vector-copy! dest pos (car uvs)) | |
(loop (+ pos (u8vector-length (car uvs))) (cdr uvs))])))) | |
- (define (header+content vec) | |
- (let* ([p (open-input-uvector vec)] |
This file contains hidden or 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
(define (rxmatch-substrings match) | |
(if match | |
(map (cut rxmatch-substring match <>) (iota (rxmatch-num-matches match))) | |
'())) | |
(define (rxmatch-indices match) | |
(if match | |
(map (^i (cons (rxmatch-start match i) (rxmatch-end match i))) | |
(iota (rxmatch-num-matches match))) | |
'())) |
This file contains hidden or 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/configure.ac b/configure.ac | |
index aa17d7c..d0f37ef 100644 | |
--- a/configure.ac | |
+++ b/configure.ac | |
@@ -199,6 +199,12 @@ case $GAUCHE_THREAD_TYPE in | |
THREADDLLIBS="-lpthread -lrt" | |
GAUCHE_THREAD_TYPE=pthreads | |
;; | |
+ *-*-openbsd*) | |
+ AC_DEFINE(GC_OPENBSD_THREADS,1,[Define to use OpenBSD threads]) |
This file contains hidden or 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
(define (copy-instance obj) | |
(rlet1 new (make (class-of obj)) | |
(dolist [slot (class-slots (class-of obj))] | |
(set! (~ new (slot-definition-name slot)) | |
(~ obj (slot-definition-name slot)))))) |
This file contains hidden or 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
(defmacro def-coords-macro (kind) | |
(let ((with-coords (intern (format nil "WITH-~a-COORDS" kind))) | |
(checking (intern (format nil "CHECKING-~a-COORDS" kind))) | |
(box (intern (format nil "BOX-~a" kind))) | |
(unbox (intern (format nil "UNBOX-~a" kind)))) | |
`(progn | |
(defmacro ,box (v) `(cons ',',kind ,v)) | |
(defmacro ,unbox (v) | |
(let ((vv (gensym))) | |
`(let ((,vv ,v)) |
This file contains hidden or 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
(define %word ($->rope ($do [h ($one-of #[A-Za-z_$])] | |
[t ($many-chars #[A-Za-z0-9_$])] | |
($return (cons h t))))) | |
(define %key ($or %word %string)) | |
(define %object | |
(let1 %member ($do [k %key] %ws | |
%name-separator | |
[v %value] |
This file contains hidden or 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 gauche.sequence) | |
(use math.prime) | |
(define (goedel n) | |
($ fold (^[p k s] (* s (expt p k))) 1 *primes* | |
$ map digit->integer $ number->string n)) | |
(define meertens | |
(let1 n 0 | |
(rec (f) (inc! n) (if (= n (goedel n)) n (f))))) |