In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge of how to run ClojureScript in Android. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Cljs.core.apply.call (null,cljs.core.inc,new cljs.core.PersistentVector (null, 1,5, cljs.core.PersistentVector.EMPTY_NODE, [1], null))
This line is the JavaScript code (apply inc [1]) that needs to be bound.
Then Tahmid finally got 2. 0. Great! This should be the first time in history to run ClojureScript on an embedded Rhino based on Android.
Next, you need to try using reader, analyzer, and compiler. Now let's try it. Simply use the JavaScript in Replete and let the app of Android execute the read_eval_print function of Replete with the argument of string (+ 1 / 2). If it works well, congratulations, ClojureScript has been started successfully.
Replete.core.read_eval_print.call (null,' (+ 1 2)')
Wait a minute, there is a problem with the execution of goog.require ('replete.core'); in Transit, which should be related to randomUUID. Tragically, it seems that there are obviously a lot of things to deal with.
But it doesn't matter. Replete has been trying to load the analysis cache in different ways. Thanks to Karl Mikkelsen, we have a version available that only uses pure JavaScript without any dependencies. After using this, after getting the print callback ready (so that a method like println can work), Tahmid notifies me through Slack:
I got 3 (+ 1 2) = 3
... And then keep bothering me, and will post a blog without permission. In this way, the bootstrapped ClojureScript REPL was born on Android!
Tahmid encapsulated something in the interface and released Replicator after fixing some minor problems with JavaScript/ClojureScript integration.
It's like a storm!
Now, Tahmid is replacing Rhino with JavaScriptCore, which is not so fast.
I think this will increase the speed. This provides some important foundation for us to use JavaScriptCore for local exchange on Android.
Judging from the big picture, I really think ClojureScript runs very fast on Android. Especially with JavaScriptCore. For this point of view, you can take a look at the difference in startup speed between Bocko and Android's Vladimir Iakovlev ports.
Clojure ~ 14 seconds Clojure / Skummet ~ 11 seconds ClojureScript ~ 2 seconds is all the content of this article "how to run ClojureScript in Android". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.