3 ms·
Author here. Willing to answer questions.
by mfikes 11y ago
Author here. Willing to answer questions.
- hellofunk 11y agoCool. Can you explain exactly what the phrases "ClojureScript apps that bootstrap themselves" or "bootstrapped ClojureScript runtime" mean?
- mfikes 11y agoBootstrapped ClojureScript refers to the idea that ClojureScript can compile itself. Evidently Lisp was the first and ClojureScript was probably the most recent to accomplish this: https://en.wikipedia.org/wiki/Self-hosting https://en.wikipedia.org/wiki/Self-hosting But then there is also the concept that a ClojureScript app which is going to make use of a REPL needs to do some additional work to bootstrap the ClojureScript runtime. Normally when you ship a ClojureScript app you would employ Google Closure to concatenate everything into a single file which is loaded and evaluated. But if you want to work with individual files (one per Clojure namespace, which is important when you are working with a REPL), you need to avoid that and you need to set up things to use Google Closure's dependency management system (CLOSURE_IMPORT_SCRIPT, etc.). I have a blog post which attempts to explain the different meaning of "bootstrap" in this context: http://blog.fikesfarm.com/posts/2015-03-05-ambly-app-bootstrapping.html http://blog.fikesfarm.com/posts/2015-03-05-ambly-app-bootstr...
- hellofunk 11y agoMy God, it's turtles, I mean ClojureScript, all the way down! This is really cool stuff. You've turned iOS into a classical lisp machine.
- currentoor 11y agoHi Mike! Great work! So when do you think we'll be able to make a solid app using React Native and cljs on iOS? What's the biggest impediment for being able to do that now?
- mfikes 11y agoI actually suspect that you can make a solid app with ClojureScript _today_, QTTT being the thing that makes me think this is so. https://github.com/mfikes/qttt#react-native-port https://github.com/mfikes/qttt#react-native-port Also, Facebook has shipped apps based on React Native. The aspect that is rough is the ClojureScript tooling. This post attempts to cover where we are with tooling: http://blog.fikesfarm.com/posts/2015-07-06-clojurescript-with-react-native.html http://blog.fikesfarm.com/posts/2015-07-06-clojurescript-wit...
- AlwaysBCoding 11y agoI've been using the Reagent library for all my web UI's and it's simply incredible. I desparately want to translate this same workflow to iOS. I'm a huge fan of React Native, but it's just not the same writing it in Javascript vs. using ClojureScript/Reagent. With the Javascript React Native workflow you're still forced to include npm modules to do basic enumerations, and the technical debt added to your codebase because of JSX is really painful. Since Reagent components turn into React functions it seems like you should be able to write React Native apps in ClojureScript/Reagent and solve all these problems. I just don't even know how to start setting that up. Can I just use the regular CLJS compiler to save a javascript file and run it on the iPhone? Is there a tutorial or really simple example of the clojurescript to react-native workflow somewhere that you know of? If you wanted to learn more about this stuff where would you recommend starting?
- mfikes 11y agoFrom a tutorial / example perspective, there's this: https://github.com/omcljs/ambly/wiki/ClojureScript-React-Native-Quick-Start https://github.com/omcljs/ambly/wiki/ClojureScript-React-Nat... The general state of things is covered here: http://blog.fikesfarm.com/posts/2015-07-06-clojurescript-with-react-native.html http://blog.fikesfarm.com/posts/2015-07-06-clojurescript-wit...
- casperc 11y agoSo how much work is it to add another compile target than JS, now that Clojurescript is bootstrapped?
- mfikes 11y agoJust me thinking off the top of my head: I doubt ClojureScript's ability to compile itself helps with that, but I've never pondered that before. Hmm. I think Fogus's post is still relevant: http://blog.fogus.me/2012/04/25/the-clojurescript-compilation-pipeline/ http://blog.fogus.me/2012/04/25/the-clojurescript-compilatio...