IRC channel logs
2015-10-24.log
back to list of logs
<davexunit>I like this: Guile "runs faster than other "scripting language" implementations like Python (CPython) or Ruby (MRI)." <ArneBab>davexunit: yes — I wish we already had the 2.2 ELF formatted modules <rekado>I think I read this article some months ago, but it's a good read anyway. <roelj>If I have: (define predicates '((lambda (x) (> x 100)) (lambda (x) (< x +inf.0)))). How can I evaluate (car predicates) with a binding for x? <daviid>roelj: why not pred< and pred> what makes you decide if you want the car or the cadr ? <daviid>paroneayea: i'm fighting guile-lib autotool chain POSIX compliance and a make distcheck problem, hope to solve these today :) <roelj>daviid: I thought it'be easier to evaluate one lambda if I had extracted it from the list. <roelj>daviid: What does pred< and pred> do? (I'm searching for the part in the reference manual) <daviid>roelj: don't know what your are up to, but I would define 2 predicates <daviid>(define (pred< x) (< x 100)) and ... <roelj>daviid: I'm trying to assemble a list of predicates while the program is running, so the list of predicates should grow while it runs. <taylan>roelj: you can do (define predicates (list (lambda (x) (> x 100)) (lambda (x) (< x +inf.0)))) so you directly store procedure objects in the list, not syntax forms that need to be evaluated later. <roelj>taylan: Yeah, that does it! I wasn't aware '() was different from (list ...). I really need to learn so much still.. <davexunit>the quoted expression is not evaluated as code, but treated as data. <roelj>Right. And what exactly is the difference between (a . b) and (a b)? <ft>(cons a b) vs (cons a (cons b '())) <ft>well, I forgot a few 's in there. <ft>(cons 'a 'b) vs (cons 'a (cons 'b '())) <roelj>Are both forms the same list structures, and the dot is a notational thing? <taylan>(x y) is really short for (x . (y . ())) <ft>This is so much easier with pictures. <roelj>I read the r5rs report and the Guile reference manual (partly). I find it hard to apply everything. <roelj>I guess it's a matter of practising.