5 ms·
Replete 2.0: ClojureScript REPL for iOS and Android
- whalesalad 8y agoI believe the title should be modified to indicate that this is clojurescript not clojure.
- tosh 8y agoupdated, thanks
- Y_Y 8y agoBut 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 8y agoYeah, ClojureScript is really a dialect of Clojure. They have hugely different applications, but at a certain level, they look like the same language.
- avodonosov 8y agoData types are different (java primitives vs js primitives)
- lugg 8y agoIn a dynamic language, other than specific math scenarios do you really ever notice this? (Curious whether it really matters or if it's just something you need to be aware of day to day)
- iLemming 8y agoWhen node.js came out I was extremely excited. I remember watching video where Ryan Dahl received standing ovations and I almost jumped myself out of my chair to applaud. I neither liked Javascript nor hated it but the idea of having same semantics on the back-end and front-end was really enticing. Sadly, after years working in node I realized that the promise of shared code was a lie and it is simply just doesn't work as I wish it would. But then I tried Clojure and Clojurescript and to my surprise the idea of shared code actually somehow works here, despite the fact that you are essentially living in two different worlds - JVM and Javascript VM.
- lugg 8y agoDo you think it is feasible to run the entire stack on closure script? JVM just irks me the wrong way. Probably less than electron / nodejs does but if I'm stuck with one set of primitives and externs (npm) I'd rather use the same one both places even if the JS one is suboptimal in all cases (I've written enough JS that I'll be able to deal.) Re The shared code thing between server and client for JS I never understood the proposition. You're solving different problems sharing code _never_ made sense. I think what people were really talking about when they said they wanted it was sharing data. Sharing their object relations, or sharing their mapping code. Or better yet, not having to share mapping because with the same language in both places you no longer need to map data. And nodejs/browser js does in fact get you all of that. Provided you have clean models and clear conventions / functions to manage that shared state. Where the story breaks down is the lack of native immutability, and the problems that leads to elsewhere, namely, if you have some data in the client that maps perfectly to serverside data you likely still end up with that serverside version of it including g server side only infoyou don't want exposed. Likely this is the what you should do boundary wise but it is what often ends up happening anyway. Closure forcing immutability also forces not only the data structures but also the library code that makes reasoning about, and slicing and dicing those structures far easier / natural or I guess you would say isocratic.
- yogthos 8y agoI actually maintain a ClojureScript port of Clojure Ring stack on top of Node https://macchiato-framework.github.io/ https://macchiato-framework.github.io/
- snotrockets 8y agoI'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 8y agoThe 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 8y agoWhich 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
- vnorilo 8y agoDo you have a source? I'm skeptical but interested.
- snotrockets 8y agoInternal tests, heard the same from others. I didn't do much digging, but I think it's the JVM being very under optimized for code not written in Java.
- littlecosmic 8y agoIs it possible to send text to Replete via a URL, etc. from another app, etc for evaluation?
- mfikes 8y agoYes. 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 8y agoDo you use Lisping and Replete together? Can Lisping using local iCloud or DropBox or etc. storage? Thanks in advance for any info.
- mfikes 8y agoI 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.
- mfikes 8y agoFor 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 8y agoOMG OMG File I/O and http. Next step libraries?! So exciting!!!
- dang 8y agoFrom 2015: https://news.ycombinator.com/item?id=9863988 https://news.ycombinator.com/item?id=9863988
- Scarbutt 8y agoWhat'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..
- throwthrow6 8y agohttp://shadow-cljs.org http://shadow-cljs.org
- lifty 8y agocljs + reagent + re-frame is still the most enjoyable way for me to build react UIs
- rboyd 8y agoFantastic 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.
- tosh 8y agoI’d add that if you are ok with remote and the company is doing something interesting: hiring (or training) isn’t that problematic, you will actually get access to very talented & motivated people because of Clojure If you require people to be co-located Berlin has a very strong Clojure community for example, depends on where you are though.
- Scarbutt 8y agoFantastic tooling The official guide recommends using webpack, the irony. https://clojurescript.org/guides/webpack https://clojurescript.org/guides/webpack
- e12e 8y agoIs 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 8y agoYou’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 8y agoThank 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 8y agoThe 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)
- smelly_cat 8y agoTake a look at http://shadow-cljs.org/ http://shadow-cljs.org/ which supports npm.
- scns 8y agoVisiting that website made firefox on android 8 hang, the phone got hot.
- jiyinyiyong 8y agoI'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.
- qwerty456127 8y agoAdd intelligent auto-completion, handy object (function) browser and public repository and this can rock as hell.
- S4M 8y agoWhat are the advantages of Replete on Android over running the Clojure (or ClojureScript) REPL Termux?
- mfikes 8y agoOne advantage is that Replete requires no network connectivity to evaluate forms. The compilation and evaluation is done directly on your device.
- kgwxd 8y agoAny chance this could be made available on F-Droid?