Fork me on GitHub
#hoplon
<
2015-09-25
>
Josh00:09:34

@onetom: Just saw your messages, super valuable to know about. Thanks for sharing! Sorry to hear Hoplon's so tricky to use for multipage apps, but really glad to hear this may not always be the case: > i wouldn't recommend it just yet until we have a better model to handle the multipage app case Do you know if that's actually a priority for the 6.0.0 release? I looked in the tracker for a corresponding issue and couldn't find one, but maybe I missed it. If it's not there, I'd be happy to make a ticket if that'd help?

onetom01:09:49

@jab: i don't think it's a priority, but since we are using it in production it might get better if i get frustrated enough with it simple_smile

Josh01:09:52

@onetom: however much it's worth that being able to prerender multipage sites was a main draw for me (some random guy looking for a better way to build web sites), it must be worth so much more that you're relying on this for your work

Josh01:09:25

@onetom: Would you want to open a ticket since you can better articulate the issue?

onetom02:09:29

@jab: the current workaround is acceptable for 10-20pages so we are focusing on our webapp instead. Regarding the early initialization of GA u have a good point; it might distort our visitor stats. We have indeed experienced a significant drop in visitor numbers since we deployed this solution, but some of it might just be because of this measurement inaccuracy.

onetom02:09:53

I might file an issue once I narrowed the scope. I the meantime I think your description is quite accurate.

onetom02:09:33

I the meantime here is something completely different : https://github.com/exicon/hoplon-chart-examples

onetom03:09:20

alandipert: have you checked your app without the when-dom? ours seems fine so far.

onetom03:09:57

as i see it got into the code base with this commit: https://github.com/hoplon/hoplon/commit/99a99b523f72abc2af544515d233391ce7cb917f but i couldn't notice anything in the commit which would explain why was this funkier way of waiting for the element to be present in the dom being introduced.

ul07:09:24

@alandipert, @micha: guys, please remind your pure-javascript lib similar to javelin

nha12:09:37

I am looking at splint right now. Would you mind explaining how splint-export differs from doing (def ^:export ...) ?

alandipert12:09:03

@nha: it has something to do with meeting the requirements of the javascript module formats, but i don't know more. it comes from mori, https://github.com/swannodette/mori/blob/master/src/mori/macros.clj#L19 on which splint is based

alandipert12:09:36

hm, ok i think it exports every arity of a cljs function

nha12:09:42

It looks like it has something to do with arity yes, but I am quite sure def ^:export works as well with different arities when called from javascript.

alandipert12:09:25

i am open to a PR if you're interested in simplifying it

alandipert12:09:39

the splint-export thing looks brittle and scary

alandipert12:09:40

an even cooler but more ambitious project idea would be a boot task that packages the mori export machinery and lets one export any cljs namespace as a passable js module simple_smile

nha12:09:02

Well I won't touch it before understanding it. But I kinda like the idea of a boot task that (selectively) exports a cljs namespace.

nha12:09:24

I'll keep it in the back of my mind simple_smile

nha12:09:49

That could even be useful to export cljs.core to javascript (!)

nha12:09:18

But I'll ask on #C03S1L9DN what it does first. Thanks !

alandipert13:09:50

my pleasure!

xifi13:09:11

everything works so nicely until you introduce mutation -_-

xifi13:09:48

@alandipert: wouldn't javelin be a nice FRP library for clojure as well?

alandipert13:09:08

i've found cells most useful for ui programming, but neither micha nor i have done that in clj, so we never used it for anything

xifi13:09:19

@alandipert: are you saying it takes 100 lines to define the whole thing?

alandipert13:09:02

the runtime component, yes. iirc it uses the same macro as the cljs one for cell=

alandipert13:09:12

javelin cljs runtime is also very short

alandipert13:09:36

oh wait, it does have its own cell=

alandipert13:09:50

yeah i think the cljs version has acquired optimizations over the years that we never backported

alandipert13:09:15

like i know the latest cljs cell= is very conservative about creating new cells

