freenode/#sbcl - IRC Chatlog
Search
11:35:59
man213
Hi guys. I need a help with sb-alien. Could somebody point me a way to define cross-referencing alien structs?
11:52:28
luis
man213: (sb-alien:define-alien-type nil (sb-alien:struct b (x (* (struct a))))) (sb-alien:define-alien-type nil (sb-alien:struct a (x (* (struct b)))))
12:07:06
man213
luis: Thank you very much, luis. You really helped. My mistake was that I referred pointer to a struct type as (* struct-type-name) and not as (* (struct struct-type-name)).
18:55:09
White_Flame
here's the annoying issue I've been having with some old code: https://pastebin.com/nwH1a7jR
19:12:47
White_Flame
I've been pondering changing *=>+ in the names, then having a symbol-macro converting *foo* to +foo+ to avoid those warning outputs, but is there a way to actually silence them? should muffle-warnings have prevented that output?
19:17:20
White_Flame
well, the warning was never reported as caught. This bare output went to stdout without any "caught STYLE-WARNING", and "compilatin finished in 0:00..." etc at the end with no report of warnings
19:17:38
White_Flame
so it seems like it was partially muffled, but the pritning still leaked out, which might be a bug if true?
19:18:09
Bike
"caught STYLE-WARNING" is from the compiler, i'm pretty sure. if you're just getting STYLE-WARNING maybe it's just a regular old warning
19:18:44
Bike
if i (handler-bind ((style-warning #'muffle-warning)) (defconstant *test* 4)) in the repl i get nothing, at least
19:20:18
White_Flame
yet (locally (declare (sb-ext:muffle-conditions style-warning)) (defconstant *foo* 3)) does print it
19:21:40
White_Flame
unless handler-bind is the idiomatic way of muffling warnings; I thought the declarations were
19:25:46
White_Flame
so yeah, runtime warning vs compile-time warning. Having a STYLE-WARNING at runtime wasn't something I considered, thx
19:28:38
Bike
well, i mean, if you (defmacro defconstant ... (handler-bind ... (cl:defconstant ...))), the cl:defconstant won't take effect at compile time
19:29:19
White_Flame
right, the handler-bind and cl:defconstant are both in the generated code, not at macroexpansion tiem
19:35:29
Bike
well, sure, but without a compile time definition you might get some spurious warnings about undefined variables and suchlike
19:47:41
White_Flame
hmm, now I"m getting errors about redefining the constant even with the boundp checks in the value
19:53:20
luis
I couldn't measure each individual pause, but I certainly could have calculated the average. D'oh.
23:03:00
Krystof
pkhuong: well *obviously* you don't associate in the order that gets you well-definedness
23:03:46
Krystof
the space of potential number tokens in CL is frustratingly smaller than you might expect