SlideShare a Scribd company logo
Suffusehttps://github.com/suffuse/
paulp@improving.org
Virtual files
— Innumerable motivations
— Today focuses on a single one
— Typed Filesystems
Definitions
— Data: blob of bytes Array[Byte]
— Value: Data of a Type, Array[Byte] constrained
— Type: set of all possible Values and meanings
Types
— A Type specifies all possible values
— A Type System enforces Type membership
— There are no "dynamic" or "runtime" types
— Memory inspection is not typing
Type Specification
— minimal: Data => Boolean
— atomic: Data => T
— composite: (V1,...,Vn) => T
— differential: T => Change[T] => T
A complex system that works is
invariably found to have
evolved from a simple system
that worked.
-– John Gall
Change orientation
— Change is far more common than creation
— ...obscured by constructor-oriented languages
— (A, A => B) offers insight which (A, B) cannot
What's in a change
— (3:00:00, 75mph) and (3:00:01, 0mph)
— Individually fine, deadly in combination
— Constraining the set of possible values is not enough
— We constrain the set of possible derivations
— Sharpen constructors, only produce initial values
Typed Files
— Pre-suffuse, every file on the system is "Data"
— At best there may be a type hint, but never
enforcement
— Files can't be called typed until data always conforms
— Sounds good, but how?
Immutable files
— An initial file and a series of changes?
— We have something for that already
— Typed files all to be under revision control
— Changes typechecked, differentially if available
What's the type of a file?
— Might be declared: user given, suffuse enforced
— Might be inferred: file extension, "file" program
— The file metadata exposes all type information
— Enforce type-preserving writes where appropriate
— Log/warn where enforcement is too strong
Files/programs analogy
— Programs have "compile time" and "run time"
— For a file, compile time is when you change it
— Run time is when you need it
— We move enforcement to "compile time"
How does it work?
— Every write triggers a type check
— A type-preserving write immediately committed
— Other writes sit in the index "dirty"
— A later write may turn a bad write good
— Dirtiness in the filesystem is "uncompilable code"
Multiple universes
— Currently we have only the "dirty" universe
— Developers most likely stay there
— Production code lives in "clean" universe
— Every file can be trusted to be of its type
— Every file loaded with reliable metadata
Flexibility
— Our generality offers huge flexibility
— Types unimaginable in a proglang easy here
— Any Data => Boolean is a valid type
Typed source code
— We can define typed source different ways
— For this example it is
— "parsed and bound" (thus, ASTs and symbols)
class A[S](sym: S) { ---> class A[S](sym: S) {
def f[T](sym: T): String = { ---> def f[T](bippy: T): String = {
var q = "" + sym ---> var q = "" + bippy
q = q + sym ---> q = q + sym
q ---> q
} ---> }
} ---> }
Synergies
— All files are seqs (at worst, of bytes)
— More commonly, UTF-8 lines
— More usefully, a known type (e.g. csv, pwent, ...)
— Typed seqs mean typed pipelines!
Type-directed shell
— Typed files are decomposable other than line by line
— The decomposed types feed back into the shell
— cat file.csv | filter _.N<tab> = bob
— Many tools to upgrade: bash, find, grep
"Implicit Conversions"
— Assume typed files and typed executables
— What happens to mp3info *.aac?
— Define translations between convertible types
— As in scala, implicit machinery can bridge gap
— (As in scala, "magic" carries a cost)

More Related Content

What's hot

5variables in c#
5variables in c#5variables in c#
5variables in c#
Sireesh K
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
Hamid Ghorbani
 
Clojure Small Intro
Clojure Small IntroClojure Small Intro
Clojure Small Intro
John Vlachoyiannis
 
L21 io streams
L21 io streamsL21 io streams
L21 io streams
teach4uin
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
AbhishekMondal42
 

What's hot (6)

5variables in c#
5variables in c#5variables in c#
5variables in c#
 
Java I/O
Java I/OJava I/O
Java I/O
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
 
Clojure Small Intro
Clojure Small IntroClojure Small Intro
Clojure Small Intro
 
L21 io streams
L21 io streamsL21 io streams
L21 io streams
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 

Similar to Suffuse: a typed filesystem

Rust All Hands Winter 2011
Rust All Hands Winter 2011Rust All Hands Winter 2011
Rust All Hands Winter 2011Patrick Walton
 
Flow
FlowFlow
Linux
LinuxLinux
Basics of C
Basics of CBasics of C
ProgFund_Lecture_2_Data_Types_and_Selection-1.pdf
ProgFund_Lecture_2_Data_Types_and_Selection-1.pdfProgFund_Lecture_2_Data_Types_and_Selection-1.pdf
ProgFund_Lecture_2_Data_Types_and_Selection-1.pdf
lailoesakhan
 
Python introduction
Python introductionPython introduction
Python introductionRoger Xia
 
Love Your Command Line
Love Your Command LineLove Your Command Line
Love Your Command Line
Liz Henry
 
