This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-29
Channels
- # admin-announcements (48)
- # announcements (1)
- # beginners (80)
- # boot (150)
- # cljs-dev (12)
- # clojure (133)
- # clojure-dev (1)
- # clojure-italy (27)
- # clojure-japan (1)
- # clojure-russia (77)
- # clojurescript (236)
- # clojutre (3)
- # code-reviews (1)
- # core-async (14)
- # core-logic (4)
- # core-matrix (15)
- # cursive (5)
- # datomic (30)
- # editors (16)
- # events (1)
- # hoplon (1)
- # ldnclj (17)
- # off-topic (30)
- # om (2)
- # onyx (47)
- # reagent (8)
has anyone using hoplon6 for multipage websites? we are having issues when there are multiple index.html's defined. eg:
src/other/index.cljs.hl
(page "other/index.html" ...)
src/index.cljs.hl
(page "index.html" ...)
we get such an error:
GET
(anonymous function) @ index.html.js:2
index.html.js:1 GET
(anonymous function) @ index.html.js:1
index.html:2 ClojureScript could not load :main, did you forget to specify :asset-path?
It seems the other/
directory level is inserted twice.
We tried to move src/other/index.cljs.hl
to src/other.cljs.hl
and still have (page "other/index.html" ..)
in it, but the result is the same.@micha or @alandipert we have prepared an [example multipage repo](https://github.com/exicon/hoplon-multipage-example) which demonstrates our issue. it would be super helpful if you could help us straighten this problem, because we could migrate our open sourced homepage from boot1+hoplon5 to boot2+hoplon6 finally. it's quite critical because we want to lift over some of our closed sourced elements into it which was already migrated to hoplon6 and it's a blocking factor now.
@cfleming: Yes, the lein-generate thing is working fine for me. Direct support for boot in Cursive would be even better, but for now it works well enough.
because the alpha4 version has some changes that interfere with some external libraries (i noticed the problem with mathjax)
(not related to the problem you're reporting here, but i noticed you're using the alpha4 version)
@micha: i think this page in a subdirectory was an issue already before -alpha1 i remember we have experienced something similar even with hoplon5 but then it got fixed somehow. and yes, we would like to use certain direct DOM manipulating libs, eg: * http://filepicker.io/ * https://www.inspectlet.com/ (not sure though how much does it affect the DOM)
then there is the lastpass extension for example which caused some confusion for the http://filepicker.io plugin: http://stackoverflow.com/questions/17814146/filepicker-io-blocked-iframe-in-chrome
so we even disable the lastpass plugin sometime if something really incomprehensible is happening...
we have to decide at some point where we want to be with respect to the tradeoffs in the experimental stuff
it will make it more difficult to use external js that goes fishing around in the dom and manipulating things
but it also interacts poorly with external js that expects to be able to mutate the DOM arbitrarily
we are quite ready to reimplement some of the functionality offered by external libs, but it would be not practical to live totally without the ability to mix in jquery stuff, like this filepicker or the auth0 login dialog and similar more complex but self contained things
the tradeoff is basically not using external libs that look into the dom and remove elements
the standard way oto use it is to have text nodes in the DOM that contain strings like \( x^2 + y^2 \)
it traverses the dom looking for that pattern, then it splits up the text node and injects elements
and the mj
defelem would call a function in mathjax that takes a string argument and returns a dom tree
i would hope they would have implemented such a thing if only for use by the dom visitor
i was doing quite a lot of angularjs in the past, where i had to babysit the custom element definition and manage a template, a compile phase and a linking phase and provide funky, 1 letter flags to tell the widget whether u want transclusion or just inclusion
i doubt u r humanly capable of coming up with such complicated solutions, so im not really worried when u mention tradeoffs 😉
whether the dom elements of the widget were replacing the custom tag or just modifying the children of the custom tag. or something like that, i've erased it from my memory quite quickly after i've learnt about react
and now that we are using hoplon for more than 6months, i have even foggier recollections of it 😉
https://docs.angularjs.org/api/ng/directive/ngTransclude "Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion. Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted. This directive executes at priority level 0." enough said i think
basically this (div "inline math: \( x^2 + y^2 \)")
becomes (div "inline math: " (mathjax "x^2 + y^2"))
because i know the external lib interop story is pretty important for applications already in production
yeah and the pattern for wrapping external libs like mathjax needs to be fully worked out in detail
if it's really a substantial internal rewrite and you are not convinced it could pan out well and would want to discontinue it, then maybe a fork would be better
and if it seems like a better model than the current then it can be promoted to be hoplon-7.0.0
because the edge cases have been eliminated you can completely replace all the primitive dom elements with custom elements
he basically implemented a different box model that's more like a mobile or application model
i think u should say @juhoteperi otherwise it doesnt count as a mention
it would make sense though that at the beginning of the line it should turn into a mention automatically
btw, what u just said above really start to look like the rebol visual interface dialect 😉
@micha: Have you thought about proposing a talk?
@juhoteperi: do you think people might want to hear about hoplon, maybe?
@micha: Sure
@micha: How much have you looked into Reagent? I'm thinking comparison would be interesting because as I understand, reagent reactions are nearly identical to formula cells.
I've been testing on how to retrieve cljs output dependency graph using cljs api and I'm nearly there: https://gist.github.com/Deraen/19b62045e74e547025de
Probably I should still take foreign deps into account as they might change.
@juhoteperi: yeah a comparison with react would be the topic probably
@micha: That would certainly be interesting
Hmm, it's possible to use reactions without macros also. (make-reaction (fn [] (deref some-ratom)))
Nope, make-reactions executes the function and deref implementation registers the watchers
https://github.com/reagent-project/reagent/blob/master/src/reagent/ratom.cljs#L263-L276
Reaction in fact has separate implementation from RAtom
@micha: awesome!!!
I hope you both will be here at least for the previous day? There is probably going to be some kind of speakers/foreigners dinner and possibly sauna
Actually I’m going to Finland for a whole week vacationing with my girlfriend. Arriving in Helsinki on 9th
@juhoteperi: if you have any recommendations where to stay/what to do, please let me know! We were thinking of staying in some airbnb nearby a lake or something after ClojuTRE.
@martinklepsch: Airbns sounds like a good idea, though I'm not sure if you can find anything with a beach there but I guess nearly everything in Tampere is near a lake. If weather is good Näsinneula observation tower is good place to start, other than that I don't know much 😄
yeah, doesn’t have to be a beach by definition, just some cozy finnish landscapes
are there other sites to check besides airbnb maybe?
There's national park (or two) about 100km away, there should be some good landscapes there. I've been thinking visiting there myself.
@martinklepsch: i'll be there the same dates, i think
is there a #clojutre room yet? 😛
#C08BDAFEE