Skip to content

Instantly share code, notes, and snippets.

@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
@Hamayama
Hamayama / 2108_escape.md
Last active August 12, 2018 10:41
文字列中のエスケープ仕様の検討

文字列中のエスケープ仕様の検討

検討

  • 簡単なコマンドを埋め込み可能な文字列データを考える。

  • 例えば、コマンドの開始記号として # を使うことにする。
    (すなわち # を特殊記号とする)

  • このとき、# 文字自身を表したい場合は、\# と記述することにする。

@Hamayama
Hamayama / 1010_lem_win.md
Last active January 14, 2021 14:16
Lem エディタの Windows 上でのインストール手順等

Lem エディタの Windows 上でのインストール手順等

インストール手順

  1. MSYS2/MinGW-w64 (64bit/32bit) のインストール
    事前に MSYS2/MinGW-w64 (64bit/32bit) がインストールされている必要があります。
@Hamayama
Hamayama / 3000_lem_emoji_ini.md
Last active April 18, 2021 11:29
Lem エディタの Windows 用の文字幅データの設定サンプル (実験中)

Lem エディタの Windows 用の文字幅データの設定サンプル (実験中)

  • Lem エディタ ( https://github.com/cxxxr/lem ) の
    Windows 用の文字幅データの設定サンプルです。
    一部の文字の表示が改善されます。
    (カーソルの表示位置がずれたりするケース等)

    <<現状、Windows 10 では、あまり改善できていません>>

@Hamayama
Hamayama / lem_opengl_check.txt
Last active December 20, 2018 14:47
lem の OpenGL フロントエンド の確認
<lem の OpenGL フロントエンド の確認>
(1)環境
OS : Windows 8.1 (64bit)
開発環境 : MSYS2/MinGW-w64 (64bit) (gcc version 7.3.0 (Rev2, Built by MSYS2 project))
(2)インストール
pacman -S mingw-w64-x86_64-glfw
ros install terminal625/utility
@Hamayama
Hamayama / cocoro.scm
Last active June 23, 2019 02:47
Gauche を使って、パズルの探索を行うプログラムです (不完全版)。
;; -*- coding: utf-8 -*-
;;
;; cocoro.scm
;; 2019-6-23 v1.11
;;
;; <内容>
;; Gauche を使って、パズル ( https://game.nicovideo.jp/atsumaru/games/gm8913 )
;; の探索を行うプログラムです (不完全版)。
;;
;; <使い方>
@Hamayama
Hamayama / thread32.c
Last active April 24, 2021 07:01
GetThreadContext test for Windows Wow64 thread
//
// thread32.c
// 2019-2-16 v1.03
//
// Description:
// GetThreadContext test for Windows Wow64 thread.
//
// Original source:
// https://social.msdn.microsoft.com/Forums/vstudio/ja-JP/aa176c36-6624-4776-9380-1c9cf37a314e/getthreadcontext-returns-stale-register-values-on-wow64?forum=windowscompatibility
// (GetThreadContext returns stale register values on WOW64)
@Hamayama
Hamayama / test-with-ini.txt
Last active May 17, 2019 23:16
Lem エディタの lem-pdcurses のテスト
<テスト>
init.lisp の設定ありで確認
(1)mintty + winpty
起動
winpty ros -Q -s lem-pdcurses -L sbcl-bin -- $USERPROFILE/.roswell/bin/lem-ncurses
→ 2019-5-14 OK
@Hamayama
Hamayama / 3011_lem_scheme.md
Last active December 30, 2020 07:46
Lem エディタの scheme-mode

Lem エディタの scheme-mode

  • Lem エディタで、Scheme 言語のプログラムの作成を行うためのモードです。

  • (キーバインドの記号 (C- 等) の意味については、Emacs 関連の文書を参照してください)

  • Scheme の処理系は、事前にインストールされている必要があります。
    (デフォルトでは、Scheme の処理系は、Gauche を想定しています)

@Hamayama
Hamayama / dynamic-test.scm
Last active December 17, 2019 08:58
Emulate dynamic-wind and reset/shift on Gauche
;;
;; dynamic-test.scm
;; 2019-12-17 v5.04
;;
;; Emulate dynamic-wind and reset/shift on Gauche
;;
;; (emu-dynamic-wind before thunk after)
;; before is (^[] expr ...)
;; thunk is (^[] expr ...)
;; after is (^[] expr ...)