[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Status of 5.2 ports
- From: Miles Bader <miles@...>
- Date: Thu, 10 Nov 2011 19:35:51 +0900
Jay Carlson <nop@nop.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) [1].
>>
>> LuaFFI isn't portable though; is alien?
>
> What do you mean by portable?
What you (probably) think: can be compiled any system that Lua can.
> 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.[1] Now that I think of it,
> ANSI C has no runtime type information anyway so it is impossible to
> even describe the argument list.
No doubt, but thus my question: what does alien do? Maybe it isn't
portable either, or maybe it is portable, but has less functionality
than LuaFFI.
This isn't necessarily a pointless question. While it may be impossible
to completely support everything FFI does portably, maybe there are
useful subsets, or alternative interfaces, which _can_ be done portably
(or "sorta portably" -- making assumptions that aren't strictly true but
are defacto true in any existing ABI). For instance, the sizes of C
types can be discovered by a C program.
Since many people seem to basically use FFI as an alternative to
stub-generators, maybe something halfway in between could be more
convenient, and yet still avoid machine-dependent code.
Anyway, I'm just tossing out ideas here...
-Miles
--
Acquaintance, n. A person whom we know well enough to borrow from, but not
well enough to lend to.