UFFI with asynchronous callbacks
Hi, I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread. Is such situation supported by UFFI ? Thanks for any tip, Jan
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz> wrote:
Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi... @Todd, How did find working through this part? cheers -ben
I've callbacks all over in https://github.com/Pharophile/XmppTalk They do work. Phil On Mon, Oct 23, 2017 at 8:13 PM, Ben Coman <btc@openinworld.com> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz> wrote:
Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi- part-4-ast-walking-with-visitors-callbacks/
@Todd, How did find working through this part? cheers -ben
Just catching up.... I'm trying to work with 64 bit Pharo 6.(1? 2?). I've run into some issues that I have not been able to resolve. I've loaded up TalkFFI with the LibClang library and testLocation fails. Anything that tries to deal with getting a code location fails and I cannot figure out what the issue is yet. Also, callbacks do not work at all. One might say that this is only tested on 32 bit Pharo and that's fine, but I have a 64 bit computer loaded with 64 bit standard libraries and recompiling everything to get 32 bit versions is just not practical. Its past time to do the 64 bit thing. FWIW, my test library at this point is SQLite Amalgam header to see if I can automatically build a SQLite interface (should be easy as it is one file) but it is kind of frustrating that these libclang features are not working on 64 bit libs. I have been running in lldb to try to catch the crashes, and I have written a number of toy programs to make certain things are the sizes I expect. Still stuck at this juncture. Had to take a lil break and learn to program a Particle board for a work project but will resume next week.
On Oct 23, 2017, at 11:13 AM, Ben Coman <btc@openinworld.com> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz <mailto:jan@cada.cz>> wrote: Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi... <http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi...>
@Todd, How did find working through this part? cheers -ben
AFAIK, TalkFFI hasn't been updated to UFFI for Pharo 5. http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5-UFFI-td4915060.htm... cheers -ben On Wed, Nov 8, 2017 at 4:07 PM, Todd Blanchard <tblanchard@mac.com> wrote:
Just catching up....
I'm trying to work with 64 bit Pharo 6.(1? 2?).
I've run into some issues that I have not been able to resolve. I've loaded up TalkFFI with the LibClang library and testLocation fails. Anything that tries to deal with getting a code location fails and I cannot figure out what the issue is yet.
Also, callbacks do not work at all.
One might say that this is only tested on 32 bit Pharo and that's fine, but I have a 64 bit computer loaded with 64 bit standard libraries and recompiling everything to get 32 bit versions is just not practical. Its past time to do the 64 bit thing.
FWIW, my test library at this point is SQLite Amalgam header to see if I can automatically build a SQLite interface (should be easy as it is one file) but it is kind of frustrating that these libclang features are not working on 64 bit libs.
I have been running in lldb to try to catch the crashes, and I have written a number of toy programs to make certain things are the sizes I expect.
Still stuck at this juncture.
Had to take a lil break and learn to program a Particle board for a work project but will resume next week.
On Oct 23, 2017, at 11:13 AM, Ben Coman <btc@openinworld.com> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz> wrote:
Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi- part-4-ast-walking-with-visitors-callbacks/
@Todd, How did find working through this part? cheers -ben
I know, but its closer to "done" than starting from scratch.
On Nov 8, 2017, at 1:13 AM, Ben Coman <btc@openinworld.com> wrote:
AFAIK, TalkFFI hasn't been updated to UFFI for Pharo 5. http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5-UFFI-td4915060.htm... <http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5-UFFI-td4915060.htm...>
cheers -ben
On Wed, Nov 8, 2017 at 4:07 PM, Todd Blanchard <tblanchard@mac.com <mailto:tblanchard@mac.com>> wrote: Just catching up....
I'm trying to work with 64 bit Pharo 6.(1? 2?).
I've run into some issues that I have not been able to resolve. I've loaded up TalkFFI with the LibClang library and testLocation fails. Anything that tries to deal with getting a code location fails and I cannot figure out what the issue is yet.
Also, callbacks do not work at all.
One might say that this is only tested on 32 bit Pharo and that's fine, but I have a 64 bit computer loaded with 64 bit standard libraries and recompiling everything to get 32 bit versions is just not practical. Its past time to do the 64 bit thing.
FWIW, my test library at this point is SQLite Amalgam header to see if I can automatically build a SQLite interface (should be easy as it is one file) but it is kind of frustrating that these libclang features are not working on 64 bit libs.
I have been running in lldb to try to catch the crashes, and I have written a number of toy programs to make certain things are the sizes I expect.
Still stuck at this juncture.
Had to take a lil break and learn to program a Particle board for a work project but will resume next week.
On Oct 23, 2017, at 11:13 AM, Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz <mailto:jan@cada.cz>> wrote: Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi... <http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi...>
@Todd, How did find working through this part? cheers -ben
Hi. Esteban has version ported to UFFI https://github.com/estebanlm/TalkFFI. But I don't know is it working or not. 2017-11-08 10:15 GMT+01:00 Todd Blanchard <tblanchard@mac.com>:
I know, but its closer to "done" than starting from scratch.
On Nov 8, 2017, at 1:13 AM, Ben Coman <btc@openinworld.com> wrote:
AFAIK, TalkFFI hasn't been updated to UFFI for Pharo 5. http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5- UFFI-td4915060.html
cheers -ben
On Wed, Nov 8, 2017 at 4:07 PM, Todd Blanchard <tblanchard@mac.com> wrote:
Just catching up....
I'm trying to work with 64 bit Pharo 6.(1? 2?).
I've run into some issues that I have not been able to resolve. I've loaded up TalkFFI with the LibClang library and testLocation fails. Anything that tries to deal with getting a code location fails and I cannot figure out what the issue is yet.
Also, callbacks do not work at all.
One might say that this is only tested on 32 bit Pharo and that's fine, but I have a 64 bit computer loaded with 64 bit standard libraries and recompiling everything to get 32 bit versions is just not practical. Its past time to do the 64 bit thing.
FWIW, my test library at this point is SQLite Amalgam header to see if I can automatically build a SQLite interface (should be easy as it is one file) but it is kind of frustrating that these libclang features are not working on 64 bit libs.
I have been running in lldb to try to catch the crashes, and I have written a number of toy programs to make certain things are the sizes I expect.
Still stuck at this juncture.
Had to take a lil break and learn to program a Particle board for a work project but will resume next week.
On Oct 23, 2017, at 11:13 AM, Ben Coman <btc@openinworld.com> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz> wrote:
Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part- 4-ast-walking-with-visitors-callbacks/
@Todd, How did find working through this part? cheers -ben
Pretty sure that's the one I loaded. Still having issues with libclang on 64 bit with code locations.
On Nov 8, 2017, at 1:26 AM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi.
Esteban has version ported to UFFI https://github.com/estebanlm/TalkFFI <https://github.com/estebanlm/TalkFFI>. But I don't know is it working or not.
2017-11-08 10:15 GMT+01:00 Todd Blanchard <tblanchard@mac.com <mailto:tblanchard@mac.com>>: I know, but its closer to "done" than starting from scratch.
On Nov 8, 2017, at 1:13 AM, Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>> wrote:
AFAIK, TalkFFI hasn't been updated to UFFI for Pharo 5. http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5-UFFI-td4915060.htm... <http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5-UFFI-td4915060.htm...>
cheers -ben
On Wed, Nov 8, 2017 at 4:07 PM, Todd Blanchard <tblanchard@mac.com <mailto:tblanchard@mac.com>> wrote: Just catching up....
I'm trying to work with 64 bit Pharo 6.(1? 2?).
I've run into some issues that I have not been able to resolve. I've loaded up TalkFFI with the LibClang library and testLocation fails. Anything that tries to deal with getting a code location fails and I cannot figure out what the issue is yet.
Also, callbacks do not work at all.
One might say that this is only tested on 32 bit Pharo and that's fine, but I have a 64 bit computer loaded with 64 bit standard libraries and recompiling everything to get 32 bit versions is just not practical. Its past time to do the 64 bit thing.
FWIW, my test library at this point is SQLite Amalgam header to see if I can automatically build a SQLite interface (should be easy as it is one file) but it is kind of frustrating that these libclang features are not working on 64 bit libs.
I have been running in lldb to try to catch the crashes, and I have written a number of toy programs to make certain things are the sizes I expect.
Still stuck at this juncture.
Had to take a lil break and learn to program a Particle board for a work project but will resume next week.
On Oct 23, 2017, at 11:13 AM, Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz <mailto:jan@cada.cz>> wrote: Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi... <http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi...>
@Todd, How did find working through this part? cheers -ben
On 8 Nov 2017, at 06:55, Todd Blanchard <tblanchard@mac.com> wrote:
Pretty sure that's the one I loaded.
Still having issues with libclang on 64 bit with code locations.
that was made for 32bit. I never tried it witht 64bit libclang so I would not expect it works just like that ;) Esteban
On Nov 8, 2017, at 1:26 AM, Denis Kudriashov <dionisiydk@gmail.com <mailto:dionisiydk@gmail.com>> wrote:
Hi.
Esteban has version ported to UFFI https://github.com/estebanlm/TalkFFI <https://github.com/estebanlm/TalkFFI>. But I don't know is it working or not.
2017-11-08 10:15 GMT+01:00 Todd Blanchard <tblanchard@mac.com <mailto:tblanchard@mac.com>>: I know, but its closer to "done" than starting from scratch.
On Nov 8, 2017, at 1:13 AM, Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>> wrote:
AFAIK, TalkFFI hasn't been updated to UFFI for Pharo 5. http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5-UFFI-td4915060.htm... <http://forum.world.st/Porting-TalkFFI-LibClang-to-Pharo-5-UFFI-td4915060.htm...>
cheers -ben
On Wed, Nov 8, 2017 at 4:07 PM, Todd Blanchard <tblanchard@mac.com <mailto:tblanchard@mac.com>> wrote: Just catching up....
I'm trying to work with 64 bit Pharo 6.(1? 2?).
I've run into some issues that I have not been able to resolve. I've loaded up TalkFFI with the LibClang library and testLocation fails. Anything that tries to deal with getting a code location fails and I cannot figure out what the issue is yet.
Also, callbacks do not work at all.
One might say that this is only tested on 32 bit Pharo and that's fine, but I have a 64 bit computer loaded with 64 bit standard libraries and recompiling everything to get 32 bit versions is just not practical. Its past time to do the 64 bit thing.
FWIW, my test library at this point is SQLite Amalgam header to see if I can automatically build a SQLite interface (should be easy as it is one file) but it is kind of frustrating that these libclang features are not working on 64 bit libs.
I have been running in lldb to try to catch the crashes, and I have written a number of toy programs to make certain things are the sizes I expect.
Still stuck at this juncture.
Had to take a lil break and learn to program a Particle board for a work project but will resume next week.
On Oct 23, 2017, at 11:13 AM, Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz <mailto:jan@cada.cz>> wrote: Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi... <http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi...>
@Todd, How did find working through this part? cheers -ben
On 8 Nov 2017, at 05:07, Todd Blanchard <tblanchard@mac.com> wrote:
Just catching up....
I'm trying to work with 64 bit Pharo 6.(1? 2?).
I've run into some issues that I have not been able to resolve. I've loaded up TalkFFI with the LibClang library and testLocation fails. Anything that tries to deal with getting a code location fails and I cannot figure out what the issue is yet.
Also, callbacks do not work at all.
thatâs unlikely to be true. what you will not have, definitively, is async callbacks (thatâs WIP and not for the immediate). Esteban
One might say that this is only tested on 32 bit Pharo and that's fine, but I have a 64 bit computer loaded with 64 bit standard libraries and recompiling everything to get 32 bit versions is just not practical. Its past time to do the 64 bit thing.
FWIW, my test library at this point is SQLite Amalgam header to see if I can automatically build a SQLite interface (should be easy as it is one file) but it is kind of frustrating that these libclang features are not working on 64 bit libs.
I have been running in lldb to try to catch the crashes, and I have written a number of toy programs to make certain things are the sizes I expect.
Still stuck at this juncture.
Had to take a lil break and learn to program a Particle board for a work project but will resume next week.
On Oct 23, 2017, at 11:13 AM, Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>> wrote:
On Mon, Oct 23, 2017 at 11:46 PM, Jan Cada <jan@cada.cz <mailto:jan@cada.cz>> wrote: Hi,
I would like to connect fingerprint reader to pharo - so far I am able to use C library to connect to it using UFFI, however the problem is that I can wait for fingerprint indefinitely ( blocking call to library) or register call-back for moment when fingerprint is available. The registration function returns immediately, so it is clear that the callback will be called from another thread.
Is such situation supported by UFFI ?
Thanks for any tip,
Jan
Callbacks are supported. Here is an example... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi... <http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-wi...>
@Todd, How did find working through this part? cheers -ben
participants (6)
-
Ben Coman -
Denis Kudriashov -
Esteban Lorenzano -
Jan Cada -
phil@highoctane.be -
Todd Blanchard