On Nov 8, 2011 4:13 AM, "Miles Bader" <firstname.lastname@example.org> wrote:
> Peter Drahoš <email@example.com> writes:
> > I don't think it is. Also alien has issues when compiled with MinGW I
> > would consider to move to LuaFFI (modeled after luajit2 ffi api) .
> LuaFFI isn't portable though; is alien?
What do you mean by portable? I thought it was impossible in ANSI C to write Lisp's apply--that is, call an arbitrary function with an arbitrary list of arguments. The signature must be known at compile-time. Now that I think of it, ANSI C has no runtime type information anyway so it is impossible to even describe the argument list.
It might be reasonable to say "libffi is on every platform I care about portability to" but that's different.
: For i386 people and those who remember when memory was faster than CPUs: many modern ABIs' function calling conventions do not look at all like "push args as if they were a struct" or even "put the first couple args in registers if they are int-sized, otherwise push." For starters, if you have floating point registers you want to keep args there. I really enjoyed reading the MIPS NUBI proposal; it talks about the history of the ABIs on the platform and what tradeoffs might be.