IRC channel logs

2022-03-13.log

back to list of logs

<mwette>(let lp ((res #f) (vals vals)) (cond ((null? vals) res) ((car vals) (if res #f (lp res (cdr vals)))) (else (lp res (cdr vals)))))
<mwette>oops: s/if res #f .../if res #f (lp #t (cdr vals))/
<mwette>So, I"m working to "improve" debugging support. I'm writing a function like Python's pdb.set_trace(). If execution hits (jump-to-debugger) the code stops and provides a repl.
<mwette>jump-to-debugger is provided in a module (jtd). Debugging works better if optimization level is 0. I could add (eval-when (load) (default-optimization-level 0)) to (jtd) so that when code uses (jtd) the debug level is set to zero. Bad idea? Or have users set the debug level?
<mwette>^ never mind: does not make good sense to set -O0 this way IMO
***rdrg109_ is now known as rdrg109
<dadinn>ArneBab: nice! possibly could do a reduce, and break if it's larger than 1 even! ;)
<mwette>'
<dadinn>Btw, is there a way to terminate a reduce? kinda like with Clojure's "reduced" value.
<rlb>dadinn: I'd guess you might could exceptions or prompts for that.
<rlb>(if I understand the context)
<rlb>s/could/use/
<dadinn>rlb: I am pretty sure something to break out of / finalise reductions is implemented in SRFI-171
<dadinn>rlb: I mean Clojure has implemented its reducers in a similar fashion and purpose, so I would assume they have similar implementations
<rlb>Ahh, might well - haven't looked at 171 much, but it's on my todo list, (in part with respect to lokke).
***alMalsamo is now known as lumberjack123
***Guest5602 is now known as roptat_
***roptat_ is now known as roptat
<mwette>should (system repl command) be #declarative? #f ?
<mwette>I place (beta) jtd code in github: https://github.com/mwette/guile-jtd