Fork me on GitHub
#cljsrn
<
2018-04-07
>
carocad19:04:21

@jeaye did I understood you correctly: you don't have out of memory errors anymore? Or are the two comments about different things ?

jeaye19:04:36

Different things.

jeaye19:04:12

metro=../node_modules/metro-bundler/src/JSTransformer/index.js
  sed -i 's/\(TRANSFORM_TIMEOUT_INTERVAL\) = .*;/\1 = 901000;/g' "$metro" || true

jeaye19:04:12

This is part of my production build script, which bumps metro's time out so it can actually get through the compiled JS. With that, I can reliably build. It just takes several minutes to transform.

carocad19:04:52

@jeaye thanks for the info. BTW, do you know if there is some kind of knowledge base for cljs react native?. I mean like those deep tips not general info like in http://cljsrn.org

jeaye19:04:53

Not that I know of @carocad. This channel is probably the best knowledge base for cljsrn.

jeaye19:04:10

For me, it's just been a grind to figure it all out the past year and a half.

mfikes19:04:51

I suspect if we had the ability to search this archive, lots of good answers are in it.

carocad19:04:36

@mfikes afaik that is what https://clojurians-log.clojureverse.org/cljsrn/2017-11-14.html is suppose to be for. However since only a piece of the conversation is shown I find it quite difficult to grasp more complicated topics 😕

mfikes19:04:47

Definitely. That log no longer works as far as I can tell. But if it did, it would be possible at times to mine some answers.

carocad20:04:49

oh really? I didnt know that the log doesnt work anymore 😕

carocad20:04:17

@mfikes would you be willing to let the cljsrn-org Wiki be the place to put those kinds of tips?

mfikes20:04:56

Yeah, people can just make PRs to the associated repo.

mfikes20:04:13

Oh, wait, you are referring to the Wiki...

carocad20:04:16

that is what I am trying to avoid 😄

mfikes20:04:33

Yeah, that Wiki isn't being used really. That might be a good place for stuff.

carocad20:04:37

I cannot get inside currently. Probably blocked in the repo settings 😕

mfikes20:04:24

Hrm. I just created the first page. Perhaps that is enough to allow anyone to edit it now?

mfikes20:04:30

Ahh, it had "Restrict editing to users in teams with push access only enabled". I just turned that off.

carocad20:04:41

I can get inside now and create and edit pages 🙂

carocad20:04:52

that should allow everybody to contribute

mfikes20:04:21

Yeah, when something is learned, we can drop some content in there summarizing the finding 🙂

mfikes20:04:08

I'll add a bit near the top of http://cljsrn.org pointing to that Wiki

carocad20:04:08

@jeaye if it is not too much to ask, would you be willing to put your cljs advance compilation script in the cljsrn-org Wiki? 🙂 https://github.com/cljsrn/cljsrn-org/wiki

carocad20:04:17

I just added some of the latest tips that I read over here. Hope that helps, but I cannot think of something right now that would be useful to many people besides that 😄. I guess we have to wait for the questions

mfikes21:04:53

Cool. I added some stuff to the Advanced Compilation page.

1
jeaye21:04:27

@carocad mmk, added page on the metro timeouts with the small patch I use.

👍 1
jeaye21:04:55

Worth adding re-natal-husk there, too, along with all of the other work which has gone into the problem by frustrated cljsrn devs.

mfikes21:04:00

Wow. It was 3 years ago that any of this stuff even worked for the first time 🙂 https://twitter.com/mfikes/status/573918846890938368?lang=en

mfikes21:04:48

It's cool to see that, even though stuff is still very rough around the corners, production-quality apps are being created.

jeaye21:04:36

@mfikes Yeah, it's crazy.

jeaye21:04:05

The tooling can be so ridiculously frustrating, at times, but it's a pretty great match: CLJS + RN.

jeaye21:04:52

In terms of performance and APK size, I'm quite pleased (as are users of our app) as well.

mfikes21:04:58

Yes. I recall watching what Facebook was doing, back when I was writing an app with Goby, really wanting a functional as opposed to imperative approach.

mfikes21:04:04

(At that time, it wasn't clear whether we would ever have something like React for native apps.)

jeaye21:04:59

How well do re-natal's source maps work? Are they only useful in the Chrome web tools, or also in the RSOD?

jeaye21:04:33

I feel like CLJSRN should have its own RSOD which is much more helpful than the default one.

mfikes21:04:52

Hmm. I wonder if we could hook in and revise it 🙂

jeaye21:04:46

There's a long-term solution to this metro problem, as well. It's just not easy.

jeaye22:04:38

We'd need to transform all of the sources before they get combined into one single mega JS file. Either before the CLJS compiler starts, or as a step in the CLJS compilation process.

jeaye22:04:15

metro's pretty fast at processing small files and it's built around that idea. It chokes for us because, as far as metro's concerned, we're misusing it.

mfikes22:04:17

Yeah, the RSOD with re-natal is of questionable value

mfikes22:04:37

Here is what I see if you do (ffirst 1) in a button callback

mfikes22:04:50

1 is not ISeqable
touchableHandlePress
_performSideEffectsForTransition
...

mfikes22:04:10

In other words not the stack you'd like, like:

cljs.user=> (ffirst 1)
1 is not ISeqable
	cljs.core/seq (cljs/core.cljs:1223:20)
	cljs.core/first (cljs/core.cljs:1232:15)
	cljs.core/ffirst (cljs/core.cljs:1744:11)

jeaye22:04:54

Yeah, exactly. It's not relevant to the CLJS at all.

jeaye22:04:33

It's gonna make error reporting in a production app quite tough.

jeaye22:04:35

Though, for re-frame users, perhaps the best approach there is to just track the entire session's events, serialize them to disk, and upload them with the the crash report.

jeaye22:04:07

That way the whole session can be examined. Still, nice (or even relevant) stack traces would really help.

mfikes22:04:14

If you are curious, this is how crude things were 3 years ago 🙂

mfikes22:04:50

(There was no Figwheel support back then, for example.)

jeaye22:04:13

@mfikes Where in the US is that accent from?

jeaye22:04:23

Sounds familiar.

mfikes22:04:41

Well, I grew up in the south-eastern US, but eliminated most of that accent, so perhaps east coast, in general, with a little southern mixed in?

jeaye22:04:06

Thanks for sharing; I like being able to place accents, so I'll keep this in mind. What's there is subtle, but memorable.

mfikes22:04:05

Interesting, if I had to guess, my accent is probably fairly close to what you'd see on American TV / news. But of course, it is difficult for me to actually percieve that.

jeaye22:04:34

I'm American as well, but from every corner of the US, so my accent is a good blend of all sorts of things which I've liked from places or have otherwise stuck.

jeaye22:04:09

When you say, for example, at the very end: "Thank ye for watchin'." I think the Southern bit is peeking out.

mfikes22:04:15

Ahh, for some reason I assumed you were British. Hah. TIL.

jeaye22:04:41

Yeah, text can make things confusing. Americans get to say things like "cheers" and really throw people off. Anyway, enough with the tangent; it's neat to see CLJSRN 3 years ago.