Seajure Meetup Notes
Intro
These are notes from our meetups. If we talk about a good tool or library, I’ll try and add a link here. Feel free to add your own notes.
February 2015
We tried to create a simple web application that echo’s messages (dare I say, a “twitter clone”?…well, not even close, actually.)
Code is at https://github.com/Seajure/echo.
Below is a snippet I saved from an earlier attempt:
(defonce hollas (atom [])) (defn layout [title & body] (html5 [:head [:meta {:charset "UTF-8"}] [:title title]] [:body [:div.container {} body]])) (defn holla-form [] (form/form-to [:post "/"] (form/label "holla" "What do you want to holler?") (form/text-area "holla") (form/submit-button "Holla!"))) (defn display-hollas [hollas] [:ul (for [holla hollas] [:li {} holla])]) (defn index [] (layout "Holla" (holla-form) [:div {:class "clear"}] (display-hollas @hollas))) (defn add-holla [holla] (swap! hollas conj holla) (index)) (defroutes routes (GET "/" [] (index)) (POST "/" [holla] (add-holla holla))) (def app (handler/site routes)) (defn start [port] (ring/run-jetty app {:port port :join? false})) (defn -main [] (let [port (Integer. (or (System/getenv "PORT") "8080"))] (start port)))
March 2015
We’re planning on going over Marcus M’s Star Trek port.
- Reddit discussion
- https://github.com/marcusm/startrek-clojure
- I’ve forked it into the org, in case we make any changes we want to keep.
- UPDATE: I committed the changes we made, if anyone wants to see them.
Links
- Rush Hour game like the one Mark Engelberg made.
- Phil’s Peep Code video, which covers making a game in clojure.
- Caves of Clojure
- Clojure for the Brave and True
- clojure.tools.trace
- print-foo
- Stuart Sierra’s Component project on github
- “My Clojure Workflow, Reloaded”, Stuart Sierra’s Blog