freenode/#sbcl - IRC Chatlog
Search
10:54:44
asdf_asdf_asdf
(sb-alien::define-aline-type nil (struct tagWNDCLASSA ... (let ((wc (make-alien (struct tagWNDCLASSA) (alien-size tagWNDCLASSA :bytes))))
15:43:13
joshe
mgsk: you might have better luck reading the existing code and browsing the commit history than waiting for someone to lay all the work out for you
17:12:50
mgsk
Reminder me where I asked for it to be laid out? I asked for a suggestion where to start. stassats only has sarcasm to offer. Thats his issue, not mine.
17:17:19
stassats
i spent a week making ppc64 work, where's the thanks? no, "give us more, more", fucking open source maintenance...
17:19:30
flip214
stassats: I hope you're aware that quite a few people appreciate all the time and efforts you put in SBCL!
17:19:41
mgsk
Dude I’m not asking for you to do the work! I think it’s cool as shit that you posted it to ppc64. And now I have access to a fat ppc64 machine and I wanna do cool stuff with it. I thought it would be fun to contribute to SBCL (something I use daily for work) by getting threading working. It’s not unreasonable for me to ask for insight from experts.
17:36:38
stylewarning
I just read chat history. “I want to do X. I tried Y. Where is a good place to start?” <- Are people seriously confusing this with the totally different demand “I see X works, now I want Y. Give me Y! Lay it out for me!”
17:38:22
asdf_asdf_asdf
OK. let is not alien type probably, so how force, to connect with alient-type here structure tagWNDCLASSA?
17:40:48
stylewarning
asdf_asdf_asdf: I don’t understand your question. Why are you defining NIL to be some object?
17:42:55
stassats
stylewarning: that's how you define-alien-type structs, but that's obviously not complete code.
17:45:14
fitzsim
I'm getting a test failure on sb-sprof in my ppc64be VM, but I'm not sure if it's related to running in a VM or a genuine failure
17:45:40
stylewarning
asdf_asdf_asdf: (define-alien-type nil (struct tagWNDCLASSA ...)) where ... are the members of the structure, I think.
17:48:11
mgsk
Although I would naively expect that be vs le would be dealt with at the OS layer, not application?
18:03:54
fitzsim
mgsk: :thread-support wasn't in *features* when I checked recently, so probably not
18:09:18
asdf_asdf_asdf
Sorry for question, but I can't find. How get "address" from callback alien?
18:13:41
asdf_asdf_asdf
No. I defined define-alien-callback, but I should still only signature without body.
18:14:44
asdf_asdf_asdf
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
18:15:04
asdf_asdf_asdf
I wrote body callback, but I must still only definition callback without body.
18:15:12
stassats
if lpfnWndProc type signature matches, then you can just set (setf (slot ...) callback)
18:16:37
stassats
and in (make-alien (* (struct tagWNDCLASSA)), you're not allocating a struct, just a pointer
18:35:16
asdf_asdf_asdf
(define-alien-type WNDPROC (LRESULT int int :convention :stdcall)) - pseudo-code. I don't know how correctly define a signature.
18:51:54
stassats
basicically just slap FUNCTION around whatever you write for define-alien-callback
19:14:18
asdf_asdf_asdf
@stassats; O yeah. It works. Thanks. Becuase I tried (cast WindowProc (* WindowProc)).
20:57:31
asdf_asdf_asdf
I search null and void type alien in SBCL. I can't find. I found (* t), but I don't know what's mean.
20:59:34
stassats
a function returning nothing? you can do (function (values) ...), void*? (* t) is kinda like that