
Replete 2.0: ClojureScript REPL for iOS and Android - tosh
http://replete-repl.org/
======
mfikes
For those curious, Replete relies on the ability of ClojureScript to self-
host, and thus essentially carry its compiler with it.

Replete iOS was one of the first applications of self-hosted ClojureScript
(around 2015, the first time we could evaluate ClojureScript forms directly on
iOS, no JVM in sight).

Just recently Replete was ported to Android, via some amazing work of Roman
Liutikov.

It is all open source, for those interested in how it works:
[https://github.com/replete-repl/](https://github.com/replete-repl/)

~~~
paultopia
OMG OMG File I/O and http. Next step libraries?! So exciting!!!

------
smelly_cat
Take a look at [http://shadow-cljs.org/](http://shadow-cljs.org/) which
supports npm.

~~~
scns
Visiting that website made firefox on android 8 hang, the phone got hot.

~~~
jiyinyiyong
I'm maintaining the site([https://github.com/shadow-cljs/shadow-
cljs.org](https://github.com/shadow-cljs/shadow-cljs.org)). It contains a
JavaScript file but doing nothing but handling the click, although its size is
large, it should do very little thing on your browser. I also installed a
Firefox on my Phone(MIX2S) and it looks fine.

------
e12e
Is the documentation up to date? Attempting to run:

(replete.http/get "[http://replete-repl.org"](http://replete-repl.org"))

from

[http://replete-repl.org/replete-namespaces.html](http://replete-
repl.org/replete-namespaces.html)

I get a "warning: no such name space" (on android).

Also, seems there's no selecting/copying text from the repl output, which is a
bit annoying...

~~~
mfikes
You’d need to first do

    
    
      (require ‘replete.http)
    

in order to load the code for that namespace.

You should be able to copy output by pressing on a history row.

~~~
e12e
Thank you. [ed: note for others - that should be a single-quote (') not a
back-tick: (require 'replete.http)]

> You should be able to copy output by pressing on a history row.

Appears I can copy the historical _input_ but not the output.

As for http/get - after the require i get a "Cleartext HTTP traffic to (...)
not permitted" with a http url, and an {:error nil} with a https url...

Is there a more appropriate forum for discussing tutorial/getting started
stuff? I'd like to play, but a set of (tested) koans seems to be required.

~~~
roman01la
The first error might be platform security limitation and the second one looks
like a bug. Please file an issue on GitHub [https://github.com/replete-
repl](https://github.com/replete-repl) (use repo for iOS or Android app)

------
qwerty456127
Add intelligent auto-completion, handy object (function) browser and public
repository and this can rock as hell.

------
whalesalad
I believe the title should be modified to indicate that this is clojurescript
not clojure.

~~~
Y_Y
But closurescript is just an implementation of closure (the language)? So
isn't it both?

This wasn't clear to me before or after I looked at the page.

~~~
mfikes
Yeah, ClojureScript is really a dialect of Clojure.

They have hugely different applications, but at a certain level, they look
like the same language.

~~~
snotrockets
I'm not sure if this is the case; due to the immense body of work on JIT
JavaScript, ClojureScript would usually perform better than Clojure for
everything but math, hence would be good idea for server side usage as well.
YMMV, of course.

~~~
black-tea
The jvm has also had an immense amount of work done on its jit. One oft cited
problem is its boot time, but other than that, its clojurescript really
faster?

~~~
pjmlp
Which is a Clojure problem, Java doesn't suffer from it.

[https://blog.ndk.io/jvm-slow-startup.html](https://blog.ndk.io/jvm-slow-
startup.html)

------
dang
From 2015:
[https://news.ycombinator.com/item?id=9863988](https://news.ycombinator.com/item?id=9863988)

------
S4M
What are the advantages of Replete on Android over running the Clojure (or
ClojureScript) REPL Termux?

~~~
mfikes
One advantage is that Replete requires no network connectivity to evaluate
forms. The compilation and evaluation is done directly on your device.

~~~
S4M
Installing Clojure/ClojureScript on Termux would allo you to run those
languages on your device. No Network connectivity required either.

~~~
mfikes
Ahh, cool. TIL.

------
littlecosmic
Is it possible to send text to Replete via a URL, etc. from another app, etc
for evaluation?

~~~
mfikes
Yes. There used to be an iOS app named Lisping

[https://news.ycombinator.com/item?id=11658418](https://news.ycombinator.com/item?id=11658418)

and you could edit text in Lisping and send it to Replete for evaluation. (The
generic hooks still exist in Replete, so in theory other apps could do the
same.)

~~~
mark_l_watson
Do you use Lisping and Replete together? Can Lisping using local iCloud or
DropBox or etc. storage? Thanks in advance for any info.

~~~
mfikes
I personally mainly use Replete for quick checks of things when AFK (seeing
what a particular form might evaluate to, checking a docstring, etc.) In,
short I've never really used Replete for any heavy development.

When Lisping existed (it is evidently no longer available), I was never really
motivated to use it to develop code with Replete.

------
kgwxd
Any chance this could be made available on F-Droid?

------
Scarbutt
What's the case for using clojurescript these days in a company compared to JS
2019? the project has almost no contributors, no one working full time on it,
the closure library they use its from 2016, the friction to interop with JS is
still too high and too much of a hassle, they never embraced npm because they
didn't want to listen to their users like typescript, etc..

~~~
rboyd
Fantastic tooling, potential to live in the same language for cljs front-
end/clojure backend, less code means less bugs than JS, shorter time to
implement, higher productivity from smaller teams, stable core, lots of
development on great libs, immutability/persistent data structures/strong
concurrency patterns get you out of the tar pit, low friction to interop with
JS, cljs loves npm via shadow-cljs.

Easier to list the case against. The case against is it has a steeper learning
curve and it's harder to hire for.

~~~
Scarbutt
_Fantastic tooling_

The official guide recommends using webpack, the irony.
[https://clojurescript.org/guides/webpack](https://clojurescript.org/guides/webpack)

~~~
iLemming
It doesn't _recommend_ \- it just lists this as a possibility. There's a big
difference.

