Several core themes emerged this year:
Additional summaries of the conference can be found at
http://clojure-conj.org/speakers/granger.html
http://nodeknockout.com/teams/kodowa http://kodowa.nko3.jitsu.com/
(component position [x y a] :x x :y y :a (or a 0))
(renderable (all-e :renderable))
This effectively turns the entire game into just data. Makes it easy to work with small compost-able functions. Not many at the conference had worked with creating games.
[:background [] :camera [] :player []]
http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/
The work with LightTable is in ClojureScript
This is possible since WebKit (Chromium) is embedded with nodejs.
https://github.com/rogerwang/node-webkit
node-webkit is one of the fundamental elements of LightTable as an implementation.
Interesting growth in the use of nodejs and javascript with ClojureScript as a protective functionality. Games and editors are good examples are large applications but may not be the core problem area for many web applications that tend to have to look at layout rather than logic; canvas is much different.
http://blog.fogus.me/2012/04/25/the-clojurescript-compilation-pipeline/
http://clojure-conj.org/speakers/bonnaire-sergeant.html
https://github.com/frenchy64/typed-clojure
Provide annotations (ann) on definitions (def) that indicate the propositions that are expected for the type of returns given a set of expectations.
Can you build a tool that does static type checking for Clojure.
Assumes that typing is useful but likely reasonable given Java interoperability.
Was part of the google summer of code
http://dev.clojure.org/display/community/Google+Summer+of+Code+2012
code -> (analyser / compiler: jvm) ast (java objects) -> analyze ast (maps) -> typed clojure
This is like the static analysis associat
(check-ns)
Can annotate without changing the underlying structure.
The main tests are done with
(cf 1 (I Number Long))) (ann-form) (def-alias AnyInteger (U Integer ...))
Check that the first argument is the intersection (rather than U = union) of the second.
This uses ordered intersection types for
this uses a series of cases that need to be checked for correctness
see first: has the ability to handle three cases: nil, arity type is just one (e.g., (1)), and finally the general case.
Final check is nil or empty…
look at the types of arity for (+) (uniform), (map, mapcat); key
http://clojure-conj.org/speakers/vachon.html
The feed is the core experience at http://copious.com/ .
This has a mongoDB back-end with the following dumps
{ actor: 'rob', listing: 'guy-with-bear', action: 'loved', interested: [travis, cutter] }
MongoDB falls over in unexpected ways. Growing interested embedded docs can lock the db.
One of the users (kaitlin) was part of the on-boarding process. Each change would generate massive documents.
Digesting is hard to do: aggregating action for grouping story actors, verbs, and objects.
(defref feed-atom) @feed-atom
Atoms allow maintaining state so the daemons can do the following:
Redis was tried but failed when too many story sets generated extensive unions.
https://github.com/nathanmarz/storm/wiki/Concepts https://github.com/nathanmarz/storm
spout > score > aggregate > save
spout, tuple, bolt, serialization, deserialization,
This all uses a protocol approach for Spout: nextTuple, ack, and fail.
This still used redis at the start and end of the process. Same processing bolt used for user-id+story
http://clojure-conj.org/speakers/barski.html
functional clientside ui framwrok with clojurScript
Author Land of Lisp
EDN / Hiccup based
Create a Prismatic application that autoloads processing backends for tweets when available .
Only the weighted connections change not the underlying model.
http://pages.cs.wisc.edu/~bolo/shipyard/neural/local.html http://www.cheshireeng.com/Neuralyst/nnbg.htm
Effectively C in Clojure…
Formatting data presently:
Context sensitivity of JSON (e.g., Date).
The distinction between the reference and the value is frequently lost in system work.
Most of the names in Clojure programs are names of functions (i.e., verbs) but systems don't like verbs (machines, storage locations).
Flow orientation rather than place orientation metaphor for factories: input raw material and output cars rather than User goes to Factory and changes state.
Queues should be fundamental to reduce coupling between system: add to queue and forget rather than have message, know end-point, know end-point status. Pub/sub is the preferred system-level approach.
Value names should never have meaning (e.g., "fred" or "fred17") since people begin to care. Example is in the context of Datomic on Riak + ZooKeeper.
Errors are things that you think should be there not the programmer convince thought of the intended functionality locally. http://www.erlang.org/download/armstrong_thesis_2003.pdf
The heterogeneous approach of simple services.
Non-program to program communication (e.g., SQL or Unix applications) requires a level of indirection (a parser).
lein deps :tree lein pendantic
# sudo emacs /etc/hosts mv .m2 .m2.old lein deps :verify gpg --send-keys A2CD6D08 gpg --sign-keys $KEY_ID
http://www.thoughtworks.com/articles/technology-radar-march-2012
adopt trial hold clojure clojurescript
Debugging is still hard. Errors still require JavaScript background (and that likely won't change).
http://clojure-conj.org/speakers/byrd-friedman.html
Petite Chez Scheme is the inferior scheme.
(run 1 (q) ...)
http://clojure.net/ http://www.intensivesystems.net/tutorials/monads_101.html
(def f (comp (partial * 2) inc)) ;; First Law - Bind (defn bind [mv f] (apply concat (map f mv))) ;; Second Law - Identity (= (vector 4) (bind (vector 4) vector)) ;; Third Law - Associativity (= (bind (bind (vector 4) f) g) (bind (vector 4) (fn [x] (bind (f x) g))))
A monadic value is a container. For the examples noted above that container is a vector. The most obvious of these would be a hash-set.
(hash-set 9) (defn set-bin [mv f] (apply clojure.set/union (map)))
Using this with constantly…
((constantly 3)) (defn bind [mv f] (fn [] (let [m (mv) new-mv (f m)] (new-mv)))) (defn f [x] (constantly (inc x))) ((f 4))
(defn result [x] (fn [state] [x state])) ((result 3) :state) (def h (result 3)) (h #{})
(defn bind [mv f] (fn [state] (let [[v new-state] (mv state) new-mv (f v)] (new-mv new-state)))) (defn f [x] (fn [state] [(inc x) (conj state :inced)])) (def h (f 8)) ;; Gives back the function with a conjable state (h []) ;; [9 [:inced]] ;; Cartesian product with bind and result (def v1 [:a :b :c]) (def v2 [1 2 3]) (bind v1 (fn [x] (bind v2 (fn [y] (vector [x y])))))
;; TODO: Review later (defmacro m-do [result [sym 1 mv1 sym2 mv2] expression] `(bind ~mv1 (fn [~sym1] (bind ~mv2 (fn [~sym2] (~result ~expression)))))) (m-do vecotor [x v1 y v2] [x y]) ;; Reset the bind (defn bind [mv f] (fn [state] (let [[v new-state] (mv state) new-mv (f v)] (new-mv new-state)))) (defn poke [k v] (fn [state] [nil (asoc state k v)])) (defn peek [k] (fn [state] [(get state k) state])) ;; Peek into the value associated with a :a and also show the original set (def h (peek :a)) (h {:a 6}) (def h (m-do result [_ (poke :a 3) x (peek :a)]))
Lets you pass around mutable state value without seeing the state.
Different in Clojure than MiniKanren and Prolog.
Annotation on data structures that allow for contstraints.
Many examples pulled from
Adding new constraints is trivial:
(defmethod prep-subst ::one-two-three... (unifier {:foo 1 :bar 2} (partial-map {:foo 1}) )
Prolog implementation used for http://www.tis.army.mil/PS_AALPS.htm .
http://reference.kfupm.edu.sa/content/b/i/the_birth_of_prolog__24094.pdf
http://clojure-conj.org/speakers/duncan.html https://github.com/pallet/ritz
Ritz has been refactored to include nrepl support.
{:user {:plugins [[lein-difftest "1.3.8"] [lein-marginalia "0.7.1"] [lein-pprint "1.1.1"] [lein-ritz "0.5.0"] [lein-swank "1.4.4"] ]}}
lein ritz-nrepl
Likng soruce code requries
lein pom mvn dependency:sources
From inside of Emacs run nrepl-ritz-jack-in.
=============================================================================================== :id | :name | :status | :at-breakpoint? | :suspended? | :suspend-count =============================================================================================== | system | | | | | main | | | | 1 | main | :wait | false | false | 0 1665 | JDI-VM-Control-Thread | :running | false | true | 1 1881 | msg-pump4597 | :wait | false | false | 0 5086 | Poller SunPKCS11-Darwin | :sleeping | false | false | 0 5082 | Reference Handler | :wait | false | false | 0 5083 | Finalizer | :wait | false | false | 0 5084 | Signal Dispatcher | :running | false | false | 0 ===============================================================================================
Shown during the Data Science demo.
http://emacswiki.org/emacs/volatile-highlights.el
This also allowed for single hand navigation.
already implemented but note as pitch.
seen the notes on the unconference requires stepping back and building the infrastructure separately
https://www.cs.indiana.edu/~minaxi/pubs/wpes12.pdf
See the associated AST tooling for http://www.cs.indiana.edu/~achauhan/Teaching/B629/2010-Fall/Assignments/manual.pdf
Chrome plugin for reviewing all scripts on page + Esprima and look for marks of libraries, ads, trackers, or features