Changes between Version 4 and Version 5 of OpenMclFfi


Ignore:
Timestamp:
02/24/09 15:52:06 (6 years ago)
Author:
james.anderson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenMclFfi

    v4 v5  
    44While 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? 
    55 
    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. 
     6So, 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. 
    77 
    88If 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. 
     
    2626== Simple Cases == 
    2727 
    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. 
    2929 
    3030In order to observe case-sensitivity, the reader-macros now read the symbol with {{{(READTABLE-CASE :PRESERVE)}}} in effect.