Python ppt
Python pptPython ppt
Python ppt
Mohita Pandey
 
Kavitha_python.ppt
Kavitha_python.pptKavitha_python.ppt
Kavitha_python.ppt
KavithaMuralidharan2
 
Scripting and the shell in LINUX
Scripting and the shell in LINUXScripting and the shell in LINUX
Scripting and the shell in LINUX
Bhushan Pawar -Java Trainer
 
1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdf1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdf
amaresh6333
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)
christ university
 
ProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdf
ProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdfProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdf
ProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdf
lailoesakhan
 
Functional programming with F#
Functional programming with F#Functional programming with F#
Functional programming with F#
Remik Koczapski
 
How to write a well-behaved Python command line application
How to write a well-behaved Python command line applicationHow to write a well-behaved Python command line application
How to write a well-behaved Python command line application
gjcross
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programmingChetan Giridhar
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Skills Matter
 
python1.ppt
python1.pptpython1.ppt
python1.ppt
ALOK52916
 

Similar to Suffuse: a typed filesystem (20)

Rust All Hands Winter 2011
Rust All Hands Winter 2011Rust All Hands Winter 2011
Rust All Hands Winter 2011
 
Flow
FlowFlow
Flow
 
Linux
LinuxLinux
Linux
 
Linux
LinuxLinux
Linux
 
Basics of C
Basics of CBasics of C
Basics of C
 
ProgFund_Lecture_2_Data_Types_and_Selection-1.pdf
ProgFund_Lecture_2_Data_Types_and_Selection-1.pdfProgFund_Lecture_2_Data_Types_and_Selection-1.pdf
ProgFund_Lecture_2_Data_Types_and_Selection-1.pdf
 
Python introduction
Python introductionPython introduction
Python introduction
 
Love Your Command Line
Love Your Command LineLove Your Command Line
Love Your Command Line
 
Python ppt
Python pptPython ppt
Python ppt
 
Kavitha_python.ppt
Kavitha_python.pptKavitha_python.ppt
Kavitha_python.ppt
 
Scripting and the shell in LINUX
Scripting and the shell in LINUXScripting and the shell in LINUX
Scripting and the shell in LINUX
 
1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdf1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdf
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)
 
ENGLISH PYTHON.ppt
ENGLISH PYTHON.pptENGLISH PYTHON.ppt
ENGLISH PYTHON.ppt
 
ProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdf
ProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdfProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdf
ProgFund_Lecture_3_Data_Structures_and_Iteration-1.pdf
 
Functional programming with F#
Functional programming with F#Functional programming with F#
Functional programming with F#
 
How to write a well-behaved Python command line application
How to write a well-behaved Python command line applicationHow to write a well-behaved Python command line application
How to write a well-behaved Python command line application
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
python1.ppt
python1.pptpython1.ppt
python1.ppt
 

More from Paul Phillips

Keynote, Lambdaconf 2017 - The Axes of Generalization
Keynote, Lambdaconf 2017 - The Axes of GeneralizationKeynote, Lambdaconf 2017 - The Axes of Generalization
Keynote, Lambdaconf 2017 - The Axes of Generalization
Paul Phillips
 
Brief tour of psp-std
Brief tour of psp-stdBrief tour of psp-std
Brief tour of psp-std
Paul Phillips
 
Keynote, Lambdaconf 2016 - Equality is Hard
Keynote, Lambdaconf 2016 - Equality is HardKeynote, Lambdaconf 2016 - Equality is Hard
Keynote, Lambdaconf 2016 - Equality is Hard
Paul Phillips
 
Naming Things and Finding Cothings
Naming Things and Finding CothingsNaming Things and Finding Cothings
Naming Things and Finding Cothings
Paul Phillips
 
Keynote, LambdaConf 2015 - Ipecac for the Ouroboros
Keynote, LambdaConf 2015 - Ipecac for the OuroborosKeynote, LambdaConf 2015 - Ipecac for the Ouroboros
Keynote, LambdaConf 2015 - Ipecac for the Ouroboros
Paul Phillips
 
Keynote, LambdaConf 2014 - The Silent Productivity Killer
Keynote, LambdaConf 2014 - The Silent Productivity KillerKeynote, LambdaConf 2014 - The Silent Productivity Killer
Keynote, LambdaConf 2014 - The Silent Productivity Killer
Paul Phillips
 
A Scala Corrections Library
A Scala Corrections LibraryA Scala Corrections Library
A Scala Corrections Library
Paul Phillips
 
Keynote, PNW Scala 2013
Keynote, PNW Scala 2013Keynote, PNW Scala 2013
Keynote, PNW Scala 2013
Paul Phillips
 

More from Paul Phillips (8)

Keynote, Lambdaconf 2017 - The Axes of Generalization
Keynote, Lambdaconf 2017 - The Axes of GeneralizationKeynote, Lambdaconf 2017 - The Axes of Generalization
Keynote, Lambdaconf 2017 - The Axes of Generalization
 
