Introduction to Zeder - a production rules toolkit for Clojure
Upcoming SlideShare
Loading in...5
×
 

Introduction to Zeder - a production rules toolkit for Clojure

on

  • 4,148 views

 

Statistics

Views

Total Views
4,148
Views on SlideShare
4,128
Embed Views
20

Actions

Likes
1
Downloads
9
Comments
0

1 Embed 20

https://twitter.com 20

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Introduction to Zeder - a production rules toolkit for Clojure Introduction to Zeder - a production rules toolkit for Clojure Presentation Transcript

  • Agenda ● Perspective ● Preliminaries ● On complecting ● Overview of Zeder ● Out of the Tar Pit ● A Little Further out of the tar pit ● Demo ● Future
  • Preliminaries
  • Lens
  • st Fogus' 1 Law In the same way that an apple tree “apples” – so too should your systems “tuple”
  • [Entity Attribute Value]
  • Decomplecting
  • Take transients... ...please
  • Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts
  • Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy
  • Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy
  • Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy
  • Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy Reference policy
  • Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy Reference policy This is what you wanted.
  • RAWG!?
  • Pods decomplect ● Reference policy ● Change policy
  • Zeder pods decomplect ● Reference policy ● Change policy ● Sharing policy (Zeder version anyway)
  • Zeder pods decomplect ● Reference policy – ● There are themselves references Change policy – – ● Transients internally Mutable objects Sharing policy (Zeder version anyway) – – Single-thread Multiple threads
  • A pod++ transient-of value value-of writer shareable? reader
  • th Fogus' 10 Rule Any sufficiently complicated Clojure program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of OPS5.
  • OPS5 ● Invented in the late 1970s ● Charles Forgy ● Rete algorithm ● Incredibly efficient ● Used to develop expert systems (XCON)
  • OPS5
  • OPS5 {:db/ident :user/username … } {:db/ident :user/salt … } (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) ;; something triggers a call ;; to store-user-info
  • OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ;; something triggers a call
  • OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ;; something triggers a call
  • OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ;; something triggers a call
  • OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ?? ;; something triggers a call
  • Out of the Tarpit 2006 by Ben Moseley and Peter Marks
  • Decomplecting
  • Re Decomplecting
  • Data Behavior Function
  • Data Behavior tactical strategic Function tactical
  • Driving principles ● Get stuff done ● Data rocks ● Don't invent anything ● Protocols (swappable engines) ● Pattern matching ● Immutability (or the appearance thereof) ● Fast would be nice
  • Things not shown ● Snapshots ● Rete implementation details ● Pod details ● Engine swaps ● RHS Actions ● LHS (match) predicates