#clojure logs

2008-02-08

03:57jaythanks
03:57jayfor some reason that didnt seem to work before
03:57jaygoodnight
08:55scramflotdirectory walker, version 0.5.9.73: http://pastebin.com/m6c86ef4b
08:56scramflotit's output is prettier, but it terminates after completing one full branch depth
08:56scramflotthe other branches aren't reached
08:58rhickeycalling def at other than the top-level is almost always a mistake - why not use let?
09:00rhickeywhat language(s) have you used before? how would you write it in that?
09:00scramflotrhickey: I'd tried using a let, but I continue to get errors
09:01scramflotlemme brew the let version back up right quick.. sec.
09:04scramflotwell, actually, this time using let didn't break the code.. http://pastebin.com/m13861f4a
09:05scramflotbut, previously, I was using a map function inside the let, which was screwing with things I think, but I could easily be wrong
09:09scramflotbut this let version still terminates after the first branch, whereas I would expect the (map dw s) to continue on ever item in s... instead it executes dw on the first item in s, which returns a new s inside the new sub-instance of dw.. the new s though doesn't contain any directories so running dw on the new s's items doesn't return any sub-sub-instance s's
09:10rhickeywhat language(s) have you used before? how would you write it in that?
09:13scramflotso i map in the original dw isn't regaining control of the process. I've dabbled in java, python and ruby... I'd probably want to use a for loop.. but in the docs I was thinking filter might be appropriate. But I'm unsure how to construct a the predicate form
09:16rhickeyYour difficulties seem to be with the logic of the problem itself rather than Clojure. You should write it first in the language you know best. If you can do that without using assignment, translating the logic into Clojure should be straightforward.
09:20scramflotit's weird cause in this one: http://pastebin.com/m5c4eb9f9 the root dw seems to regain control.. and continue to map the the other directory
09:21rhickeyI can't help you anymore with this, sorry.
09:21scramflotI'm just talking out loud man.. You don't have to waste your time.. I'll get it eventually