Open carkat opened 1 year ago
Don't know how to create ISeq from: org.armedbear.lisp.SimpleArray_ByteBuffer
Don't know how to create ISeq from: org.armedbear.lisp.SimpleVector
What I'm looking to find out is if there is something that can do a conversion on these types, or how I might do that on my end
@carkat The easiest way to save the result in a variable and pass it to a CL context is actually to define a CL var and save it there. example:
(abclj.core/setvar 'x (abclj.core/with-cl '(april:april-c "1 2 3 + 1 2 3")))
(abclj.core/with-cl `(april:april-c "{⍵+⍵}" x))
works just fine.
defining an 'x' variable on clj and passing it CL will return a JVM address to the function on CL and april absolutely will not be able to work on that.
But I think the request does make a lot of sense and it is worth to try to add support for org.armedbear.lisp.SimpleVector
on the cl->clj conversion. I'll try to do it this week.
Is there a way presently to convert Common Lisp vectors to Clojure vectors? Especially the higher dimensional variety?
For instance
Or something of the sort. I guess this method is only expecting list results from lisp, rather than the native CL vector type. Does there need to be some additional conversion functions written to handle vector types, or is there already something that supports this conversion?
Further, round tripping of values doesn't seem to be supported for CL vectors either.
In the above example, x is store, then passed into the next expression. but using clj, x is said to be an
org.armedbear.lisp.SimpleVector
and yet I can't pass it back into an expression expecting a lisp vector