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.