Skip to content

Instantly share code, notes, and snippets.

View y2q-actionman's full-sized avatar
🕹️
👾👾👾👾👾👾👾👾👾

Yokota Yuki y2q-actionman

🕹️
👾👾👾👾👾👾👾👾👾
View GitHub Profile
@y2q-actionman
y2q-actionman / test.lisp
Last active August 27, 2022 09:26
(eval-when (:compile-toplevel)) in (eval-when (:compile-toplevel))
#|
Some experiments to understand the example of CLHS eval-when explanations.
( http://clhs.lisp.se/Body/s_eval_w.htm#eval-when )
;;; #4: This always does nothing. It simply returns NIL.
(eval-when (:compile-toplevel)
(eval-when (:compile-toplevel)
(print 'foo4)))
|#
@y2q-actionman
y2q-actionman / write_ltsv_using_cl_format.lisp
Created April 14, 2022 10:32
Writing LTSV using 'format' of Common Lisp.
(format t "~:{~A:~S~:^ ~}"
'((:foo "100") (:bar "200") (:baz 9999))) ; Using a list of lists, not an alist.
; => FOO:"100" BAR:"200" BAZ:9999
@y2q-actionman
y2q-actionman / coon_monster_ability.org
Last active May 23, 2022 06:16
サガフロ リマスター プレイ日記

所有:58/124

頭部(全13種)

  • [X] 牙
  • [X] 吸血
  • [X] クチバシ
  • [X] 催眠
  • [X] 死の凝視
  • [X] 石化凝視
@y2q-actionman
y2q-actionman / logical_pathname-translations-test.lisp
Last active April 8, 2021 14:46
Logical Pathname Translations の実験
(setf (logical-pathname-translations "asdf-cache")
`(("**;*.*.*"
,(merge-pathnames
(make-pathname :directory '(:relative :wild-inferiors))
asdf:*user-cache*))))
; => (("**;*.*.*" #P"/Users/yokota/.cache/common-lisp/acl-10.1s-macosx-x64/**/"))
(translate-logical-pathname "asdf-cache:bar;baz;mum.quux")
; => #P"/Users/yokota/.cache/common-lisp/acl-10.1s-macosx-x64/bar/baz/mum.quux"
@y2q-actionman
y2q-actionman / uninterned_hello.lisp
Created February 5, 2020 06:42
Uninterned symbol に flet してそれを呼ぶ
(in-package :cl-user)
;;; これは、二回出てくる `#:hello' が別のシンボルなので、エラーになる。
;; (flet ((#:hello () "Hello, World!"))
;; (#:hello))
;; ; => Evaluation aborted on #<undefined-function @ #x105a7af3f2>.
;;; 一回目の `#:hello' を #n= と #n# で参照すればよい。
(flet ((#1=#:hello () "Hello, World!"))
(#1#))
@y2q-actionman
y2q-actionman / openssl100.sh
Created January 6, 2020 06:12
MacOSXのHomebrewをアップデートした結果、OpenSSLが1.1系になって1.0系が使えなくなったけど、"Library not loaded: libcrypto.1.0.0.dylib issue in mac"とか出るのでOpenSSL 1.0系に戻す
# MacOSXのHomebrewをアップデートした結果、OpenSSLが1.1系になって1.0系が使えなくなったけど、"Library not loaded: libcrypto.1.0.0.dylib issue in mac"とか出るのでOpenSSL 1.0系に戻したければ:
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb --force
brew switch openssl 1.0.2t
@y2q-actionman
y2q-actionman / use_cases_of_lambda_list_aux.txt
Last active March 6, 2020 02:51
Common Lisp の lambda list の &aux の用途
lambda list の &aux の用途
- 単純な関数やlambdaを短く書きたいときに
- 依存する dynamic 変数を lambda list に明示する
- lambda list にbindした変数の一部を取り出すため、近所にまとめたいとき
- もっとルーズに let のかわり
@y2q-actionman
y2q-actionman / memo.org
Last active March 6, 2020 02:52
Common Lisp マクロの種類

Common Lisp マクロの種類

  • macro form ; いわゆる「マクロ」
    • (普通の)マクロ
    • setf マクロ
  • symbol macro
  • reader macro
    • (単一の) macro character
    • dispatching macro character
  • compiler macro
@y2q-actionman
y2q-actionman / qldot-systems.lisp
Created May 7, 2019 09:43 — forked from youz/qldot-systems.lisp
visualize dependencies in the quicklisp systems
(quicklisp:quickload '(#:anaphora #:iterate #:cl-ppcre))
(defpackage #:qldot
(:use #:cl #:iterate #:anaphora #:ppcre))
(in-package #:qldot)
(defparameter *font* "Courier New")
(defmacro portname (sys &optional prj)
@y2q-actionman
y2q-actionman / feel_about_asdf.md
Last active October 8, 2021 02:56
Re: (ご意見募集)Common LispのASDF3のここが気に入らない・難しい に向けて

原典 : https://blog.3qe.us/entry/2019/04/15/194201

ASDF難しい

わかる。正直いって全然わからん。

どうでもいい実験を書くときや、手元で動けばいいスクリプトを書くときには、そもそも defsystem を書いたりしない。 「CL:LOAD で順に読む」というだけで十分なので。 (まあそもそも、 asdf がやってることも「いい感じに compile / load する」のだと考えられるが。)