On 7/3/07, Robin Lee Powell <[EMAIL PROTECTED]> wrote:
I'm looking at using CDK (the widget library for ncurses) for a TUI app (unless anyone else has any better TUI library suggestions? I'd love to hear them). My primary question is, how should I be doing FFI to make it nice and simple for me? http://www.call-with-current-continuation.org/eggs/lazy-ffi.html ? http://chicken.wiki.br/dollar ? http://chicken.wiki.br/easyffi ? http://chicken.wiki.br/Interface%20to%20external%20functions%20and%20variables ?
Well, it depends... ;-) I don't know CDK, so my advice may be completely off the mark. Easyffi is (naturally) the easiest way to wrap a large set of foreign functionality, with the result that you'll get a C-like API in Scheme. You can put higher-level layers on top of it, of course. SWIG is also an alternative if you need something quick-and-dirty, but usually the fine-tuning of the generated bindings can be tedious. You normally will also not need a complete wrapper for CDK, if you plan to write an application. I personally prefer "dollar", but you'll get better type-checking with easyffi. lazy-ffi is only useful for C libraries, and the direct access to libraries may be fragile. Do you need good error-checking? Do you want to access CDK in a low-level manner, or would you prefer a complete CDK wrapper? Or are you just interested in getting it to work quickly. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
