Related project: sbcl-win32-threads
September 16, 2010
For some time I wasn’t making much progress with cl-gtk2 (though I have plans to improve it) because I’ve been busy with adding native threads support for SBCL on Windows that are necessary for developing cross-platform GUI applications with SBCL and cl-gtk2. Threads are pretty much working right now and I’m now asking to test and evaluate it. The sources are available at http://github.com/dmitryvk/sbcl-win32-threads and the binary installer is available at https://sites.google.com/site/dmitryvksite/sbcl-distr/sbcl-1.0.40-threads-2.msi.
There are still some I/O issues waiting to be resolved that affect threads (Win32 is quite weird when it comes to I/O). Lucky for me, Anton Kovalenko made improvements in SBCL’s I/O for Win32.
cl-gtk2 seems to work in multithreaded SBCL on Windows (though I didn’t test it a lot). There is an issue that affects cl-gtk2: loading it from the SLIME REPL hangs during initialization of Gtk+ due to some deadlock in windows’ C runtime – you’ll just have to enter anything in SLIME’s *inferior-lisp* buffer to unhang it. Hopefully, this will be resolved with help from Anton Kovalenko.
September 16, 2010 at 9:53 pm
Thanks for working on this Dmitry!
September 17, 2010 at 8:35 am
Wow, that’s amazing! You are doing great work, Dimitry. Keep it up (-:
September 17, 2010 at 6:03 pm
I have been following this branch for a while, and for the past month or so, all the contribs fail when I build it under cygwin. What is your build environment like?
September 17, 2010 at 8:56 pm
I’m building under cygwin and I haven’t paid too much attention to contribs failing (they fail on my machine). But the failure seems to be I/O-related, since just running “echo 1 | sh run-sbcl.sh” crashes SBCL.
October 3, 2010 at 6:26 pm
First off, thanks for the work.
It’s not helping my current problem, though, which involves callbacks made from somewhere other than the primary thread from a DLL loaded through CFFI.
I haven’t tried to debug through it or anything yet.
October 3, 2010 at 6:33 pm
SBCL currently does not support callbacks from foreign threads.
October 17, 2010 at 8:51 pm
Does SBCL support callbacks from foreign threads on Linux?
October 18, 2010 at 2:07 am
No, it does not.
March 7, 2011 at 7:34 am
Dmitry,
Which CL does it work with on Win32? What version?
I really would kill for some form of GUI toolkit, preferably Gtk.
Thanks in advance.
March 8, 2011 at 9:14 am
I’ve tested cl-gtk2 on Clozue CL, SBCL (upstream untithreaded version and multithreaded). Unithreaded SBCL is much more limited.
April 2, 2011 at 4:26 pm
Hi,
I’m trying to use cl-gtk2-gtk but I have some questions about how to debug gui code and how do you usually work with it. I think there is a good way of using it and a bad way and I’m using it badly.
Currently my code looks like:
(defun run ()
(within-main-loop
(let ((builder (make-instance ‘builder)))
(builder-add-from-file builder (namestring (make-pathname :name “furseby”
:type “glade”
:directory ‘(:relative “gui”))))
; match the controls that matter to vars
(let ((window (builder-get-object builder “window”))
(search-field (builder-get-object builder “search-field”))
;……………
; on window close keep the gtk running. helps with debugging
(g-signal-connect search-field “key-press-event” (lambda (x y) (format t “~a” (list w y))))
(g-signal-connect window “destroy” (lambda (w) (declare (ignore w)) (leave-gtk-main)))
(widget-show window)))))
and every time I have an error, the gui window (which I get by calling run) hangs and doesn’t respond to futher repl commands like (leave-gtk-main).
Is there a forum, chat room or any other place where I can ask this questions?