IRC channel logs


back to list of logs

<ArneBab>(define (? use-content . args) (if use-content args (list)))
<ArneBab>`(foo bar ,@(? #t 'baz))
<ArneBab>$2 = (foo bar baz)
<ArneBab> `(foo bar ,@(? #t 'baz 'maz))
<ArneBab>$3 = (foo bar baz maz)
<dustyweb>ArneBab: that's not the case sadly
<ArneBab>so you have additional requirements :)
<dustyweb>ArneBab: consider: you may not wish to run the "content" at all if the test does not pass
<dustyweb>no additional requirements!
<ArneBab>ah, yes
<ArneBab>you’re right …
<ArneBab>the content producer might be expensive
<dustyweb>for more on why, see SICP exercise 1.6
<ArneBab>… but, as seen here, it is easy to move from a procedure to a macro without any changes to the using code
<dustyweb>or could have side effects, but hopefully not in mere sxml templating ;)
<dustyweb>ArneBab: you still need to wrap content in a list though
<ArneBab>(this is one of the aspects I see as really cool in Scheme)
<ArneBab>dustyweb: see my final implementation which uses (define (? test . args))
<ArneBab>args always is a list :)
<ArneBab>(in short: I continue to be lazy ☺)
<ArneBab>dustyweb: as last line this night: Isn’t it cool how dramatically a one-line-definition like the ? can cut ceremony?
<dustyweb>ArneBab: yeah!
<OrangeShark>Happy Tuesday
<bms_>I don't have school because it's election day!
<bms_>And I didn't have school yesterday because a horrible storm knocked their power out.
<OrangeShark>bms_: glad you have power back :)
<OrangeShark>guess I said it too soon
<bms_>No, I've had power since the night of the storm. It was only out for like fifteen minutes. It was much worse closer to my school. I don't think they're supposed to have it back until late tomorrow.
<amz3>TIL: there is two ways to POST form data to a server urlencoded or using form-data
<amz3>the default is urlencoded which is rather easy to parse
<amz3>which means that I will try to make a pastebin app
<amz3>if I find a good template ;)
<amz3>that does is not space themed
<amz3>or maybe that is space themed