SlideShare a Scribd company logo
The Misty Report
Douglas Crockford
Fifty Years and Counting...
• Crocktran
• Candy
• Ply
• Elemeno
• Neo
• Misty
Spinoffs
• JSLint
• Top Down Operator Precedence [Vaughan Pratt]
• JSON
• Parseq
• The Seif Protocol
• JavaScript: The Good Parts
• How JavaScript Works
Making programming languages
is a great hobby
• They are easy to make.
• Most new languages offer little real value over their
predecessors.
• It requires extraordinary luck to get adoption.
• One clever programmer can make a new language.
It will take an army of coders to maintain it.
• Some languages do not become popular, except with
other language designers: ALGOL, BCPL, SmallTalk,
Scheme, Haskell.
• The next language should promote a new paradigm that
allows better solutions to current and future problems.
Being a maker of programming
languages can make you a better
critic of programming languages.
JavaScript
• Good Parts
• Flexible objects
• First class objects with lexical closure
• Optimized for event handling
• Bad Parts
• Pretty much everything else
• Including most of the new parts
• Sequential illusion confusion
[Promises, Async/Await]
JavaScript should not be
the last programming
language.
WTF Operator
?.
The Old Paradigms
1. Von Neumann architecture
2. Symbolic programming
3. High level language
4. Structured programming
5. Object oriented programming
6. Functional programming
The program runs in a single machine.
Our World
• Many processes per machine.
• Many machines interconnected.
• Machines are very fast.
• Machines have very large memories.
• Reliability requirements get increasing strict.
• Insecurity is our biggest problem.
• We need a programming paradigm that fits our
distributed world.
The Actor Model
The Actor Model
• The concurrency model...
• The communication model...
• The security model...
...all come from a single mechanism:
Message Passing
The Actor Model
• An actor is a program running in a single process in a machine.
• An actor communicates with other actors only by message
passing.
• There is no sharing, even between actors in the same machine.
• An actor can create new actors in its own machine.
• Every actor has a private address.
• If you have an actor’s private address, you can send messages
to that actor.
• Messages can contain private addresses.
• Actors can have state, which can change based on received
messages.
Actors At Work
• Incoming messages are queued if necessary, delivered
in arrival order.
• An actor runs when it receives a message.
• An actor will not be given another message until it is
done.
• Messages sent by an actor will be held until it is done.
• An actor’s turn may be timesliced.
Acquiring private addresses
• By creation:
When an actor creates an new actor, it receives the new actor’s
private address.
• By construction:
An actor can be endowed with private addresses when it is
created.
• By introduction:
An actor can receive messages containing private addresses.
Neo: JavaScript with very bad part
removed.
Misty: Neo + Actors
Misty: Neo + Actors
• send private_address: message
• send private_address: message: callback
• send received_message: message
• Register a receiver function
• Register a portal function
• Cleaner, more modular programming model
• Connection management
• Failure management
Li ai son
W
or ker
Agent
Li ai son
W
or ker
Agent Cl i ent
W
or ker
M
i ni on
Agent Cl i ent
W
or ker
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
M
i ni on
Agent Cl i ent
Li ai son
W
or ker
M
i ni on
Li ai son M
i ni on
Agent Cl i ent
W
or ker
M
i ni on
Agent Cl i ent
W
or ker
M
i ni on
Por t al
Agent Cl i ent
W
or ker
M
i ni on
Por t al Portal’s network address
Portal’s public key
Agent Cl i ent
W
or ker
M
i ni on
Por t al
The Misty Report - Douglas Crockford
The Misty Report - Douglas Crockford
The Misty Report - Douglas Crockford
The Misty Report - Douglas Crockford
The Misty Report - Douglas Crockford
The Misty Report - Douglas Crockford
Death before confusion!
Coping effectively with multiple opportunities for failure.
The Actor Protocol
• On the network, an actor should not care what language
another actor is written in.
• We need an Actor Protocol, based on the Seif Protocol,
to replace HTTPS in actor systems.
• And a JSON-like format that adds blobs and private
addresses.
•Strictly speaking, a new programming
language is not needed to enjoy the new
paradigm.
•A new programming language will make it
easier to think effectively in the new
paradigm.
Misty is a transitional language:
Actors are made of functions.
After Misty:
Actors all the way down.
The Theater of Computation Project
• Please write to me at
email: dougl as@
cr ockf or d. com
or
mastodon:
ht t ps: / / l ayer 8. space/ @
dougl ascr ockf or d
• See ht t ps: / / w
w
w
. cr ockf or d. com
/ m
i st y
• See ht t ps: / / w
w
w
. cr ockf or d. com
/ dec64. ht m
l
• See ht t ps: / / gi t hub. com
/ paypal / sei f -
pr ot ocol

More Related Content

