Fork me on GitHub
#cljsrn
<
2015-12-08
>
artemyarulin08:12:09

well, maybe everyone already know about it and using it - but you can use figwheel-react-native with nrepl. Meaning you can connect your cider (or any other IDE) and get so much awesomeness from the development simple_smile Here short instruction https://github.com/decker405/figwheel-react-native/issues/7

johannjohann22:12:28

yeah was fooling around with renatal the other day

artemyarulin22:12:33

natal is using ambly as a repl which does some modification on the native side of the app. figwheel-react-native has a beautiful hack which allows figwheel to run along with rn packager. Not a big change for the end user, but looks cleaner and allows much easier integration with the existing app (my case exactly)

johannjohann22:12:15

re-natal is the forked natal which uses figwheel lol

johannjohann22:12:21

lotsa great movement in build setups šŸ˜„

johannjohann22:12:06

the nice win with the figwheel setup is chrome debugging

johannjohann22:12:17

or maybe it was just easier for me to get a better experience with it

johannjohann22:12:33

i was trying to figure out how to get the source maps working but i think its a webworker thing?

artemyarulin22:12:34

oh, I didnā€™t know about re-natal. Late for the party simple_smile

artemyarulin22:12:49

donā€™t know about source maps or debugger - didnā€™t have any need in any of this. Repl covers staff for me

artemyarulin22:12:43

checked re-natal - itā€™s using figwheel-react-native ha. Small world

johannjohann22:12:54

yeah its pretty nice

johannjohann22:12:12

i probably ran into more issues than i had to because i just copy and pasted some stuff i was working on too late in the night but

johannjohann22:12:19

debugging caught exceptions is pretty amazing, espcially with source maps

artemyarulin22:12:28

could be yeah, more checks better. Have you tried advanced optimization btw?

johannjohann22:12:06

in react native land?

johannjohann22:12:14

only to get the android demo going

johannjohann22:12:29

in general, yeah

artemyarulin22:12:32

yeah, for some reason everywhere I see :simple for production build

johannjohann22:12:27

might just be convention c&p'ed šŸ˜›

decker40522:12:52

Iā€™ve never been able to get builds to work with anything higher than :simple

artemyarulin22:12:53

could be yeah. Iā€™m just a bit uncomfortable to release my app with the source code. Advanced compilation makes me much more comfortable

artemyarulin22:12:46

oh, hm, thatā€™s weird. Could it be related to the absence of externs for the RN land?

johannjohann22:12:59

theres a demo i pulled

johannjohann22:12:09

lemme google i assumed it was advanced compilation i was doing

artemyarulin22:12:58

cool, then itā€™s possible

johannjohann22:12:13

lots of churn tho

johannjohann22:12:18

might be a react native version thing

johannjohann22:12:39

arte are you using om next in yr app

artemyarulin22:12:23

not yet - I have an existing app with native UI and part of business logic in CLJS already. Now Iā€™m learning om itself and tools around it

artemyarulin22:12:52

but hopefully yeah - soon Iā€™ll migrate couple of screens to om

mfikes22:12:44

Perhaps Nicholas Kariniemi's ClojureScript code ā€œsurvivesā€ :advanced because it refers to React Native JavaScript symbols using strings.

johannjohann22:12:11

ah yeah thats a crucial painpoint for advanced compilation (nods)

artemyarulin22:12:51

well, I guess proper externs would fix it?

mfikes22:12:43

FWIW, unchanged versions of Om worked against React Native when it came out. In other words, maybe React externs supplemented with a few more React Native externs would be sufficient.

artemyarulin22:12:55

oh yeah, you are right

mfikes22:12:36

The React externs theoretically cover Om's usage, and the supplemental ones really only need to cover what your application code uses, I'd guess.

artemyarulin22:12:12

Yep, Iā€™ll check

mfikes22:12:53

@artemyarulin: you do have an interesting point. I suppose anyone could download my Classroom Checkout app and at least steal the JavaScript source.

johannjohann22:12:14

thats pretty interesting

artemyarulin22:12:25

well, this is an issue if RN itself

mfikes22:12:42

And since I open sourced Goby, they could have it all :)

mfikes22:12:53

Classroom Checkout uses :advanced, which I agree is pretty effective as an obfuscator :)

artemyarulin22:12:19

oh yeah. Well, for some people CLJS looks like obfuscated already simple_smile

mfikes22:12:42

Check out what Planck doesā€”you can put your code in the binary.

artemyarulin22:12:10

I want to keep the main feature of RN - hot push without AppStore review

artemyarulin22:12:37

binary is not a choice unfortunately

mfikes22:12:47

Brave man :)

artemyarulin22:12:37

oh common - nothing scary there

mfikes22:12:41

(I'd be afraid I'd inadvertently break someone's app.)

mfikes22:12:03

But I suppose we do that all the time with web apps.

artemyarulin22:12:04

guys from the web doing it all the time and they donā€™t afraid simple_smile

artemyarulin22:12:35

well - OK, they afraid in any case simple_smile

mfikes22:12:01

App Review is a joke IMHO

artemyarulin22:12:05

ā€œIf you afraid of deployment - you donā€™t have enough testsā€(c) somebody simple_smile

mfikes22:12:23

In other words, it shouldn't take a week

artemyarulin22:12:29

yeah, this is a just pain

artemyarulin22:12:10

actually without hot deploy itā€™s worser - once I released version with a bug and then I had to wait 10 days (!) in order to release a new version with a fix

artemyarulin22:12:29

ok, it wasnā€™t actually ā€œonceā€ simple_smile

mfikes22:12:26

One thing that does scare me is the QTTT React Native thing I released broke with an iOS update. (But then again, that happens with half my apps anyway, native or hybrid).

johannjohann22:12:39

how did it break?

mfikes22:12:12

Here it is. It used to work. Now doesn't.

artemyarulin22:12:56

I know this bug and I send a PL to RN with a fix:)

mfikes22:12:57

Maybe change 9.1 to 8.4 on the URL

artemyarulin22:12:18

update RN and everything gonna be all right

mfikes22:12:15

Yep 8.4 works but 9.1 doesn't.

mfikes22:12:34

Cool. That was built a long time ago.

artemyarulin22:12:18

Yep. Rule #1 with RN - always keep it up to date

artemyarulin22:12:03

I helped mfikes, best day of my life! parrot

mfikes22:12:49

Wow. If you look at that preamble we get at the beginning the JavaScript generated by ClojureScript, it is to deal with an integer multiplication error in Safari I helped David track down. :)

johannjohann22:12:35

hah yeah i noticed that

mfikes22:12:38

Things don't feel fragile though. Just normal fairly rare errors. It's amazing all these JavaScript engines produce the same behavior for so much code.

mfikes22:12:05

We'll be stuck with that Safari integer multiplication fix for years. :)

artemyarulin22:12:29

Gotta go. Iā€™ll play with advanced optimisation tomorrow - hopefully Iā€™ll find a solution

mfikes23:12:12

Speaking of JavaScriptCore, you should at least compile with :static-fns true to avoid http://dev.clojure.org/jira/browse/CLJS-910

johannjohann23:12:47

awesome heads up simple_smile