IRC channel logs
2024-01-03.log
back to list of logs
<apteryx>can I redefine a variable in a if branch? <apteryx>yes; I wanted to avoid nested a level deeper. I've found I could put some check in the default argument of my procedure to the same effect <graywolf>Is it possible to use (format) to print an alist in key = val format? <graywolf>The best I figured out is ~:{~a = ~a~%~} but it needs (map (lambda (x) (list (car x) (cdr x))) a-lst) as an argument <dthompson>why not just for-each and print out each pair? <dsmith>Yeah, I was going to say, something with ~{ might do it <graywolf>Before I did (list (cdr x) (car x)) it actually was ~:{~*~a = ~@*~a~%~} ... this minilanguage is suprisingly powerful <graywolf>It is part of fairly long (format #f ...), so I wanted to do it inside the call <graywolf>But I could split it out into two with for-each in the middle <graywolf>It just feels like I am *this* close... :/ <dthompson>if your formats are getting that complicated you might want to grab one of those lispy dsls for formatting <dsmith>Pretty sure it's inherited from Common Lisp <dsmith>That reminds me. There was something not quite right in the tranlations to Scheme. The way #f and '() are differnet.