Tomas Petricek, Charles University
tomas@tomasp.net
@tomasp.net
https://tomasp.net
https://d3s.mff.cuni.cz/teaching/nprg077




Needed "implementation" to finish my PhD!
How to show potential uses of theoretical work?
Tiny web demos of two potential applications


Making programmatic data exploration accessible to non-programmers
Small typed language, but interaction is why it works!


Computational substrate for end-user programming
Making implementation of end-user programming experiences easier...



Programming systems & languages research
D3S at MFF CUNI
PRL at FIT CTU
Ask us about PhD & post-doc opportunities!

Tomas Petricek, Charles University
tomas@tomasp.net
@tomasp.net
https://tomasp.net
https://d3s.mff.cuni.cz/teaching/nprg077



Ignore implementation and practical features
Prove that the core idea is formally sound


Ignore inner working and implementation
Show that users can actually use it and how


Ignore usability and design implications
Show that you can do better than a baseline




Why study 1908s programming systems?
No code programming!
First us of an "icon"!

Best way to learn?
Write it on your own!
Understand principles
As well as subtle details
I hope you'll have fun!
Little may be enough...
Imagine new paradigms
End-user programming?
Focus on interaction
How exactly did it work
Ignore practical details
They can often wait!


(Kamin, 1990)
Used in multiple
courses worldwide
Examples in Pascal
Languages covered are APL, Clu, LISP, Prolog, Smalltalk, Scheme, SASL
Not always focused
on the key aspect


(Schank, Riesbeck, 1981)
Miniature implementations of 5 Yale AI lab programs
Faster, more efficient, easier to understand, modify and extend
"Miniatures, demos and artworks" by Warren Sack


(Distill, 2016-2021)
Five affordances of interactive articles
Connecting people & data
Making systems playful
Prompting self-reflection
Personalizing reading
Reducing cognitive load

Tomas Petricek, Charles University
tomas@tomasp.net
@tomasp.net
https://tomasp.net
https://d3s.mff.cuni.cz/teaching/nprg077


Programming is
writing code
Formal semantics, implementation, paradigms, types
We know how
to study this!


Interacting with a stateful system
Feedback, liveness, interactive user interfaces
But how do we
study this?








Standard approach
to programming language theory
Why write small interpreters instead?

(* A term like 'father(william, X)'
consists of predicate 'father',
atom 'william' and variable 'X' *)
type Term =
| Atom of string
| Variable of string
| Predicate of string * Term list
(* A rule 'head(...) :- body.' *)
type Rule =
{ Head : Term
Body : Term list }
(* A program is a list of rules *)
type Program = Rule list
A good way to explain the structures!
1) Functional data types for the static and dynamic structure
2) A function to model the evaluation logic

Tomas Petricek, Charles University
tomas@tomasp.net
@tomasp.net
https://tomasp.net
https://d3s.mff.cuni.cz/teaching/nprg077





Functional interactive user interface development
Types for application
State and user Event
Functions to render
and update state




We will only need a small part of the language!
I will introduce all constructs we will need as we go...

Tiny system examples
Starting points
