by shigemk2

当面は技術的なことしか書かない

2013-04-07から1日間の記事一覧

対話によるCommon Lisp入門 27 factorial関数を適当にトレース

(defun factorial (n) (if (= n 0) 1 (* (factorial (- n 1)) n))) ;; (factorial 3) ;; = (* (* (* (factorial 0) n1) n2) n3) ;; = (* (* (* 1 n1) n2) n3) ;; = (* (* (* 1 1) n2) n3) ;; = (* (* 1 2) n3) ;; = (* 2 3) ;; 6 ;; [6]> (trace factorial) …

Mac OS XでCommon Lispの環境を作る (homebrew + emacs)

homebrewでclispを入れるのをやってみた。 その1 CLISPを入れる $ brew install clisp対話によるCommon Lisp入門 1 - by shigemk2 その2 SLIMEを入れる(EmacsニオケルCommon Lisp実行環境) $ cvs -d :pserver:anonymous:anonymous@common-lisp.net:/project/…

対話によるCommon Lisp入門 26 ed その2

前回のやつで、 edでエディタを開くという話だったけども、 "Waiting for Emacs..."をやめるには、 そのバッファを消すか、Emacsを終了させるかすればいい。 [5]> (ed "hoge.l") Waiting for Emacs... NIL作ったファイルを読み込むことも出来るお。 [6]> (lo…

対話によるCommon Lisp入門 25 ed

[5]> (ed "hoge.l") Waiting for Emacs...とやると、emacs、というかエディタが起動する。quickrun.elで開発効率アップ - Life is very short (setf x 'hoge) (print x) (setf x '(1 2)) (print x) と書いて、quickrunを実行すると… HOGE (1 2) ひゃあああう…