* repl for android
@ 2017-08-31 15:44 Sonny To
2017-08-31 16:32 ` Per Bothner
0 siblings, 1 reply; 3+ messages in thread
From: Sonny To @ 2017-08-31 15:44 UTC (permalink / raw)
To: Kawa mailing list
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: repl for android
2017-08-31 15:44 repl for android Sonny To
@ 2017-08-31 16:32 ` Per Bothner
2017-08-31 18:02 ` Per Bothner
0 siblings, 1 reply; 3+ messages in thread
From: Per Bothner @ 2017-08-31 16:32 UTC (permalink / raw)
To: Sonny To, Kawa mailing list
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: repl for android
2017-08-31 16:32 ` Per Bothner
@ 2017-08-31 18:02 ` Per Bothner
0 siblings, 0 replies; 3+ messages in thread
From: Per Bothner @ 2017-08-31 18:02 UTC (permalink / raw)
To: Sonny To, Kawa mailing list
On 08/31/2017 09:31 AM, Per Bothner wrote:
> 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.)
Oops - that should have been
java kawa.repl --server PORTNUM
The ---port flag used used to start a http server, while the --server flag
is used to start a telnet server.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-31 18:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 15:44 repl for android Sonny To
2017-08-31 16:32 ` Per Bothner
2017-08-31 18:02 ` Per Bothner
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).