Short history of Lisp - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Short history of Lisp

Description:

... appeared on the market: Allegro CL, LispWorks, Macintosh Common ... Allegro CL. LispWorks. What makes Lisp different today. compact and easy to read code ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 10
Provided by: home2
Category:
Tags: allegro | history | lisp | short

less

Transcript and Presenter's Notes

Title: Short history of Lisp


1
Short history of Lisp
  • Lisp appeared first in 1958
  • Linked lists in Lisp
  • Several dialects of Lisp appeared Common Lisp,
    Emacs Lisp, Scheme
  • In 1988, after the inclusion of CLOS, Common Lisp
    became the first standardized object oriented
    language
  • Several commercial implementations of Lisp
    appeared on the market Allegro CL, LispWorks,
    Macintosh Common Lisp
  • Today Common Lisp is a multi-paradigm language
    functional, reflective, object-oriented

2
What made Lisp different
  • conditionals (at that time Fortran only had a
    conditional GOTO)?
  • a function data type functions can be passed as
    arguments, returned from other functions, etc.
  • recursion
  • variables values have a type, not variables
  • garbage collection
  • code is data, data is code

3
Allegro CL
4
LispWorks
5
What makes Lisp different today
  • compact and easy to read code
  • incremental development / fast prototyping
  • macros
  • reflection
  • error handling

6
Examples
  • (defun funny-sort(my-string)
  • (stable-sort my-string '(lambda(a b)(if (
    (random 2) 0) t nil))))
  • (defun check-sort(my-string)
  • (do ((end nil) (counter 0 (1 counter)))
  • ((or end ( counter 1000000)) (print
    counter))
  • (when (string-equal my-string (funny-sort
    (copy-seq my-string)))
  • (setf end t)
  • (print "FOUND A MATCH !!!"))))

7
Macros in action
  • the sum of the even integers from 1 to 10
  • (loop for i from 1 to 10 when (evenp i) sum i)
  • (setf numbers '(3 1 34 0 23 94 5 6 7 234 2))
  • print a message if all numbers in numbers
    are even
  • (if (loop for n in numbers always (evenp n))
  • (print "All numbers even."))

8
Macros in action
  • print the smallest number in numbers
  • (loop for i in numbers minimizing i into min
    finally (print min))
  • convert the numbers to words
  • (setf numbers
  • (loop for i in numbers collect (format nil
    "r" i)))
  • ("three" "one" "thirty-four" "zero"
    "twenty-three" "ninety-four" "five" "six" "seven"
    "two hundred thirty-four" ...)

9
  • "Lisp has jokingly been called "the most
    intelligent way to misuse computer". I think that
    description is a great compliment because it
    transmits the full flavor of liberation it has
    assisted a number of our most gifted fellow
    humans in thinking previously impossible
    thoughts."
  • - Edsger Dijkstra
  • "Don't worry about what anybody else is going to
    do. The best way to predict the future is to
    invent it."
  • - Alan Kay
Write a Comment
User Comments (0)
About PowerShow.com