所有:58/124
- [X] 牙
- [X] 吸血
- [X] クチバシ
- [X] 催眠
- [X] 死の凝視
- [X] 石化凝視
#| | |
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))) | |
|# |
(format t "~:{~A:~S~:^ ~}" | |
'((:foo "100") (:bar "200") (:baz 9999))) ; Using a list of lists, not an alist. | |
; => FOO:"100" BAR:"200" BAZ:9999 |
(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" |
(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#)) |
# 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 |
lambda list の &aux の用途 | |
- 単純な関数やlambdaを短く書きたいときに | |
- 依存する dynamic 変数を lambda list に明示する | |
- lambda list にbindした変数の一部を取り出すため、近所にまとめたいとき | |
- もっとルーズに let のかわり |
Common Lisp マクロの種類
(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) |
原典 : https://blog.3qe.us/entry/2019/04/15/194201
わかる。正直いって全然わからん。
どうでもいい実験を書くときや、手元で動けばいいスクリプトを書くときには、そもそも defsystem を書いたりしない。
「CL:LOAD
で順に読む」というだけで十分なので。
(まあそもそも、 asdf がやってることも「いい感じに compile / load する」のだと考えられるが。)