Brief tour of psp-std
Brief tour of psp-stdBrief tour of psp-std
Brief tour of psp-std
 
Keynote, Lambdaconf 2016 - Equality is Hard
Keynote, Lambdaconf 2016 - Equality is HardKeynote, Lambdaconf 2016 - Equality is Hard
Keynote, Lambdaconf 2016 - Equality is Hard
 
Naming Things and Finding Cothings
Naming Things and Finding CothingsNaming Things and Finding Cothings
Naming Things and Finding Cothings
 
Keynote, LambdaConf 2015 - Ipecac for the Ouroboros
Keynote, LambdaConf 2015 - Ipecac for the OuroborosKeynote, LambdaConf 2015 - Ipecac for the Ouroboros
Keynote, LambdaConf 2015 - Ipecac for the Ouroboros
 
Keynote, LambdaConf 2014 - The Silent Productivity Killer
Keynote, LambdaConf 2014 - The Silent Productivity KillerKeynote, LambdaConf 2014 - The Silent Productivity Killer
Keynote, LambdaConf 2014 - The Silent Productivity Killer
 
A Scala Corrections Library
A Scala Corrections LibraryA Scala Corrections Library
A Scala Corrections Library
 
Keynote, PNW Scala 2013
Keynote, PNW Scala 2013Keynote, PNW Scala 2013
Keynote, PNW Scala 2013
 

Recently uploaded

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 

Recently uploaded (20)

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 

Suffuse: a typed filesystem

  • 2. Virtual files — Innumerable motivations — Today focuses on a single one — Typed Filesystems
  • 3. Definitions — Data: blob of bytes Array[Byte] — Value: Data of a Type, Array[Byte] constrained — Type: set of all possible Values and meanings
  • 4. Types — A Type specifies all possible values — A Type System enforces Type membership — There are no "dynamic" or "runtime" types — Memory inspection is not typing
  • 5. Type Specification — minimal: Data => Boolean — atomic: Data => T — composite: (V1,...,Vn) => T — differential: T => Change[T] => T
  • 6. A complex system that works is invariably found to have evolved from a simple system that worked. -– John Gall
  • 7. Change orientation — Change is far more common than creation — ...obscured by constructor-oriented languages — (A, A => B) offers insight which (A, B) cannot
  • 8. What's in a change — (3:00:00, 75mph) and (3:00:01, 0mph) — Individually fine, deadly in combination — Constraining the set of possible values is not enough — We constrain the set of possible derivations — Sharpen constructors, only produce initial values
  • 9. Typed Files — Pre-suffuse, every file on the system is "Data" — At best there may be a type hint, but never enforcement — Files can't be called typed until data always conforms — Sounds good, but how?
  • 10. Immutable files — An initial file and a series of changes? — We have something for that already — Typed files all to be under revision control — Changes typechecked, differentially if available
  • 11. What's the type of a file? — Might be declared: user given, suffuse enforced — Might be inferred: file extension, "file" program — The file metadata exposes all type information — Enforce type-preserving writes where appropriate — Log/warn where enforcement is too strong
  • 12. Files/programs analogy — Programs have "compile time" and "run time" — For a file, compile time is when you change it — Run time is when you need it — We move enforcement to "compile time"
  • 13. How does it work? — Every write triggers a type check — A type-preserving write immediately committed — Other writes sit in the index "dirty" — A later write may turn a bad write good — Dirtiness in the filesystem is "uncompilable code"
  • 14. Multiple universes — Currently we have only the "dirty" universe — Developers most likely stay there — Production code lives in "clean" universe — Every file can be trusted to be of its type — Every file loaded with reliable metadata
  • 15. Flexibility — Our generality offers huge flexibility — Types unimaginable in a proglang easy here — Any Data => Boolean is a valid type
  • 16. Typed source code — We can define typed source different ways — For this example it is — "parsed and bound" (thus, ASTs and symbols)
  • 17. class A[S](sym: S) { ---> class A[S](sym: S) { def f[T](sym: T): String = { ---> def f[T](bippy: T): String = { var q = "" + sym ---> var q = "" + bippy q = q + sym ---> q = q + sym q ---> q } ---> } } ---> }
  • 18. Synergies — All files are seqs (at worst, of bytes) — More commonly, UTF-8 lines — More usefully, a known type (e.g. csv, pwent, ...) — Typed seqs mean typed pipelines!
  • 19. Type-directed shell — Typed files are decomposable other than line by line — The decomposed types feed back into the shell — cat file.csv | filter _.N<tab> = bob — Many tools to upgrade: bash, find, grep
  • 20. "Implicit Conversions" — Assume typed files and typed executables — What happens to mp3info *.aac? — Define translations between convertible types — As in scala, implicit machinery can bridge gap — (As in scala, "magic" carries a cost)