IRC channel logs

2018-01-03.log

back to list of logs

<rlb>(nb. we may need to figure out the guile-2.2 arch build issues in the next couple of weeks to avoid removal from debian testing.)
<amz3>héllo all
<wingo>happy new year's, guilefolk :)
<amz3>happy new year
<amz3>manumanumanu: how do you bind C++ code in Guile?
<kristofer>hello!
<kristofer>I'm on page 60 of the little schemer. my definition of o+ is causing a stack overflow
<kristofer>I thought adjusting (add1 (o+ n (sub1 m))) to (o+ (add1 n) (sub1 m)) in the recursive line might not blow the stack. no luck though.
<kristofer> http://paste.freshbakedyams.com/paste/HO0F0J1M
<kristofer>(o+ n m) where m is 1 or 0 will work. m > 1 will not work though
<kristofer>same is true for (oplus n m)
<ijp>the *definition* is causing an overflow. that's kind of weird
<ijp>ACTION looks
<ijp>or did you mean that it overflows when you call it
<ijp>ah, your sub1 is wrong
<ijp>(- 1 x) = 1 - x, which is an involution, so it's just going to bounce back and forth between x and 1-x
<ijp>(hence why it will terminate for 1 or 0)
<ijp>it's easily done
<kristofer>aha
<kristofer>I knew it had to be user error. 'twas a late night ha
<amz3>ACTION happy