Has anyone got any code examples of ECL Lisp for Iphone development?
Asked Answered
P

2

11

I found out about Lisp for the Iphone recently and wanted to find some code examples.

https://github.com/TerjeNorderhaug/ecl-iphone-builder/#readme

Patella answered 24/4, 2011 at 10:26 Comment(5)
Beware that ECL is LGPL licensed. AFAIK you can not dynamically link on iOS. That probably means, you have to statically link against ECL. Statically linking against a LGPL library forces you to release the source code of your app under LGPL and i think, the App Store is incompatible with the GPL.Hangout
LGPL is not GPL. The source code for the application need not be disclosed. ecls.wikispaces.com/FAQVanhouten
You are right, LGPL is not GPL. Please read my comment again. When you statically link a LGPL library, your code is considered a derivative work: spinics.net/lists/xf/msg02311.html which means, your application's source code needs to be disclosed according to the LGPL.Hangout
Here is a discussion with the developer regarding ECL's license and commercial iPhone apps arguing that its LGPL license should not be a hinder for selling apps based on ECL in the App Store.Vanhouten
No you don't need to disclose the source, just make your compiled object files available and a short script to link them to the final app. Shouldn't take more then a day to add it to your build scriptSubminiaturize
V
18

The ECL for iOS distribution includes a code example of a Common Lisp application running on the iPhone.

The example is a Swank server, the backend for the SLIME and MCLIDE Lisp development environments (disclosure: I am the developer of the latter).

Following the steps in the readme will build the application and place it on your iPhone/iPad, or alternatively on the iPhone simulator that comes with Xcode. You can then connect to the iOS device using SLIME or MCLIDE, providing a REPL from which you can evaluate Lisp expressions directly on the device and interactively develop the app.

The code example in the init.lisp file runs on the device as the application starts. It currently loads the swank server and notifies the user with a text field, button and alert dialog. The ECL for iPhone project doesn't yet provide much user interface functionality from Lisp, but you can use the Xcode Interface Builder to design the GUI.

ECL compiles to C and supports inline Objective-C, so you can use Common Lisp as an abstraction layer on top or integrate Common Lisp implemented functionality with Objective-C code. The repository for the project includes examples of combining Common Lisp with Objective-C, including the implementation of basic widgets.

Vanhouten answered 24/4, 2011 at 15:29 Comment(1)
I wonder if this has some license problems when publishing an app. Because I recall that you cannot run byte-compiled code in iOS, AFAIK. ECL uses a bytecode-compiler. Is this allowed license-wise?Practicable
W
1

I have been following this thread and recently there was a new branch in ECL repo here https://gitlab.com/embeddable-common-lisp/ecl/tree/arm64-port that builds ECL for arm64 architectures.

Waylon answered 13/9, 2019 at 0:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.