User Tools

Site Tools


notes:language-inspiration

This is an old revision of the document!


Inspirations and historical connections for the folk programming language

Dynamicland | Realtalk

  • Andrés and Omar met at Dynamicland in 2017, their experiences with Dynamicland's Realtalk shaping their creation of folk in 2022
  • While they both used Realtalk extensively, when they moved to New York and began building their open source tangible computing language they picked a different architecture (Tcl & C heavy, with AprilTags as the core fiducial marker) and started anew.

The historical roots of Wish, When, and Claim

Note: there are many more historical roots and papers we reference in the Programming language & DB implementation section of our links page. What follows below is Andrés' attempt to ground our recent (from ~2005 - 2025) citations to the deeper history of programming language design

When

  • The journey to a When statement begins with the foundational work on event-driven programming in Smalltalk-76 (Ingalls, 1978), which established a model where objects communicated by sending messages, a precursor to modern event handling.
  • This was refined in Smalltalk-80 (Goldberg & Robson, 1983) with its Model-View-Controller (MVC) architecture, where user actions (events) in the View would trigger changes in the Model.
  • Concurrently, the AI community was developing production systems like OPS5 (Forgy, 1981), which used explicit IF-THEN rules that reacted to changes in a central “working memory.”
  • This reactive, rule-based approach was formalized in databases through Event-Condition-Action (ECA) rules (Dayal et al., 1988) and given a temporal dimension in temporal logic programming (Abadi & Manna, 1989).
    • A parallel technique emerged from Linda (Gelernter, 1985), where processes could wait for data patterns (using in/rd) in a shared “tuple space,” directly demonstrating a “when this pattern exists, then proceed” model.
  • These distinct threads—object-oriented event handling + AI rule-based reactions, database triggers, and pattern-matching coordination — all converged on the core idea of a system that declaratively waits for a condition to become true before executing a behavior. This lineage culminates in modern constructs like the When statement in folk — realtime execution in reaction to database updates rather than the traditional imperative if statement.

Wish

    • Without this 10 page (!) paper we wouldn't have modern logic programming, the foundation of the ability to Wish into a shared reactive database in Folk
    • As ACM noted in 2001 when awarding Kowalski the Lovelace Medal: “his influential dictum Algorithm+Logic=Control has shaped our views on the essence of declarative programming within the logic programming framework and has had a large impact on the design of new control mechanisms for this approach to programming. His subsequent research revealed the rich potential of the logic programming paradigm. He showed how legal, metalevel, and commonsense reasoning can naturally be formalized by means of logic programs.”
  • This paradigm was first realized in Prolog (Colmerauer, 1972) and later specialized for database queries in Datalog, which provided the “shared database” component of our modern model. It was further generalized by Constraint Logic Programming (Jaffar & Lassez, 1987), which expanded the expressive power of these declarative goals.
  • Together, these systems form the heritage of Wish: a declarative, goal-seeking mechanism for interacting with a logical model of the world.

Claim

  • Claim can be traced back to Bertrand Meyer's “Design by Contract” (DbC), a core feature in the design of the Eiffel programming language first outlined in a 1986 article.
    • Design by Contract formalizes software modules using three types of assertions: preconditions (require), postconditions (ensure), and invariants. These Claims form a rigorous, checkable contract between a component and its clients.
  • The theoretical groundwork for DbC was laid even earlier by work on formal verification. C.A.R. Hoare's axiomatic semantics, or Hoare Logic (1969), used pre- and post-condition triples, `{P} C {Q}`, to logically prove program correctness.
  • While formal verification was often heavyweight, Meyer's DbC provided a pragmatic way to apply these ideas to everyday programming. This approach has since influenced assertion and contract features in many languages, including Ada, D, Clojure, and Python's type hinting system.

* Claim is the direct descendant of this tradition, providing a lightweight but powerful way to assert formal guarantees about a program's behavior at runtime.

notes/language-inspiration.1753708791.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki