Clojure HaXmasthon

114 views
Skip to first unread message

Markku

unread,
Nov 20, 2011, 4:30:12 PM11/20/11
to clojure...@googlegroups.com
Hey everybody!

Finally, time for some Clojure hacking. I'll be at the office sometime between Xmas and New Year, so feel free to join the fun. Vote for the date!

http://www.doodle.com/inc9x5d7ktdwvucz

-Markku

P.S. Maybe this is a bit early to decide on a date, so I'll remind you a bit closer to the date. So take this as FYI :)

Vesa Marttila

unread,
Nov 21, 2011, 6:53:47 AM11/21/11
to clojure...@googlegroups.com
Very nice! Definitely have to find time for this.

Vesa

Markku

unread,
Dec 14, 2011, 5:15:55 AM12/14/11
to clojure...@googlegroups.com
Clojure HaXmasthon! I narrowed down the dates. Come and sign up so we know to order some food and which day is better.
http://www.doodle.com/inc9x5d7ktdwvucz

Esko Luontola

unread,
Dec 27, 2011, 5:47:39 PM12/27/11
to clojure...@googlegroups.com
So will it start at 12 in the office? Shall we meet already earlier and go eat lunch together?

Markku

unread,
Dec 28, 2011, 3:06:30 AM12/28/11
to clojure...@googlegroups.com
Yeah the start is at 12. I will be back at the office by that time. I know some people are joining only after work.

I thought that it's always a little difficult to find lunch space for a big group. But I might join, if you have good ideas. Maybe at 11?

-Markku

Esko Luontola

unread,
Dec 28, 2011, 3:12:43 AM12/28/11
to clojure...@googlegroups.com
How about so that those who want to join for a lunch would come to the office at 11? I'm sure we'll figure out a place where we will fit, or then we'll split into smaller groups.

Markku

unread,
Dec 28, 2011, 3:27:48 AM12/28/11
to clojure...@googlegroups.com
Alright, we'll go for aimless wandering. Let's leave at 11, shouldn't be too busy yet. Famous last words and all :-)

Vesa Marttila

unread,
Dec 28, 2011, 5:36:53 AM12/28/11
to clojure...@googlegroups.com
Hi! I will try to attend lunch as well, so see you at 11.

Vesa

Stephen Sykes

unread,
Dec 29, 2011, 3:04:20 AM12/29/11
to clojure...@googlegroups.com
I should arrive before 11. Do you have a contact number in case I am a
little late?

Markku Rontu

unread,
Dec 29, 2011, 3:36:12 AM12/29/11
to clojure...@googlegroups.com

Stephen Sykes

unread,
Dec 29, 2011, 3:48:58 AM12/29/11
to clojure...@googlegroups.com
Thanks. Looks like we will be there 15 mins after 11. I will call you to see where you are.

Esko Luontola

unread,
Dec 30, 2011, 10:08:00 AM12/30/11
to clojure...@googlegroups.com
I wrote a GUI for the Conway's Game of Life which I implemented that day. Any suggestions on how to make the code more idiomatic Clojure?

Vesa Marttila

unread,
Jan 2, 2012, 4:48:09 AM1/2/12
to clojure...@googlegroups.com
Hi! I think it looks quite good. Below a few things I would consider altering:

https://github.com/orfjackal/misc-tools/blob/master/src/main/clojure/net/orfjackal/game_of_life/gui.clj#L36
Unless you need the result of the 'map' you should probably use 'doseq'.

https://github.com/orfjackal/misc-tools/blob/master/src/main/clojure/net/orfjackal/game_of_life/gui.clj#L66
Perhaps decouple the repainting from mutating with 'add-watch'? 'add-watch'
enables you to add a listener function to a Clojure "mutable" type.

https://github.com/orfjackal/misc-tools/blob/master/src/main/clojure/net/orfjackal/game_of_life/cell.clj
'neighbours' seems a bit repetitive. As an alternative I would suggest something
like this:
  (defn neighbors [[x y]]
    (let [diffs [-1 0 1]]
      (set (for [x2 diffs y2 diffs :when (not (and (= x x2) (= y y2)))]
               (new-cell (+ x x2) (+ y y2))))))

Also (defn x [cell] (first cell)) could be changed to (def x first), but I guess you
wanted to document the function. Also a destucturing form could be used like
this this (defn x [[fst _]] fst).

Vesa
Reply all
Reply to author
Forward
0 new messages