3 things I wish I knew when I started designing languages About - - PowerPoint PPT Presentation

3 things i wish i knew when i started designing languages
SMART_READER_LITE
LIVE PREVIEW

3 things I wish I knew when I started designing languages About - - PowerPoint PPT Presentation

3 things I wish I knew when I started designing languages About poor me Declarative languages Systems programming Me About the real me Flunked trig, flunked chem, never took calculus or physics. Graduated HS with a 2.8 GPA Bachelor


slide-1
SLIDE 1

3 things I wish I knew when I started designing languages

slide-2
SLIDE 2

About “poor me”

Systems programming Me Declarative languages

slide-3
SLIDE 3

About the real me

Flunked trig, flunked chem, never took calculus or physics. Graduated HS with a 2.8 GPA Bachelor of Arts in English Literature 3 years as an editor; 2 as a DBA; 5 as a software engineer before grad school I am not nor was I ever a PL researcher

slide-4
SLIDE 4

This talk is about me (designing a language)

  • 1. Misgivings: how I almost never began
  • 2. Lucky guesses: things I got right
  • 3. Discoveries: stuff I learned along the way
slide-5
SLIDE 5

Prelude: misapprehensions and misgivings

how we FUD ourselves out of language design

slide-6
SLIDE 6

1: The Look

An audacious new language should look unique!

slide-7
SLIDE 7

1: The Need

slide-8
SLIDE 8

1: The Impact

slide-9
SLIDE 9

Lucky guesses: things I got right

slide-10
SLIDE 10

Lucky guess 1:

context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context

slide-11
SLIDE 11

Every language is a DSL

slide-12
SLIDE 12

Thy firmness makes my circle just

A domain

slide-13
SLIDE 13

More lucky guesses: a damn problematic domain

slide-14
SLIDE 14

Hiding and illuminating

slide-15
SLIDE 15

What is damn hard about this domain?

Program correctness

slide-16
SLIDE 16

What is damn hard about this domain?

Program correctness Debugging

slide-17
SLIDE 17

What is damn hard about this domain?

Program correctness Debugging

slide-18
SLIDE 18

What is damn hard about this domain?

Program correctness Debugging Maintenance and extensibility

slide-19
SLIDE 19

What is damn hard about this domain?

Program correctness Debugging Maintenance and extensibility Heterogeneity and portability

slide-20
SLIDE 20

Rearranging the deckchairs...

Program correctness Debugging Maintenance and extensibility

slide-21
SLIDE 21

Why so damn hard?

slide-22
SLIDE 22

The right language would focus our attention on

How data flows through the system; How it is allowed to change over time; Where and when we can control how it changes and when we can’t. Everything else, arguably, is a distraction

slide-23
SLIDE 23

State representation Control flow Data Time

context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context

slide-24
SLIDE 24

Thy firmness makes my circle just

A domain An opinion

slide-25
SLIDE 25

Many moons passed

slide-26
SLIDE 26

Inspiration

slide-27
SLIDE 27

Descriptive complexity (Immerman’99)

slide-28
SLIDE 28

Descriptive complexity (Immerman’99)

slide-29
SLIDE 29

Descriptive complexity (Immerman’99)

slide-30
SLIDE 30

Descriptive complexity (Immerman’99)

slide-31
SLIDE 31

Queries made a neat lens...

create view response as select client, server, code, document from request r, page p where r.server = p.server and r.URI = p.URI;

slide-32
SLIDE 32

Maybe languages are really lenses

E r l a n g

SQL

slide-33
SLIDE 33

fragments

¬ σ π ⋈ LFP

Conjunctive queries

slide-34
SLIDE 34

fragments

¬ σ π ⋈ LFP

SQL

slide-35
SLIDE 35

fragments

¬ σ π ⋈ LFP

Datalog

slide-36
SLIDE 36

Or maybe they are lassos

¬ σ π ⋈ LFP

Conjunctive queries

SQL

Datalog

slide-37
SLIDE 37

context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context

slide-38
SLIDE 38

Datacentrism

knowledge(“details”)

slide-39
SLIDE 39

Datacentrism

knowledge(host1, “details”)

Contexualized by location (space)

slide-40
SLIDE 40

Datalog cannot express

Mutable state Uncertainty

slide-41
SLIDE 41

Datacentrism

knowledge(host1, “details”, 27)

Contexualized by relative order (time)

slide-42
SLIDE 42

Datacentrism

register(host1, “current value”, 27)

slide-43
SLIDE 43

Datacentrism

kvs(host1, key, “current value”, 27)

slide-44
SLIDE 44

Or maybe they are lassos

¬ σ π ⋈ LFP

Datalog

slide-45
SLIDE 45

Or maybe they are lassos

¬ σ π ⋈ LFP

+1

“Statelog”

slide-46
SLIDE 46

Dedalus can express it all. but...

¬ σ π ⋈ LFP

+1 ND choice

Dedalus

slide-47
SLIDE 47

Dedalus allows us to say things we don’t want to say; requires us to use stuff we’d rather not use

2PC 3PC Paxos

slide-48
SLIDE 48

Waiting requires counting Counting requires waiting (Joe Hellerstein)

slide-49
SLIDE 49

¬

Waiting requires counting Nonmontonicity required to express coordination Counting requires waiting Coordination required to tolerate nonmonotonicity

slide-50
SLIDE 50

Or maybe they are lassos

¬ σ π ⋈ LFP

+1 ND choice

CALM Dedalus

slide-51
SLIDE 51

Pop descriptive complexity

Coordination-free programs

“Embarrassingly parallel”

Dedalus “Truly monotone” dedalus Semipositive Dedalus Dedalus0 Datalog

Halt [....] NP P [...]

slide-52
SLIDE 52

Discoveries: stuff I learned along the way

slide-53
SLIDE 53

Languages and the design process

context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context context

slide-54
SLIDE 54

Languages and the design process

Subject Object

slide-55
SLIDE 55

Languages and the design process

Subject Object

slide-56
SLIDE 56

Discoveries: stuff I learned along the way The look

slide-57
SLIDE 57

Discoveries: stuff I learned along the way The look it’s about the fit

slide-58
SLIDE 58

Discoveries: stuff I learned along the way The look it’s about the fit The need

slide-59
SLIDE 59

Discoveries: stuff I learned along the way The look it’s about the fit The need it’s about our need

slide-60
SLIDE 60

Discoveries: stuff I learned along the way The look it’s about the fit The need it’s about our need The impact well….

slide-61
SLIDE 61
slide-62
SLIDE 62

Poor lucky me

slide-63
SLIDE 63

BTW: Where’s the lie?