IRC channel logs

2023-10-22.log

back to list of logs

<apteryx>can I hope to have access to (system vm program) from libguile/load.c?
<apteryx>i'm trying to use scm_procedure_minimum_arity from #include "procprop.h" and I get while building guile: In procedure private-lookup: Module named (system vm program) does not exist
<apteryx>ACTION simply throws the towel on this petty old hooks vs new hooks backward compatibility problem
<tohoyn>daviid: ping
<mirai>What's the right way to return a lambda that either works with a single argument or one that accepts 2 args but only uses the last one? snippet: <https://paste.centos.org/view/21d1f5fb>
<mirai>perhaps I'm overlooking something but I'm having trouble fitting case-lambda here
<rekado>mirai: (case-lambda ((one) (+ one 10)) ((first second) (+ second 20)))
<spk121>mirai: You can make a func that takes any number of arguments and only uses the last one like this:
<rekado>if you must use case-lambda you can let-bind the final procedure. E.g. (let ((process (lambda (one) (+ value 100)))) (case-lambda ((value) (process value)) ((_ value) (process value))))
<rekado>or you can use match-lambda*
<spk121>lol, that probably better than what I was going to write
<mirai>****
<mirai>thanks for the tips