tag:blogger.com,1999:blog-6454006.post4295344906839639596..comments2024-01-16T14:32:49.175+00:00Comments on Arcane Sentiment: Macro of the day: build-listArcane Sentimenthttp://www.blogger.com/profile/04144052171693893368noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-6454006.post-71686128144532870412011-08-23T12:19:16.957+00:002011-08-23T12:19:16.957+00:00Unknown: (random-thing) is supposed to be a standi...Unknown: (random-thing) is supposed to be a standin for some larger expression, not necessarily a function.Arcane Sentimenthttps://www.blogger.com/profile/04144052171693893368noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-67929279043098808272011-08-23T09:03:03.592+00:002011-08-23T09:03:03.592+00:00(repeatedly n random-thing) is sufficient - no nee...(repeatedly n random-thing) is sufficient - no need for #().Alan Malloyhttps://www.blogger.com/profile/11347579423754083087noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-47357856693806652482010-12-24T04:53:35.653+00:002010-12-24T04:53:35.653+00:00I think it's rare because I've never wante...I think it's rare because I've never wanted such a list in "real" code, and I do regularly for toys. But I forgot completely about random tests (despite having written one recently) — I suppose random lists would be used for that.<br /><br />A seed is <i>potentially</i> useful, but (at least in this sort of application) will probably never actually be needed, so why bother? Also, the CL-native way of threading RNG state is by side effect rather than explicit fold, since this doesn't require reorganizing the code that uses it.Arcane Sentimenthttps://www.blogger.com/profile/04144052171693893368noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-28571321435379972452010-12-23T16:57:12.352+00:002010-12-23T16:57:12.352+00:00Maybe this is cultural too (I'm not a CL or Cl...Maybe this is cultural too (I'm not a CL or Clojure coder -- I tend more towards Scheme and Haskell), but on what basis do you call this sort of thing "rare" in production programs? I'm thinking of fuzz testing, here. My first inclination was to say "This should take a seed so its results can be repeated", which leads to it being a fold.That Bassett Disasterhttps://www.blogger.com/profile/17875046009465426632noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-41578115929526699322010-12-23T16:16:58.452+00:002010-12-23T16:16:58.452+00:00Oh, another useful LOOP clause I didn't know. ...Oh, another useful LOOP clause I didn't know. :/ (Scandal: knee-jerk anti-LOOPist doesn't know LOOP!)<br /><br />I originally used DO instead, but that was just too verbose.Arcane Sentimenthttps://www.blogger.com/profile/04144052171693893368noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-19331952167644745312010-12-23T10:49:48.541+00:002010-12-23T10:49:48.541+00:00CL with loop would be: (loop repeat n collect ...)...CL with loop would be: (loop repeat n collect ...)Xachhttps://www.blogger.com/profile/04498567730331742642noreply@blogger.com