Re: Migrating from UFFI to CFFI

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Sun, 20 Oct 2013 21:13:22 -0600
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
On Oct 20, 2013, at 12:38 PM, Victor <[email protected]> wrote:
> I tried to work without the clsql_uffi library on Linux (Ubuntu) and
> will try these modifications on the "problematic" Windows 7 system
> tomorrow. Diff for the changes is here:
> 
> https://github.com/vityok/clsql/commit/eabede9da3e61ef5191b601dcf9b30f30f613f3e
> 
> Actually, I would like to avoid dependencies as much as possible.

Hi Victor,

A quick look through your patch looks like you're on the right track.
However, my review focused on the one problematic area I alluded to before: 
the 64-bit FFI interface. As the UFFI documentation states, there is
a reader symbol pushed on cl:*features* for platforms that can not
support 64-bit FFI integers. As you might expect, if 64-bit integers
were possible on all platforms, I wouldn't have gone through the trouble
of writing the clsql_uffi interface.

Your PARSE-INTEGER approach is still viable, but would need testing and
performance evaluation across many platforms. I don't think it is the
best use of your time, but if it can be shown to have similar performance
across implementations as the current code, it would be a win to not
have an extra dependency. But, I'd estimate it to be a 20-80x use of time
compared installing a C compiler and compiling clsql_uffi. If you
don't wish to use Microsoft's C compiler, I imagine that mingw or possible
gcc would work as well, but I have only used Microsoft's compiler in the 
past.

For Microsoft C, I think the syntax is perhaps
  nmake /f Makefile.msvc
but, it has been many years since I have tried

Kevin