Skip to content

Latest commit

 

History

History
90 lines (56 loc) · 2.11 KB

README.md

File metadata and controls

90 lines (56 loc) · 2.11 KB

Ambly

A ClojureScript REPL into iOS JavaScriptCore.

Ambly is a REPL designed for use when developing hybrid ClojureScript iOS apps.

Ambly comprises a ClojureScript REPL implementation, along with Objective-C code interfacing JavaScriptCore.

An iOS app is included, making it easy to give the REPL a spin. Watch a demo.

platform :ios, '8.0'
pod "Ambly", "~> 0.3.0"

Clojars Project

Running

Prerequisites

You must have Xcode installed as well as support for CocoaPods. You must have Java 7 or later installed along with Leiningen.

Demo App

In ambly/ObjectiveC/Ambly Demo run pod install.

Open Ambly Demo.xcworkspace in Xcode and run the app in the simulator or on a device.

REPL

In ambly/Clojure run script/repl to start the REPL.

Here is a sample REPL startup sequence, illustrating device auto-discovery:

$ lein run 

[1] Ambly Demo on iPod touch
[2] Ambly Demo on iPad
[3] Ambly Demo on iPhone Simulator (My-Mac-Pro)

[R] Refresh

Choice: 1

Connecting to Ambly Demo on iPod touch ...

To quit, type: :cljs/quit
cljs.user=> (+ 3 4)
7

Manual REPL Startup

If you would like to manually start the Ambly REPL from a Clojure REPL, issue the following two forms:

(require
  '[cljs.repl :as repl]
  '[ambly.core :as ambly])
(repl/repl (ambly/repl-env))

rlwrap

For a better REPL experience (keyboard input editing and history support), you can install rlwrap under OS X with Homebrew:

brew install rlwrap

Then script/repl will automatically detect rlwrap and use it.

Contributing

Please contact David Nolen via email to request an electronic Contributor Agreement. Pull requests will be accepted once your electronic CA has been signed and returned.

Copyright and license

Copyright © 2015 David Nolen

Licensed under the EPL (see the file epl.html).