摘要:I recall there is a chance missed by me.In a project, I have coded a saving format like this:fooquzActually, what I need is the following one:(msgnode (src foo) ________(dst bar)________(info quz)). I...
阅读全文
随笔分类 - Lisp
摘要:Disclaimer: This is an excerpt from Paul Graham's site, I learn a lot from his site, someday I copy the following text from his site, and today I post it here. How do you avoid copying the wrong thi...
阅读全文
摘要:For days, I plans to read code of _LiSP_, and rewrite it in CommonLisp, but it seems I failed. I do not have a copy of that book, just download a copy of the code accompany with the book from Internet...
阅读全文
摘要:% member member1(X, [X | Y]). member1(X, [_ | B]) :- member(X, B). % append(list1, list2, result) append1([], L2, L2). append1([A | B], L2, [A | C]) :- append(B, L2, C). % revert(L1, L2) revert(List,R...
阅读全文
摘要:The other images which are commonly found in an Allegro CL installation are: mlisp Modern base Lisp image, international (16-bit characters) alisp ANSI base Lisp image, international (16-bit charact...
阅读全文
摘要:Roughly speaking, an S-expression is a parenthesized collection of information. The atomic pieces of information are numbers, symbols, and strings. Placing a pair of parentheses around any number of S...
阅读全文
摘要:LISP is a computer language that is unique in that it is based on an algebraic structure, the lambda calculus, from pure mathematics. In its purest form, [1] there is no distinction between data and p...
阅读全文
摘要:;; ;; File .emacs - These commands are executed when GNU emacs starts up. ;; ;; Cause the region to be highlighted and prevent region-based commands ;; from running when the mark isn't active. (pendin...
阅读全文
摘要:I have not read _Practical Common Lisp_, but I found this one may be useful for me at a glance, so I keep a local copy. Finding Lisp Libraries While the standard library of functions, data types, and...
阅读全文
摘要:I visit Peter Norvig's site, and found this one:If you have two mutually-recursive functions that both alter the state of an object, try to move almost all the functionality into just one of the funct...
阅读全文
摘要:I want to restart use Common Lisp implementation, such as Allegro Common Lisp,but it is not clear whether it is a wise choice.
阅读全文
摘要:After 2 hours of wasting time, I decide to drop MIT/GNU Scheme, not using it any more.It is very strange that MIT/GNU Scheme does not have a C interface. Although it has Win32 package interface, but I...
阅读全文
摘要:Which implementation should I use? I have tried Petite Chez Scheme, MzScheme, Scheme 48, and Bigloo. For Bigloo, I was attracted by its design goal stated in its homepage, "Build a practical Scheme C...
阅读全文
摘要:source : CLtL2 Common Lisp the Language, 2nd Edition Scope and Extent In describing various features of the Common Lisp language, the notions of scope and extent are frequently useful. These notio...
阅读全文
摘要:source : Peter Norvig What Lessons are in PAIP? Here is my list of the 52 most important lessons in PAIP: Use anonymous functions. [p. 20] Create new functions (closures) at run time. [p. 22...
阅读全文
摘要:1. OrthogonalityA orthogonal language is one in which you can express a lot by combining a small number of operators at a lot of different ways.2. Programming Language Features (from Peter Norvig):(1)...
阅读全文
摘要:1. Test For Existence foobar(elt, (x . y)) :- foo(elt, x). foobar(elt, (x . y)) :- foobar(elt, y).For example, the familiar function can be written a...
阅读全文
摘要:(DEFUN PRINT-SQUARES (LIST) (DOLIST (ELEMENT LIST) (PRINT (LIST ELEMENT (EXPT ELEMENT 2))))) (DEFUN PRINT-SQUARES (LST) (DOLIST (ELEMENT LST) (PRINT (LIST ELEMENT (EXPT ELEMENT 2))))) Conslusions: T...
阅读全文
摘要:1. for a language: (1) primitive elements (2) means of combination (3) means of abstraction 2. ;; compute the sum of term(k) where k from a to b by next(a) (define sum (term a next b) ______(if (> ...
阅读全文
浙公网安备 33010602011771号