nha14:09:05

@alandipert: after asking about that macro on #C03S1L9DN, it appears it creates functions with different arities for performance reasons : https://github.com/swannodette/mori/wiki/Benchmarking

alandipert14:09:05

@nha: ah. we should remove it then

alandipert14:09:01

at least in splint, it's much more important for it to be stable and to keep working with cljs that to be "performant" in some contrived sense

alandipert14:09:15

@martinklepsch: that's cool, thanks for sharing simple_smile

nha14:09:33

@alandipert: Well it shouldn’t break anything, it is kind of “opt-in” since you have to specify the arity (`method.f1`, method.f2…). Your call of course.

alandipert14:09:25

a few bad experiences with cljs regressions brought on by premature optimization color my thinking

alandipert14:09:18

but i'm also loathe to change it because we use splint in our flagship UI which we're trying not to change much while we work on UI 2.0

alandipert14:09:52

so, i probably won't ever update the cljs version in splint anyway because it will never be used together with another cljs library... so i suppose we should probably just leave it simple_smile

alandipert14:09:59

thanks for looking into it though

nha14:09:26

Well thanks for helping me satisfy my curiosity simple_smile

alandipert15:09:24

my pleasure!

flyboarder16:09:48

@alandipert: i like the sound of "main" as it's historic but usually i find that may cause false assumptions, main suggests a single primary entry, i suggest we use something which suggests less of a hierarchy

flyboarder16:09:40

entry may be a bit more future proof as the landscape for multiple page apps in hoplon opens

mangr3n19:09:30

How do I access the cljs repl using boot on the hoplon demo projects?

flyboarder19:09:21

this will show you a repl url

flyboarder19:09:49

nREPL server started on port XXXXX on host 127.0.0.1 - <nrepl://127.0.0.1:XXXXX>

flyboarder19:09:22

i personally use lighttable to then connect to the nrepl server

flyboarder19:09:16

however i believe there are additional commands; cljs-repl start-repl

mangr3n20:09:06

thanks, I'll do some more hacking around

andrewboltachev21:09:10

Hi. Is there a way to require hoplon.core in index.hl.cljs? simple_smile

mynomoto21:09:55

@andrewboltachev: all functions from hoplon.core are available on hl.cljs files by :refer. Is that what you want?

onetom21:09:13

alandipert: nha: i find these kind of explanations very valuable when trying to understand others' code i've captured your conversation about splint-export here: https://github.com/adzerk-oss/splint.js/wiki/About-%60splint-export%60 just mentioning in case you want to anonymize it or something.

onetom21:09:03

@andrewboltachev: u mean index.cljs.hl?

onetom21:09:56

one major point of the boot-hoplon task is to make hoplon inclusion painless, because in clojurescript you can not do :refer :all (at least in the past you couldnt)

onetom21:09:37

so if you want to use hoplon but don't want to create a "page", then you can just create a regular namespace within a .cljs.hl file and hoplon will be required in

raywillig21:09:23

@mynomoto: hey was trying to figure out where the demos were so I could get territory builder up to date. It's really fubar lol. Might be a while

raywillig21:09:37

@mynomoto: anyway I did find it

mynomoto21:09:39

@raywillig: the territory builder should be almost working 😉

raywillig21:09:13

Well I got it to compile but it blows up with max call stack error

mynomoto21:09:13

The main problem is that it uses lots of things from the google-maps lib that I'm not familiar with.

mynomoto21:09:49

Wow. I will check later but it was compiling the last time I tried.

raywillig21:09:58

Yeah the google maps things need to be updated. I think I'm going to wait until hoplon 6 is release or at least rc

raywillig21:09:27

I've been keeping them up with the alphas in my own space but .....

mynomoto21:09:47

I did update the lib to get it working on alpha 10 and did a release, but not sure if it does everything it should.

onetom23:09:36

mynomoto: wait a sec, u were also saying index.hl.cljs instead of index.cljs.hl is this some new convention i missed?