Skip to content

Instantly share code, notes, and snippets.

@Hamayama
Hamayama / console.stub.diff
Created June 22, 2014 11:39
GaucheのWindowsコンソール処理のパッチ(2014-6-22)
--- console20140622.stub 2014-06-20 15:56:48 +0900
+++ console.stub 2014-06-22 18:33:51 +0900
@@ -268,7 +268,9 @@
:type <boolean>)
(key.repeat-count :c-name "rec.Event.KeyEvent.wRepeatCount"
:type <int>)
- (key.virtual-key-code :c-name "rec.Event.KeyEvent.wVirtualScanCode"
+ (key.virtual-key-code :c-name "rec.Event.KeyEvent.wVirtualKeyCode"
+ :type <int>)
+ (key.virtual-scan-code :c-name "rec.Event.KeyEvent.wVirtualScanCode"
@Hamayama
Hamayama / console.stub.diff
Last active August 29, 2015 14:16
GaucheのWindowsコンソール処理のパッチ(2015-2-27)(2015-3-3修正)(2015-3-3修正2)
--- console_orig.stub 2015-02-24 13:43:19 +0900
+++ console.stub 2015-03-03 13:57:53 +0900
@@ -71,7 +71,7 @@
(define-enum CTRL_C_EVENT)
(define-enum CTRL_BREAK_EVENT)
-(define-cproc sys-generate-console-ctrl-event (event::<int> pgid::<int>)
+(define-cproc sys-generate-console-ctrl-event (event::<int> pgid::<uint>)
::<void>
(check (GenerateConsoleCtrlEvent (DWORD event) (DWORD pgid))))
@Hamayama
Hamayama / error.c.diff
Last active August 29, 2015 14:16
GaucheのWindows版のシステムエラー表示のパッチ(2015-2-27)(2015-5-6修正)(2015-7-3修正)
--- error_orig.c 2015-07-02 18:12:26 +0900
+++ error.c 2015-07-03 00:14:02 +0900
@@ -650,17 +650,23 @@
syserr = SCM_MAKE_STR_COPYING(strerror(en));
#else /*GAUCHE_WINDOWS*/
if (en < 0) {
- LPTSTR msgbuf;
+ ScmObj ostr = Scm_MakeOutputStringPort(TRUE);
+ LPTSTR msgbuf = NULL;
const char *xmsgbuf;
@Hamayama
Hamayama / example9-4.scm.diff
Last active August 29, 2015 14:23
Gauche-glのWindows版の実行エラー2のパッチ(2015-6-13)(2015-6-14修正)
--- example9-4_orig.scm 2014-12-29 21:55:10 +0900
+++ example9-4.scm 2015-06-14 21:03:17 +0900
@@ -80,6 +80,11 @@
(glut-init-window-size 250 250)
(glut-init-window-position 100 100)
(glut-create-window (car args))
+
+ ;; When using GLEW, 'glew-init' must be called after 'glut-create-window'
+ ;; to use OpenGL extensions such as 'gl-tex-image-3d'.
+ (glew-init)
@Hamayama
Hamayama / 1008_if_nan.md
Last active April 23, 2017 08:06
JavaScript で NaN と if 文の条件式について

JavaScript で NaN と if 文の条件式について

  • JavaScript で NaN を大小比較に使用すると、結果が常に false になります。
    このため、変数の内容に NaN がありえる状況では、
    if 文の条件式を書き換えると 結果が変わってくるケースがあります。

  • 例えば、

if (x < 0 || x > 10) { y = 1; } else { y = 2; }

@Hamayama
Hamayama / issue_167_GC_memo.txt
Last active June 16, 2017 06:15
boehmgc issue #167 memo
7.7.0 (master): MinGW: gctest.exe fails
from #166
> 1. Could you please recheck it using master branch of bdwgc (with any libatomic_ops)?
> 2. Same as 1 plus --disable-parallel-mark --enable-gc-assertions
> 3. Same as 2 plus comment out THREAD_LOCAL_ALLOC definition in include/config.h
I tried a master branch, but I got many failures.
@Hamayama
Hamayama / test1.txt
Last active September 16, 2017 00:40
Gauche の Windows コンソールのコードページ対応の試験
<Gauche の Windows コンソールのコードページ対応の試験>
1. 試験環境
OS : Windows 8.1 (64bit)
開発環境 : MSYS2/MinGW-w64 (64bit) (gcc version 7.1.0 (Rev2, Built by MSYS2 project))
Gauche : v0.9.6_pre2 (コミット aa189e6 + 変更)
mintty : v2.7.7 (x86_64-pc-msys)
winpty : v0.4.3
emacs : v25.2.1 (x86_64-w64-mingw32)
@Hamayama
Hamayama / memo.txt
Last active September 17, 2017 02:06
Gauche 調査中
<調査中>
MSYS2/MinGW-w64 32bit 開発環境での Gauche v0.9.6_pre2 のビルド/テストでエラーが出る。
MSYS2/MinGW-w64 64bit や MinGW.org (32bitのみ) の開発環境では発生しない。
OS : Windows 8.1 (64bit)
印象としては、ほとんど動作していて、ごくまれに文字列が化ける感じ。
(1)MSYS2/MinGW-w64 32bit 開発環境での Gauche v0.9.6_pre2 のビルドで以下のエラー
@Hamayama
Hamayama / measure.txt
Last active September 30, 2017 03:44
Gauche の Windows コンソールのコードページ対応の測定
<Gauche の Windows コンソールのコードページ対応の測定>
1. 環境
OS : Windows 8.1 (64bit)
開発環境 : MSYS2/MinGW-w64 (64bit) (gcc version 7.1.0 (Rev2, Built by MSYS2 project))
Gauche : v0.9.6_pre2 (コミット aa189e6 + 変更)
2. 測定
@Hamayama
Hamayama / test_format.scm
Last active November 6, 2017 18:01
Gauche の format ~f のテスト
;;
;; testing format ~f
;;
(use gauche.test)
(use math.const) ; for pi
(test-start "format ~f")
(define-syntax expr-test