freenode/#lisp - IRC Chatlog
Search
14:04:17
loke
The biggest event I'm part of here is the Emacs Meetup. Usually finds around 10 participants.
14:25:08
beach
Videos typically take some time before being posted. It is all done by volunteers, after all. And those people tend to be the same ones that are busy with tons of other stuff.
14:25:36
beach
If you haven't been to ELS before, you can start with videos from previous conferences.
16:06:31
Posterdati
please help, how can I match a lisp integer type with the corresponding foreign type? Thanks!
16:10:02
Bicyclidine
hm, i suppose you could have a fixed ctype->lisptype map (like :uint8 is (unsigned-byte 8)) and then to do the other way, find the smallest mapped type that a given lisp type is a subtype of
16:15:25
pjb
Posterdati: you could define the foreign types as lisp types, and then use subtypep to match the lisp types to them.
17:54:40
oystewh
is there an idiom for finding the index for which an element in an array is maximized?
18:07:16
beach
It might do two traversals. If you want to avoid that, I think you have to do it "manually", by traversing the sequence and assigning to an index every time you find a larger element.
18:08:47
beach
(let ((index 0) (max (aref array 0))) (loop for i from 1 below (length array) when (> (aref array i) max) do (setf index i) (setf max (aref array i)) finally (return index))) something like that.
18:09:47
beach
The performance issue is typically not the traversal per se, but the application of the :KEY function which is often non-trivial.
19:39:51
Bicyclidine
changing the element type of a stream is impossible, as far as i know, but you can bind a stream with a different element-type to those variables
19:42:17
Bicyclidine
(let ((*standard-input* (open wherever :element-type '(unsigned-byte 60)))) ...) is fine
20:00:22
pjb
mrottenkolber: however, some implementations let you do that, with some implementation specific mean. Otherwise, you may try with flexi-streams.
22:55:59
marvin2
someone remind me please what do I have to add before defmacro to use it in the same file it is defined?
23:26:00
parjanya
where can I find functions to find prime numbers and test if it’s a prime number? I’ve searched on quicklisp but I couldn’t find what’s on the maths related packages...
23:38:46
parjanya
I even started writing it myself, but reinventing the wheel like this isn’t much fun, unless one really wants to do it
0:30:49
antonv
parjanya: for example I did "go to definition" natigated to some source code. After reading the definition I want to return where I was before that.
0:47:44
Bicyclidine
If you do C-h k C-, you'll get the help for the function, which will list the keys it's bound to
0:51:43
Bicyclidine
oh, i wouldn't know that then. probably in emacs help somewhere if it's not obvious from the list of bindings.
0:56:26
antonv
Previous this OpenSSL function was called SSLeay and now it is called OpenSSL_version_num
0:57:22
antonv
How to correctly do CFFI declaration to dynamically check what symbol exists and use it?
1:02:53
Bicyclidine
but i don't think cffi has enough to query whether a symbol has a function. hell i don't know if C does off the top of my head
1:03:54
antonv
Bicyclidine: CFFI has such feature, but it's not guaranteed to work on any impl (all impls have it except for Corman)
1:04:45
antonv
pjb: on some implementations (cffi:defcfun ...) doesn't fail whaterver foreign name you use, event non-existing
1:06:04
Bicyclidine
actually half of cffi doesn't work on corman as i remember. doesn't it not have defcfun?
1:25:33
Bicyclidine
corman supports defcfun but not foreign-funcall, not foreign-funcall but not defcfun
1:32:06
Bicyclidine
well there's no flavors on account of sbcl is newer than when flavors stopped, and sb-clos would be sb-pcl.
1:33:48
antonv
I'm thinking to use cffi:foreign-funcall and rule-out corman, but first want to ensure the problem is impossible to solve with cffi:defcfun
1:34:30
antonv
pjb: can you help writing error handler so I will catch error a compile, load or call-time?