I know what you mean. After a year or so I still oscillate between a day of: - naval gazing to uncover a lovely clean design, a few trivial bits of clojure later and out comes a lovely, incidental-complexity free implementation that reads like a conversation from the domain actors in the real world and - naval gazing to uncover a lovely clean design, a head-banging session of "what on earth is happening here - why is this so *** hard!", whole pages of stuff that somehow works but is a factor bigger and messier than a trivial OO implementation. Then a few sleepless nights. In the morning; clarity, hold down shift, page down, page down, page down, delete and a few trivial bits of clojure later and peace is restored.
Regardless of what type of day I have I know for a fact that tomorrow I will understand why what I wrote today, regardless of how pleasing it is to me will turn out to be a mess of unnecessary code. As Dr Eli Goldratt/TOC states: "never say I know" :). For example, I meant 'for/while' not 'while' :). On 1 March 2015 at 10:52, Cecil Westerhof <cldwester...@gmail.com> wrote: > 2015-03-01 11:33 GMT+01:00 Colin Yates <colin.ya...@gmail.com>: >> >> I would replace it with loop/recur or a while, with both checking a >> termination flag (probably an atom) which is set by the user. > > I was just going to post that I was going to use a loop. You beat me to it. > ;-) > Probably being busy for to long, because I should have thought about that. > :-( > Well > > I keep updating my Clojure skills. :-) > > No need for a flag (in this case): the user is shown an adjustment. He can > choose yes, no, or cancel. Cancel is the break out of the loop. With no the > adjustment is not done and the next one is shown. With yes the adjustment is > done and the next one is shown. > >> An alternative approach would be core.async with a stop channel and then >> use alt! to check them both simultaneously. > > Something to dive into later. (Just as some other things that came up in my > avalanche of questions of lately.) > > I must say I like Clojure. It is a bit different and I need to get used to > it, but it looks like when I am proficient in it, my productivity will be > quit a bit higher. > >> On 1 Mar 2015 10:30, "Cecil Westerhof" <cldwester...@gmail.com> wrote: >>> >>> I have a program where I change a lot of records based on id's in a >>> sequence. It is a manual process, so I want to give the user an option to >>> terminate the sequence. What would be the correct way to stop (for example) >>> a doseq? > > > -- > Cecil Westerhof > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.