Agenda
●

Perspective

●

Preliminaries

●

On complecting

●

Overview of Zeder

●

Out of the Tar Pit

●

A Little Furth...
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...
Transients
●

Limited mutability

●

Thread isolated change

●

Not persistent

●

Not references

●

Speed boosts

Change...
Transients
●

Limited mutability

●

Thread isolated change

●

Not persistent

●

Not references

●

Speed boosts

Change...
Transients
●

Limited mutability

●

Thread isolated change

●

Not persistent

●

Not references

●

Speed boosts

Change...
Transients
●

Limited mutability

●

Thread isolated change

●

Not persistent

●

Not references

●

Speed boosts

Change...
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 internal...
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...
OPS5
●

Invented in the late 1970s

●

Charles Forgy

●

Rete algorithm

●

Incredibly efficient

●

Used to develop exper...
OPS5
OPS5
{:db/ident :user/username … }
{:db/ident :user/salt … }

(defn store-user-info [uname]
@(transact connection
[{:user/...
OPS5
(literalize user
username
salt
)

{:db/ident :user/username … }
{:db/ident :user/salt … }

(p new-user
(user ^usernam...
OPS5
(literalize user
username
salt
)

{:db/ident :user/username … }
{:db/ident :user/salt … }

(p new-user
(user ^usernam...
OPS5
(literalize user
username
salt
)

{:db/ident :user/username … }
{:db/ident :user/salt … }

(p new-user
(user ^usernam...
OPS5
(literalize user
username
salt
)

{:db/ident :user/username … }
{:db/ident :user/salt … }

(p new-user
(user ^usernam...
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)

●

Patter...
Things not shown
●

Snapshots

●

Rete implementation details

●

Pod details

●

Engine swaps

●

RHS Actions

●

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

Introduction to Zeder - a production rules toolkit for Clojure

4,507
-1

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,507
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Introduction to Zeder - a production rules toolkit for Clojure

  1. 1. Agenda ● Perspective ● Preliminaries ● On complecting ● Overview of Zeder ● Out of the Tar Pit ● A Little Further out of the tar pit ● Demo ● Future
  2. 2. Preliminaries
  3. 3. Lens
  4. 4. st Fogus' 1 Law In the same way that an apple tree “apples” – so too should your systems “tuple”
  5. 5. [Entity Attribute Value]
  6. 6. Decomplecting
  7. 7. Take transients... ...please
  8. 8. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts
  9. 9. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy
  10. 10. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy
  11. 11. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy
  12. 12. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy Reference policy
  13. 13. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy Reference policy This is what you wanted.
  14. 14. RAWG!?
  15. 15. Pods decomplect ● Reference policy ● Change policy
  16. 16. Zeder pods decomplect ● Reference policy ● Change policy ● Sharing policy (Zeder version anyway)
  17. 17. Zeder pods decomplect ● Reference policy – ● There are themselves references Change policy – – ● Transients internally Mutable objects Sharing policy (Zeder version anyway) – – Single-thread Multiple threads
  18. 18. A pod++ transient-of value value-of writer shareable? reader
  19. 19. th Fogus' 10 Rule Any sufficiently complicated Clojure program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of OPS5.
  20. 20. OPS5 ● Invented in the late 1970s ● Charles Forgy ● Rete algorithm ● Incredibly efficient ● Used to develop expert systems (XCON)
  21. 21. OPS5
  22. 22. 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
  23. 23. 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
  24. 24. 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
  25. 25. 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
  26. 26. 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
  27. 27. Out of the Tarpit 2006 by Ben Moseley and Peter Marks
  28. 28. Decomplecting
  29. 29. Re Decomplecting
  30. 30. Data Behavior Function
  31. 31. Data Behavior tactical strategic Function tactical
  32. 32. 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
  33. 33. Things not shown ● Snapshots ● Rete implementation details ● Pod details ● Engine swaps ● RHS Actions ● LHS (match) predicates

×