freenode/#ecl - IRC Chatlog
Search
3:23:09
mitigate
is there any reasonable way to hand bitfield packed structs in lisp? struct foo { int a:1; int b:7; }; - sizeof(struct foo) = 4 ?
3:26:30
mitigate
BTW I'm seeing "Cannot interrupt the inactive process" errors when connecting connecting to a swank server. I'm not able to debug it - I just put a handler case around (kill-thread) in (sentinel-stop-server) to work around it.
3:37:23
pjb
mitigate: so you should read the documentation of the C compiler, and translate that to normal FFI stuff.
3:38:17
pjb
mitigate: eg. if the C compiler packs the 1 and 7 bit fields into a single 32-bit int, then you can declare a defcstruct with a single 32-bit int. Then you have to know where those bits are stored? Once you know that, you can use ldb and dpb to access them.
3:57:16
mitigate
but the problem i'm having in my head is in using that info to implement (ffi-slot-value struct slot-name)
6:20:49
shakdwipeea
I am trying to create some bindings for godot engine using https://github.com/GodotNativeTools/godot_headers. This basically allows using dynamically linked libraries from godot engine.
6:22:36
shakdwipeea
From the godot_headers README, they are defining library endpoint as /** Library entry point **/
6:53:37
mitigate
i may screw up my system requiring a reboot if that happens i'll be gone for a few hours
6:54:56
shakdwipeea
Okay, the problem I am facing is when I load the so files generated from my lisp files. godot errors out with Can't resolve symbol godot_gdnative_init .
6:55:09
shakdwipeea
In my lisp files I had just defined it as (defun godot_gdnative_init (p-options))
7:06:23
mitigate
Error: Can't open display: :0 are you using ecl_init before loading the library and trying to call the function?
7:07:56
mitigate
there is more involved.. but i'm afraid i'm out of time now. i'm sure jackdaniel will help if he sees this
7:13:09
shakdwipeea
In that case then maybe I will have to write the main file (the one to be compiled to so) as a c source and then call the lisp functions from there.
7:26:16
jackdaniel
shakdwipeea: check out examples/embed directory for example how to use ecl from C module (hello.c)
7:26:59
jackdaniel
yes, you must call cl_boot (and module_init if you have compiled modules, this is also in the example)
7:28:50
jackdaniel
!notify mitigate please verify, what slime/swank version do you have (and what connection type is chosen). also if you have recompiled ecl *after* loading slime, you may want to remove ~/.slime/fasls directory. upstream slime works fine with ecl as far as I'm concerned (even for remtoe connections)
7:29:03
Colleen
Unknown command. Possible matches: 8, set, say, mop, get, have a, grant, award, time, tell,
7:29:08
jackdaniel
:notify mitigate please verify, what slime/swank version do you have (and what connection type is chosen). also if you have recompiled ecl *after* loading slime, you may want to remove ~/.slime/fasls directory. upstream slime works fine with ecl as far as I'm concerned (even for remtoe connections)
7:29:16
jackdaniel
!tell mitigate please verify, what slime/swank version do you have (and what connection type is chosen). also if you have recompiled ecl *after* loading slime, you may want to remove ~/.slime/fasls directory. upstream slime works fine with ecl as far as I'm concerned (even for remtoe connections)
7:29:25
jackdaniel
:tell mitigate please verify, what slime/swank version do you have (and what connection type is chosen). also if you have recompiled ecl *after* loading slime, you may want to remove ~/.slime/fasls directory. upstream slime works fine with ecl as far as I'm concerned (even for remtoe connections)
9:04:10
shakdwipeea
I followed the embed examples and wrote a c program including the ecl header files and then compiled that to so file.
9:04:59
shakdwipeea
but when I try to load the library. I get Can't open dynamic library ... undefined symbol: cl_symbols
9:06:21
shakdwipeea
here is the c file I'm trying https://gist.github.com/shakdwipeea/49204c5191f0e5fcf93bda518a54c624
9:10:50
jackdaniel
did you add -lecl when compiling? in general, did you provide adeqate cflags and ldflags?
9:11:22
jackdaniel
-Wl,--rpath,/home/jack/Pulpit/lisps/ecl-wip/lib -L/home/jack/Pulpit/lisps/ecl-wip/lib -lecl -lgc -ldl -lm
9:13:47
shakdwipeea
this is the command I am using for compiling and the warnings https://pastebin.com/PPRZ2740
9:14:54
jackdaniel
you need to see then why clang doesn't accept linker flags (or how to supply them)
9:16:57
shakdwipeea
I just tried with gcc .. I don't get the warnings but the library still doesn't work.