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
(define (f) | |
(let ((x 0)) | |
(let ((up (lambda () (set! x (+ x 1)) x)) | |
(dn (lambda () (set! x (- x 1)) x))) | |
(cons up dn)))) | |
(define g (f)) | |
((car g)) ;=> 1 | |
((car g)) ;=> 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
(global-set-key "\C-h" 'delete-backward-char) | |
;;; Misc | |
(tool-bar-mode 0) | |
(show-paren-mode 1) | |
(global-linum-mode 1) | |
(setq column-number-mode t) | |
(setq indent-tabs-mode nil) | |
(setq make-backup-files nil) |
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
_\(\w+\): function \(.+\) {$ | |
function \1\2 { | |
\(\w+\): function \(.+\) {$ | |
function \1\2 { | |
_function\s- | |
function _ | |
$function |
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
// 後置インクリメントは限定継続を使って表せるし、 | |
// 逆に限定継続の一番身近な例が後置インクリメント | |
// http://www.kmonos.net/pub/Presen/fltv/FLTV.pdf | |
class BigInt { | |
BigInt&/<noreturn> operator++(int) { | |
var f = rest_of_full_expression(); | |
var g = after_full_expression(); | |
var r = f(*this); | |
this->incr(); | |
g(r); |
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
;;; amb stuff | |
;; stack of cc. | |
(define fail '()) | |
;;; nondeterminsm macro operator | |
(define-syntax amb | |
(syntax-rules () | |
((_) ((pop! fail))) |
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
// Copyright 2012 the V8 project authors. All rights reserved. | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are | |
// met: | |
// | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above | |
// copyright notice, this list of conditions and the following | |
// disclaimer in the documentation and/or other materials provided |
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
[32;01m * [39;49;00mPackage: app-shells/bash-4.2_p36 | |
[32;01m * [39;49;00mRepository: gentoo_prefix | |
[32;01m * [39;49;00mUSE: bootstrap elibc_Darwin kernel_Darwin net prefix userland_GNU x64-macos | |
[32;01m * [39;49;00mFEATURES: nostrip preserve-libs | |
>>> Unpacking source... | |
>>> Unpacking bash-4.2.tar.gz to /Users/yuichi/Library/Gentoo/var/tmp/portage/app-shells/bash-4.2_p36/work | |
[32;01m*[0m Applying bash42-001 ... | |
[A[94C [34;01m[ [32;01mok[34;01m ][0m | |
[32;01m*[0m Applying bash42-002 ... | |
[A[94C [34;01m[ [32;01mok[34;01m ][0m |
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
>>> Emerging (1 of 32) sys-devel/gnuconfig-20120116 | |
* gnuconfig-20120116.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] | |
>>> Unpacking source... | |
>>> Unpacking gnuconfig-20120116.tar.bz2 to /Users/yuichi/Library/Gentoo/var/tmp/portage/sys-devel/gnuconfig-20120116/work | |
dyld: Library not loaded: /Users/yuichi/Library/Gentoo/usr/lib/libbz2.1.dylib | |
Referenced from: /Users/yuichi/Library/Gentoo/bin/bzip2 | |
Reason: image not found | |
tar: This does not look like a tar archive | |
tar: Exiting with failure status due to previous errors | |
* ERROR: sys-devel/gnuconfig-20120116 failed (unpack phase): |
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
options | original(js) | --disable-type-check | --release | |
----------------+---------------+-----------------------+------------ | |
Richards | 14975 | 7120 | 13905 | |
DeltaBlue | 18883 | 10288 | 22123 | |
RayTrace | 20752 | 28638 | 31534 | |
RegExp | 3658 | 3781 | 3770 | |
Splay | 5700 | 5680 | 5729 | |
NavierStokes | 21095 | 21179 | 21327 | |
(higher is better) |
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
O-02551-MAC:example nishiwaki.yuichi$ jsx --run cat.jsx | |
fs.js:381 | |
var r = binding.read(fd, buffer, offset, length, position); | |
^ | |
Error: EAGAIN, no more processes | |
at Object.fs.readSync (fs.js:381:19) | |
at Function._Main.main$AS (/private/var/folders/9c/fvg4rhxn5c57ptdjzv3t69c95jvdwl/T/cat.jsx.73524.13953608600.js:119:18) | |
at Object.JSX.runMain (/private/var/folders/9c/fvg4rhxn5c57ptdjzv3t69c95jvdwl/T/cat.jsx.73524.13953608600.js:178:15) | |
at /private/var/folders/9c/fvg4rhxn5c57ptdjzv3t69c95jvdwl/T/cat.jsx.73524.13953608600.js:214:5 |