The Misty Report - Douglas Crockford

  • 2. Fifty Years and Counting... • Crocktran • Candy • Ply • Elemeno • Neo • Misty
  • 3. Spinoffs • JSLint • Top Down Operator Precedence [Vaughan Pratt] • JSON • Parseq • The Seif Protocol • JavaScript: The Good Parts • How JavaScript Works
  • 4. Making programming languages is a great hobby • They are easy to make. • Most new languages offer little real value over their predecessors. • It requires extraordinary luck to get adoption. • One clever programmer can make a new language. It will take an army of coders to maintain it. • Some languages do not become popular, except with other language designers: ALGOL, BCPL, SmallTalk, Scheme, Haskell. • The next language should promote a new paradigm that allows better solutions to current and future problems.
  • 5. Being a maker of programming languages can make you a better critic of programming languages.
  • 6. JavaScript • Good Parts • Flexible objects • First class objects with lexical closure • Optimized for event handling • Bad Parts • Pretty much everything else • Including most of the new parts • Sequential illusion confusion [Promises, Async/Await]
  • 7. JavaScript should not be the last programming language.
  • 9. The Old Paradigms 1. Von Neumann architecture 2. Symbolic programming 3. High level language 4. Structured programming 5. Object oriented programming 6. Functional programming The program runs in a single machine.
  • 10. Our World • Many processes per machine. • Many machines interconnected. • Machines are very fast. • Machines have very large memories. • Reliability requirements get increasing strict. • Insecurity is our biggest problem. • We need a programming paradigm that fits our distributed world.
  • 12. The Actor Model • The concurrency model... • The communication model... • The security model... ...all come from a single mechanism: Message Passing
  • 13. The Actor Model • An actor is a program running in a single process in a machine. • An actor communicates with other actors only by message passing. • There is no sharing, even between actors in the same machine. • An actor can create new actors in its own machine. • Every actor has a private address. • If you have an actor’s private address, you can send messages to that actor. • Messages can contain private addresses. • Actors can have state, which can change based on received messages.
  • 14. Actors At Work • Incoming messages are queued if necessary, delivered in arrival order. • An actor runs when it receives a message. • An actor will not be given another message until it is done. • Messages sent by an actor will be held until it is done. • An actor’s turn may be timesliced.
  • 15. Acquiring private addresses • By creation: When an actor creates an new actor, it receives the new actor’s private address. • By construction: An actor can be endowed with private addresses when it is created. • By introduction: An actor can receive messages containing private addresses.
  • 16. Neo: JavaScript with very bad part removed. Misty: Neo + Actors
  • 17. Misty: Neo + Actors • send private_address: message • send private_address: message: callback • send received_message: message • Register a receiver function • Register a portal function • Cleaner, more modular programming model • Connection management • Failure management
  • 20. Agent Cl i ent W or ker M i ni on
  • 21. Agent Cl i ent W or ker M i ni on
  • 22. Agent Cl i ent Li ai son W or ker M i ni on
  • 23. Agent Cl i ent Li ai son W or ker M i ni on
  • 24. Agent Cl i ent Li ai son W or ker M i ni on
  • 25. Agent Cl i ent Li ai son W or ker M i ni on
  • 26. Agent Cl i ent Li ai son W or ker M i ni on
  • 27. Agent Cl i ent Li ai son W or ker M i ni on
  • 28. Agent Cl i ent Li ai son W or ker M i ni on M i ni on
  • 29. Agent Cl i ent Li ai son W or ker M i ni on Li ai son M i ni on
  • 30. Agent Cl i ent W or ker M i ni on
  • 31. Agent Cl i ent W or ker M i ni on Por t al
  • 32. Agent Cl i ent W or ker M i ni on Por t al Portal’s network address Portal’s public key
  • 33. Agent Cl i ent W or ker M i ni on Por t al
  • 40. Death before confusion! Coping effectively with multiple opportunities for failure.
  • 41. The Actor Protocol • On the network, an actor should not care what language another actor is written in. • We need an Actor Protocol, based on the Seif Protocol, to replace HTTPS in actor systems. • And a JSON-like format that adds blobs and private addresses.
  • 42. •Strictly speaking, a new programming language is not needed to enjoy the new paradigm. •A new programming language will make it easier to think effectively in the new paradigm.
  • 43. Misty is a transitional language: Actors are made of functions. After Misty: Actors all the way down.
  • 44. The Theater of Computation Project • Please write to me at email: dougl as@ cr ockf or d. com or mastodon: ht t ps: / / l ayer 8. space/ @ dougl ascr ockf or d • See ht t ps: / / w w w . cr ockf or d. com / m i st y • See ht t ps: / / w w w . cr ockf or d. com / dec64. ht m l • See ht t ps: / / gi t hub. com / paypal / sei f - pr ot ocol