"=>はif。ほんとは⇒"
cond => (then) else
"<oはアイボールって言って続くトークンを読む.ほんとは専用のグリフがある。"
<o someToken
"☞はlispのquoteみたいなやつ。続く式を評価しない。"
"変数への代入は←。←は普通のメッセージなので変数はクオートしてやらないといけない"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ((lambda (A) A) 1) | |
| -> compile -> | |
| (frame (halt) (constant 1 (argument (close (A) (refer A (return)) (apply))))) | |
| ------- VM --------- | |
| a - アキュムレータ 一時的な値を保存しておく | |
| x - (今回実行するインストラクション [引数,...] (次に実行するインストラクション [引数,...] (...)) |
この記事は、lispリーダーマクロアドベントカレンダー の4日目の記事です。 タイトルにある通り、Clojure でのリー ダーマクロについて取り扱います(対象とする Clojure のバージョンは 1.4)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;;; Krivine's Machine in Scheme ;;;; | |
| ;;; 2012 Minori Yamashita <ympbyc@gmail.com> ;;add your name here | |
| ;;; | |
| ;;; reference: | |
| ;;; http://pauillac.inria.fr/~xleroy/talks/zam-kazam05.pdf | |
| ;;; http://pop-art.inrialpes.fr/~fradet/PDFs/HOSC07.pdf | |
| ;;; Notes ;;; | |
| ;; CLOSURE creates thunks that packs the continuation and environment together. | |
| ;; To create closures(function objects), CLOSURE the GRAB and expression followed by CONTINUE. |
- Haskellは天才過ぎて大学行ってる15歳
- RubyはモテモテJK
- Pythonは真面目委員長、風紀委員
- LISPは部活
- Javaは最近あんまり人気無い
- COBOLは用務員のおばあちゃん
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- ProofGeneral-4.3pre130327.orig/Makefile 2013-01-16 06:48:49.000000000 +0900 | |
| +++ ProofGeneral-4.3pre130327/Makefile 2013-04-10 09:45:49.000000000 +0900 | |
| @@ -62,7 +62,7 @@ | |
| # only during compilation. Another idea: put a function in proof-site | |
| # to output the compile-time load path and ELISP_DIRS so these are set | |
| # just in that one place. | |
| -BYTECOMP = $(BATCHEMACS) -eval '(setq load-path (append (mapcar (lambda (d) (concat "${PWD}/" (symbol-name d))) (quote (${ELISP_DIRS}))) load-path))' -eval '(progn (require (quote bytecomp)) (require (quote mouse)) (require (quote tool-bar)) (require (quote fontset)) (setq byte-compile-warnings (remove (quote cl-functions) (remove (quote noruntime) byte-compile-warning-types))) (setq byte-compile-error-on-warn t))' -f batch-byte-compile | |
| +BYTECOMP = $(BATCHEMACS) -eval '(setq load-path (append (mapcar (lambda (d) (concat "${PWD}/" (symbol-name d))) (quote (${ELISP_DIRS}))) load-path))' -eval '(progn (require (quote bytecomp)) (require (quote mouse)) (require (quote tool-b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns macro-combinator | |
| (:refer-clojure :exclude [=])) | |
| (defn prim [x] (fn [a] `(fn [~x] ~a))) | |
| (defn in [v a] (v a)) | |
| (defn where [a v] (v a)) | |
| (defn = [v b] (fn [a] `(~(v a) ~b))) | |
| (defn <- [v b] (fn [a] `(>>= ~b ~(v a)))) | |
| (println (in (= (prim 'x) 42) 'x)) | |
| ; ((clojure.core/fn [x] x) 42) |