The Study Group met on February 21st at 1PM at HacDC’s workshop to continue our discussion of concurrency.
We worked through Stuart Halloway’s snake program, taking note of the way he organized his program by separating the functions that dealt only with immutable data from the ones that dealt with changes in state. We noted his use of “update-” at the beginning of his names for the state-aware functions, and we agreed this was a pretty good convention for functions that were going to update the state of some refs, agents, or atoms. We also paid a fair amount of attention to his consistent use of destructuring as well as the syntax for the alter function. Finally, we looked at Halloway’s atom-snake, which actually stores the state of the entire snake game in an atom and updates it with swap!
, and in so doing creates a transaction-free version of the game. This precipitated a discussion of Software Transactional Memory, which allows copies of complex objects, such as the state of a snake game, to be made without duplicating data from original to copy.
Our next meeting is March 14th, at 1PM, at HacDC’s workshop in St. Stephen’s Church in Washington DC. Homework: chapters 5 and 7 (on Functional Programming and Macros) from Stuart Halloway’s Programming Clojure. We hope to see you there.
We’re also starting to consider our capstone project. Watch the Google group for discussions about the project.