Better Stories, Better Languages

What do programmers do?

(note: click Ø in the menu on the lower-right to disable slideshow mode)

This Presentation

Title:Better Stories, Better Languages
Subtitle:What do programmers do?
Author:François-René Rideau, TUNES
Meeting:ILC'09, 2009-03-24
URL:http://fare.tunes.org/computing/fare-ilc09-lightning.html

The Take Home Points

Software tools imply a story.

New stories can help invent new tools.

Explicit stories are a great meta-tool...

How to fund software?

Issue: Starved programmers don't code

Story: Owning SW, static Vendor & Customers

Solution: Proprietary SW, One True (Closed) Source

How to fund programming?

Story: Owning Labor, dynamic contributors

Solution: FLOSS, anyone can fork/merge at anytime

Tools: source tuned for open maintenance, DVCS

Decompose programs?

Issue: software is too big to handle in one lump.

Story: hierarchical design in parts. fully informed.

Solution: top-down management, layers.

Decompose programming?

Story: Partial information. Propagator network.

Solution: Packages. Version Control.

Tools: Software Distributions (Debian). VCS.

Get good libraries?

Issue: software components are hard to design

Story: get expertly designed language, library...

Solution: experts standardize now for everyone after

Get good experts?

Story: dynamically delegate responsibility to expert.

Solution: dynamic market in expert service.

Tools: modular system extensions, software repos.

Choose features in a PL?

Issue: not every PL is as fit for a problem

Story: Programming languages are for machines

Solution: match machine features, Turing tar pit

Express programming ideas?

Story: Programming languages are for humans

Solution: match human cognition & social process

Tools: simpler, cleaner programming languages

Handle repetitive programs?

Issue: repetitive programmer behavior

Story: programmer as grunt worker

Solution: Theorize repetitions as Design Patterns

Remove programming drudge?

Story: Programmer as abstract thinker

Solution: metaprograms (Turing!)

Tools: PL extensibility (macros, etc.).

Have an extensible syntax?

Lisp Story: side-effects One True Lisp World.

Solution: bind symbols to macros, modify readtable

Issue: new syntax makes your language autistic

Explore useful syntaxes?

Story: exploration of many worlds, purely

Solution: scoped syntax extension

Tools: PLT modules, locally extensible grammars

Users = Programmers?

Story: speech for users, writing for programmers

Solution: unrelated languages, multiple levels

Using = Programming?

Story: no difference b/w using and programming

Solution: integrated interactive interface

Tools: dynamically extended interfaces

Programmer = PL Implementer?

Issue: writing a compiler is hard

Story: specialists write compiler, others use

Solution: closed implementation for each language

Programming = PL Impl'ing?

Story: special (meta) case of using and programming

Solution: same language can switch level of abstraction

Tools: MOP for DSLs, "A implements B" (PCLSRing)

PL Definer = PL Impl'er?

Issue: designing a language is hard

Story: specialists define big language, others implement

Solution: static language, blind spots, slow update, bit rot

PL Defining vs PL Impl'ing?

Story: specialists know and implement specialty

Solution: modular language, delegate specialties

Tools: grammatical mixins, monadic lifting

Get a specialized language?

Issue: programming involves heterogeneous activities

Story: each activity has its own language

Solution: C, scripting glue, sysadmin tools

Specialize conversation?

Story: the same brains do all these different things

Solution: one language w/ many contexts

Tools: universal languages

Debugged Programs?

Issue: interrupt, inspect, extend, fix running programs

Story: exceptional situation, retrofit ad-hoc tools

Solution: low-level debugger, ad-hoc debug info

Explore Semantics?

Story: compiler as reversible lens, VW controler

Solution: generalize PCLSRing, external meta-info

Tool: dynamic controlling (remote) meta-process

Secure software?

Issue: security is a hard, whole system property

Story: get it to run, think about security later

Solution: try retrofit fixes to most glaring leaks

Build software securely?

Story: security is a deep component of SW quality

Solution: design SW with security from the start

Tools: capabilities, whole-system protocol design

Dealing with catastrophes?

Issue: bad manipulations happen, data gets lost

Story: error is exceptional, catastrophic

Solution: confirm, remove bin, undo last

Eliminating catastrophes?

Story: error is normal, casual

Solution: monotonic info, never lose data

Tools: reversible interfaces

Write a Contract?

Issue: a PL constrains the contracts you can express

Story: PL as a given. Follow it. Document the rest.

Solution: team division, informal contracts.

Agree on Responsibilities?

Story: PL as convention. Extend it.

Solution: Formalize contracts. New formalism if needed.

Tools: DSLs. Better type systems.

Arbitrate Resource?

Issue: arbitrate resource, enforce invariant?

Story: Central dictator

Solution: Kernel, needs perfect static model

Resolve Conflicts?

Story: Property Law

Solution: self-enforced contracts

Tool: invariant-enforcing linkers, delegated authority

Resource Possession?

Issue: who controls (accesses, frees) a resource?

Story: control possible iff low-level

Solution: manual management (C/C++) vs GC

Resource Ownership?

Story: essential concurrency b/w H&M processes

Solution: mononotic + linear logic

Tool: pure values vs actor-owned regions

Connect Computers?

Issue: technical and social limits of single-machine computing

Story: putting together many different systems

Solution: invoke remote methods, ship information around

Distribute Computation?

Story: many agents partake in the same system

Solution: share pure information, manage local state

Tools: content-based addressing, declarative deployment

User = OS writer?

Issue: can't have a single trust domain for everything

Story: when in a mess, virtualize ad-hoc domain

Solution: virtual process, virtual Unix, virtual PC

Using = Virtualizing?

Story: everyone is "root" in his Virtual World

Solution: Never log as root. Create your sub-domain.

Tool: PL support for VW. Create a sub-user!

Persist important data?

Issue: important data must persist against hw/sw failure

Story: persistence is disjoint from PL design

Solution: ad-hoc files, databases w/o good PL

Write persistent software?

Story: persistence is an essential aspect of PL

Solution: integrate persistence & virtualization

Tools: orthogonal persistence, explicit prevalence

Model a changing world?

Everything is stateful. Java.

Model changes to the world?

Functional programming.

Mostly functional. OCaml, Clojure.

Purity at base-level. Haskell.

Purity at meta-level, too. Unlambda.

Discuss relevant change?

Actors encapsulate state. Erlang, Reactive FP.

State is meta-level modularity.

Encapsulate and recapsulate.

The Grand Challenge

None of these Stories is revolutionary.

Each Story has been at least foretold in a past system.

But no system embodies all these Stories at once.

The Meta-Story

The bad stories are about things.

The better stories are about people making things.

Better stories have late binding of what's Good,

Early banning of what's Bad.

http://fare.tunes.org/computing/fare-ilc09-lightning.html