IRC channel logs
2015-12-25.log
back to list of logs
<cmhobbs>so i got a wild hair and i think i want to tinker with building an implementation of conway's game of life in guile. is there a simple graphics library i can use or would it just be best to do text output? <lfam>cmhobbs: Cool project! I don't know enough to recommend a library but I'm looking forward to your implementation! I love the game of life <alezost>just to mention: in emacs there is "M-x life" <cmhobbs>anyway, it's a sufficiently complex problem to introduce me to the language <cmhobbs>i keep dragging my feet with guile and i never get anywhere. i hope this solidifies my udnerstanding <cmhobbs>which sfri provides multidimensional arrays? <cmhobbs>what is GOOPS? it's mentioned in guile-ploy <cmhobbs>searching the web for guile things often yield poor results. the ref manual has been my constant companion <cmhobbs>ack, why would you slap object oriented things on top of a functional language? <daviid`>cmhobbs: when you ned oop, obviously :) and clos is the best oo system ever invented by human being, so we're luck [almost, goops has bugs, but they will be solved] <cmhobbs>i use oop every day and i get very tired of it <daviid`>cmhobbs: wrt oop, if you do need it, use goops, don't [even try to] write your own, but if you don't need it, well just don't :) <cmhobbs>that's not something i think i'd care to undertake <cmhobbs>self inflicted papercuts between my toes sounds more fun <cmhobbs>i need to make more use of geiser than i do <cmhobbs>does 'foo represent a symbol called foo? is that what the single quote before a series of characters is? <madsy>cmhobbs: ' is a shorthand for QUOTE which is a special form <madsy>QUOTE tells guile to not evaluate the symbol further, but take the symbol literally <madsy>Suppose you call a function like this: (foo bar baz). It looks like you're passing symbols to the function, but what happens is that the arguments bar and baz are evaluated. So you end up passing what the symbols refer to. <madsy>But (foo 'bar 'baz) would actually pass the symbols bar and baz to foo as parameters <madsy>To make it more confusing, the value the symbol refers to can itself be a symbol :) <cmhobbs>managed to build a multi-dimensional array to represent board state and i'm able to set arbitrary life or death in that array <cmhobbs>simple stuff but i barely have guile under my belt. trying to get all this in muscle memory <cmhobbs>on to printing out the board state in some useful manner now <cmhobbs>it's all in geiser, though. i need to get this into a source file before i have too much <madsy>Create a module. It's easy and makes your code cleaner <madsy>If you use emacs with geiser, I hearthily recommend paredit and rainbow-parens :) <cmhobbs>so far my plan is to 1. implement board state (nearly there), 2. build functions for each condition of the game of life, 3. iterate each element of the board through those conditions, 4. display it somehow (probably printing some unicode characters), 5. split it up into modules <cmhobbs>i may already be using paredit and rainbow-parens, i'm not sure <cmhobbs>i installed a bunch of stuff at one point or another