freenode/#lisp - IRC Chatlog
Search
7:16:42
flip214
If I have a JAR file created via ABCL, is there already something to decompile that back to CL sources?
7:29:33
White_Flame
unless the source code is literally included, reversing the process is not really programmatically reliable
7:30:53
flip214
I also have a few __loader__._ files -- these include the function names and docstrings in many (SYSTEM:FSET ...) calls
7:31:22
easye
flip214: How'd you create the JAR? If via ASDF-JAR there should still be Lisp source along with the fasls.
7:34:33
knobo
Could I get some feedback on my first package using cffi, please? https://github.com/knobo/cl-sysinfo
7:48:02
shka
usually, i would suggest to signal error instead of returning nil in scenarios like this
7:49:03
shka
if you remove redundant functions, you will be left with just one function to document :-)
7:51:19
knobo
shka: unless I also keep the decode-loads funtion. But maybe I should not decode the loads.
8:10:22
knobo
Maybe I could define a variable that keeps a c-sysinfo struc, and reuse it in the function call.
12:15:00
jackdaniel
if you are curious about ECL's FFI implementation, then you can read about it here: https://common-lisp.net/project/ecl/static/ecldoc/Extensions.html#Foreign-Function-Interface
12:15:46
jackdaniel
generally it follows UFFI API, which reference manual is included here: https://common-lisp.net/project/ecl/static/manual/pt04.html
12:17:58
black_13
if had a function "void foo(void);" defined in a .dll and had normal exports and this was built using visual studio how would i call
12:19:21
jackdaniel
first you load the library (see cffi's doc) then you call defcfun (see cffi doc)
12:19:48
jackdaniel
(defcfun "foo" :void) ; should create function foo which could be called like CL-REPL> (foo)
12:28:30
jackdaniel
while I understand that reading documentation may be a demanding task for various reason, that's why documentation is written - so a person who wrote it doesn't have to explain things over and over again
12:52:24
dlowe
people come to help on IRC because a) they want to know something they can't find in the manual, b) they don't want to read the manual, c) they need emotional support while trying to use your thing
12:58:53
TMA
If insults are to be meted out, it shall be done with dignity, style and proper grammar.
18:28:20
beginner_supreme
Hey all, curious if high-performance compilers create contiguous objects when given element-type, so for (make-array n :element-type some-object/struct), the rough equivalent in C would be: malloc(n * sizeof(some-object/struct));
18:29:47
beginner_supreme
Is this sort of contiguous allocation done at all for these types of expressions (not just for arrays) or are only pointers contiguous, having an extra indirection
18:37:20
copec
I'm not sure if all compilers do, but the presumption is that you are giving it sufficient information so that it can.
18:40:37
beginner_supreme
I read one opinion of it on stack overflow, and the idea is that it would stress the garbage collector out if such an optimization were done. https://stackoverflow.com/questions/29008545/any-ways-to-allocate-flattened-array-of-structure-as-c-in-common-lisp
18:42:12
stylewarning
beginner_supreme: in Common Lisp, usually will not be allocated necessarily like that
18:42:19
copec
If you have reached a point that that is important enough, I would consult the specific implementation docs and/or source
18:42:44
stylewarning
beginner_supreme: it'll be more like: void **array = malloc(n * sizeof (void *))
18:43:01
stylewarning
beginner_supreme: followed by n allocations of the objects, which will inadvertently be contiguous
18:46:55
beginner_supreme
For the future, are such inquiries suitable for this channel or must I refer them to #clnoobs?
18:50:11
copec
I tend to ask in clnoobs first, and reflect the question in here or one of the other CL channels if I can't get an answer. There are some pretty knowledgable people in there though, it's not newb on newb action