To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

PC-LISP is an implementation of the Franz Lisp dialect by Peter Ashwood-Smith.

Version 2.11 was released on May 15, 1986. A current version may be downloaded from the external link below.

Currently, PC-LISP has been ported to 32 & 64 bit Linux, Mac, and Windows.

Note that the Franz LISP dialect was the immediate, portable successor to the ITS version of Maclisp and is perhaps the closest thing to the LISP in the Steven Levy book Hackers as is practical to operate. PC-LISP runs well in DOS emulators and on modern Windows versions. Because PC-LISP implements Franz LISP, it is a dynamically scoped predecessor to modern Common Lisp. This is therefore an historically important implementation.

YouTube Encyclopedic

  • 1/3
    Views:
    120 629
    263 848
    429
  • AutoCAD Tutorial Load a Lisp or Application
  • Using Python to Code by Voice
  • How to Install Scheme on PC

Transcription

Example

The session is running the following code which demonstrates dynamic scoping in Franz LISP. Note that PC-LISP does not implement the let special form that Emacs Lisp provides for local variables. Instead, all variables are what an ALGOL-based language would call "global". The first dialect of Lisp to incorporate ALGOL scoping rules (called lexical scoping) was Scheme although the Common Lisp language also added this feature.

;; Demonstration of dynamic scoping

;; This is a "global" variable
(setq myglobal "this is my global variable")

;; Another global variable
(setq yourglobal "this is my global variable")

;; a function which prints the symbols
(defun dosomething (mine yours)
  (princ " * Mine is  - ")
  (princ mine)
  (princ "\n")
  (princ " * Yours is - ")
  (princ yours)
  (princ "\n"))

;; override the symbols
(defun nolocals ()
  (setq mine "I have set mine to a new value")
  (setq yours "I have set yours to a new value")
  (dosomething mine yours))

(defun main ()
  ;; define two symbols
  (setq mine myglobal)
  (setq yours yourglobal)
  
  ;; print them
  (princ "calling dosomething\n")
  (dosomething mine yours)
  (princ "calling nolocals\n")
  (nolocals)
  (princ "calling dosomething again\n")
  (dosomething mine yours))

Another example showing the use of backquote and the power of LISP. This is a differentiation example.

; D(e,X) -
;          Will compute the symbolic derivative of expression e with respect
; to variable X. We take the expression in standard lisp prefix form and will
; use the following rules of differentiation.
;
;         D(x)    = 1
;         D(a)    = 0
;         D(ln u) = D(u)/u 
;         D(u+v)  = D(u)+D(v)
;         D(u-v)  = D(u)-D(v)
;         D(u*v)  = D(u)*v + u*D(v)
;         D(u/v)  = D(u)*v + (u*D(v))/v^2
;         D(v^u)  = (v^u)*(u*D(v)/v + D(u)*ln(v))
;
(defun  D(e X &aux u v)
 (cond ((equal e X) 1) 
       ((atom e) 0)           
       (t (setq u (cadr e) v (caddr e))
	  (caseq (car e)
		 (ln `(/ ,(D u X) ,u)) 
		 (+  `(+ ,(D u X) ,(D v X)))
		 (-  `(- ,(D u X) ,(D v X)))
		 (*  `(+  (* ,(D u X) ,v) (* ,(D v X) ,u)))
		 (/  `(-  (/ ,(D u X) ,v)
			  (/ (* ,u ,(D v X)) (^ ,v 2))))
		 (^  `(* ,e  (+ (/ (* ,v ,(D u X)) ,u)
				   (* ,(D v X) (ln ,u)))))
		 (t (princ "ERROR") (exit)]

References

External links

This page was last edited on 18 September 2023, at 19:22
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.