Search
Monday, 29th of May 2017, 0:57:49 UTC
0:58:17
antonv
The irony is that this function returns library version.
0:58:49
pjb
declare both and try both. The one that doesn't signal an error is the good one.
1:00:00
antonv
pjb: is it correct to wrap (cffi:defcfun ...) into an exception handler?
1:00:22
pjb
it is correct to wrap anything in a condition handler.
1:00:32
antonv
I don't know when (cffi:defcfun ...) does actual work: at compile time, load time
1:00:36
pjb
There are no exception in lisp: every behavior is normal!
1:01:43
Bicyclidine
antonv: i think it depends on the implementation actually.
1:01:52
antonv
Bicyclidine: exactly
1:02:53
Bicyclidine
but i don't think cffi has enough to query whether a symbol has a function. hell i don't know if C does off the top of my head
1:03:13
Bicyclidine
i guess dlsym can tell you whether there's a memory location for it.
1:03:54
antonv
Bicyclidine: CFFI has such feature, but it's not guaranteed to work on any impl (all impls have it except for Corman)
1:04:45
antonv
pjb: on some implementations (cffi:defcfun ...) doesn't fail whaterver foreign name you use, event non-existing
1:04:49
Bicyclidine
oh. well... do that then?
1:05:11
antonv
Bicyclidine: I want portable thing, 100 correct
1:05:27
pjb
then use dlopen yourself.
1:05:34
Bicyclidine
you're not gonna get it from cffi
1:05:45
Bicyclidine
nobody uses corman anyway
1:05:48
antonv
pjb: dlopen doesn't work on Windows, I want portable
1:06:01
pjb
then install linux on your windows box!
1:06:04
Bicyclidine
actually half of cffi doesn't work on corman as i remember. doesn't it not have defcfun?
1:08:20
antonv
BTW, this thing is called foreign-funcall in CFFI
1:08:23
antonv
https://common-lisp.net/project/cffi/manual/cffi-manual.html#Functions
1:09:58
antonv
pjb: the box is not mine :)
1:14:01
Bicyclidine
so i got it backwards.
1:22:26
antonv
Bicyclidine: what backwards?
1:25:33
Bicyclidine
corman supports defcfun but not foreign-funcall, not foreign-funcall but not defcfun
1:27:16
JuanDaugherty
there's no sb-flavors or sb-clos someplace is there?
1:27:27
JuanDaugherty
(analogous to sb-pcl)
1:31:18
Bicyclidine
there's an sb-pcl?
1:31:36
Bicyclidine
oh, wait, the internals yeah.
1:32:06
Bicyclidine
well there's no flavors on account of sbcl is newer than when flavors stopped, and sb-clos would be sb-pcl.
1:33:48
antonv
I'm thinking to use cffi:foreign-funcall and rule-out corman, but first want to ensure the problem is impossible to solve with cffi:defcfun
1:34:30
antonv
pjb: can you help writing error handler so I will catch error a compile, load or call-time?
1:35:41
antonv
(handler-case (cffi:defcfun ("SSLeay" ssleay) :long) (.....))
4:06:24
beach
Good morning everyone!
4:10:51
azzamsa
beach: have a great fun days. happy hacking!.
6:18:12
MONODA
anyone know of a pdf viewer written in cl?
6:43:06
MONODA
ah. well i didn't know about the pdf-tools package for emacs. I think that'll be sufficient for my use case!
9:29:59
attila_lendvai1
** NICK attila_lendvai
Monday, 29th of May 2017, 12:57:49 UTC