Foil

Provides a protocol and code to interface between Lisp and instances of runtimes such as the JVM and CLR
Download

Foil Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Rich Hickey
  • Publisher web site:
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 98 KB

Foil Tags


Foil Description

Provides a protocol and code to interface between Lisp and instances of runtimes such as the JVM and CLR Foil provides a protocol and code to interface between Lisp and instances of runtimes such as the JVM and CLR, offering comprehensive, safe, dynamic, efficient, and portable access to Java and CLI libraries from Lisp, with an emphasis on working in Lisp.Foil consists of a protocol and a set of libraries that facilitate access to popular object runtimes, such as the JVM and the CLI/CLR, and their libraries, from Lisp. A protocol is defined which abstracts out the common features provided by Java-like environments - object construction, method, field, and property access, object lifetime management etc. The protocol defines a set of features as well as an s-expression based stream format for communication.Runtime server applications are provided that utilize Java and C# libraries to implement the object runtime side of the protocol for Java and the CLI. Source for the applications is provided so that custom hosts can be built. A library for Common Lisp is provided that implements the consumer side of the protocol, and offers seamless access to the foreign objects in a Lisp-like manner. The design of Foil owes much to jfli, an in-process solution to the same problem for Java, and it remains extremely similar in its Lisp interface.NOTE: Foil is licensed and distributed under the terms of the Common Public License 1.0. Here are some key features of "Foil": · Automatic function generation for constructors, fields, methods, and properties either by named class, or entire package (sub)trees given a jar file or assembly name. · Java/CLI -> Lisp package and name mapping with an eye towards lack of surprise, lack of conflict, and useful editor completion. · setf-able setter generation for fields and properties · Java/CLI vector creation and aref-like access to Java/CLI vectors. · Constructors that allow for keyword-style property initialization. · Typed references to Java/CLI objects with an inheritance hierarchy on the Lisp side mirroring that on the Java/CLI side - allowing for Lisp methods specialized on Java/CLI class and interface types. · Implementation of arbitrary Java/CLI interfaces in Lisp, and callbacks from Java/CLI to Lisp via those interfaces. · Automatic lifetime maintenance of Lisp-referenced Java/CLI objects, boxing/unboxing of primitive args/returns, string conversions, Java/CLI exception handling, overload resolution etc. · (Hopefully) Much improved portability (n.b. it has not been ported, but is mostly standard CL) · Access to the CLR with the same API · Support for CLR and JavaBean properties · Simultaneous access to multiple runtimes · Simultaneous access to the CLR and Java · A marshalling system which can, in a single call, pull across the types, hashcodes, and/or values of reference objects to an arbitrary depth, with user customizable value marshallers. · All references to the same remote object are eq on the Lisp side · ensure-typed-ref, which makes a remote reference its most fully derived type in Lisp, works in place, using change-class · vector argument boxing, so lightweight vectors-as-arguments can be created in-place without the overhead of multiple calls to create and initialize the vector · keyword-style init of properties in constructor calls is supported by the ctor functions, and can be leveraged in apply and mapping scenarios (this feature was limited in jfli to the new macro)


Foil Related Software