IRC channel logs

2026-09-25.log

back to list of logs

<lechner>old: OK, thanks!
<mwette>old: do you know for sure if guile CPS optimizer translates a call-with-values form to a multi-valued continuation ?
<old>mwette: idk off hand. Why asking ?
<mwette>looking at srfi-189
<lechner>Hi, why would in Emacs (get 'with-exception-handler 'scheme-indent-function) be nil, please?
<old>mwette: AFAICT, it is a known primitive in tree-il and gets translate into a primcall
<old>ah it's suppose to be converted into a let-values in peval
<mwette>old: thanks
<mwette>the sample impl of srfi-189 seems to be turning multiple values into lists
<mwette>and using apply for mv calls
<old>which function?
<mwette>maybe-ref, for example
<mwette> https://github.com/scheme-requests-for-implementation/srfi-189/blob/master/srfi/189.scm#L160
<mwette>note my use of 'seems': not really sure yet
<old>just looking at it, but using pair? is slower than null?
<old>well only true if the object is actually a heap object
<old>nvm what I said, I gues it's fine
<mwette>Is `(values 1)' equivalent to `1' ?
<mwette>... as returned by a procedure?
<mwette>hmm ... `(+ (values 1) (values 2))' => `3'
<old>mwette: I think so yes
<old>at optimization level 1, this is optimized to 3
<old>through peval
<old>655 ;; Statically-known number of values.
<old>656 (($ <primcall> src 'values vals)
<old>657 (and (<= nmin (length vals)) (or (not nmax) (>= nmax (length vals)))
<old>658 (make-call src (make-lambda #f '() consumer) vals)))
<mwette>thank you
<old>that peval stuff is such a best
<old>beast
<old>I don't even know how to read all of that
<mwette>What? The first comment in peval is "This is a simple partial evaluator." :)
<mwette>JohnCowan: The srfi-189 sample implementation exports `values'. Is that intended? (I'm not up on r6rs lib's.)
<mwette>old: my attempt to start looking into srfi-189 for values: https://paste.debian.net/hidden/c723f779
<mwette>^ disappeared, so https://paste.centos.org/view/2298bad1