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
;; [SRFI-2] | |
;; http://srfi.schemers.org/srfi-2/srfi-2.html | |
;; | |
;; AND-LET* (CLAWS) BODY | |
(require 'cl-lib) | |
(defmacro and-let* (varlist &rest body) | |
"Like `let' but bind only if CLAW bind non-nil value. | |
Useful to avoid deep nest of `let' and `and'/`when'/`if' test. |
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 srfi-cond (&rest clauses) | |
(reduce | |
(lambda (clause res) | |
(let ((test (car clause))) | |
(cond | |
((eq (cadr clause) '=>) | |
(unless (= (length clause) 3) | |
(error "Malformed `srfi-cond' test => expr")) | |
(let ((v (make-symbol "v"))) | |
`(let ((,v ,test)) |
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
(print (ucs->char (logand (char->ucs #\生) (char->ucs #\死)))) |
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
一番最初のエラーは一週間前の gosh に関係するみたいなのですけど | |
Mar 12 15:39:39 zeus kernel: [204006.465570] gosh: page allocation failure: order:1, mode:0x20 | |
Mar 12 15:39:39 zeus kernel: [204006.465578] Pid: 3135, comm: gosh Not tainted 3.2.0-4-amd64 #1 Debian 3.2.54-2 | |
Mar 12 15:39:39 zeus kernel: [204006.465581] Call Trace: | |
Mar 12 15:39:39 zeus kernel: [204006.465584] <IRQ> [<ffffffff810b8f30>] ? warn_alloc_failed+0x11f/0x134 | |
Mar 12 15:39:39 zeus kernel: [204006.465599] [<ffffffff810bbc60>] ? __alloc_pages_nodemask+0x704/0x7aa | |
Mar 12 15:39:39 zeus kernel: [204006.465606] [<ffffffff810eb115>] ? kmem_getpages+0x4c/0xd9 | |
Mar 12 15:39:39 zeus kernel: [204006.465610] [<ffffffff810ec4c6>] ? fallback_alloc+0x13e/0x1e2 | |
Mar 12 15:39:39 zeus kernel: [204006.465617] [<ffffffff8134fdc7>] ? _raw_spin_unlock_irqrestore+0xe/0xf |
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
#!/usr/bin/env /usr/local/gauche-current/bin/gosh | |
(debug-print-width #f) | |
(use gauche.uvector) | |
(use gauche.sequence) | |
(use gauche.threads) | |
(use rfc.json) | |
(use parser.peg) |
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 nlet (name varlist &rest body) | |
"Named-LET for elisp. Create function dynamic bind as NAME. | |
DO NOT use primitive name of elisp function as NAME. | |
Example: | |
\(nlet next ((a 0) | |
(res '())) | |
(if (< a 3) | |
(next (1+ a) (cons (* a 2) res)) | |
(nreverse res))) |
OlderNewer