(+ lisp ios android osx)

The level of interactivity here is pretty damn cool.”
— Christopher Biscardi
Author, Snap for Beginners
— Fernando Rodríguez
iOS instructor at Big Nerd Ranch

Lisp for iOS, Android, and OS X.

Creating mobile applications shouldn't require you to do everything in Java and Objective-C. With mocl, you can put your application logic into a shared Lisp library that runs on iOS, Android, and even OS X. Furthermore, since mocl runs an expansive subset of Common Lisp, an ANSI standard like C, you can also run your CL code on other implementations, and target the server.

Interactive Programming with the REPL.

Test and experiment with your code interactively while your application is running. Get immediate feedback from a REPL during run-time, without having to go through a whole cycle of recompilation. Want to learn more? See the mocl screencast.

Fast Native Code via LLVM, with a Small Footprint.

When a user downloads your app over 3G, it needs to be small. mocl apps are as small as 2.5 MB. Furthermore, mocl delivers efficient and fast native code, via LLVM/Clang. In fact, mocl is so fast that on some benchmarks, it blows away Google's own Dalvik JVM.

* Code at mocl-benchmark-android. Parameters: n=16 on Nexus 4 w/ Android 4.2.2
Dalvik vs. mocl,

Networking, Unicode, CLOS, and More. Run Countless CL Libraries.

Too many developer tools sound promising, only to fall flat when you attempt to do anything non-trivial. “That free thing seemed great, until we found ourselves spending more time on it than our actual project.” mocl aims for a different approach: it “just works” from the start. Unicode is supported automatically, by default. mocl has networking, CLOS, gray streams, and more. You can already run countless popular CL libraries with mocl. And more are on the way.


With debugging enabled, mocl provides you stack traces that zero in on the source of errors when they occur. Plus, since mocl generates C/Obj-C code, profiling tools like Apple's Instruments work great, helping you measure and diagnose performance issues, quickly.

Drops Seamlessly into New or Existing Projects.

Adding mocl to your project is as simple as adding a library. Whether your project is new or existing, this takes just a minute. Xcode and Android Developer Tools are fully supported.

How it Works

mocl is built around the idea that your application logic should live in Lisp, and your user interface code should be fully native to the platform — Obj-C or Java in the case of iOS and Android. This is not unlike the web, where your server logic is in one language (hopefully Lisp), and the client logic is in HTML/JavaScript. For example:

We set up (using Apple's Xcode) an Objective-C event handler called onDoneTap that triggers when the 'Done' button is tapped.

- (IBAction)onDoneTap:(id)sender {
    [[self view] endEditing:YES];
    update_contact([_txtName text], [_txtMobile text], [_txtEmail text]);

When the event is triggered, our Lisp code gets called.

(declaim (call-in update-contact))
(defun update-contact (name mobile email)
  (setf (contact-name *current-contact*) name
        (contact-mobile *current-contact*) mobile
        (contact-email *current-contact*) email))

(declaim (call-in save-contacts))
(defun save-contacts ()
  (when (and *current-contact* (not (member *current-contact* *contacts*)))
    (push *current-contact* *contacts*)
    (setf *contacts* (sort *contacts* #'string< :key #'contact-name)))
  (let ((file (merge-pathnames *doc-dir* "contacts.lisp")))
    (string-to-file (prin1-to-string *contacts*) file)))

Take notice that all you need to make your lisp code callable is to declaim it with very little boilerplate. Within the call-in declaration for update-contact, even though it takes three arguments, we did not need to specify the argument names or their types. This was handled automatically by mocl.

We can do the tap event on the Android side as well, calling the same Lisp code from Java:

public void onDoneTap(MenuItem m) {
    CL.update_contact(txtName.getText(), txtMobile.getText(), txtEmail.getText());

Check out the full source code for these examples at the Wukix GitHub: both the iOS Example and the Android Example.

Download in (<= 60) seconds.

Enterprise License
mocl with source code and priority support
Source Code License
mocl with its source code (private git)
Standard License
Just mocl
Group Licenses
License your team, research group, etc.
(Javascript Required)
Reviewed in

Each license includes, free, one year of updates and upgrades following the purchase date, including major version upgrades.

If you are unsatisfied with mocl in any way, let us know within 30 days of your purchase that you wish to terminate your license, and we'll refund you.

Powering Mobile Lisp Worldwide
Some of our customers

Receive Announcements


© 2015 Wukix, Inc.