Ruby FFI, Need Suggestions!
-
Hello everyone,
I came across the Ruby FFI and am amazed by its features and advantages over the DL, Win32API, or Win32::API. I love its implementations and want to use it for my future library. I did a few adjustments, changed Config to ENV data, and got it working, though not sure how to implement it:
- Should I place the FII library into my library's folder, or have it in the separate, in the plugins folder?
- Should I recompile it under my own namespace? The library can have an unlimited amount of callbacks, so recompiling it isn't required; however, what if someone else uses a different version of FFI - might results in overwriting, and incompatibilities... Including, recompiling FFI to own namespace is a long pain - the library is huge!
- I think we need to have agreements here, like posting the FFI library as a separate, shared plugin, and have the user require it for his/her own plugin/library.
- And what if we want to use other gems, should each person recompile it to his/her own version? I don't think so, I think we should have a Topic with a list of gems (adjusted and set compatible for SU) so the user can go there, download, and use it for his/her library. The only thing the user will have to check is whether the required library is there, and display a message if it isn't: Like "The AMS library requires Ruby-FII, please go here to download it; otherwise, the library will not load!"
What you think
- Anton
-
@anton_s said:
Should I place the FII library into my library's folder, or have it in the separate, in the plugins folder?
Should I recompile it under my own namespace? The library can have an unlimited amount of callbacks, so recompiling it isn't required; however, what if someone else uses a different version of FFI - might results in overwriting, and incompatibilities... Including, recompiling FFI to own namespace is a long pain - the library is huge!I would recommend compiling it under your own namespace - to avoid version conflict if anyone else should try to load a different version. That what I did with TT_Lib2 when I needed Win32::API.
@anton_s said:
I think we need to have agreements here, like posting the FFI library as a separate, shared plugin, and have the user require it for his/her own plugin/library.
The problem is that every SketchUp extension developer isn't on this forum to check this list.
@anton_s said:
The only thing the user will have to check is whether the required library is there, and display a message if it isn't: Like "The AMS library requires Ruby-FII, please go here to download it; otherwise, the library will not load!"
That somewhat that path I took with TT_Lib, but trust me - it will generate a lot of "This plugins doesn't work!!!111!!1" - because people never read the instructions. I've started expanding the library check with my plugins so the users will get a webdialog that describes why the plugin didn't load and direct link to the require libraries. That takes cares of most of the people who tries to install it. -
@tt_su said:
I would recommend compiling it under your own namespace - to avoid version conflict if anyone else should try to load a different version.
Ok, I guess that's the way I should go
@tt_su said:
The problem is that every SketchUp extension developer isn't on this forum to check this list.
Lazy people
@tt_su said:
That somewhat that path I took with TT_Lib, but trust me - it will generate a lot of "This plugins doesn't work!!!111!!1" - because people never read the instructions. I've started expanding the library check with my plugins so the users will get a webdialog that describes why the plugin didn't load and direct link to the require libraries. That takes cares of most of the people who tries to install it.
Even I my self got one of these messages before Good results require some work
Advertisement