libera/#commonlisp - IRC Chatlog
Search
5:40:57
nij-
When I load cl-git, cffi-grovel calls `cc..` and complains https://bpa.st/GHXDG . Turns out that it needs to add another include dir "-I/opt/homebrew/include" (I tried that in a shell and that's fine https://bpa.st/CMNV2). How do I customize cffi to include such thing?
8:28:09
gnoo
hello, how can i find the documentation for common lisp functions such as rev ? in emacs lisp, i'd do C-h f rev or check the elisp manual
8:40:29
beach
The Common Lisp language does not guarantee that tail calls are optimized, so if you use tail recursion on a linear structure like a list, you might very quickly run out of stack.
8:41:37
beach
gnoo: Also, if you are a newbie, there is #clschool for newbie questions. #commonlisp is not really for newbie questions, but they are tolerated to some extent.
13:23:22
nij-
When I load cl-git, cffi-grovel calls `cc..` and complains https://bpa.st/GHXDG . Turns out that it needs to add another include dir "-I/opt/homebrew/include" (I tried that in a shell and that's fine https://bpa.st/CMNV2). How do I customize cffi to include such thing?
13:32:13
Bike
nij-: this is more about your system configuration than cffi. you should configure your system so that you can compile C code you have.
13:35:25
Bike
if you really want to, you can add cflags or include files in the grovel syntax, but presumably you don't want to mess with cl-git's code
13:40:29
nij-
an example of grovel file - https://github.com/russell/cl-git/blob/master/src/libgit2-types-grovel0.lisp
13:41:13
nij-
There is an process-.. function in cl-grovel that would process these kinds of files, (should) generate C codes, and run cc on it.
13:41:47
nij-
It's really cffi-grovel that runs CC. So I suppose there's a way to tell cffi-grovel to include (cc -I..) certain paths.
13:44:26
pjb
nij-: there's a #<CFFI-GROVEL:GROVEL-FILE "cl-git" "libgit2-types-grovel0"> this object has a cc-flags slot that you can initialize with :cc-flags
13:47:02
pjb
I wonder if the asd file can be modified to something like: (cffi-grovel:grovel-file "libgit2-types-grovel" :cc-flags "-I/…/ -L/…/")
13:48:46
Bike
nij-: there's a cc-flags documented as part of the grovel file specification. that is what i was referring to.
13:49:24
Bike
nij-: but since you don't want to have to edit every grovel file you want to load, you should probably configure your cc to look at includes you have installed, instead.
14:25:33
nij-
Yeah C has been a pita.. if I can't resolve this I may have to go for python.. and which makes me sad..
14:27:15
nij-
There were times that I gave up on projects because of cffi-grovel. I hope not again.. otherwise I can't use CL for most part.
14:28:26
nij-
phoe thanks for sharing! I'm looking into that now. Does legit work by parsing the textual output of git!?
14:28:57
Bike
nij-: yes. this is not a problem you will have with cffi alone. it means even if you are doing C programming you will not be able to use libraries you get from homebrew.