freenode/#sbcl - IRC Chatlog
Search
13:12:26
phoe
minion: memo for stassats: FORMAT.E.26 is probabilistic and therefore it may fail or succeed, depending on the floats that it randomly generates.
18:41:21
man213
Hi folks. I need a help with sbcl alien enums. I have an enum type, defined with (define-alien-type ... (enum ... (...)...)). Could someone point me out how I can convert an enum value to integer it represents? Simple casting via (cast val type) does not help. Thanks.
19:48:29
Krystof
man213: I don't really recommend this, but: if foo is your enum type and :baz is one of the values, try
19:50:16
Krystof
in an ideal world, you don't need the integer representation on the lisp side at all
19:51:09
Krystof
if foo is your enum and :baz your value, you could do (position :baz (sb-kernel:member-type-members (sb-kernel:specifier-type '(alien foo))))