- Define vocabulary with patterns and syntax with grammars
- Parsers read code and interpret with lexical and syntactic analysis by a lexer and a parser, respectively
- HTML is not context free and so it can't be parsed by a regular parser
- CSS is a context-free language
- Both parsers generate a tree representing what they parsed
- Have a lexicon and syntax that cannot be described by a context-free grammar
- Human language contains a lot of ambiguity
- Steps
- Break the unbroken speech stream into words
- The minds match the sounds to words in the mental lexicon
- Once we have access to the word, we have access to its meaning and its syntactic and thematic roles
- Then we can parse the sentence, but it's unclear how that works...
- Modular View: the phrases involved occur separately in different modules
- Interactive View: all available information can be used at once in parsing the sentence
- Does this happen in serial or parallel?
- Humans are forgiving of syntax errors
- Receptive language processing occurs in the dominant hemisphere of the brain, in Wernicke's area
How does the human visual system paint a picture of the world; how does the browser render pictures to the screen?
- Visible light goes into the eye via cornea and lens
- Retina turns light into neural signals using rods and cones
- Neural signals are sent to the brain
- They are combined in the optic chiasm
- Most signals are sent to the lateral geniculate nuclei
- Signals end up at the primary visual cortex
- Signals get sent to higher visual processing centers to perceive what is seen
- Evaluate langage to get the trees
- DOM and CSSOM trees combined to form the render tree
- Browser traverses render tree, calculating location and size of all elements
- Browser traverses render tree, creating layers of bitmaps
- Bitmaps sent to the GPU for compositing
- Do it over and over, optimally 60 FPS
Can the human mind and the browser multitask?
- attention ... as a filter, as a spotlight, as control (blocking unwanted distractions and automated processes)
- attention ... as threads?
- Humans are bad at multitasking
- inattentional blindness
- dichotic listening task
- shadowing
- JavaScript doesn't multitask; it's single threaded
- Javascript can call out to APIs to effectively multitask