Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Road to LISP heaven

Road to LISP heaven

Presented: Pataconf 2018

8cf49d39d44f100e1afed5c5a259fed4?s=128

Giovanny Gongora

November 15, 2018
Tweet

More Decks by Giovanny Gongora

Other Decks in Technology

Transcript

  1. Road to LISP heaven

  2. The ((( ))) language

  3. The ((( ))) language

  4. Why talk about LISP? • Want to learn more about

    programming languages • Understand why we do something today • What is the purpose and behavior with something • It’s fun, why no? :)
  5. What is this talk about? • Language history • Context

    about design decisions • Understand which LISP concepts are good for • Think about new data reference patterns ready • No rants plz
  6. History/Context

  7. • Let’s travel to 1930s

  8. • Let’s travel to 1930s • New Princeton offices

  9. • Let’s travel to 1930s • New Princeton offices •

    Alonzo Church
  10. • Let’s travel to 1930s • New Princeton offices •

    Alonzo Church • Lambda Calculus
  11. • Let’s travel to 1930s • New Princeton offices •

    Alonzo Church • Lambda Calculus • World War II
  12. • Let’s travel to 1930s • New Princeton offices •

    Alonzo Church • Lambda Calculus • World War II • Electronic Discrete Variable Automatic Computer (EDVAC)
  13. • Let’s travel to 1930s • New Princeton offices •

    Alonzo Church • Lambda Calculus • World War II • Electronic Discrete Variable Automatic Computer (EDVAC) • 1958 unveiled List Processing language (Lisp)
  14. Learn to read LIPS in one example

  15. f(4, 2)

  16. (f 4, 2)

  17. (60 * 9 / 5) + 32

  18. (+ (* (/ 9 5) 60) 32)

  19. You already know LISP :)

  20. (+ 2 2)

  21. 4

  22. (= (+ 2 2) (* 2 2))

  23. True

  24. (first (list ‘a ‘b ‘c))

  25. a

  26. (define patacones 6) (define chorizos 5) (if (> patacones chorizos)

    (printf "Patacones!") (printf “Chorizos!”))
  27. Patacones!

  28. ((define (dbl x) (* 4 x)) (dbl 10)

  29. 40

  30. Interesting facts about LISP • Comments are made using ;

    • Defined only atom, eq, cons, car, and cdr • Functions were intended to create the whole language
  31. What made LISP “different”?

  32. • Conditionals

  33. • Conditionals • A function type

  34. • Conditionals • A function type • Recursion

  35. • Conditionals • A function type • Recursion • New

    concept of variables
  36. • Conditionals • A function type • Recursion • New

    concept of variables • Garbage Collection
  37. • Conditionals • A function type • Recursion • New

    concept of variables • Garbage Collection • Composed expressions
  38. • Conditionals • A function type • Recursion • New

    concept of variables • Garbage Collection • Composed expressions • Literal data structures
  39. (macros) You can change the language, implement your own features,

    or even write a new programming language
  40. Scheme vs Common lisp

  41. Common Lisp

  42. Scheme

  43. Functional Programming & Lambda calculus & LISP

  44. • Not all lambda calculus ideas transform to practice •

    Functional programming is a set of ideas, not a set of strict guidelines • Concurrency is a win
  45. Thanks Giovanny Gongora @Gioyik