Skip to content

Commit

Permalink
Add basic (unimplemented) fingerprint support
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Aug 20, 2012
1 parent 0c490e4 commit 21eba1f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/clostridium/core.clj
Expand Up @@ -352,6 +352,19 @@
)
)

(defn makeFingerprint [nb]
(let [
{:keys [b item]} (removeFromStack nb)
{:keys [b items]} (removeManyFromStack b item)
fingerprint (reduce #(+ (* 256 %1) %2) 0 items)
]
{
:b b
:fingerprint fingerprint
}
)
)

(def initialInstructions
(merge
numberInsts
Expand Down Expand Up @@ -651,6 +664,22 @@

)
)
\( (fn [nb]
(let [{:keys [b fingerprint]} (makeFingerprint nb)]
(do
;(println "Begin Fingerprint" fingerprint)
(reflect b) ; FIXME: unimplemented
)
)
)
\) (fn [nb]
(let [{:keys [b fingerprint]} (makeFingerprint nb)]
(do
;(println "End fingerprint" fingerprint)
(reflect b) ; FIXME: unimplemented
)
)
)
}
)
)
Expand Down

0 comments on commit 21eba1f

Please sign in to comment.