freenode/#ecl - IRC Chatlog
Search
16:02:24
princesspancake
hello. i have an issue with ASDF, i get a STACK-OVERFLOW when loading quicklisp
16:11:45
princesspancake
`ros install ecl` then dl the quicklisp lisp file, run it, `(quicklisp-quickstart:install)` and after some DL there's a stack overflow
16:13:04
jackdaniel
princesspancake: roswell is a third party app, I don't know what version it puts, and whether their build is broken or not
16:13:23
jackdaniel
I'd rather have you clone the repository, ./configure --prefix=`pwd`/my-ecl/ && make && make install
16:17:18
jackdaniel
asdf bundled with ecl has unique version number because it was forked before 3.2.0 release
16:18:01
princesspancake
i removed my .roswell folder and now i have "Module error: Don't know how to REQUIRE SOCKETS.."
16:19:36
jackdaniel
sockets are built by default with ecl (however it may be disabled in configure script)
16:22:03
jackdaniel
this directory is always created when you install ecl, so if it does not exist that means: 1) it was removed by something else, 2) ecl is not installed, 3) you are using a broken packaged version
17:01:15
princesspancake
but then where i use it i have an error "unknown representation type :godot-dictionary"
17:08:42
jackdaniel
if you are interested in the ffi interface, it is documented in the manual as an appendix
17:08:53
jackdaniel
(that said, I don't remember from top of my head how you should use def-foreign-type)
17:09:13
princesspancake
can't use portability because ECL is the only CL implementation allowing exporting dyn libraries
17:10:23
jackdaniel
it may be a bug then. cffi is a portability layer, it should work on ecl without a problem
17:10:39
jackdaniel
it doesn't mean that you need to have another implementatino working on the system.
17:27:03
princesspancake
https://ibb.co/zRTDbKk that's my code. on the left is the type defs, and on the right the function def. both are in the same package
17:28:24
princesspancake
sadly the manual doesn't show any example of defining foreign functions or C functions with custom foreign types
17:30:02
princesspancake
even tried using keywords for the type names and i had the same error (unknown representation type :godot-dictionary)
17:31:30
princesspancake
i'm generating a dyn lib, not executing the code, does the eval-when will have any effects ?
17:32:07
jackdaniel
yes, i.e when macros require it, then it needs to be available at compilation time
17:45:11
princesspancake
tho i use eval-when now, but i get the error "the sepcial form clines cannot be used in the interpreter" while it's in the (eval-when (compile) ...) form
17:45:13
jackdaniel
I've made a poll regarding my work on ecl: https://twitter.com/dk_jackdaniel/status/1355572561640304641
17:50:54
borodust
i really would like to have delimited continuations, but that would bind me to ECL, as other implementations don't have it :(
18:30:10
princesspancake
@jackdaniel do you have an idea why the ffi:clines forms are failing in my code ? they are within (eval-when (compile) ...) forms
18:35:00
jackdaniel
princesspancake: I have too little data, if you could construct a minimal example (standalone, without godot dependencies), then I could try troubleshoting it if you submit an issue on ecl repository
18:47:19
borodust
princesspancake: can you arrange an example at gist.github.com (or any other paste service of your choice) we can run to reproduce the problem?
18:52:56
jackdaniel
princesspancake: construct an example of how you define a type and try to use it
18:53:44
princesspancake
ye but i need to know if the issue is because these forms are evaled in compile-time or not
18:55:06
jackdaniel
eval-when is used to force evaluating of specified forms at a certain time; still it prompts evaluation just like eval
18:55:46
princesspancake
well then how am i supposed to force ffi thingies to be ran only at compile-time ?
18:56:38
jackdaniel
as I've said, please construct a minimal and self-contained example of what you are trying to do with def-ffi-type;
19:00:26
princesspancake
@jackdaniel https://gist.github.com/linkpy/0c5c60679f6946f7961be7e1ed019f8f
19:16:17
jackdaniel
I'll submit the issue to the repository, I'll include a fix there (I will need to investigate whether it is a correct fix at later time)
19:26:14
jackdaniel
princesspancake: there https://gitlab.com/embeddable-common-lisp/ecl/-/issues/623
19:44:03
princesspancake
https://gist.github.com/linkpy/4a263f3cb56673a7ac2fd19c8fd630d4 if you want to check
20:04:25
princesspancake
i'm using arrays just to have the correct type sizes (they are opaque anyway)
20:08:13
princesspancake
well the types are defined as `typedef struct { uint8_t _dont_touch_that[SIZE]; } godot_NAME;`
20:08:36
princesspancake
i'm not really doing it by hand, i've made macros that uses the API definition to generate everything
20:10:25
borodust
i'll have a look tomorrow, i wonder if i'll be able to run some gdnative example with ecl and claw
20:13:26
borodust
nah, i mean, i have oldish bindings to gdnative routines, but never ran them actually
20:14:56
princesspancake
ye i dont plan to use it on android or ios so i'm not worried about android x)
20:14:57
borodust
thanks, no, the point is i'll autogenerate bindings with :claw and will check if those work
20:17:30
princesspancake
https://github.com/godotengine/godot_headers/blob/3.2/gdnative_api_struct.gen.h that's the only thing you get (which is for primitive types and some other low level stuff) but you still need to generate a wrapper around the structures. for accessing anything for the objects or nodes you need to generate wrappers
20:18:05
princesspancake
basically (at runtime) you query godot to get a pointer to an object method, and need to cache that (and wrap it so it's accessible)
20:25:47
borodust
are you trying to define foreign structures at runtime after receiving descriptors from godot api?
20:29:28
princesspancake
you have that https://github.com/godotengine/godot_headers/blob/3.2/gdnative_api.json for the gdnative api
20:29:57
princesspancake
and you have that https://github.com/godotengine/godot_headers/blob/3.2/api.json for the objects/methods
20:34:57
borodust
and it's not exposed through header? maybe someone already generated C headers from those
20:37:38
princesspancake
but other functions, like related to godot_transform (which is 24 or 36 bytes) aren't
20:39:38
borodust
almost all of its functions are simple enough, but rare ones pass structs by value
20:39:53
borodust
claw generates shim like this for those functions https://github.com/borodust/claw-sdl/blob/master/src/lib/SDL_platform.x86_64-pc-linux-gnu.h
20:40:15
borodust
bindings themselves look like this: https://github.com/borodust/claw-sdl/blob/master/bindings/x86_64-pc-linux-gnu.lisp
20:40:41
borodust
here https://github.com/borodust/claw-sdl/blob/master/src/lib/adapter.x86_64-pc-linux-gnu.c
20:41:09
borodust
then in bindings you can find __claw_SDL_GameControllerGetBindForAxis which is a shim that calls to actual function
20:49:25
jackdaniel
ecl has three ffi mechanisms: static ffi, dlopen ffi, and dynamic ffi. the last one under the hood is libffi
21:57:30
etimmons
Not sure if it's related to what princesspancake saw, but I have seen stack overflows when loading the latest version of ASDF (3.3.4). But only when ASDF tries to upgrade itself from a .fas file. Loading the .fas directly works so I assume the blame lays with ASDF, but I haven't had the time to dig deeper into it.