[squeak-dev] Usability of Squeak FFI for anything serious...

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Apr 11 21:23:00 UTC 2018


I'm trying to see how hard it is to port my HDF5 work from VW to Squeak.
It was not a pleasure in VW, because that already raised some questions
despite that there is a somehow detailed DLLCC manual:

https://stackoverflow.com/questions/49544642/why-cant-i-pass-an-uninterpretedbytes-to-a-void-thru-dll-c-connect
https://stackoverflow.com/questions/49564024/isnt-pointer-type-checking-disabled-in-dll-c-connect-and-is-that-ok

But in Squeak, it sounds like hard++:

https://stackoverflow.com/questions/49782651/how-one-aligns-structure-fields-in-squeak-ffi
https://stackoverflow.com/questions/49783126/how-one-defines-a-union-type-in-squeak-ffi
https://stackoverflow.com/questions/49783443/how-one-defines-a-fixed-size-array-member-in-a-struct-in-squeak-ffi
https://stackoverflow.com/questions/49783882/how-one-deals-with-typedefs-in-squeak-ffi
https://stackoverflow.com/questions/49784253/how-one-deals-with-multiple-pointer-level-like-char-in-squeak-ffi
https://stackoverflow.com/questions/49784522/how-one-supports-both-32-and-64-bits-target-in-squeak-ffi

Either I'm blind, or the very light documentation that I found lacks those
details
http://wiki.squeak.org/squeak/2426

I think that I could throw a few more questions (dealing with enums...) but
I don't want to excede some unknown quota and start irritating a touchy SO
moderator ;)

I'm afraid that there is no answer but "you're on your own"...
I'm open to studying Alien or UnifiedFFI of Pharo.
Or I can try and improve FFI.
At this stage, my trajectory has already been quite perturbed, and despite
my knowledge of rocket science, I can see that I'm not going to put HDF5 on
the intended orbit :(

Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180411/9357b530/attachment.html>


More information about the Squeak-dev mailing list