IRC channel logs

2018-03-27.log

back to list of logs

<lloda>ok managed to install guile-gnome, problem was g-wrap had written @GUILE_CFLAGS@ literally in its pkg-config file b/c (I think) it didn't find guile-config. I thought this was outdated, is it a bug in g-wrap?
<civodul>in Guix there's a g-wrap package but it doesn't do anything special
<civodul>it seems to "just work" with Guile 2.2
<lloda>hmm
<lloda>neither guile nor guile-config are on my PATH, b/c I use $GUILE. But pkg-config should be enough. Define a variable if one of the executables is actually required. But g-wrap was barfing on GUILE_CFLAGS and GUILE_LIBS, for those nothing more than pkg-config should be required :-|
<lloda>imo
<lloda>does anyone know what is MATCH-BIND and what package provides it?
<lloda>oh it's in guile-lib
<lloda>so guile-lib isn't installing the modules in --prefix. It installs them inside my Guile install directories. WTH :-/
<civodul>uh, that's bad
<lloda>wingo: after installing all the dependences, I still can't regenerate the guile-cairo doc. make generate-defuns in doc/ doesn't seem to do anything. doc/Makefile.am has hardcoded paths like ~/src/gnome2/...
<turlando>Hello
<turlando>It's not clear to me the difference between the following two expressions: '(1 2 3) and (cons 1 (cons 2 (cons 3 '()))). Are they stored differently in memory?
<turlando>Kind of related: why should I prefer a vector over a list?
<OrangeShark>turlando: '(1 2 3) creates a constant, there only exist one instance of that list. The other creates a new list each time. (list 1 2 3) and (cons 1 (cons 2 (cons 3 '()))) are equivalent
<OrangeShark>turlando: you would use a vector over a list when you want to access any element randomly, especially for larger lists.
<turlando>OrangeShark thanks a lot. It's not clear why `eq?' returns me false when I compare the cons expression and the list expression. Is that because it's not a constant?
<OrangeShark>eq? returns true if they refer to the same object.
<turlando>What function shold I use to compare the value of two expressions then?
<OrangeShark>so when you use cons or list, you create a new object each time
<OrangeShark>equal?
<turlando>thanks a lot for the clarification OrangeShark
<OrangeShark>I believe there is a section in the manual that explains the different equality functions, but the gnu website seems to be really slow right now
<turlando>I'm using `info guile' for a reason
<OrangeShark>not on a computer with guile unfortunately :(
<turlando>no worries, I can find it by myself, I think it's few section after what I'm reading now
<OrangeShark>a section called equality
<turlando>I have another question: let's say I want to make a function that takes a varidic number of arguments and print all of them to the screen. I'm doing so: (define (printall . v) (if (pair? v) (if (null? (cdr v)) (printall (car v)) (printall (cdr v))) (display v)))
<turlando>But that seems to me extremely complicated and it doesn't work too (gets into an infinite loop)
<turlando>Which is the sane way of doing so?
<spk121>turlando: (define (printall . x) (for-each display x))
<spk121>but there won't be spaces in between theme.
<turlando>spk121 thanks a lot :) It was a simplification of another case I'm trying to address (it involves calling a C function I wrote from scheme)
<manumanumanu>ahoy hoy
<amz3>o/
<spk121>wingo: or civodul: would you mind if I pushed a patch to add inexact->exact to (ice-9 sandbox) ?
<civodul>spk121: that's definitely a question for wingo :-)
<civodul>at first sight it looks safe, but i'd rather let wingo weigh in