Andrew,
I have worked rather closely with Python and Tkinter. It was a gross mess. In my very early days, I planned as my first VM hack to do a Tkinter extension. The big difficulty is that Squeak makes it very, very difficult to do callbacks, which are used extensively in Tkinter. My impression is that this is till a problem, even under FFI.
Andreas, your comments?
Callbacks are currently not support in the FFI stuff. There is more than one reason for it but for me the primary reason is that adding callbacks has some serious implications on the general working of the VM - so I was trying to avoid an (in my understanding unnecessary) complication for the forthcoming J3. My basic feeling about this is that a working J3 is more worth than any callback support for the FFI stuff... Also, in many cases you can work around callbacks (e.g., Windows, MacOS and X11 all support polling if you want to write your own window stuff).
I'm not saying that it'll never come - just not any time soon ;-)
- A.
"Raab, Andreas" wrote:
Callbacks are currently not support in the FFI stuff. There is more than one reason for it but for me the primary reason is that adding callbacks has some serious implications on the general working of the VM - so I was trying to avoid an (in my understanding unnecessary) complication for the forthcoming J3.
A while ago a thought of a portable way of implementing something like callbacks. Indeed I just realized how it's implemented in Squeak. Isn't it possible to provide a portable callback mechanism using Semaphores?
Callbacker Bye! Richie++
-- A390 1BBA 2C58 D679 5A71 - 86F9 404F 4B53 3944 C2D0 Investigacion y Desarrollo - CoreLabs - Core SDI http://www.core-sdi.com
--- For a personal reply use gera@core-sdi.com
Yikes... it seems like the Squeak world (or is it San Diego) is caught in some kind of chronosynclastic infundibulum. :-)
We have a working callback mechanism based on POSIX-compliant semaphores that we are preparing for release. It is fully synchronous now, but we are planning on support for asynchronous call-in (to Squeak) as well.
We are preparing a VM plug-in that provides this mechanism through a .so on Unixesque systems. It is easy to see how Mac and Windows-32 ports may be made. There is a little bit of portable C-code to operate the platform semaphore mechanisms. The rest is in Smalltalk 'Slang' and regular Smalltalk. We have tested an implementation that used additional primitives in the VM. We are reimplementing these as a named-primitive plugin.
We are planning to make this available by the time of Camp Smalltalk, but may be able to post something sooner.
We have posted this notice because we are seeing a good number of calls for this capability. We can serve as the center for this effort if the community is receptive. We would like to advance this in the context of a generalized message capability.
speaking on behalf of the technical staff at TFEI
John Sarkela CTO The Fourth Estate, Inc.
From: Gerardo Richarte core.lists.squeak@core-sdi.com Organization: Core-SDI, Buenos Aires, Argentina Reply-To: squeak@cs.uiuc.edu Date: 28 Feb 2000 13:32:37 -0300 To: squeak@cs.uiuc.edu Subject: Re: FFI and callbacks (was: RE: How Do You Do Business Apps?) Resent-From: squeak@cs.uiuc.edu Resent-Date: 28 Feb 2000 16:39:39 -0000
"Raab, Andreas" wrote:
Callbacks are currently not support in the FFI stuff. There is more than one reason for it but for me the primary reason is that adding callbacks has some serious implications on the general working of the VM - so I was trying to avoid an (in my understanding unnecessary) complication for the forthcoming J3.
A while ago a thought of a portable way of implementing something like callbacks. Indeed I just realized how it's implemented in Squeak. Isn't it possible to provide a portable callback mechanism using Semaphores?
Callbacker Bye! Richie++
-- A390 1BBA 2C58 D679 5A71 - 86F9 404F 4B53 3944 C2D0 Investigacion y Desarrollo - CoreLabs - Core SDI http://www.core-sdi.com
--- For a personal reply use gera@core-sdi.com
"John W. Sarkela" wrote:
We have a working callback mechanism based on POSIX-compliant semaphores that we are preparing for release. It is fully synchronous now, but we are planning on support for asynchronous call-in (to Squeak) as well.
Interesting!
We are preparing a VM plug-in that provides this mechanism through a .so on Unixesque systems.
That's great!
It is easy to see how Mac and Windows-32 ports may be made. There is a little bit of portable C-code to operate the platform semaphore mechanisms. The rest is in Smalltalk 'Slang' and regular Smalltalk. We have tested an implementation that used additional primitives in the VM. We are reimplementing these as a named-primitive plugin.
That's nice. It's good to have as many named pluggable prims as possible: - more readable, - less changes at the core VM, - pluggable.
We are planning to make this available by the time of Camp Smalltalk, but may be able to post something sooner.
We have posted this notice because we are seeing a good number of calls for this capability. We can serve as the center for this effort if the community is receptive.
We would like to advance this in the context of a generalized message capability.
Sounds very fundamental: perhaps this should be synchronized with SqC...
Thank you for your efforts!
Greetings,
Stephan
squeak-dev@lists.squeakfoundation.org