IRC channel logs

2014-12-01.log

back to list of logs

<ArneBab>sneek: later tell cmhobbs: I wrote down the basics I learned about Guile when I started. Maybe they can help you, too: http://draketo.de/proj/guile-basics/ http://draketo.de/proj/py2guile/
<sneek>Will do.
<davexunit>I always struggle to name things. Do I prefix a procedure with the data type it is operating on or do I leave it off?
<davexunit>a map-like operation would be prefixed to avoid collision and confusion with the regular map.
<davexunit>but what about other names?
<ijp>some people thing it is better not to, and rely on the module system for renaming
<ijp>in pfds, I generally always do it
<davexunit>I have a procedure that changes the color of a 'model', a drawable thing.
<davexunit>I called it 'paint', but maybe I should name it 'model-paint'. I dunno.
<davexunit>in other parts of my library, I use the prefixes, so it feels inconsistent.
<davexunit>my 'signal' module has everything prefixed with signal-
<davexunit>signal-map, signal-filter, etc.
<davexunit>but then there's things that aren't likely to clash. I could rename 'signal-sample' to 'sample', but it would again be inconsistent.
<sg2002>Guys, thanks, for all the help, here's why I was asking all those dumb questions: https://github.com/sg2002/lilypond-cheatsheets
<cky>sg2002: Instead of using (cond ((char=? v #\\') ...) ((char=? v #\\,) ...)), use (case v ((#\\') ...) ((#\\,) ...)).
<nalaginrut>yes, since case uses eqv? (actually, memv)
***karswell` is now known as karswell
<ArneBab>sneek: later tell sg2002: woah - the cheatsheet is cool! I needed something like this for ages!
<sneek>Got it.
<ArneBab>sneek: botsnack
<sneek>:)
<ArneBab>sneek: later tell sg2002: would it be possible to extend it to include all the possible *chords*? (like D moll 4)
<sneek>Okay.
*taylanub remembers to test Guile with Xcode 6.1
<cky>taylanub: :-D
<taylanub>:)
<taylanub>cky: do you think I should test anything beyond 2.0.11 + your patch?
<taylanub>stable branch or master branch...
<taylanub>I guess I can just do it all; this iMac's resources are otherwise mostly unused
<cky>Hahahaha. My testing was done on stable, but it's up to you.
<taylanub>all seems fine with CC=clang on 2.0.11 and stable, with the patch. apparently master's autogen.sh needs libtoolize which I don't have...
<nalaginrut>taylanub: Is it faster when you use clang to compile guile?
<taylanub>nalaginrut: it spews out many warnings and Emacs's shell-mode buffer is slow; I'd need to silence the output and measure the time to be able to tell. also, in any case the .go compilation will dwarf any .o compilation, so the overall faster compiler for Guile would be the one that produces more performant binaries rather than producing binaries faster...
<nalaginrut>well, my mistake, I mean 'is it faster after use clang' ;-P
<nalaginrut>I think GuileVM could be faster if compiled with llvm
<taylanub>nalaginrut: AFAIK GCC still produces slightly faster binaries than Clang
<nalaginrut>taylanub: nice to know it! You know, nowadays, LLVM got high praise to generate faster binaries
<nalaginrut>I never compare the performance between GCC and LLVM
<nalaginrut>but people always saying...
<lloda`>taylanub: there's a patch for the libtoolize thing in stable-2.0, don't know when mark_weaver will do the next merge
<pzn>Hi! I'm a guile newbie. trying to modify a program made by another person. for debug, how can I print all elements of a list?
<ijp>write or display
<jmd>pzn: He means (write name-of-list)
<dsmith-w`>Morning Greetings, Guilers
<ijp>well, if pzn doesn't know how to apply a function, then they have way more problems than printing alist
<pzn>ijp, jmd, worked as expected. tks
<jmd>pzn: He described himself as a "newbie".
<ijp>jmd: it would be literally impossible to read the program they are debugging
<pzn>ijp, actually I know nothing :-) but I can read the code and understand its flow... then I can "repeat" what is done. I found that things work like this: (funcionname arg1 arg2 arg3...)
<pzn>I already did "lisp" school works, but that was back in 1995-1999...
***dsmith-w` is now known as dsmith-work
<taylanub>pzn: if you're already a programmer and just don't know lisp, I wrote the following some time as an attempt at clearing up precisely for newcomers how the parenthesized syntax works: http://taylanub.github.io/doc/lisp-rundown.txt feel free to comment on its clarity and such...
<pzn>I discovered the problem of the program. it uses the function "pg-getvalue" to retrieve a bytearray from postgreSQL. but someway the returned value is different in postgres 9.x than it was before
<civodul>Hello Guilers!
<dsmith-work>civodul: Greets
<pzn>nice folks! thanks, problem solved. a (write x) really helped a lot :-)
<dsmith-work>sneek: later tell sg2002 Oh Yeah, that cheetsheet is cool.
<sneek>Got it.
<sg2002>dsmith-work: Thanks. ;-)
<sneek>sg2002, you have 3 messages.
<sneek>sg2002, ArneBab says: woah - the cheatsheet is cool! I needed something like this for ages!
<sneek>sg2002, ArneBab says: would it be possible to extend it to include all the possible *chords*? (like D moll 4)
<sneek>sg2002, dsmith-work says: Oh Yeah, that cheetsheet is cool.
<wingo>greets
<sneek>wingo, you have 1 message.
<sneek>wingo, civodul says: thanks for (system vm elf)! -> http://lists.gnu.org/archive/html/guix-devel/2014-11/msg00670.html
<wingo>whoa neat!
<dsmith-work>sg2002: I've been looking into major third tuning. I might just have a go trying to make a sheet for it.
<amirouche>héllo guilers
<civodul>wingo: that was a fun hack :-)
<civodul>i like it when you're like, "oh, this is already implemented, let's just use it"
<civodul>i feel like a pythonista ;-)
<davexunit>hahaha
<davexunit>that's slowly starting to happen more and more with guile.
<civodul>yup!
<wingo>:)
<sg2002>dsmith-work: m3 is interesting, if only power chords in it were easier.
<sg2002>ArneBab: Displaying all possible chords is probably possible, but it would require writing a new script pretty much from scratch.
<dsmith-work>sg2002: Yeah, it's definitly not "good enough for rock-n-roll"
***fangism1 is now known as fangism-is-back
<amirouche>I looked at my guile bindings issue and I got a clue !
<amirouche>when a c procedure returns NULL (doesn't return anything) it can segfault.
<dsmith-work>amirouche: Yes! Never ever *ever* let a NULL be a SCM
<amirouche>that's what happens internaly in vm-i-system.c:890 but this as to be expected since my procedure doesn't return
<amirouche>void my_function(SCM foo)
<amirouche>always crash
<amirouche>hmmm now that I have a look at the code it seems like it only support one value or "multiple values" as per values procedure
<amirouche>I will make a small test case and submit it
<amirouche>ark! it looks like a bit more complicated
<gjanssens>Hi all
<gjanssens>I'm having an issue with load-extension on OS X...
<gjanssens>(load-extension "foo")
<gjanssens>Will that also try to load foo.dylib or only foo.so ?
<taylanub>gjanssens: from what I know there are no .so on OS X and it should try .dylib
<gjanssens>taylanub: thanks. That means my problem is elsewhere as our build system fails to find a given .dylib file
<gjanssens>I'll dig furter
<gjanssens>Will guile use the DYLD_LIBRARY_PATH environment varibable to find .dylib files ?
<taylanub>gjanssens: note that "what I know" isn't necessarily true :)
<taylanub>I think Guile uses libltdl to open dynamic libraries...
<taylanub>the manual says it does search in LTDL_LIBRARY_PATH
<taylanub>(info "(guile) Foreign Functions") (info "(guile) Foreign Libraries")
<gjanssens>taylanub: thanks but unfortunately that doesn't change anything.
<gjanssens>GnuCash has been running fine on OS X without that parameter set
<gjanssens>jralls did just test it to be sure though...
<gjanssens>On OS X we only need LD_LIBRARY_PATH and DYLD_LIBRARY_PATH
<amirouche>taylanub: where do you use this (info *) procedure? it doesn't work in REPL
<dsmith-work>amirouche: In emacs, hit C-x C-e after one of the )'s. You *do* use emacs for IRC don't you? ;^)
<amirouche>ah thanks!
<amirouche>yes, I use emacs, kind of a newbie for many years
<dsmith-work>Cool.
<dsmith-work>amirouche: A decent editor is vital for scheme code.
<amirouche>emacs is the only editor I use, but I have not a big .emacs, I added recently a few extensions for scheme like rainbow-block
<amirouche>and git-gutter also is kind of helpful
<amirouche>that said, I know about buffers ^^ some people use vim without knowing about them.
<amirouche>about binding problem, I just have to return something like you said that is not NULL
<dsmith-work>amirouche: If you haven't already, check out geiser http://www.nongnu.org/geiser/
<gjanssens_>taylanub: just fyi we got it fixed
<gjanssens_>I was once more mislead by the error message: ice-9/boot-9.scm:106:20: In procedure dynamic-link: file: "libgncmod-app-utils", message: "file not found"
<gjanssens_>That message doesn't mean libgcnmod-app-utils isn't found but libgncmod-app-utils isn't finding one of its own dependencies
<gjanssens_>It's not the first time I'm bitting by this confusing message :(
<gjanssens_>I hope I remember now...
<civodul>gjanssens_: yes, that's confusing; it's what libltdl gives us, unfortunately :-/
<gjanssens_>heh, understood
<daviid>using guile-gnome, any one knows how to catch and connect to 'notify gobject signals on a finer grain level, such as "notify::x-expand", can't find any example so far
***karswell` is now known as karswell