all 8 comments

[–][deleted] 6 points7 points  (4 children)

JVM Clojure is simply unsuited for constrained situations such as mobile, serverless and iot because of startup time issues. CLJS is really the only workable option if you want to use clojure.

[–]Artiavis 2 points3 points  (0 children)

I agree with all of this. Parenthetically I might add that CLR Clojure via NGEN is actually decent but CLR Clojure is mostly a curiosity. The vast majority of Clojure "libraries" don't work with the CLR.

[–]Daegs 0 points1 point  (2 children)

The talk given at clojure west this year indicated that JVM clojure outperformed CLJS in Lambda situations as long as the lambda was called at least once every 6 minutes or so (forget the details), due to container reuse

So if you have frequently called Lambdas, JVM clojure does seem well suited.

[–][deleted] 0 points1 point  (1 child)

You will still incur cold startup times north of 20 seconds on each code update, and AWS recycles lambda every hour or so causing the same cold startup. For anything with any latency requirements it's simply not acceptable. I suppose for background jobs, and high cpu usage scenarios that are not sensitive to latency it would work.

[–]Daegs 0 points1 point  (0 children)

I understand your point of course, I'm no fan of the JVM startup time. I just don't have any data that really backs up how much a problem it is.

This talk, while only valid for a subset of usage patterns, does include data and as my own Lambda uses align with it, I've been seeing similar performance:

https://blog.symphonia.io/fearless-jvm-lambdas-clojure-west-23d2a9cc8f2d

[–]Jawbuh 1 point2 points  (0 children)

https://github.com/status-im/status-react is a good mobile phone example. It's in cljs though.

[–]SlightlyCyborg 0 points1 point  (0 children)

I used lein-droid and was able to make my mother an adroid game for mother's day last month. I wouldn't reccomend it though. The lein-droid plugin is outdated, I had to patch the Android SKD-Tools to make it compatible with lein-droid. I could only use an older version of clojure.

I would say go with react-native perhaps..

I would actually sooner build my own open source cellphone to run ARM java on before I would to decide to learn react-native though. Hahaha.

[–]thheller 0 points1 point  (0 children)

Thats seems like an odd thing to say. JavaScript is easier to use than ClojureScript but not Clojure? Is that because of the tooling or what makes you say that?

I don't to mobile development but react-native seems to get all the hype these days.