Sfoglia il codice sorgente

2.2 hierarchical data and closure

jordyn 4 anni fa
parent
commit
1b18fc8bc4
1 ha cambiato i file con 39 aggiunte e 0 eliminazioni
  1. 39 0
      2/2/jord/notes.org

+ 39 - 0
2/2/jord/notes.org

@@ -3,6 +3,9 @@
 !! "it is better to have 100 functions operate on one data structure
    than 10 functions operate on 10 data structures" -- alan perlis
 
+like that bruce lee quote about fearing the foe who practiced one kick
+10,000 times, not the one who practiced 10,000 kicks once
+
 Box and pointer diagram of (cons 1 2)
 
 :  |    +-----+-----+
@@ -436,3 +439,39 @@ to generate unique permutations of a set, {1 2 3} {2 1 3} {3 1 2} etc
     (filter (lambda (x) (not (= x item)))
             sequence))
 #+END_SRC
+** 2.2.4 Example: A Picture Language
+we are going to explore data abstraction, closure, and higher-order
+procedures with the picture language
+
+the language combines procedures as data
+
+the picture language has only one primitive: painter
+
+we can combine imagues by constructing new painters from given
+painters
+
+eg flip-vert takes a painter and produces a painter that paints
+upside-down
+
+we can combine these pictures with all the power of plain ol' scheme
+
+im not really interested in this section: i see what they are getting
+at and the lecture was dope, but i feel like im sitting on my thumbs
+with no way to actually use painters
+
+i do like the connection to geb
+
+LEVELS OF LANGUAGE FOR ROBUST DESIGN
+
+  - stratified design :: a complex system should be structured as a
+       sequence of levels that are described using a sequence of
+       languages
+
+each part is constructed using what it considers to be primitive
+
+the level above takes those constructs as its primitives
+
+the level below uses hidden concepts that are its own idea of
+primitive
+
+!! means of abstraction appropriate to the current level of detail