IRC channel logs
2023-08-27.log
back to list of logs
<haugh>Say I have an internal definition or lambda expression which does not reference any parameters of the "parent" procedure. Does Guile recompute it every time the parent procedure is called? <haugh>Instead of "parameters of parent procedure" I should say "bindings in the lexical scope" <haugh>Although now that I think of it, I suppose all these bindings are in lexical scope... I guess what I'm really asking is whether I should worry about the cost of internal or ad hoc procedures as much as I do <haugh>I was concerned that the answer to my question was "grok CPS" <haugh>thank you for confirming my fears <rlb>Hah, not necessarily - and I think there are some disassembly options, so you could possibly just look at the end result for some simpler examples. <rlb>(As yet, I've mostly dealt with the scheme level, and the C level, and not as much the middle :) Well, actually I suppose I've dealt with tree-il somewhat.) <haugh>I haven't actually encountered any issues but I do write in an obsessively HOF-oriented style so the concern is always there in the back of my mind. <rlb>Not unreasonable -- just depends on the compiler in question, I suppose. <rlb>(not unreasonable to wonder I mean) <haugh>I'm positive I'll get down there eventually, just a matter of priorities <wingo>cps might be easier to read in the output of ,optimize-cps at the repl <cow_2001>In the socket procedure's docstring there's a typo. Should be "be" instead of "by". "A single socket port cannot by used for communication until it has" <mwette>If I create a module that has (define (bv-u32le-ref bv) (bytevector-u32-ref bv little)), where (define little (endianness little)), the compiler will inline the bytevector-u32-ref calls, correct? IIRC bytevector-u32-ref is an intrinsic procedure.