Fork me on GitHub
#hoplon
<
2017-04-06
>
jjttjj00:04:18

@chromalchemy you could update data directly. This might be a little hacky but maybe something like this?

(let [data (cell [1 2 3])]
    (for-tpl [[i x] (cell= (map-indexed vector data)]
      (elem :click #(swap! data update @i inc) @x)))

flyboarder01:04:50

^ fixing the README header

chromalchemy01:04:23

@jjttjj Thanks, ill try that out

chromalchemy02:04:13

@flyboarder, Meta looks neat!! A powerful stack, fascinating that its all cljs/js. How does feathers.js compare to your efforts with firebase? Why forgo Clojure on the server? How accessible will it be for someone with little js/interop experience?

flyboarder02:04:59

@chromalchemy So your first question regarding Firebase, I really like firebase! I will continue to use it for all my side projects which don’t require a server, it has some maturing to do tho. Second question; why remove clojure on the server? I’d rather not, I have a bias against Java. CLJS on Node solves two problems; 1. I still get clojure(script) on the server… win! 2. Node is the same platform as electron, so now I get 3 environments (browser, server, client) with a single language/codebase…. double win! This opens up a range of usage options. I am implementing a few within [meta]; 1. browser (client) - runs within browser 2. nodejs (server) - runs on nodejs for api+serving client 3. electron (agent) - runs on electron for local client+connecting to server 4. nodejs (worker) - runs on nodejs for handling requests from api server

flyboarder02:04:59

Third question, how accessible will it be? The goal is to eventually have the project boot it’s own visual ide for building applications. Similar to nightcode, but more along the lines of evelang.

thedavidmeister07:04:31

@flyboarder @alandipert +1 for good docs on how to not use .hl files

thedavidmeister07:04:09

and to make them opt-in rather than opt-out

thedavidmeister07:04:29

from what i've seen people saying, it's a reasonably common misunderstanding that .hl files are required and don't play nice with other systems, which is often seen as a deal breaker vs. something like om/reagent

Josh17:04:43

Hi #hoplon, I'm including material-design-lite.inc.js via cljsjs, and it works fine after I manually refresh the page, but if I save a .cljs file to cause boot-reload to reload the page, the material widgets stop working. I think it's only designed to be loaded once (at which point it binds to existing dom elements with matching classes), rather than live binding to future matching elements. What's the best way around this?

Josh17:04:16

figured out that I can call componentHandler.upgradeAllRegistered() on js-reload to fix this. Hooked up a js-reload callback following the example in https://github.com/onetom/hoplon-layouts/blob/master/build.boot#L49 and https://github.com/onetom/hoplon-layouts/blob/master/src/page/index.cljs#L12 but my callback isn't getting called. Any ideas?

Josh17:04:36

Is there some way I can get the (reload ...) task to log the function I pass for :on-jsload, or at least warn if it isn't found?

Josh17:04:28

ping @onetom (in case it's a quick fix and you have a sec, sorry to bother you!)