public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Sonny To <son.c.to@gmail.com>, Kawa mailing list <kawa@sourceware.org>
Subject: Re: repl for android
Date: Thu, 31 Aug 2017 16:32:00 -0000	[thread overview]
Message-ID: <4ab41d4d-616d-c2ad-9079-2edea143d4d0@bothner.com> (raw)
In-Reply-To: <CAJxjsJt2Ph04S9dXseAUET4ZEaxZtjZ=r4ihK-RkNUnP2VFbLw@mail.gmail.com>

On 08/31/2017 08:43 AM, Sonny To wrote:
> One thing I like about Clojure for Android is the repl.  Is there a
> repl for android where I can attach from emacs and eval some code and
> dynamically construct a UI?

Kawa does includes a telnet server. You could start it on the phone with:
   java kawa.repl --port PORTNUM
where PORTNUM is the listening port.  (If you use 0, an available port is used.)

Then from your PC you can telnet to that port:

telnet IPADDR PORTNUM

where IPADDR is that of your Android device.

I haven't tested this with an Android device.  Of course note that telnet
is unencrypted and insecure, so don't use an unencrypted WiFi connection.

Better, but more complex, would be to use a ssh server on the device.

Kawa's eval/repl on Android does have some limitations because you can't
construct new classes on the fly.  (On other targets repl/eval code is
first compiled to bytecode before it is executed.  That is not an option
on Android at this time.)
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2017-08-31 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 15:44 Sonny To
2017-08-31 16:32 ` Per Bothner [this message]
2017-08-31 18:02   ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ab41d4d-616d-c2ad-9079-2edea143d4d0@bothner.com \
    --to=per@bothner.com \
    --cc=kawa@sourceware.org \
    --cc=son.c.to@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).