IRC channel logs
2023-10-20.log
back to list of logs
<RhodiumToad>mirai: this is explained in the "Eval-when" section of the manual <RhodiumToad>basically, procedure definitions that you need to reference in macro expansions in such a way that the procedure is run at macro expansion time (rather than just becoming part of the expansion) need to be defined in an eval-when <mirai>ahh, so I'd need to wrap it within (eval-when (expand) …) then? <RhodiumToad>"Other uses of ‘eval-when’ may void your warranty or poison your cat." <seeg123456>It you're interested in my recent ffi struggle. Probably contains memory leaks as I didn't pay attention to pointers :) <graywolf>Hi! (@ (foo) proc) gives me a symbol proc from module foo. How can I make a pair from that? I tried ((@ (srfi srfi-1) map) . (@ (srfi srfi-1) map)) but that does not seem to work... <graywolf>Never mind, I am just stupid. Got it now. <graywolf>However I do have a follow up question: '((@ (x) x) . (@ (y) y)) does not produce a pair, but instead ((@ (x) x) @ (y) y) . However car and cdr do give expected values it seems. What is going on? <lloda>that's because (@ (y) y) is a list. (x . (y ...)) is the same as (x y ...) and the printer always uses the latter <lloda>iow ((@ (x) x) @ (y) y) IS a pair <graywolf>Aaaah I see. So the (a . b) is special only by the fact that the b is *not* a pair? Other than that, the . is not "stored" anywhere or anything like that? <graywolf>Aaaand that is a reason why (cons 'a 'b) produces (a . b). <sneek>tohoyn, daviid says: now comes the time to get g-golf in debian 'proper', let me know if there is something i can do to help ... thanks <RhodiumToad>graywolf: a list (or "proper list") is either the specific "empty list" atom '(), or it's a pair whose cdr is a proper list. so all proper lists end in '(), <RhodiumToad>graywolf: but you can have improper lists where the final pair's cdr is some atom other than '() <RhodiumToad>graywolf: note that this means that the list? predicate has O(n) time complexity because it has to run down the list to check that the terminating atom is indeed '() <dsmith>graywolf, pair? just checks to see if it <dsmith>'s a cons cell, and so can be used with improper lists. And it doens't walk the lsit. <tohoyn>daviid: are you planning to publish version 0.8.0 later with no suffixes? if yes, you should rename g-golf-0.8.0-rc-1.tar.gz to something like g-golf-0.8.0~rc1.tar.gz. I just discussed this in #debian-mentors. <graywolf>Is there a non-white-space character I can use to separate modules components? For a reasons, I want to write (@ (foo bar) baz) without spaces. It works, but only for modules in the top level. <graywolf>"Not possible" is an acceptable answer, I realize this is pretty unusual ask :D <old>graywolf: I do not think you can. That would be the equivalent of asking to write a list '(foo bar) with something else than blanks <graywolf>I was hoping there would be some weird, not really anymore useful, half forgotten way. Never mind, string-substring-replace it it :) <lilyp>graywolf: actually, you can use any other sigil as long as you use string-split and map string->symbol :) <graywolf>For the time being I just decided to map `_' to ` '. Since _ is not really used in idiomatic scheme naming, I don't expect that to be an problem. <lilyp>you can also pollute your module namespace so that (fooZWJbar) → (foo bar) <lilyp>you can also build "hidden" modules by deliberately adding spaces to their names <lilyp>all of that only works if you don't have to resolve them to file names, though