freenode/#lisp - IRC Chatlog
Search
13:13:16
beach
leo_song: Jim Newton and Didier Verna created some abstractions on top of that though. They call it "regular type expressions".
14:17:28
leo_song
beach: thanks. I was thinking that there would be something like the the array's (array type), so the compilers can have the information to optimise.
14:37:24
beach
leo_song: The array types are determined by the fact that arrays are specialized. A specialized array can hold only objects of a particular type because of the very way the array is represented in memory. But CONS cells can not be specialized that way, so there is no way to guarantee that such a type constraint will remain true.
18:11:27
nij
How to make nickname for a function? (defun f () ()) (setf g #'f) doesn't do what I want, in that (g) returns error.
18:21:09
Alfr
nij, there's also (setf (fdefinition ..) ..); fdefinition also accepts function-names, e.g. (setf frob), which symbol-function does not.
18:22:11
Alfr
nij, also make sure that what you assign really is a function (not a special operator or macro).
19:03:51
lukego
Hey can anyone recommend (or not) an OpenCV binding for Lisp? (Can the ones on Github dates ~2013 be usable or is that hopelessly old in OpenCV terms?)
19:05:02
lukego
Or alternatively, can someone suggest a practical mostly-automated way to extract a set of polygons from a photo? e.g. if you'd take a photo of a keyboard and detect the shape and location of each key
22:09:07
Josh_2
Hey, a foreign function I'm trying to call expects a pointer to a 'const unsigned char ' what encoding type is that? utf-8 doesn't seem to be working properly so I'm not sure if I have the encoding correct
22:15:26
Bike
the function might actually want strings in some encoding, but unsigned char* just means bytes.
22:21:44
Josh_2
I pass it the base64 encoded string converted to a pointer that I receive from a different function
22:25:54
Josh_2
https://gitlab.matrix.org/matrix-org/olm/-/blob/master/python/tests/account_test.py#L74 this is the test I'm trying to copy, it uses the methods sign https://gitlab.matrix.org/matrix-org/olm/-/blob/master/python/olm/account.py#L185 and ed25519_verify https://gitlab.matrix.org/matrix-org/olm/-/blob/master/python/olm/utility.py#L83
22:26:56
Josh_2
https://github.com/K1D77A/cl-megolm/blob/master/src/account.lisp#L87 that is my lisp version of sign, and this is my lisp version of ed25519 verify https://github.com/K1D77A/cl-megolm/blob/master/src/utility.lisp#L33
22:30:34
Josh_2
You can call (%olm:utility-last-error <utility pointer>) and it will return a string telling you some information about the error
22:39:16
Josh_2
Thats why I showed you the python version of the functions because I assume they are correctly using the C library
22:43:11
Bike
but you're not interfacing with that api at all. you're using this one: https://gitlab.matrix.org/matrix-org/olm/-/blob/master/include/olm/olm.h and that's the one you need to understand
22:47:41
Josh_2
https://gitlab.matrix.org/matrix-org/olm/-/blob/master/include/olm/utility.hh here is the verify function