Changes between Version 4 and Version 5 of OpenMclFfi
- Timestamp:
- 02/24/09 09:52:06 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OpenMclFfi
v4 v5 4 4 While many of us, once we learn Lisp, might wish to write every line of code after in Lisp, there are far too many existing libraries and tools written in other languages that we might want to interact with. Besides, who wants to have to port, debug, and then maintain reams of existing boilerplate operating system code? 5 5 6 So, what can we do? We must use a ''Foreign Function call Interface (FFI)'', which allows us to easily interact with external libraries and operating system features. And luckily, '''OpenMCL''' comes with one of the best [http:// www.openmcl.org/Doc/index.html#The-Foreign_002dFunction-Interface implementations] around.6 So, what can we do? We must use a ''Foreign Function call Interface (FFI)'', which allows us to easily interact with external libraries and operating system features. And luckily, '''OpenMCL''' comes with one of the best [http://ccl.clozure.com/ccl-documentation.html#The-Foreign-Function-Interface implementations] around. 7 7 8 8 If you cast about for FFI's, you might run across several excellent tools such as [http://uffi.b9.com/ UFFI], [http://clisp.cons.org/impnotes/dffi.html CLISP's] FFI, and others. However, most of the require lots of manual typing and boilerplate to interface Lisp and external libraries. … … 26 26 == Simple Cases == 27 27 28 (Note [[FootNote(This section shamelessly stolen from [http:// www.openmcl.org/Doc/index.html#The-Foreign_002dFunction-Interface])]]) The primary way of referring to foreign constant and function names in '''OpenMCL''' is via the {{{#$}}} and {{{#_}}} reader macros. These reader macro functions each read a symbol into the "OS" package, look up its constant or function definition in the interface database, and assign the value of the constant to the symbol or install a macroexpansion function on the symbol.28 (Note [[FootNote(This section shamelessly stolen from [http://ccl.clozure.com/ccl-documentation.html#The-Foreign-Function-Interface])]]) The primary way of referring to foreign constant and function names in '''OpenMCL''' is via the {{{#$}}} and {{{#_}}} reader macros. These reader macro functions each read a symbol into the "OS" package, look up its constant or function definition in the interface database, and assign the value of the constant to the symbol or install a macroexpansion function on the symbol. 29 29 30 30 In order to observe case-sensitivity, the reader-macros now read the symbol with {{{(READTABLE-CASE :PRESERVE)}}} in effect.
