News for hackers. Stuff that matters.
Re:Answers from 2017 Common Lisp experts by vram22 on Tuesday August 22, 2017 @11:23AM (#15073282)
>There are at least two portable libraries to do this.

What are they?

Re:Answers from 2017 Common Lisp experts by flavio81 on Tuesday August 22, 2017 @12:04PM (#15073719)
One is CFFI, widely known and well documented, with tutorial and tooling:

https://common-lisp.net/project/cffi/

The other was UFFI, older; but then there are others. In fact, there are a ton of other projects for doing FFI in Common Lisp!

http://www.cliki.net/FFI

And then you can also use the FFI functionalities provided by the particular Lisp implementation (i.e. SBCL, LispWorks, ABCL, etc.)

However, the use of a portable library like CFFI means that you can take your code that runs correctly in SBCL, and then run the very same code in CLISP (other Lisp implementation) with no change at all.

CFFI works for the following Lisp implementations or "compilers": ABCL, Allegro CL, Clasp, CLISP, Clozure CL, CMUCL, Corman CL, ECL, GCL, LispWorks, MCL, SBCL and the Scieneer CL.

That's a lot of implementations!

Re:Answers from 2017 Common Lisp experts by vram22 on Tuesday August 22, 2017 @01:22PM (#15074501)
Sure is a lot. Thanks!
Re:Answers from 2017 Common Lisp experts by e12e on Tuesday August 22, 2017 @12:03PM (#15073712)
Re:Answers from 2017 Common Lisp experts by vram22 on Tuesday August 22, 2017 @01:23PM (#15074510)
Interestingly there is a CFFI module in Python too. Maybe they got the idea from Lisp.
Re:Answers from 2017 Common Lisp experts by flavio81 on Wednesday August 23, 2017 @12:37AM (#15078556)
Um, i'm not sure. Python was designed with C compatibility as a main feature since the start, anyways.
Re:Answers from 2017 Common Lisp experts by e12e on Wednesday August 23, 2017 @10:56AM (#15081965)
The cffi module in python came from pypy (which broke the cpython c api) - but both the python ctypes module and cffi use libffi:

https://en.m.wikipedia.org/wiki/Libffi

Re:Answers from 2017 Common Lisp experts by vram22 on Sunday August 27, 2017 @05:20PM (#15112822)
Interesting info, thanks.