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.) <wingo>happy new year's, guilefolk :) <amz3>manumanumanu: how do you bind C++ code in Guile? <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>(o+ n m) where m is 1 or 0 will work. m > 1 will not work though <ijp>the *definition* is causing an overflow. that's kind of weird <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) <kristofer>I knew it had to be user error. 'twas a late night ha